From dc0c31f1904ddd500a9f0957e7b90bae2bc4ebc9 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 21 Aug 2020 12:06:59 +0200 Subject: [PATCH] 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