From b2b5f2a5bdc04d03561283f267bcb6021110a7a1 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 21 Aug 2020 10:26:44 +0200 Subject: [PATCH 1/9] new rel --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index da4dbcd..096eeab 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,7 +11,7 @@ pipeline { steps { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=351']) { + withEnv(['NEXT_BUILD_NUMBER=352']) { // env.versionNumber = VersionNumber(versionNumberString : '1.1.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '1.1.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '1.1.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') From 491b55248e4a1fdad19d8c13f0aa93aaddc7aeba Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 21 Aug 2020 10:27:00 +0200 Subject: [PATCH 2/9] reinseriti errori 500 + redirect dopo 10sec --- NKC_WF/Web.config | 5 ++- NKC_WF/WebUserControls/cmp_errorDetail.ascx | 17 ++++++++- .../WebUserControls/cmp_errorDetail.ascx.cs | 38 ++++++++++++++++++- .../cmp_errorDetail.ascx.designer.cs | 22 ++++++++++- 4 files changed, 75 insertions(+), 7 deletions(-) diff --git a/NKC_WF/Web.config b/NKC_WF/Web.config index 4776fdd..c5fe8fa 100644 --- a/NKC_WF/Web.config +++ b/NKC_WF/Web.config @@ -38,12 +38,13 @@ - + + - + diff --git a/NKC_WF/WebUserControls/cmp_errorDetail.ascx b/NKC_WF/WebUserControls/cmp_errorDetail.ascx index ac95e02..ce403b3 100644 --- a/NKC_WF/WebUserControls/cmp_errorDetail.ascx +++ b/NKC_WF/WebUserControls/cmp_errorDetail.ascx @@ -12,8 +12,21 @@
Error log recorded
- detailed info - (server access only). + + + <%--detailed info + (server access only).--%> + <%: traduci("RedirectingToHome") %> + + + +
+
+
+
+
+
+
<%: traduci("TryReset") %> diff --git a/NKC_WF/WebUserControls/cmp_errorDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_errorDetail.ascx.cs index f577515..2127b8b 100644 --- a/NKC_WF/WebUserControls/cmp_errorDetail.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_errorDetail.ascx.cs @@ -13,7 +13,6 @@ namespace NKC_WF.WebUserControls { protected void Page_Load(object sender, EventArgs e) { - } public string ErrorTitle @@ -77,6 +76,11 @@ namespace NKC_WF.WebUserControls } protected void lbtTryReset_Click(object sender, EventArgs e) + { + doRedirect(); + } + + private void doRedirect() { // svuoto session e cache per rileggere i dati da Db Session.RemoveAll(); @@ -97,5 +101,37 @@ namespace NKC_WF.WebUserControls memLayer.ML.setSessionVal("nextPage", "default"); Response.Redirect("~/default"); } + + protected int countDown + { + get + { + int answ = 0; + int.TryParse(lblCounter.Text, out answ); + return answ; + } + set + { + lblCounter.Text = value.ToString(); + } + } + + public string timeAdv + { + get + { + return $"width: {(countDown) * 100 / 10}%"; + } + } + + protected void timerRedirect_Tick(object sender, EventArgs e) + { + // decremento contatore + if (countDown <= 0) + { + doRedirect(); + } + countDown--; + } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_errorDetail.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_errorDetail.ascx.designer.cs index cfadaa2..18c23a5 100644 --- a/NKC_WF/WebUserControls/cmp_errorDetail.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_errorDetail.ascx.designer.cs @@ -33,13 +33,31 @@ namespace NKC_WF.WebUserControls protected global::System.Web.UI.WebControls.Label lblErrorExpl; /// - /// Controllo hlElmah. + /// Controllo upnlBCode. /// /// /// Campo generato automaticamente. /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// - protected global::System.Web.UI.WebControls.HyperLink hlElmah; + protected global::System.Web.UI.UpdatePanel upnlBCode; + + /// + /// Controllo lblCounter. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblCounter; + + /// + /// Controllo timerRedirect. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.Timer timerRedirect; /// /// Controllo lbtTryReset. From 680d1e85a8860bb83b2fa39d3493b22351ea32f4 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 21 Aug 2020 10:54:16 +0200 Subject: [PATCH 3/9] Inizio modifica x reset KIT --- NKC_WF/Web.config | 4 ++-- NKC_WF/WebUserControls/cmp_kitReqRunning.ascx | 5 ++++ .../WebUserControls/cmp_kitReqRunning.ascx.cs | 23 +++++++++++++++++++ NKC_WF/WebUserControls/cmp_kitReqSched.ascx | 2 +- NKC_WF/site/KitRequestSched.aspx | 2 -- NKC_WF/site/KitRequestSched.aspx.cs | 6 +++++ 6 files changed, 37 insertions(+), 5 deletions(-) diff --git a/NKC_WF/Web.config b/NKC_WF/Web.config index c5fe8fa..9e64220 100644 --- a/NKC_WF/Web.config +++ b/NKC_WF/Web.config @@ -38,8 +38,8 @@ - - + + diff --git a/NKC_WF/WebUserControls/cmp_kitReqRunning.ascx b/NKC_WF/WebUserControls/cmp_kitReqRunning.ascx index 0c6a8cd..adb6e7c 100644 --- a/NKC_WF/WebUserControls/cmp_kitReqRunning.ascx +++ b/NKC_WF/WebUserControls/cmp_kitReqRunning.ascx @@ -34,6 +34,11 @@ + + + aaa + + diff --git a/NKC_WF/WebUserControls/cmp_kitReqRunning.ascx.cs b/NKC_WF/WebUserControls/cmp_kitReqRunning.ascx.cs index cf2441a..3590ffc 100644 --- a/NKC_WF/WebUserControls/cmp_kitReqRunning.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_kitReqRunning.ascx.cs @@ -1,4 +1,5 @@ using System; +using System.Web.UI.WebControls; namespace NKC_WF.WebUserControls { @@ -42,5 +43,27 @@ namespace NKC_WF.WebUserControls grView.SelectedIndex = -1; doUpdate(); } + + + protected void lbtSuspendJob_Clickaaa(object sender, EventArgs e) + { + int PackListId = 0; + LinkButton lbtBtn = (LinkButton)sender; + if (lbtBtn != null) + { + int.TryParse(lbtBtn.CommandArgument, out PackListId); + // SOSPENDO il job selezionato e indico status approvato + DLMan.taPL.updateSchedPrior(PackListId, -10); + DLMan.taPL.updateStatus(PackListId, 2); + // fix grafico! + doUpdate(); + raiseEvent(); + } + } + + protected void lbtSuspendJob_Click(object sender, EventArgs e) + { + + } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_kitReqSched.ascx b/NKC_WF/WebUserControls/cmp_kitReqSched.ascx index 72c9b91..ea9d008 100644 --- a/NKC_WF/WebUserControls/cmp_kitReqSched.ascx +++ b/NKC_WF/WebUserControls/cmp_kitReqSched.ascx @@ -15,7 +15,7 @@ - + diff --git a/NKC_WF/site/KitRequestSched.aspx b/NKC_WF/site/KitRequestSched.aspx index 474e9e4..6ab1f5c 100644 --- a/NKC_WF/site/KitRequestSched.aspx +++ b/NKC_WF/site/KitRequestSched.aspx @@ -3,8 +3,6 @@ <%@ Register Src="~/WebUserControls/cmp_kitReqRunning.ascx" TagPrefix="uc1" TagName="cmp_kitReqRunning" %> <%@ Register Src="~/WebUserControls/cmp_kitReqSched.ascx" TagPrefix="uc1" TagName="cmp_kitReqSched" %> - -
diff --git a/NKC_WF/site/KitRequestSched.aspx.cs b/NKC_WF/site/KitRequestSched.aspx.cs index e7051e2..f1779b6 100644 --- a/NKC_WF/site/KitRequestSched.aspx.cs +++ b/NKC_WF/site/KitRequestSched.aspx.cs @@ -7,6 +7,12 @@ namespace NKC_WF.site protected void Page_Load(object sender, EventArgs e) { cmp_kitReqSched.eh_doRefresh += cmp_kitReqSched_eh_doRefresh; + cmp_kitReqRunning.eh_doRefresh += cmp_kitReqRunning_eh_doRefresh; + } + + private void cmp_kitReqRunning_eh_doRefresh(object sender, EventArgs e) + { + cmp_kitReqSched.doUpdate(); } private void cmp_kitReqSched_eh_doRefresh(object sender, EventArgs e) From dc0c31f1904ddd500a9f0957e7b90bae2bc4ebc9 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 21 Aug 2020 12:06:59 +0200 Subject: [PATCH 4/9] Ok il ciclo di sospensione KITTIN --- AppData/DS_App.Designer.cs | 144 ++++++++++++++++-- AppData/DS_App.xsd | 136 +++++++++++------ AppData/DS_App.xss | 8 +- NKC_WF/WebUserControls/cmp_kitReqRunning.ascx | 4 +- .../WebUserControls/cmp_kitReqRunning.ascx.cs | 15 +- .../WebUserControls/cmp_kittingSmart.ascx.cs | 2 + 6 files changed, 236 insertions(+), 73 deletions(-) diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index 57d931b..0f259d0 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -28609,7 +28609,7 @@ SELECT MatID, MatExtCode, MatDesc, ApprovDate, ApprovUser, L_mm, W_mm, T_mm, Mat [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[8]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[10]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT * FROM v_BinDetail"; @@ -28649,19 +28649,30 @@ SELECT MatID, MatExtCode, MatDesc, ApprovDate, ApprovUser, L_mm, W_mm, T_mm, Mat this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BinIndex", 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; - this._commandCollection[6].CommandText = "dbo.stp_BIN_updateKitting"; + this._commandCollection[6].CommandText = "dbo.stp_BIN_resetKitIncomplete"; this._commandCollection[6].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[6].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[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BinID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RecStart", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RecEnd", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[7] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[7].Connection = this.Connection; - this._commandCollection[7].CommandText = "dbo.stp_BIN_updatePainted"; + this._commandCollection[7].CommandText = "dbo.stp_BIN_setKitStart"; this._commandCollection[7].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[7].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[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BinID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PaintDate", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BinID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[8].Connection = this.Connection; + this._commandCollection[8].CommandText = "dbo.stp_BIN_updateKitting"; + this._commandCollection[8].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[8].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[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BinID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RecStart", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RecEnd", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[9] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[9].Connection = this.Connection; + this._commandCollection[9].CommandText = "dbo.stp_BIN_updatePainted"; + this._commandCollection[9].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[9].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[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BinID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PaintDate", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -28796,7 +28807,7 @@ SELECT MatID, MatExtCode, MatDesc, ApprovDate, ApprovUser, L_mm, W_mm, T_mm, Mat [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_App.BinsDataTable updateKitting(global::System.Nullable Original_BinID, global::System.Nullable RecStart, global::System.Nullable RecEnd) { - this.Adapter.SelectCommand = this.CommandCollection[6]; + this.Adapter.SelectCommand = this.CommandCollection[8]; if ((Original_BinID.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(Original_BinID.Value)); } @@ -28825,7 +28836,7 @@ SELECT MatID, MatExtCode, MatDesc, ApprovDate, ApprovUser, L_mm, W_mm, T_mm, Mat [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_App.BinsDataTable updatePainted(global::System.Nullable Original_BinID, global::System.Nullable PaintDate) { - this.Adapter.SelectCommand = this.CommandCollection[7]; + this.Adapter.SelectCommand = this.CommandCollection[9]; if ((Original_BinID.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(Original_BinID.Value)); } @@ -28842,6 +28853,56 @@ SELECT MatID, MatExtCode, MatDesc, ApprovDate, ApprovUser, L_mm, W_mm, T_mm, Mat 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")] + public virtual int resetKitIncomplete() { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6]; + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + 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")] + public virtual int setKitStart(global::System.Nullable BinID) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[7]; + if ((BinID.HasValue == true)) { + command.Parameters[1].Value = ((int)(BinID.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } } /// @@ -28985,7 +29046,7 @@ SELECT MatID, MatExtCode, MatDesc, ApprovDate, ApprovUser, L_mm, W_mm, T_mm, Mat [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[5]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[7]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_CartDetail"; @@ -29014,6 +29075,17 @@ SELECT MatID, MatExtCode, MatDesc, ApprovDate, ApprovUser, L_mm, W_mm, T_mm, Mat 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("@CartIndex", 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_CART_resetKitIncomplete"; + 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[6] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[6].Connection = this.Connection; + this._commandCollection[6].CommandText = "dbo.stp_CART_setKitStart"; + this._commandCollection[6].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[6].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[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CartID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -29107,6 +29179,56 @@ SELECT MatID, MatExtCode, MatDesc, ApprovDate, ApprovUser, L_mm, W_mm, T_mm, Mat 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")] + public virtual int resetKitIncomplete() { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5]; + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + 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")] + public virtual int setKitStart(global::System.Nullable CartID) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6]; + if ((CartID.HasValue == true)) { + command.Parameters[1].Value = ((int)(CartID.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } } /// diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index 1a91cdb..1f3d50d 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -1263,6 +1263,27 @@ SELECT MatID, MatExtCode, MatDesc, ApprovDate, ApprovUser, L_mm, W_mm, T_mm, Mat + + + + dbo.stp_BIN_resetKitIncomplete + + + + + + + + + + dbo.stp_BIN_setKitStart + + + + + + + @@ -1356,6 +1377,27 @@ FROM v_CartDetail + + + + dbo.stp_CART_resetKitIncomplete + + + + + + + + + + dbo.stp_CART_setKitStart + + + + + + + @@ -3011,7 +3053,7 @@ FROM v_OKIB - + @@ -3061,7 +3103,7 @@ FROM v_OKIB - + @@ -3086,7 +3128,7 @@ FROM v_OKIB - + @@ -3141,7 +3183,7 @@ FROM v_OKIB - + @@ -3214,7 +3256,7 @@ FROM v_OKIB - + @@ -3222,7 +3264,7 @@ FROM v_OKIB - + @@ -3291,7 +3333,7 @@ FROM v_OKIB - + @@ -3324,7 +3366,7 @@ FROM v_OKIB - + @@ -3365,7 +3407,7 @@ FROM v_OKIB - + @@ -3384,7 +3426,7 @@ FROM v_OKIB - + @@ -3415,7 +3457,7 @@ FROM v_OKIB - + @@ -3423,7 +3465,7 @@ FROM v_OKIB - + @@ -3440,7 +3482,7 @@ FROM v_OKIB - + @@ -3449,7 +3491,7 @@ FROM v_OKIB - + @@ -3480,7 +3522,7 @@ FROM v_OKIB - + @@ -3488,7 +3530,7 @@ FROM v_OKIB - + @@ -3504,7 +3546,7 @@ FROM v_OKIB - + @@ -3512,7 +3554,7 @@ FROM v_OKIB - + @@ -3540,7 +3582,7 @@ FROM v_OKIB - + @@ -3576,7 +3618,7 @@ FROM v_OKIB - + @@ -3592,7 +3634,7 @@ FROM v_OKIB - + @@ -3602,7 +3644,7 @@ FROM v_OKIB - + @@ -3619,7 +3661,7 @@ FROM v_OKIB - + @@ -3632,7 +3674,7 @@ FROM v_OKIB - + @@ -3681,7 +3723,7 @@ FROM v_OKIB - + @@ -3710,7 +3752,7 @@ FROM v_OKIB - + @@ -3752,7 +3794,7 @@ FROM v_OKIB - + @@ -3861,7 +3903,7 @@ FROM v_OKIB - + @@ -3924,7 +3966,7 @@ FROM v_OKIB - + @@ -3969,7 +4011,7 @@ FROM v_OKIB - + @@ -3995,7 +4037,7 @@ FROM v_OKIB - + @@ -4088,7 +4130,7 @@ FROM v_OKIB - + @@ -4151,7 +4193,7 @@ FROM v_OKIB - + @@ -4210,7 +4252,7 @@ FROM v_OKIB - + @@ -4259,7 +4301,7 @@ FROM v_OKIB - + @@ -4418,18 +4460,18 @@ FROM v_OKIB - - - - - - - - - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/AppData/DS_App.xss b/AppData/DS_App.xss index 17aca0e..3c7c980 100644 --- a/AppData/DS_App.xss +++ b/AppData/DS_App.xss @@ -4,7 +4,7 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + @@ -14,12 +14,12 @@ - - + + - + diff --git a/NKC_WF/WebUserControls/cmp_kitReqRunning.ascx b/NKC_WF/WebUserControls/cmp_kitReqRunning.ascx index adb6e7c..98861bf 100644 --- a/NKC_WF/WebUserControls/cmp_kitReqRunning.ascx +++ b/NKC_WF/WebUserControls/cmp_kitReqRunning.ascx @@ -1,8 +1,6 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_kitReqRunning.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_kitReqRunning" %> <%@ Register Src="~/WebUserControls/cmp_KR_cart.ascx" TagPrefix="uc1" TagName="cmp_KR_cart" %> - -

<%: traduci("RunningKitReq") %>

@@ -36,7 +34,7 @@ - aaa + diff --git a/NKC_WF/WebUserControls/cmp_kitReqRunning.ascx.cs b/NKC_WF/WebUserControls/cmp_kitReqRunning.ascx.cs index 3590ffc..4b98818 100644 --- a/NKC_WF/WebUserControls/cmp_kitReqRunning.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_kitReqRunning.ascx.cs @@ -44,8 +44,7 @@ namespace NKC_WF.WebUserControls doUpdate(); } - - protected void lbtSuspendJob_Clickaaa(object sender, EventArgs e) + protected void lbtSuspendJob_Click(object sender, EventArgs e) { int PackListId = 0; LinkButton lbtBtn = (LinkButton)sender; @@ -53,17 +52,17 @@ namespace NKC_WF.WebUserControls { int.TryParse(lbtBtn.CommandArgument, out PackListId); // SOSPENDO il job selezionato e indico status approvato - DLMan.taPL.updateSchedPrior(PackListId, -10); DLMan.taPL.updateStatus(PackListId, 2); + DLMan.taPL.updateSchedPrior(PackListId, 0); + DLMan.taPL.fixSched(); + // resetto CART e BIN che al KIT siano NON completati... + DLMan.taCR.resetKitIncomplete(); + DLMan.taBN.resetKitIncomplete(); // fix grafico! + grView.SelectedIndex = -1; doUpdate(); raiseEvent(); } } - - protected void lbtSuspendJob_Click(object sender, EventArgs e) - { - - } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.cs b/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.cs index 9ef0004..20dbfee 100644 --- a/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.cs @@ -309,6 +309,8 @@ namespace NKC_WF.WebUserControls var tabLog = DLMan.taPLog.getByCartId(codeInt); if (tabLog.Count > 0) { + // per scrupolo sistemo la data di kitting... + DLMan.taCR.setKitStart(codeInt); // verifico se sia completo --> reset... altrimenti lascio così... var tabCOK = DLMan.taCOK.GetData(); // cerco se sia "green" numWait + numReady + numOtherWait = 0 From 6e34fa2a1d08b677529965fe559de7bea31b6917 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 21 Aug 2020 12:31:34 +0200 Subject: [PATCH 5/9] Aggiunta ricerca x CART --- NKC_WF/WebUserControls/cmp_KS_Bin.ascx | 1 + NKC_WF/WebUserControls/cmp_KS_Bin.ascx.cs | 17 ++++++ .../cmp_KS_Bin.ascx.designer.cs | 17 ++++++ NKC_WF/site/GlobalSearch.aspx | 7 +++ NKC_WF/site/GlobalSearch.aspx.cs | 54 +++++++++++++++++-- NKC_WF/site/GlobalSearch.aspx.designer.cs | 27 ++++++++++ 6 files changed, 118 insertions(+), 5 deletions(-) create mode 100644 NKC_WF/WebUserControls/cmp_KS_Bin.ascx create mode 100644 NKC_WF/WebUserControls/cmp_KS_Bin.ascx.cs create mode 100644 NKC_WF/WebUserControls/cmp_KS_Bin.ascx.designer.cs diff --git a/NKC_WF/WebUserControls/cmp_KS_Bin.ascx b/NKC_WF/WebUserControls/cmp_KS_Bin.ascx new file mode 100644 index 0000000..e034237 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_KS_Bin.ascx @@ -0,0 +1 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_KS_Bin.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_KS_Bin" %> diff --git a/NKC_WF/WebUserControls/cmp_KS_Bin.ascx.cs b/NKC_WF/WebUserControls/cmp_KS_Bin.ascx.cs new file mode 100644 index 0000000..bbd5b5d --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_KS_Bin.ascx.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace NKC_WF.WebUserControls +{ + public partial class cmp_KS_Bin : System.Web.UI.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_KS_Bin.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_KS_Bin.ascx.designer.cs new file mode 100644 index 0000000..811bd4d --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_KS_Bin.ascx.designer.cs @@ -0,0 +1,17 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace NKC_WF.WebUserControls +{ + + + public partial class cmp_KS_Bin + { + } +} diff --git a/NKC_WF/site/GlobalSearch.aspx b/NKC_WF/site/GlobalSearch.aspx index a119378..468f7bc 100644 --- a/NKC_WF/site/GlobalSearch.aspx +++ b/NKC_WF/site/GlobalSearch.aspx @@ -2,6 +2,8 @@ <%@ Register Src="~/WebUserControls/cmp_barcode.ascx" TagPrefix="uc1" TagName="cmp_barcode" %> <%@ Register Src="~/WebUserControls/cmp_searchItems.ascx" TagPrefix="uc1" TagName="cmp_searchItems" %> +<%@ Register Src="~/WebUserControls/cmp_KS_Cart.ascx" TagPrefix="uc1" TagName="cmp_KS_Cart" %> + @@ -13,6 +15,11 @@ +
+

Missing PARTS for CART

+ +
+
diff --git a/NKC_WF/site/GlobalSearch.aspx.cs b/NKC_WF/site/GlobalSearch.aspx.cs index b294570..1026fc3 100644 --- a/NKC_WF/site/GlobalSearch.aspx.cs +++ b/NKC_WF/site/GlobalSearch.aspx.cs @@ -1,12 +1,43 @@ using AppData; using NKC_SDK; using System; +using System.Net.Http.Headers; using System.Web.UI; namespace NKC_WF.site { public partial class GlobalSearch : BasePage { + /// + /// ItemID selezionato + /// + protected int ItemID + { + get + { + int answ = 0; + int.TryParse(hfItemID.Value, out answ); + return answ; + } + set + { + hfItemID.Value = value.ToString(); + } + } + /// + /// CartID selezionato + /// + protected int CartID + { + get + { + return cmp_KS_Cart.CartID; + } + set + { + cmp_KS_Cart.CartID = value; + } + } /// /// Comando barcode letto /// @@ -45,7 +76,9 @@ namespace NKC_WF.site if (!Page.IsPostBack) { ((SiteContent)this.Master).showSearch = false; - cmp_searchItems.Visible = false; + ItemID = 0; + CartID = 0; + showResults(false); } cmp_barcode.eh_doRefresh += Cmp_barcode_eh_doRefresh; cmp_barcode.eh_doReset += Cmp_barcode_eh_doReset; @@ -82,15 +115,21 @@ namespace NKC_WF.site case codeType.Item: cmp_barcode.showOutput(cssClass.success, $"Valid IT Code: {decoData.rawData}"); cmp_searchItems.itemDtmx = decoData.rawData; + ItemID = decoData.codeInt; + CartID = 0; doShowResults = true; break; case codeType.ItemGeneric: cmp_barcode.showOutput(cssClass.success, $"Valid IG Code: {decoData.rawData}"); cmp_searchItems.itemDtmx = decoData.rawData; + ItemID = decoData.codeInt; + CartID = 0; doShowResults = true; break; case codeType.OtherItem: cmp_barcode.showOutput(cssClass.success, $"Valid Generic PART Code: {decoData.rawData}"); + ItemID = decoData.codeInt; + CartID = 0; doShowResults = false; break; case codeType.Material: @@ -110,8 +149,12 @@ namespace NKC_WF.site doShowResults = false; break; case codeType.Cart: - cmp_barcode.showOutput(cssClass.success, $"Cart - ignored: {decoData.description}"); - doShowResults = false; + cmp_barcode.showOutput(cssClass.success, $"Cart : {decoData.description}"); + ItemID = 0; + CartID = decoData.codeInt; + cmp_KS_Cart.CartDtmx = decoData.rawData; + cmp_KS_Cart.doUpdate(); + doShowResults = true; break; case codeType.Bin: cmp_barcode.showOutput(cssClass.success, $"Bin - ignored: {decoData.description}"); @@ -129,9 +172,10 @@ namespace NKC_WF.site /// Determina visualizzazione risultati ///
/// - protected void showResults(bool shoItems) + protected void showResults(bool showDetail) { - cmp_searchItems.Visible = shoItems; + cmp_searchItems.Visible = showDetail && ItemID > 0; + divCart.Visible = showDetail && CartID > 0; } } diff --git a/NKC_WF/site/GlobalSearch.aspx.designer.cs b/NKC_WF/site/GlobalSearch.aspx.designer.cs index 22eed16..fabeea5 100644 --- a/NKC_WF/site/GlobalSearch.aspx.designer.cs +++ b/NKC_WF/site/GlobalSearch.aspx.designer.cs @@ -49,5 +49,32 @@ namespace NKC_WF.site /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::NKC_WF.WebUserControls.cmp_searchItems cmp_searchItems; + + /// + /// Controllo divCart. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divCart; + + /// + /// Controllo cmp_KS_Cart. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::NKC_WF.WebUserControls.cmp_KS_Cart cmp_KS_Cart; + + /// + /// Controllo hfItemID. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfItemID; } } From 66e1ba8c0c2d3e6fe04476916839dbd285b24496 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 21 Aug 2020 12:55:55 +0200 Subject: [PATCH 6/9] FIX SearchPage x BIN --- NKC_WF/NKC_WF.csproj | 8 ++ NKC_WF/WebUserControls/cmp_KS_Bin.ascx | 12 +++ NKC_WF/WebUserControls/cmp_KS_Bin.ascx.cs | 79 ++++++++++++++++++- .../cmp_KS_Bin.ascx.designer.cs | 24 +++++- NKC_WF/WebUserControls/cmp_KS_Cart.ascx | 6 -- NKC_WF/site/GlobalSearch.aspx | 10 ++- NKC_WF/site/GlobalSearch.aspx.cs | 73 ++++++++++------- NKC_WF/site/GlobalSearch.aspx.designer.cs | 22 +++++- 8 files changed, 191 insertions(+), 43 deletions(-) diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index 9bb4a6a..7def23a 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -463,6 +463,7 @@ + @@ -1180,6 +1181,13 @@ cmp_KR_cart.ascx + + cmp_KS_Bin.ascx + ASPXCodeBehind + + + cmp_KS_Bin.ascx + cmp_KS_BinCart.ascx ASPXCodeBehind diff --git a/NKC_WF/WebUserControls/cmp_KS_Bin.ascx b/NKC_WF/WebUserControls/cmp_KS_Bin.ascx index e034237..c546cc6 100644 --- a/NKC_WF/WebUserControls/cmp_KS_Bin.ascx +++ b/NKC_WF/WebUserControls/cmp_KS_Bin.ascx @@ -1 +1,13 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_KS_Bin.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_KS_Bin" %> +<%@ Register Src="~/WebUserControls/cmp_KS_currBin.ascx" TagPrefix="uc1" TagName="cmp_KS_currBin" %> +<%@ Register Src="~/WebUserControls/cmp_KS_currCart.ascx" TagPrefix="uc1" TagName="cmp_KS_currCart" %> +<%@ Register Src="~/WebUserControls/cmp_KS_OkibBin.ascx" TagPrefix="uc1" TagName="cmp_KS_OkibBin" %> + +
+
+ +
+
+ +
+
\ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_KS_Bin.ascx.cs b/NKC_WF/WebUserControls/cmp_KS_Bin.ascx.cs index bbd5b5d..7843bd8 100644 --- a/NKC_WF/WebUserControls/cmp_KS_Bin.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_KS_Bin.ascx.cs @@ -1,4 +1,5 @@ -using System; +using SteamWare; +using System; using System.Collections.Generic; using System.Linq; using System.Web; @@ -7,11 +8,83 @@ using System.Web.UI.WebControls; namespace NKC_WF.WebUserControls { - public partial class cmp_KS_Bin : System.Web.UI.UserControl + public partial class cmp_KS_Bin : BaseUserControl { protected void Page_Load(object sender, EventArgs e) { - + if (!Page.IsPostBack) + { + fixVisibility(); + } } + + protected bool binOk + { + get + { + return BinID > 0; + } + } + + private void fixVisibility() + { + // controllo visualizazione in base ai dati presenti + cmp_KS_currBin.Visible = binOk; + cmp_KS_OkibBin.Visible = binOk; + } + + public void doUpdate() + { + fixVisibility(); + if (binOk) + { + cmp_KS_OkibBin.doUpdate(); + } + } + + /// + /// Bin selezionato + /// + public int BinID + { + get + { + return cmp_KS_currBin.CurrId; + } + set + { + cmp_KS_currBin.CurrId = value; + } + } + /// + /// Matrix Bin selezionato + /// + public string BinDtmx + { + get + { + return cmp_KS_currBin.Dtmx; + } + set + { + cmp_KS_currBin.Dtmx = value; + cmp_KS_OkibBin.Dtmx = value; + } + } + /// + /// Descrizione BIN selezionato (ord ext code) + /// + public string BinDesc + { + get + { + return cmp_KS_currBin.Description; + } + set + { + cmp_KS_currBin.Description = value; + } + } + } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_KS_Bin.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_KS_Bin.ascx.designer.cs index 811bd4d..d2b94ae 100644 --- a/NKC_WF/WebUserControls/cmp_KS_Bin.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_KS_Bin.ascx.designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ -// +// // Codice generato da uno strumento. // // Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se -// il codice viene rigenerato. -// +// il codice viene rigenerato. +// //------------------------------------------------------------------------------ namespace NKC_WF.WebUserControls @@ -13,5 +13,23 @@ namespace NKC_WF.WebUserControls public partial class cmp_KS_Bin { + + /// + /// Controllo cmp_KS_currBin. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::NKC_WF.WebUserControls.cmp_KS_currBin cmp_KS_currBin; + + /// + /// Controllo cmp_KS_OkibBin. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::NKC_WF.WebUserControls.cmp_KS_OkibBin cmp_KS_OkibBin; } } diff --git a/NKC_WF/WebUserControls/cmp_KS_Cart.ascx b/NKC_WF/WebUserControls/cmp_KS_Cart.ascx index e51b44d..8dff89a 100644 --- a/NKC_WF/WebUserControls/cmp_KS_Cart.ascx +++ b/NKC_WF/WebUserControls/cmp_KS_Cart.ascx @@ -3,12 +3,6 @@ <%@ Register Src="~/WebUserControls/cmp_KS_OkibCart.ascx" TagPrefix="uc1" TagName="cmp_KS_OkibCart" %> <%@ Register Src="~/WebUserControls/cmp_KS_OkoiCart.ascx" TagPrefix="uc1" TagName="cmp_KS_OkoiCart" %> - - - - - -
diff --git a/NKC_WF/site/GlobalSearch.aspx b/NKC_WF/site/GlobalSearch.aspx index 468f7bc..50a2d29 100644 --- a/NKC_WF/site/GlobalSearch.aspx +++ b/NKC_WF/site/GlobalSearch.aspx @@ -3,6 +3,8 @@ <%@ Register Src="~/WebUserControls/cmp_barcode.ascx" TagPrefix="uc1" TagName="cmp_barcode" %> <%@ Register Src="~/WebUserControls/cmp_searchItems.ascx" TagPrefix="uc1" TagName="cmp_searchItems" %> <%@ Register Src="~/WebUserControls/cmp_KS_Cart.ascx" TagPrefix="uc1" TagName="cmp_KS_Cart" %> +<%@ Register Src="~/WebUserControls/cmp_KS_Bin.ascx" TagPrefix="uc1" TagName="cmp_KS_Bin" %> + @@ -15,11 +17,15 @@ +
-

Missing PARTS for CART

+
<%: traduci("SearchDetCart") %>
- +
+
<%: traduci("SearchDetBin") %>
+ +
diff --git a/NKC_WF/site/GlobalSearch.aspx.cs b/NKC_WF/site/GlobalSearch.aspx.cs index 1026fc3..de16bf5 100644 --- a/NKC_WF/site/GlobalSearch.aspx.cs +++ b/NKC_WF/site/GlobalSearch.aspx.cs @@ -39,6 +39,20 @@ namespace NKC_WF.site } } /// + /// BinID selezionato + /// + protected int BinID + { + get + { + return cmp_KS_Bin.BinID; + } + set + { + cmp_KS_Bin.BinID = value; + } + } + /// /// Comando barcode letto /// protected string lastCmd @@ -108,58 +122,62 @@ namespace NKC_WF.site decodedData decoData = DLMan.decodeBcode(lastCmd); switch (decoData.codeType) { - case codeType.UNK: - cmp_barcode.showOutput(cssClass.danger, $"Unknown Data: {decoData.rawData} --> no action"); - doShowResults = false; - break; case codeType.Item: - cmp_barcode.showOutput(cssClass.success, $"Valid IT Code: {decoData.rawData}"); - cmp_searchItems.itemDtmx = decoData.rawData; - ItemID = decoData.codeInt; - CartID = 0; - doShowResults = true; - break; case codeType.ItemGeneric: - cmp_barcode.showOutput(cssClass.success, $"Valid IG Code: {decoData.rawData}"); - cmp_searchItems.itemDtmx = decoData.rawData; - ItemID = decoData.codeInt; - CartID = 0; - doShowResults = true; - break; case codeType.OtherItem: - cmp_barcode.showOutput(cssClass.success, $"Valid Generic PART Code: {decoData.rawData}"); - ItemID = decoData.codeInt; + cmp_barcode.showOutput(cssClass.success, $"{decoData.description}"); + cmp_searchItems.itemDtmx = decoData.rawData; + BinID = 0; CartID = 0; - doShowResults = false; + ItemID = decoData.codeInt; + doShowResults = true; break; case codeType.Material: - cmp_barcode.showOutput(cssClass.warning, $"Material - ignored: {decoData.description}"); + cmp_barcode.showOutput(cssClass.warning, $"{decoData.description}"); doShowResults = false; break; case codeType.Sheet: - cmp_barcode.showOutput(cssClass.warning, $"Sheet - ignored: {decoData.description}"); + cmp_barcode.showOutput(cssClass.warning, $"{decoData.description}"); doShowResults = false; break; case codeType.Stack: - cmp_barcode.showOutput(cssClass.warning, $"BUNK - ignored: {decoData.description}"); + cmp_barcode.showOutput(cssClass.warning, $"{decoData.description}"); doShowResults = false; break; case codeType.Batch: - cmp_barcode.showOutput(cssClass.warning, $"Batch - ignored: {decoData.description}"); + cmp_barcode.showOutput(cssClass.warning, $"{decoData.description}"); doShowResults = false; break; case codeType.Cart: - cmp_barcode.showOutput(cssClass.success, $"Cart : {decoData.description}"); - ItemID = 0; + cmp_barcode.showOutput(cssClass.success, $"{decoData.description}"); + BinID = 0; CartID = decoData.codeInt; + ItemID = 0; cmp_KS_Cart.CartDtmx = decoData.rawData; cmp_KS_Cart.doUpdate(); doShowResults = true; break; case codeType.Bin: - cmp_barcode.showOutput(cssClass.success, $"Bin - ignored: {decoData.description}"); - doShowResults = false; + case codeType.BinProcessed: + cmp_barcode.showOutput(cssClass.success, $"{decoData.description}"); + var tabBin = DLMan.taBN.getByKey(decoData.codeInt); + BinID = decoData.codeInt; + CartID = 0; + ItemID = 0; + cmp_KS_Bin.BinDtmx = decoData.rawData; + if (tabBin.Count > 0) + { + try + { + cmp_KS_Bin.BinDesc = tabBin[0].ItemExtCode; + } + catch + { } + } + cmp_KS_Bin.doUpdate(); + doShowResults = true; break; + case codeType.UNK: default: cmp_barcode.showOutput(cssClass.danger, $"Unknown Data: {decoData.rawData} --> no action"); doShowResults = false; @@ -176,6 +194,7 @@ namespace NKC_WF.site { cmp_searchItems.Visible = showDetail && ItemID > 0; divCart.Visible = showDetail && CartID > 0; + divBin.Visible = showDetail && BinID > 0; } } diff --git a/NKC_WF/site/GlobalSearch.aspx.designer.cs b/NKC_WF/site/GlobalSearch.aspx.designer.cs index fabeea5..1b5c1b3 100644 --- a/NKC_WF/site/GlobalSearch.aspx.designer.cs +++ b/NKC_WF/site/GlobalSearch.aspx.designer.cs @@ -50,6 +50,15 @@ namespace NKC_WF.site /// protected global::NKC_WF.WebUserControls.cmp_searchItems cmp_searchItems; + /// + /// Controllo hfItemID. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfItemID; + /// /// Controllo divCart. /// @@ -69,12 +78,21 @@ namespace NKC_WF.site protected global::NKC_WF.WebUserControls.cmp_KS_Cart cmp_KS_Cart; /// - /// Controllo hfItemID. + /// Controllo divBin. /// /// /// Campo generato automaticamente. /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// - protected global::System.Web.UI.WebControls.HiddenField hfItemID; + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divBin; + + /// + /// Controllo cmp_KS_Bin. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::NKC_WF.WebUserControls.cmp_KS_Bin cmp_KS_Bin; } } From 8ad663813b3f8e6c2e2f16aa946ee0b29404a5e6 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 21 Aug 2020 13:10:30 +0200 Subject: [PATCH 7/9] Aggiunta hlink x aprire missing in action da PList --- NKC_WF/WebUserControls/cmp_kitReqRunning.ascx | 14 +++++++++++--- NKC_WF/WebUserControls/cmp_kitReqSched.ascx | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/NKC_WF/WebUserControls/cmp_kitReqRunning.ascx b/NKC_WF/WebUserControls/cmp_kitReqRunning.ascx index 98861bf..4f04dfb 100644 --- a/NKC_WF/WebUserControls/cmp_kitReqRunning.ascx +++ b/NKC_WF/WebUserControls/cmp_kitReqRunning.ascx @@ -11,19 +11,27 @@ <%# traduci("NoKitReqRunning") %> + + +
+ + +
+
+
-
+
-
+
- + <%----%> diff --git a/NKC_WF/WebUserControls/cmp_kitReqSched.ascx b/NKC_WF/WebUserControls/cmp_kitReqSched.ascx index ea9d008..227d39f 100644 --- a/NKC_WF/WebUserControls/cmp_kitReqSched.ascx +++ b/NKC_WF/WebUserControls/cmp_kitReqSched.ascx @@ -15,6 +15,7 @@ + From b98587045a117984610d946faaafb9acb623aa0d Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 21 Aug 2020 15:02:49 +0200 Subject: [PATCH 8/9] Aggiunto invio a scrap da MissInAct! e funziona --- AppData/DS_App.Designer.cs | 74 +++++++++++- AppData/DS_App.xsd | 16 ++- AppData/DS_App.xss | 34 +++--- NKC_WF/NKC_WF.csproj | 8 ++ .../WebUserControls/cmp_partMIA_byPLID.ascx | 87 ++++++++++++++ .../cmp_partMIA_byPLID.ascx.cs | 107 ++++++++++++++++++ .../cmp_partMIA_byPLID.ascx.designer.cs | 44 +++++++ NKC_WF/site/PartMIA.aspx | 38 ++++--- NKC_WF/site/PartMIA.aspx.cs | 59 +++++++--- NKC_WF/site/PartMIA.aspx.designer.cs | 18 +++ 10 files changed, 432 insertions(+), 53 deletions(-) create mode 100644 NKC_WF/WebUserControls/cmp_partMIA_byPLID.ascx create mode 100644 NKC_WF/WebUserControls/cmp_partMIA_byPLID.ascx.cs create mode 100644 NKC_WF/WebUserControls/cmp_partMIA_byPLID.ascx.designer.cs diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index 0f259d0..d66fa10 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -11384,6 +11384,8 @@ namespace AppData { private global::System.Data.DataColumn columnBinDtmx; + private global::System.Data.DataColumn columnBinIndex; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ItemSearchDetailDataTable() { @@ -11617,6 +11619,14 @@ namespace AppData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn BinIndexColumn { + get { + return this.columnBinIndex; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -11679,7 +11689,8 @@ namespace AppData { string CartDtmx, int CartIndex, int BinID, - string BinDtmx) { + string BinDtmx, + int BinIndex) { ItemSearchDetailRow rowItemSearchDetailRow = ((ItemSearchDetailRow)(this.NewRow())); object[] columnValuesArray = new object[] { ItemID, @@ -11706,7 +11717,8 @@ namespace AppData { CartDtmx, CartIndex, BinID, - BinDtmx}; + BinDtmx, + BinIndex}; rowItemSearchDetailRow.ItemArray = columnValuesArray; this.Rows.Add(rowItemSearchDetailRow); return rowItemSearchDetailRow; @@ -11761,6 +11773,7 @@ namespace AppData { this.columnCartIndex = base.Columns["CartIndex"]; this.columnBinID = base.Columns["BinID"]; this.columnBinDtmx = base.Columns["BinDtmx"]; + this.columnBinIndex = base.Columns["BinIndex"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -11816,6 +11829,8 @@ namespace AppData { base.Columns.Add(this.columnBinID); this.columnBinDtmx = new global::System.Data.DataColumn("BinDtmx", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnBinDtmx); + this.columnBinIndex = new global::System.Data.DataColumn("BinIndex", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnBinIndex); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnItemID}, true)); this.columnItemID.AllowDBNull = false; @@ -11850,6 +11865,7 @@ namespace AppData { this.columnBinID.ReadOnly = true; this.columnBinDtmx.ReadOnly = true; this.columnBinDtmx.MaxLength = 10; + this.columnBinIndex.ReadOnly = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -20470,6 +20486,22 @@ namespace AppData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int BinIndex { + get { + try { + return ((int)(this[this.tableItemSearchDetail.BinIndexColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'BinIndex\' nella tabella \'ItemSearchDetail\' è DBNull.", e); + } + } + set { + this[this.tableItemSearchDetail.BinIndexColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsKitIDNull() { @@ -20601,6 +20633,18 @@ namespace AppData { public void SetBinDtmxNull() { this[this.tableItemSearchDetail.BinDtmxColumn] = global::System.Convert.DBNull; } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsBinIndexNull() { + return this.IsNull(this.tableItemSearchDetail.BinIndexColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetBinIndexNull() { + this[this.tableItemSearchDetail.BinIndexColumn] = global::System.Convert.DBNull; + } } /// @@ -34384,6 +34428,7 @@ SELECT RemnantID, BatchID, MatID, SheetID, DimX, DimY, Available FROM Remnants W tableMapping.ColumnMappings.Add("CartIndex", "CartIndex"); tableMapping.ColumnMappings.Add("BinID", "BinID"); tableMapping.ColumnMappings.Add("BinDtmx", "BinDtmx"); + tableMapping.ColumnMappings.Add("BinIndex", "BinIndex"); this._adapter.TableMappings.Add(tableMapping); } @@ -34397,13 +34442,19 @@ SELECT RemnantID, BatchID, MatID, SheetID, DimX, DimY, Available FROM Remnants W [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "dbo.stp_ISD_searchDtmx"; this._commandCollection[0].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[0].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[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ItemDtmx", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[1].Connection = this.Connection; + this._commandCollection[1].CommandText = "dbo.stp_ISD_getMissingByPLID"; + this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[1].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[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PackListID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -34441,6 +34492,23 @@ SELECT RemnantID, BatchID, MatID, SheetID, DimX, DimY, Available FROM Remnants W 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_App.ItemSearchDetailDataTable getMissingByPLID(global::System.Nullable PackListID) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((PackListID.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(PackListID.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + DS_App.ItemSearchDetailDataTable dataTable = new DS_App.ItemSearchDetailDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } } /// diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index 1f3d50d..3bd5387 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -2592,8 +2592,21 @@ SELECT RemnantID, BatchID, MatID, SheetID, DimX, DimY, Available FROM Remnants W + - + + + + + dbo.stp_ISD_getMissingByPLID + + + + + + + + @@ -3900,6 +3913,7 @@ FROM v_OKIB + diff --git a/AppData/DS_App.xss b/AppData/DS_App.xss index 3c7c980..3221c78 100644 --- a/AppData/DS_App.xss +++ b/AppData/DS_App.xss @@ -4,10 +4,10 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - - + + @@ -15,32 +15,32 @@ - + - + - + - + - + - - - - - - - - - + + + + + + + + + diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index 7def23a..dab1292 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -500,6 +500,7 @@ + @@ -1447,6 +1448,13 @@ cmp_partMIA.ascx + + cmp_partMIA_byPLID.ascx + ASPXCodeBehind + + + cmp_partMIA_byPLID.ascx + cmp_scrapList.ascx ASPXCodeBehind diff --git a/NKC_WF/WebUserControls/cmp_partMIA_byPLID.ascx b/NKC_WF/WebUserControls/cmp_partMIA_byPLID.ascx new file mode 100644 index 0000000..858a0d2 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_partMIA_byPLID.ascx @@ -0,0 +1,87 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_partMIA_byPLID.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_partMIA_byPLID" %> + + + + + <%----%> + + + +
+ +
+
+
+ + +
+ +
+ +
+
+ + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ + +
+ +
+ +
+
+ + +
+ +
+
+
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+
+ + + + + +
+ + <%: traduci("NoRecord") %> + +
+ + + + + + diff --git a/NKC_WF/WebUserControls/cmp_partMIA_byPLID.ascx.cs b/NKC_WF/WebUserControls/cmp_partMIA_byPLID.ascx.cs new file mode 100644 index 0000000..3b62dc5 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_partMIA_byPLID.ascx.cs @@ -0,0 +1,107 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace NKC_WF.WebUserControls +{ + public partial class cmp_partMIA_byPLID : BaseUserControl + { + /// + /// Postazione attuale (per ora cablata) + /// + protected string PlaceId + { + get + { + return "WRK001"; + } + } + protected void Page_Load(object sender, EventArgs e) + { + + } + /// + /// PLID corrente... + /// + public int PLID + { + set + { + hfPLID.Value = value.ToString(); + doUpdate(); + } + get + { + int answ = 0; + int.TryParse(hfPLID.Value, out answ); + return answ; + } + } +#if false + /// + /// Calcola css da statusID + /// + /// + /// + public string cssByStatus(object _statusID) + { + string answ = "text-secondary"; + int statusID = 0; + int.TryParse(_statusID.ToString(), out statusID); + switch (statusID) + { + case 1: + answ = "text-dark"; + break; + case 2: + answ = "text-warning"; + break; + case 3: + answ = "text-success"; + break; + case 4: + answ = "text-info"; + break; + default: + answ = "text-danger"; + break; + } + return answ; + } +#endif + + public void doUpdate() + { + grView.DataBind(); + } + + public bool checkVisible(object _statusID) + { + bool answ = false; + int StatusID = 0; + int.TryParse(_statusID.ToString(), out StatusID); + answ = StatusID < 900; + return answ; + } + + protected void grView_SelectedIndexChanged(object sender, EventArgs e) + { + + int ItemId = 0; + int.TryParse(grView.SelectedValue.ToString(), out ItemId); + if (ItemId > 0) + { + + // resetto item selezionato... + DLMan.taIL.updateStatus(ItemId, 990, PlaceId); + lgInfo($"cmp_partMIA_byPLID | SCRAP | Status --> 990 | itemIdSelected: {ItemId} | PlaceId: {PlaceId}"); + grView.SelectedIndex = -1; + grView.DataBind(); + raiseEvent(); + } + } + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_partMIA_byPLID.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_partMIA_byPLID.ascx.designer.cs new file mode 100644 index 0000000..b9121b7 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_partMIA_byPLID.ascx.designer.cs @@ -0,0 +1,44 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace NKC_WF.WebUserControls +{ + + + public partial class cmp_partMIA_byPLID + { + + /// + /// Controllo grView. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.GridView grView; + + /// + /// Controllo ods. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource ods; + + /// + /// Controllo hfPLID. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfPLID; + } +} diff --git a/NKC_WF/site/PartMIA.aspx b/NKC_WF/site/PartMIA.aspx index d22b2f5..0f1bf6d 100644 --- a/NKC_WF/site/PartMIA.aspx +++ b/NKC_WF/site/PartMIA.aspx @@ -1,24 +1,30 @@ -<%@ Page Title="" Language="C#" MasterPageFile="~/SiteContent.master" AutoEventWireup="true" CodeBehind="PartMIA.aspx.cs" Inherits="NKC_WF.site.PartMIA" %> +<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="PartMIA.aspx.cs" Inherits="NKC_WF.site.PartMIA" %> <%@ Register Src="~/WebUserControls/cmp_partMIA.ascx" TagPrefix="uc1" TagName="cmp_partMIA" %> +<%@ Register Src="~/WebUserControls/cmp_partMIA_byPLID.ascx" TagPrefix="uc1" TagName="cmp_partMIA_byPLID" %> + - - - -
-
-

<%: traduci("PartMIA") %> (<%: hfBatchID.Value %>)

- -
-
-
-
- +
+ + + +
+
+

<%: traduci("PartMIA") %> +

+ +
+
+
+
+ + +
-
- - + + +
diff --git a/NKC_WF/site/PartMIA.aspx.cs b/NKC_WF/site/PartMIA.aspx.cs index 96db537..11abdb1 100644 --- a/NKC_WF/site/PartMIA.aspx.cs +++ b/NKC_WF/site/PartMIA.aspx.cs @@ -1,4 +1,5 @@ using AppData; +using SteamWare; using System; using System.Collections.Generic; using System.Linq; @@ -10,6 +11,20 @@ namespace NKC_WF.site { public partial class PartMIA : BasePage { + protected int PLID + { + get + { + int answ = 0; + try + { + answ = memLayer.ML.QSI("PLID"); + } + catch + { } + return answ; + } + } /// /// Codice macchina (HARD CODED x ora) /// @@ -19,7 +34,7 @@ namespace NKC_WF.site if (!Page.IsPostBack) { - ((SiteContent)this.Master).showSearch = false; + ((SiteMaster)this.Master).showSearch = false; doUpdate(); } } @@ -33,6 +48,8 @@ namespace NKC_WF.site { hfBatchID.Value = value.ToString(); cmp_partMIA.BatchId = BatchId; + lblBatchId.Text = $"({value})"; + lblBatchId.Visible = value > 0; } get { @@ -54,26 +71,36 @@ namespace NKC_WF.site ///
private void doUpdate() { - bool needUpdate = false; - // recupero bunk corrente... - DS_App.StackListRow currBunk = ComLib.getCurrBunk(); - if (currBunk != null) + if (PLID > 0) { - bool chgBtLocal = BatchId != currBunk.BatchID; - bool chgBtCache = savedBatchId != currBunk.BatchID; - if (chgBtLocal || chgBtCache) - { - BatchId = currBunk.BatchID; - needUpdate = true; - } + cmp_partMIA.Visible = false; + cmp_partMIA_byPLID.Visible = true; + cmp_partMIA_byPLID.PLID = PLID; + cmp_partMIA_byPLID.doUpdate(); } else { - BatchId = 0; - ComLib.setCurrBunkId(machine, 0); - ComLib.man.resetSheetUnload(0); + cmp_partMIA.Visible = true; + cmp_partMIA_byPLID.Visible = false; + // recupero bunk corrente... + DS_App.StackListRow currBunk = ComLib.getCurrBunk(); + if (currBunk != null) + { + bool chgBtLocal = BatchId != currBunk.BatchID; + bool chgBtCache = savedBatchId != currBunk.BatchID; + if (chgBtLocal || chgBtCache) + { + BatchId = currBunk.BatchID; + } + } + else + { + BatchId = 0; + //ComLib.setCurrBunkId(machine, 0); + //ComLib.man.resetSheetUnload(0); + } + cmp_partMIA.doUpdate(); } - cmp_partMIA.doUpdate(); } /// /// Main timer diff --git a/NKC_WF/site/PartMIA.aspx.designer.cs b/NKC_WF/site/PartMIA.aspx.designer.cs index 1de7d4e..6c51e97 100644 --- a/NKC_WF/site/PartMIA.aspx.designer.cs +++ b/NKC_WF/site/PartMIA.aspx.designer.cs @@ -32,6 +32,15 @@ namespace NKC_WF.site /// protected global::System.Web.UI.Timer timerMain; + /// + /// Controllo lblBatchId. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblBatchId; + /// /// Controllo hfBatchID. /// @@ -58,5 +67,14 @@ namespace NKC_WF.site /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::NKC_WF.WebUserControls.cmp_partMIA cmp_partMIA; + + /// + /// Controllo cmp_partMIA_byPLID. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::NKC_WF.WebUserControls.cmp_partMIA_byPLID cmp_partMIA_byPLID; } } From ea1d258ce594a81b7f344d65c4874364be24630e Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 21 Aug 2020 15:09:16 +0200 Subject: [PATCH 9/9] Fix paginazione num righe x part missing x KITTING PLID --- NKC_WF/WebUserControls/cmp_partMIA.ascx.cs | 11 +++++++++++ NKC_WF/WebUserControls/cmp_partMIA_byPLID.ascx.cs | 11 +++++++++++ NKC_WF/site/PartMIA.aspx | 10 ++++++++++ NKC_WF/site/PartMIA.aspx.cs | 8 ++++++++ NKC_WF/site/PartMIA.aspx.designer.cs | 9 +++++++++ 5 files changed, 49 insertions(+) diff --git a/NKC_WF/WebUserControls/cmp_partMIA.ascx.cs b/NKC_WF/WebUserControls/cmp_partMIA.ascx.cs index f3f051b..03b30f7 100644 --- a/NKC_WF/WebUserControls/cmp_partMIA.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_partMIA.ascx.cs @@ -65,5 +65,16 @@ namespace NKC_WF.WebUserControls { grView.DataBind(); } + public int numRow + { + get + { + return grView.PageSize; + } + set + { + grView.PageSize = value; + } + } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_partMIA_byPLID.ascx.cs b/NKC_WF/WebUserControls/cmp_partMIA_byPLID.ascx.cs index 3b62dc5..d3fb064 100644 --- a/NKC_WF/WebUserControls/cmp_partMIA_byPLID.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_partMIA_byPLID.ascx.cs @@ -103,5 +103,16 @@ namespace NKC_WF.WebUserControls raiseEvent(); } } + public int numRow + { + get + { + return grView.PageSize; + } + set + { + grView.PageSize = value; + } + } } } \ No newline at end of file diff --git a/NKC_WF/site/PartMIA.aspx b/NKC_WF/site/PartMIA.aspx index 0f1bf6d..d7a384c 100644 --- a/NKC_WF/site/PartMIA.aspx +++ b/NKC_WF/site/PartMIA.aspx @@ -2,6 +2,8 @@ <%@ Register Src="~/WebUserControls/cmp_partMIA.ascx" TagPrefix="uc1" TagName="cmp_partMIA" %> <%@ Register Src="~/WebUserControls/cmp_partMIA_byPLID.ascx" TagPrefix="uc1" TagName="cmp_partMIA_byPLID" %> +<%@ Register Src="~/WebUserControls/cmp_numRow.ascx" TagPrefix="uc1" TagName="cmp_numRow" %> + @@ -23,6 +25,14 @@
+ +
diff --git a/NKC_WF/site/PartMIA.aspx.cs b/NKC_WF/site/PartMIA.aspx.cs index 11abdb1..6a4f32a 100644 --- a/NKC_WF/site/PartMIA.aspx.cs +++ b/NKC_WF/site/PartMIA.aspx.cs @@ -1,4 +1,5 @@ using AppData; +using NKC_WF.WebUserControls; using SteamWare; using System; using System.Collections.Generic; @@ -37,6 +38,13 @@ namespace NKC_WF.site ((SiteMaster)this.Master).showSearch = false; doUpdate(); } + cmp_numRow.eh_doRefresh += cmp_numRow_eh_doRefresh; + } + + private void cmp_numRow_eh_doRefresh(object sender, EventArgs e) + { + cmp_partMIA.numRow = cmp_numRow.numRow; + cmp_partMIA_byPLID.numRow = cmp_numRow.numRow; } /// diff --git a/NKC_WF/site/PartMIA.aspx.designer.cs b/NKC_WF/site/PartMIA.aspx.designer.cs index 6c51e97..2773b70 100644 --- a/NKC_WF/site/PartMIA.aspx.designer.cs +++ b/NKC_WF/site/PartMIA.aspx.designer.cs @@ -76,5 +76,14 @@ namespace NKC_WF.site /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::NKC_WF.WebUserControls.cmp_partMIA_byPLID cmp_partMIA_byPLID; + + /// + /// Controllo cmp_numRow. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::NKC_WF.WebUserControls.cmp_numRow cmp_numRow; } }