From 39f6b536c19450d2a43279b6704625e486f5fd5c Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 5 Jan 2021 15:00:20 +0100 Subject: [PATCH 1/2] completata gestione editing COPY/PASTE x Scheda Tecn ADM --- Jenkinsfile | 2 +- MP-ADM/WebUserControls/cmp_ST_preview.ascx | 2 +- MP-ADM/WebUserControls/cmp_ST_preview.ascx.cs | 21 +++++++++++++++---- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3a9da4fe..65cfd5da 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,7 +13,7 @@ pipeline { steps { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=1358']) { + withEnv(['NEXT_BUILD_NUMBER=1359']) { // env.versionNumber = VersionNumber(versionNumberString : '6.12.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '6.12.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'MAPO' diff --git a/MP-ADM/WebUserControls/cmp_ST_preview.ascx b/MP-ADM/WebUserControls/cmp_ST_preview.ascx index 9d1b29a6..ea283621 100644 --- a/MP-ADM/WebUserControls/cmp_ST_preview.ascx +++ b/MP-ADM/WebUserControls/cmp_ST_preview.ascx @@ -8,7 +8,7 @@

Scheda Tecnica Articolo

- + PASTE
diff --git a/MP-ADM/WebUserControls/cmp_ST_preview.ascx.cs b/MP-ADM/WebUserControls/cmp_ST_preview.ascx.cs index aa283e50..15c84f6c 100644 --- a/MP-ADM/WebUserControls/cmp_ST_preview.ascx.cs +++ b/MP-ADM/WebUserControls/cmp_ST_preview.ascx.cs @@ -46,6 +46,7 @@ namespace MP_ADM.WebUserControls { hfIdxST.Value = $"{value}"; repGroup.DataBind(); + checkClipboard(); } } @@ -55,8 +56,14 @@ namespace MP_ADM.WebUserControls private void checkClipboard() { + // Tabella ST selezionata + var tabCurrSTAR = DataLayerObj.taSTAR.getByST(IdxST); bool showPaste = false; - // verifico ci sia qualcosa + bool checkSource = false; + bool checkDest = false; + // verifico condizioni COPY + lbtCopy.Visible = (tabCurrSTAR.Rows.Count > 0); + // verifico condizioni PASTE if (!string.IsNullOrEmpty(clipboard)) { // verifico sia tipo clipboard valida @@ -65,13 +72,19 @@ namespace MP_ADM.WebUserControls //verifico sia intero valido if (clipbIdxST > 0) { - // verifico SIA una ST esistente... - var tabSTA = DataLayerObj.taSTA.getByKey(clipbIdxST); - showPaste = (tabSTA.Rows.Count > 0); + // verifico le condizioni: si parte da una una ST esistente... + var tabSrcSTA = DataLayerObj.taSTA.getByKey(clipbIdxST); + checkSource = tabSrcSTA.Rows.Count > 0; + checkDest = tabCurrSTAR.Rows.Count == 0; + // verifica status visibilità x PASTE + showPaste = checkSource && checkDest; } } } + // verifica x stile copy + lbtCopy.CssClass = checkSource ? "btn btn-block btn-light" : "btn btn-block btn-outline-light"; lbtPaste.Visible = showPaste; + lbtPaste.DataBind(); } #endregion Private Methods From 23216fa368ce3a52ee41c3a7506d857b89f4aace Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 5 Jan 2021 15:08:46 +0100 Subject: [PATCH 2/2] fix sel schedatec x TAB --- MapoDb/DS_SheetTech.Designer.cs | 105 +++++++++++--------------------- MapoDb/DS_SheetTech.xsd | 30 ++++----- MapoDb/DS_SheetTech.xss | 8 +-- 3 files changed, 56 insertions(+), 87 deletions(-) diff --git a/MapoDb/DS_SheetTech.Designer.cs b/MapoDb/DS_SheetTech.Designer.cs index 0d70876e..d7fc1145 100644 --- a/MapoDb/DS_SheetTech.Designer.cs +++ b/MapoDb/DS_SheetTech.Designer.cs @@ -4685,25 +4685,25 @@ SELECT IdxST, Label, Oggetto, Num, CodGruppo, CodTipo, Value, CheckType, Require this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Oggetto", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[3].Connection = this.Connection; - this._commandCollection[3].CommandText = "dbo.stp_ST_AR_getGrpOdlLabel"; + this._commandCollection[3].CommandText = "dbo.stp_ST_AR_getByGrpIdxST"; this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxST", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodGruppo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Label", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxODL", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[4].Connection = this.Connection; - this._commandCollection[4].CommandText = "dbo.stp_ST_AR_getByGrpIdxST"; + this._commandCollection[4].CommandText = "dbo.stp_ST_AR_getByGrpOdl"; this._commandCollection[4].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxST", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodGruppo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxODL", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[5].Connection = this.Connection; - this._commandCollection[5].CommandText = "dbo.stp_ST_AR_getByGrpArtOdl"; + this._commandCollection[5].CommandText = "dbo.stp_ST_AR_getGrpOdlLabel"; this._commandCollection[5].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodGruppo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Label", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxODL", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[6].Connection = this.Connection; @@ -4759,72 +4759,12 @@ SELECT IdxST, Label, Oggetto, Num, CodGruppo, CodTipo, Value, CheckType, Require return dataTable; } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)] - public virtual int FillBy(DS_SheetTech.ST_ActualRowDataTable dataTable, string CodGruppo, string Label, global::System.Nullable IdxODL) { - this.Adapter.SelectCommand = this.CommandCollection[3]; - if ((CodGruppo == null)) { - this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; - } - else { - this.Adapter.SelectCommand.Parameters[1].Value = ((string)(CodGruppo)); - } - if ((Label == null)) { - this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; - } - else { - this.Adapter.SelectCommand.Parameters[2].Value = ((string)(Label)); - } - if ((IdxODL.HasValue == true)) { - this.Adapter.SelectCommand.Parameters[3].Value = ((int)(IdxODL.Value)); - } - else { - this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value; - } - if ((this.ClearBeforeFill == true)) { - dataTable.Clear(); - } - int returnValue = this.Adapter.Fill(dataTable); - return returnValue; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_SheetTech.ST_ActualRowDataTable getByGrpOdlLbl(string CodGruppo, string Label, global::System.Nullable IdxODL) { - this.Adapter.SelectCommand = this.CommandCollection[3]; - if ((CodGruppo == null)) { - this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; - } - else { - this.Adapter.SelectCommand.Parameters[1].Value = ((string)(CodGruppo)); - } - if ((Label == null)) { - this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; - } - else { - this.Adapter.SelectCommand.Parameters[2].Value = ((string)(Label)); - } - if ((IdxODL.HasValue == true)) { - this.Adapter.SelectCommand.Parameters[3].Value = ((int)(IdxODL.Value)); - } - else { - this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value; - } - DS_SheetTech.ST_ActualRowDataTable dataTable = new DS_SheetTech.ST_ActualRowDataTable(); - this.Adapter.Fill(dataTable); - return dataTable; - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_SheetTech.ST_ActualRowDataTable getByGrpIdxST(global::System.Nullable IdxST, string CodGruppo) { - this.Adapter.SelectCommand = this.CommandCollection[4]; + this.Adapter.SelectCommand = this.CommandCollection[3]; if ((IdxST.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(IdxST.Value)); } @@ -4847,7 +4787,7 @@ SELECT IdxST, Label, Oggetto, Num, CodGruppo, CodTipo, Value, CheckType, Require [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_SheetTech.ST_ActualRowDataTable getByGrpOdl(string CodGruppo, global::System.Nullable IdxODL) { - this.Adapter.SelectCommand = this.CommandCollection[5]; + this.Adapter.SelectCommand = this.CommandCollection[4]; if ((CodGruppo == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -4865,6 +4805,35 @@ SELECT IdxST, Label, Oggetto, Num, CodGruppo, CodTipo, Value, CheckType, Require return dataTable; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_SheetTech.ST_ActualRowDataTable getByGrpOdlLbl(string CodGruppo, string Label, global::System.Nullable IdxODL) { + this.Adapter.SelectCommand = this.CommandCollection[5]; + if ((CodGruppo == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(CodGruppo)); + } + if ((Label == null)) { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = ((string)(Label)); + } + if ((IdxODL.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[3].Value = ((int)(IdxODL.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value; + } + DS_SheetTech.ST_ActualRowDataTable dataTable = new DS_SheetTech.ST_ActualRowDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] diff --git a/MapoDb/DS_SheetTech.xsd b/MapoDb/DS_SheetTech.xsd index de85f97e..476c3cef 100644 --- a/MapoDb/DS_SheetTech.xsd +++ b/MapoDb/DS_SheetTech.xsd @@ -212,19 +212,6 @@ SELECT IdxST, Label, Oggetto, Num, CodGruppo, CodTipo, Value, CheckType, Require - - - - dbo.stp_ST_AR_getGrpOdlLabel - - - - - - - - - @@ -237,10 +224,10 @@ SELECT IdxST, Label, Oggetto, Num, CodGruppo, CodTipo, Value, CheckType, Require - + - dbo.stp_ST_AR_getByGrpArtOdl + dbo.stp_ST_AR_getByGrpOdl @@ -249,6 +236,19 @@ SELECT IdxST, Label, Oggetto, Num, CodGruppo, CodTipo, Value, CheckType, Require + + + + dbo.stp_ST_AR_getGrpOdlLabel + + + + + + + + + diff --git a/MapoDb/DS_SheetTech.xss b/MapoDb/DS_SheetTech.xss index e02d8c0e..b14c8e8b 100644 --- a/MapoDb/DS_SheetTech.xss +++ b/MapoDb/DS_SheetTech.xss @@ -4,10 +4,10 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - - + + @@ -19,7 +19,7 @@ 454 - 760 + 741 454