From 7927ac4ef9c855f07dbe322926973c30ccf41546 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 25 Aug 2020 18:00:41 +0200 Subject: [PATCH] COmpletate modifiche x invalidazione dati su CART/ITEM --- AppData/DS_App.Designer.cs | 164 ++++++-- AppData/DS_App.xsd | 135 +++--- AppData/DS_App.xss | 8 +- NKC_WF/NKC_WF.csproj | 8 + .../WebUserControls/cmp_kittingSmartAdv.ascx | 17 +- .../cmp_kittingSmartAdv.ascx.cs | 80 ++-- .../cmp_kittingSmartAdv.ascx.designer.cs | 13 +- .../cmp_kittingSmartAdvInvalid.ascx | 63 +++ .../cmp_kittingSmartAdvInvalid.ascx.cs | 383 ++++++++++++++++++ ...mp_kittingSmartAdvInvalid.ascx.designer.cs | 170 ++++++++ 10 files changed, 908 insertions(+), 133 deletions(-) create mode 100644 NKC_WF/WebUserControls/cmp_kittingSmartAdvInvalid.ascx create mode 100644 NKC_WF/WebUserControls/cmp_kittingSmartAdvInvalid.ascx.cs create mode 100644 NKC_WF/WebUserControls/cmp_kittingSmartAdvInvalid.ascx.designer.cs diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index cc4887e..67f209c 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -27765,7 +27765,7 @@ SELECT ItemID, StatusID, KitID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, ItemQ [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[17]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[19]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT *\r\n FROM dbo.ItemList"; @@ -27839,45 +27839,60 @@ SELECT ItemID, StatusID, KitID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, ItemQ this._commandCollection[11].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[12] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[12].Connection = this.Connection; - this._commandCollection[12].CommandText = "dbo.stp_IL_updateCadPath"; + this._commandCollection[12].CommandText = "dbo.stp_IL_invalidateByCart"; this._commandCollection[12].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[12].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[12].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BasePath", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[12].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[12].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ForceAll", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[12].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, "", "", "")); + this._commandCollection[12].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[13] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[13].Connection = this.Connection; - this._commandCollection[13].CommandText = "dbo.stp_IL_updateFromNesting"; + this._commandCollection[13].CommandText = "dbo.stp_IL_invalidateByPartCart"; this._commandCollection[13].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[13].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[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ItemID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MatID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PostProcList", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProcessesReq", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PdfFilePath", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[13].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, "", "", "")); + this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ItemExtCode", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[14] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[14].Connection = this.Connection; - this._commandCollection[14].CommandText = "dbo.stp_IL_updateSheetStatus"; + this._commandCollection[14].CommandText = "dbo.stp_IL_updateCadPath"; this._commandCollection[14].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[14].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[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SheetID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StatusID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BasePath", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ForceAll", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[15] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[15].Connection = this.Connection; - this._commandCollection[15].CommandText = "dbo.stp_IL_updateSheetStatusPU"; + this._commandCollection[15].CommandText = "dbo.stp_IL_updateFromNesting"; this._commandCollection[15].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[15].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[15].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SheetID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[15].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[15].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ItemID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[15].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MatID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[15].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PostProcList", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[15].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProcessesReq", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[15].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PdfFilePath", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[16] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[16].Connection = this.Connection; - this._commandCollection[16].CommandText = "dbo.stp_IL_updateStatus"; + this._commandCollection[16].CommandText = "dbo.stp_IL_updateSheetStatus"; this._commandCollection[16].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[16].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[16].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ItemID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[16].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SheetID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[16].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StatusID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[16].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[17] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[17].Connection = this.Connection; + this._commandCollection[17].CommandText = "dbo.stp_IL_updateSheetStatusPU"; + this._commandCollection[17].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[17].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[17].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SheetID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[17].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[18] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[18].Connection = this.Connection; + this._commandCollection[18].CommandText = "dbo.stp_IL_updateStatus"; + this._commandCollection[18].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[18].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[18].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ItemID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[18].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StatusID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[18].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -28530,8 +28545,82 @@ SELECT ItemID, StatusID, KitID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, ItemQ [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 updateCadPath(string BasePath, global::System.Nullable BatchID, global::System.Nullable ForceAll) { + public virtual int invalidateByCart(global::System.Nullable CartID, string PlaceCod) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[12]; + if ((CartID.HasValue == true)) { + command.Parameters[1].Value = ((int)(CartID.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + if ((PlaceCod == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(PlaceCod)); + } + 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 invalidateByPartCart(global::System.Nullable CartID, string ItemExtCode, string PlaceCod) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[13]; + if ((CartID.HasValue == true)) { + command.Parameters[1].Value = ((int)(CartID.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + if ((ItemExtCode == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(ItemExtCode)); + } + if ((PlaceCod == null)) { + command.Parameters[3].Value = global::System.DBNull.Value; + } + else { + command.Parameters[3].Value = ((string)(PlaceCod)); + } + 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 updateCadPath(string BasePath, global::System.Nullable BatchID, global::System.Nullable ForceAll) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[14]; if ((BasePath == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } @@ -28571,7 +28660,7 @@ SELECT ItemID, StatusID, KitID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, ItemQ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int updateFromNesting(global::System.Nullable ItemID, global::System.Nullable MatID, string PostProcList, string ProcessesReq, string PdfFilePath) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[13]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[15]; if ((ItemID.HasValue == true)) { command.Parameters[1].Value = ((int)(ItemID.Value)); } @@ -28623,7 +28712,7 @@ SELECT ItemID, StatusID, KitID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, ItemQ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int updateSheetStatus(global::System.Nullable SheetID, global::System.Nullable StatusID, string PlaceCod) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[14]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[16]; if ((SheetID.HasValue == true)) { command.Parameters[1].Value = ((int)(SheetID.Value)); } @@ -28663,7 +28752,7 @@ SELECT ItemID, StatusID, KitID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, ItemQ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int updateSheetStatusPU(global::System.Nullable SheetID, string PlaceCod) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[15]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[17]; if ((SheetID.HasValue == true)) { command.Parameters[1].Value = ((int)(SheetID.Value)); } @@ -28697,7 +28786,7 @@ SELECT ItemID, StatusID, KitID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, ItemQ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int updateStatus(global::System.Nullable ItemID, global::System.Nullable StatusID, string PlaceCod) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[16]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[18]; if ((ItemID.HasValue == true)) { command.Parameters[1].Value = ((int)(ItemID.Value)); } @@ -34372,7 +34461,7 @@ 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 = "SELECT OrdID, CartID, CartIndex, CartDtmx, CreationDate, KittingStart, KittingEnd" + @@ -34380,6 +34469,12 @@ SELECT RemnantID, BatchID, MatID, SheetID, DimX, DimY, Available FROM Remnants W " OtherQtyCur, OtherQtyWait, OrderExtCode, DestPlant, ModelCode, KitQty FROM v_Ca" + "rtKitDetail"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[1].Connection = this.Connection; + this._commandCollection[1].CommandText = "dbo.stp_CKD_getByKey"; + 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("@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()] @@ -34405,6 +34500,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.CartOnKitDataTable getByKey(global::System.Nullable CartID) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((CartID.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(CartID.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + DS_App.CartOnKitDataTable dataTable = new DS_App.CartOnKitDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } } /// diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index 8a49789..a686cb5 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -1024,6 +1024,31 @@ SELECT ItemID, StatusID, KitID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, ItemQ + + + + dbo.stp_IL_invalidateByCart + + + + + + + + + + + + dbo.stp_IL_invalidateByPartCart + + + + + + + + + @@ -2415,7 +2440,19 @@ SELECT RemnantID, BatchID, MatID, SheetID, DimX, DimY, Available FROM Remnants W - + + + + + dbo.stp_CKD_getByKey + + + + + + + + @@ -3108,7 +3145,7 @@ FROM v_Pack2Cart - + @@ -3158,7 +3195,7 @@ FROM v_Pack2Cart - + @@ -3183,7 +3220,7 @@ FROM v_Pack2Cart - + @@ -3238,7 +3275,7 @@ FROM v_Pack2Cart - + @@ -3311,7 +3348,7 @@ FROM v_Pack2Cart - + @@ -3319,7 +3356,7 @@ FROM v_Pack2Cart - + @@ -3388,7 +3425,7 @@ FROM v_Pack2Cart - + @@ -3421,7 +3458,7 @@ FROM v_Pack2Cart - + @@ -3462,7 +3499,7 @@ FROM v_Pack2Cart - + @@ -3481,7 +3518,7 @@ FROM v_Pack2Cart - + @@ -3512,7 +3549,7 @@ FROM v_Pack2Cart - + @@ -3520,7 +3557,7 @@ FROM v_Pack2Cart - + @@ -3537,7 +3574,7 @@ FROM v_Pack2Cart - + @@ -3546,7 +3583,7 @@ FROM v_Pack2Cart - + @@ -3577,7 +3614,7 @@ FROM v_Pack2Cart - + @@ -3585,7 +3622,7 @@ FROM v_Pack2Cart - + @@ -3601,7 +3638,7 @@ FROM v_Pack2Cart - + @@ -3609,7 +3646,7 @@ FROM v_Pack2Cart - + @@ -3637,7 +3674,7 @@ FROM v_Pack2Cart - + @@ -3673,7 +3710,7 @@ FROM v_Pack2Cart - + @@ -3689,7 +3726,7 @@ FROM v_Pack2Cart - + @@ -3699,7 +3736,7 @@ FROM v_Pack2Cart - + @@ -3716,7 +3753,7 @@ FROM v_Pack2Cart - + @@ -3729,7 +3766,7 @@ FROM v_Pack2Cart - + @@ -3778,7 +3815,7 @@ FROM v_Pack2Cart - + @@ -3807,7 +3844,7 @@ FROM v_Pack2Cart - + @@ -3849,7 +3886,7 @@ FROM v_Pack2Cart - + @@ -3959,7 +3996,7 @@ FROM v_Pack2Cart - + @@ -4022,7 +4059,7 @@ FROM v_Pack2Cart - + @@ -4067,7 +4104,7 @@ FROM v_Pack2Cart - + @@ -4093,7 +4130,7 @@ FROM v_Pack2Cart - + @@ -4186,7 +4223,7 @@ FROM v_Pack2Cart - + @@ -4249,7 +4286,7 @@ FROM v_Pack2Cart - + @@ -4308,7 +4345,7 @@ FROM v_Pack2Cart - + @@ -4357,7 +4394,7 @@ FROM v_Pack2Cart - + @@ -4389,7 +4426,7 @@ FROM v_Pack2Cart - + @@ -4581,18 +4618,18 @@ FROM v_Pack2Cart - - - - - - - - - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/AppData/DS_App.xss b/AppData/DS_App.xss index fa6bf35..d52a90c 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. --> - + @@ -13,7 +13,7 @@ - + @@ -29,7 +29,7 @@ - + @@ -41,7 +41,7 @@ - + diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index a1d3860..800e103 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -467,6 +467,7 @@ + @@ -1215,6 +1216,13 @@ cmp_kittingSmartAdvBcode.ascx + + cmp_kittingSmartAdvInvalid.ascx + ASPXCodeBehind + + + cmp_kittingSmartAdvInvalid.ascx + cmp_KR_cart.ascx ASPXCodeBehind diff --git a/NKC_WF/WebUserControls/cmp_kittingSmartAdv.ascx b/NKC_WF/WebUserControls/cmp_kittingSmartAdv.ascx index b2b36be..b733daf 100644 --- a/NKC_WF/WebUserControls/cmp_kittingSmartAdv.ascx +++ b/NKC_WF/WebUserControls/cmp_kittingSmartAdv.ascx @@ -2,9 +2,7 @@ <%@ Register Src="~/WebUserControls/cmp_kitReqRunning.ascx" TagPrefix="uc1" TagName="cmp_kitReqRunning" %> <%@ Register Src="~/WebUserControls/cmp_kitReqSched.ascx" TagPrefix="uc1" TagName="cmp_kitReqSched" %> <%@ Register Src="~/WebUserControls/cmp_partMIA_byPLID.ascx" TagPrefix="uc1" TagName="cmp_partMIA_byPLID" %> - - - +<%@ Register Src="~/WebUserControls/cmp_kittingSmartAdvInvalid.ascx" TagPrefix="uc1" TagName="cmp_kittingSmartAdvInvalid" %>
@@ -15,6 +13,16 @@
+ +
+
+ <%: traduci("Reset") %> +
+
+ +
+
+
<%: traduci("KitSuspend") %> @@ -72,8 +80,7 @@
-
-
+
diff --git a/NKC_WF/WebUserControls/cmp_kittingSmartAdv.ascx.cs b/NKC_WF/WebUserControls/cmp_kittingSmartAdv.ascx.cs index 17eccfa..55744f4 100644 --- a/NKC_WF/WebUserControls/cmp_kittingSmartAdv.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_kittingSmartAdv.ascx.cs @@ -79,6 +79,19 @@ namespace NKC_WF.WebUserControls } cmp_kitReqRunning.eh_doRefresh += cmp_kitReqRunning_eh_doRefresh; cmp_kitReqSched.eh_doRefresh += cmp_kitReqSched_eh_doRefresh; + cmp_kittingSmartAdvInvalid.eh_doRefresh += cmp_kittingSmartAdvInvalid_eh_doRefresh; + cmp_kittingSmartAdvInvalid.eh_doReset += cmp_kittingSmartAdvInvalid_eh_doReset; + } + + private void cmp_kittingSmartAdvInvalid_eh_doReset(object sender, EventArgs e) + { + ActiveMode = KitAdvMode.NA; + cmp_kittingSmartAdvInvalid.resetShowData(); + updateCurrData(); + } + + private void cmp_kittingSmartAdvInvalid_eh_doRefresh(object sender, EventArgs e) + { } private void cmp_kitReqSched_eh_doRefresh(object sender, EventArgs e) @@ -102,7 +115,7 @@ namespace NKC_WF.WebUserControls divAct02.Visible = false; divAct03.Visible = false; divAct04.Visible = false; - divAct05.Visible = false; + lbtReset.Visible = false; lbtKitSusp.Visible = false; lbtKitReorder.Visible = false; lbtKitReloadPart.Visible = false; @@ -111,27 +124,29 @@ namespace NKC_WF.WebUserControls switch (ActiveMode) { case KitAdvMode.PauseKit: - lbtKitSusp.Visible = enablePause; + lbtReset.Visible = true; divAct01.Visible = enablePause; break; case KitAdvMode.PartsReorder: - lbtKitReorder.Visible = enableReorder; + lbtReset.Visible = true; divAct02.Visible = enableReorder; // fixme... sistemare PLID cmp_partMIA_byPLID.PLID = 40; cmp_partMIA_byPLID.doUpdate(); break; case KitAdvMode.PartsReload: - lbtKitReloadPart.Visible = enableReload; + lbtReset.Visible = true; divAct03.Visible = enableReload; break; case KitAdvMode.PartInvalidate: - lbtKitInvalidatePart.Visible = enableInvalidPart; + lbtReset.Visible = true; + cmp_kittingSmartAdvInvalid.currMode = invalidMode.Part; divAct04.Visible = enableInvalidPart; break; case KitAdvMode.CartInvalidate: - lbtKitInvalidateCart.Visible = enableInvalidCart; - divAct05.Visible = enableInvalidCart; + lbtReset.Visible = true; + cmp_kittingSmartAdvInvalid.currMode = invalidMode.Cart; + divAct04.Visible = enableInvalidCart; break; case KitAdvMode.NA: default: @@ -146,70 +161,41 @@ namespace NKC_WF.WebUserControls protected void lbtKitSusp_Click(object sender, EventArgs e) { - if(ActiveMode== KitAdvMode.NA) - { - ActiveMode = KitAdvMode.PauseKit; - } - else - { - ActiveMode = KitAdvMode.NA; - } + ActiveMode = KitAdvMode.PauseKit; updateCurrData(); } protected void lbtKitReorder_Click(object sender, EventArgs e) { - if (ActiveMode == KitAdvMode.NA) - { - ActiveMode = KitAdvMode.PartsReorder; - } - else - { - ActiveMode = KitAdvMode.NA; - } + ActiveMode = KitAdvMode.PartsReorder; updateCurrData(); } protected void lbtKitReloadPart_Click(object sender, EventArgs e) { - if (ActiveMode == KitAdvMode.NA) - { - ActiveMode = KitAdvMode.PartsReload; - } - else - { - ActiveMode = KitAdvMode.NA; - } + ActiveMode = KitAdvMode.PartsReload; updateCurrData(); } protected void lbtKitInvalidatePart_Click(object sender, EventArgs e) { - if (ActiveMode == KitAdvMode.NA) - { - ActiveMode = KitAdvMode.PartInvalidate; - } - else - { - ActiveMode = KitAdvMode.NA; - } + ActiveMode = KitAdvMode.PartInvalidate; updateCurrData(); } protected void lbtKitInvalidateCart_Click(object sender, EventArgs e) { - if (ActiveMode == KitAdvMode.NA) - { - ActiveMode = KitAdvMode.CartInvalidate; - } - else - { - ActiveMode = KitAdvMode.NA; - } + ActiveMode = KitAdvMode.CartInvalidate; + updateCurrData(); + } + protected void lbtReset_Click(object sender, EventArgs e) + { + ActiveMode = KitAdvMode.NA; + cmp_kittingSmartAdvInvalid.resetShowData(); updateCurrData(); } } diff --git a/NKC_WF/WebUserControls/cmp_kittingSmartAdv.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_kittingSmartAdv.ascx.designer.cs index 0157d70..c3b11ee 100644 --- a/NKC_WF/WebUserControls/cmp_kittingSmartAdv.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_kittingSmartAdv.ascx.designer.cs @@ -32,6 +32,15 @@ namespace NKC_WF.WebUserControls /// protected global::System.Web.UI.WebControls.HiddenField hfDeviceId; + /// + /// Controllo lbtReset. + /// + /// + /// 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.LinkButton lbtReset; + /// /// Controllo lbtKitSusp. /// @@ -141,12 +150,12 @@ namespace NKC_WF.WebUserControls protected global::System.Web.UI.HtmlControls.HtmlGenericControl divAct04; /// - /// Controllo divAct05. + /// Controllo cmp_kittingSmartAdvInvalid. /// /// /// 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 divAct05; + protected global::NKC_WF.WebUserControls.cmp_kittingSmartAdvInvalid cmp_kittingSmartAdvInvalid; } } diff --git a/NKC_WF/WebUserControls/cmp_kittingSmartAdvInvalid.ascx b/NKC_WF/WebUserControls/cmp_kittingSmartAdvInvalid.ascx new file mode 100644 index 0000000..d093f5a --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_kittingSmartAdvInvalid.ascx @@ -0,0 +1,63 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_kittingSmartAdvInvalid.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_kittingSmartAdvInvalid" %> + +<%@ Register Src="~/WebUserControls/cmp_barcode.ascx" TagPrefix="uc1" TagName="cmp_barcode" %> +<%@ Register Src="~/WebUserControls/cmp_KS_Cart.ascx" TagPrefix="uc1" TagName="cmp_KS_Cart" %> +<%@ Register Src="~/WebUserControls/cmp_ItemDet.ascx" TagPrefix="uc1" TagName="cmp_ItemDet" %> + + +
+
+ + <%: traduci("ModePart") %> + <%: traduci("ModeCart") %> +
+
+ +
+
+ +
+
+ <%: traduci("InvalidatePart") %> +
+
+ +
+
+
+ +
+
+ +
+
+ <%: traduci("InvalidateCart") %> +
+
+ +
+
+
+
+
+ + + + +
+
+
+ +
+
+
+
+ +
+
+
+ + + +
+
diff --git a/NKC_WF/WebUserControls/cmp_kittingSmartAdvInvalid.ascx.cs b/NKC_WF/WebUserControls/cmp_kittingSmartAdvInvalid.ascx.cs new file mode 100644 index 0000000..373220e --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_kittingSmartAdvInvalid.ascx.cs @@ -0,0 +1,383 @@ +using AppData; +using NKC_SDK; +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_kittingSmartAdvInvalid : BaseUserControl + { + /// + /// Postazione attuale (per ora cablata) + /// + protected string PlaceId + { + get + { + return "WRK001"; + } + } + /// + /// Comando barcode letto + /// + protected string lastCmd + { + get + { + return hfLastBCode.Value; + } + set + { + hfLastBCode.Value = value; + lastValidCmd = value; + } + } + /// + /// Ultimo object letto + /// + protected string lastObject + { + get + { + return hfLastObject.Value; + } + set + { + hfLastObject.Value = value; + } + } + /// + /// ULTIMO Comando barcode VALIDO (!="") letto + /// + protected string lastValidCmd + { + get + { + return hfLastValidBCode.Value; + } + set + { + // solo se è !="" + if (!string.IsNullOrEmpty(value)) + { + hfLastValidBCode.Value = value; + } + } + } + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + lastObject = ""; + ItemExtCode = ""; + resetShowData(); + } + cmp_barcode.eh_doRefresh += cmp_barcode_eh_doRefresh; + } + + public void resetShowData() + { + cmp_KS_Cart.CartID = 0; + lastObject = ""; + cmp_barcode.resetMessage(); + cmp_barcode.resetInput(); + divError.Visible = false; + divInfo.Visible = false; + fixVisibility(); + } + public invalidMode currMode + { + get + { + invalidMode answ = invalidMode.ND; + try + { + answ = (invalidMode)Enum.Parse(typeof(invalidMode), hfMode.Value); + } + catch + { } + return answ; + } + set + { + hfMode.Value = value.ToString(); + fixDisplay(); + } + } + + private void fixDisplay() + { + lblPart.Visible = false; + lblCart.Visible = false; + lbtInvalidateCart.Visible = false; + lbtInvalidatePartCart.Visible = false; + switch (currMode) + { + case invalidMode.Part: + lblPart.Visible = true; + break; + case invalidMode.Cart: + lblCart.Visible = true; + break; + case invalidMode.ND: + default: + break; + } + } + + private void cmp_barcode_eh_doRefresh(object sender, EventArgs e) + { + bool doRaiseEv = false; + // processo evento.. + lastCmd = cmp_barcode.inputAcquired.ToUpper(); + doRaiseEv = processLastCmd(doRaiseEv); + + // reset comando + cmp_barcode.inputAcquired = ""; + // aggiorno... + doUpdate(); + if (doRaiseEv) + { + raiseEvent(); + } + } + + private bool processLastCmd(bool doRaiseEv) + { + if (string.IsNullOrEmpty(lastCmd)) doRaiseEv = true; + // processiamo barcode letto + decodedData decoData = DLMan.decodeBcode(lastCmd); + switch (decoData.codeType) + { + case codeType.Item: + cmp_barcode.showOutput(cssClass.success, $"Valid IT Code: {decoData.rawData}"); + processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt); + break; + case codeType.OtherItem: + cmp_barcode.showOutput(cssClass.success, $"Valid Generic PART Code: {decoData.rawData}"); + processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt); + break; + case codeType.Cart: + cmp_barcode.showOutput(cssClass.success, $"{decoData.description}"); + processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt); + doRaiseEv = true; + break; + default: + cmp_barcode.showOutput(cssClass.danger, $"{traduci("UnknownData")} {decoData.rawData} {traduci("NoAction")}"); + resetSelection(); + break; + } + return doRaiseEv; + } + + /// + /// Processo il DataMatrix letto + /// + /// + /// + /// + private void processItemSuggestion(codeType tipoCod, string rawData, int codeInt) + { + displError(""); + displInfo(""); + DataLayer DLMan = new DataLayer(); + // processo suggerimenti x ITEM / cart / bin dato suo RawData (Dtmx) e Cod univoco (intero) + switch (tipoCod) + { + case codeType.Cart: + // primo step: verifico dal codice CART l'ordine da cui deriva... + var tabCart = DLMan.taCOK.getByKey(codeInt); + if (tabCart.Count == 0) + { + displError($"{traduci("KS_ADV_CartNotFound")} {rawData}, {traduci("ErrPleaseRetry")}"); + resetCart(); + } + else + { + var rigaCart = tabCart[0]; + // verifico il cart NON ABBIA FINITO il KITTING (start ma NON end) + if (!rigaCart.IsKittingEndNull()) + { + displError($"{traduci("KS_ADV_CartAlreadyKitted")} {rawData} --> OrdExtCode {rigaCart.OrderExtCode}, {traduci("ErrPleaseRetry")}"); + resetCart(); + } + else + { + // se non è al kitting non può resettare + if (rigaCart.IsKittingStartNull()) + { + displError($"{traduci("KS_ADV_CartNotKitting")} {rawData} --> OrdExtCode {rigaCart.OrderExtCode}, {traduci("ErrPleaseRetry")}"); + resetCart(); + } + else + { + // mostro CART! + string descr = "-"; + try + { + descr = rigaCart.OrderExtCode; + } + catch + { } + setCart(rawData, codeInt, descr); + // verifico il MODO: se CART --> mostro button x invalidare ALL + lbtInvalidateCart.Visible = (currMode == invalidMode.Cart); + lbtInvalidateCart.DataBind(); + // se PART --> il relativo modulo mostrerà reload + checkPartCart(); + } + } + } + break; + + case codeType.Item: + // veriufico item esistente + var tabItems = DLMan.taIL.getByKey(codeInt); + if (tabItems.Count == 0) + { + displError($"{traduci("KS_ADV_ItemNotFound")} {rawData}, {traduci("ErrPleaseRetry")}"); + resetCart(); + } + else + { + // salvo item e ext code... + cmp_ItemDet.ItemId = codeInt; + ItemExtCode = tabItems[0].ItemExtCode; + // se PART --> il relativo modulo mostrerà reload + checkPartCart(); + } + break; + case codeType.OtherItem: + break; + default: + lastObject = ""; + break; + } + } + + protected string ItemExtCode + { + get + { + return hfItemExtCode.Value; + } + set + { + hfItemExtCode.Value = value; + } + } + + private void checkPartCart() + { + // se ho part + cart mostro button + if (currMode == invalidMode.Part) + { + if (cmp_ItemDet.ItemId > 0 && cmp_KS_Cart.CartID > 0) + { + lbtInvalidatePartCart.Visible = true; + } + else + { + lbtInvalidatePartCart.Visible = false; + } + } + else + { + lbtInvalidatePartCart.Visible = false; + } + } + + /// + /// Mostra INFO ed effettua reset vari... + /// + /// + protected void displInfo(string infoMessage) + { + lblSuccessMsg.Text = infoMessage; + divError.Visible = false; + divInfo.Visible = true; + resetSelection(); + } + /// + /// Mostra ERROR ed effettua reset vari... + /// + /// + protected void displError(string errorMessage) + { + lblErrorMsg.Text = errorMessage; + divError.Visible = true; + divInfo.Visible = false; + resetSelection(); + } + protected void doUpdate() + { + + } + + protected void resetSelection() + { + + } + + /// + /// Imposta il cart sugli oggetti dipendenti + /// + /// + /// + /// + private void setCart(string rawData, int codeInt, string Description) + { + cmp_KS_Cart.CartID = codeInt; + cmp_KS_Cart.CartDtmx = rawData; + cmp_KS_Cart.CartDesc = Description; + cmp_KS_Cart.doUpdate(); + fixVisibility(); + } + private void resetCart() + { + cmp_KS_Cart.CartID = 0; + fixVisibility(); + } + private void fixVisibility() + { + // reset grafico + cmp_KS_Cart.Visible = cmp_KS_Cart.CartID > 0; + } + + protected void lbtInvalidateCart_Click(object sender, EventArgs e) + { + // esegue la stored di reset dell'intero cart... + DLMan.taIL.invalidateByCart(cmp_KS_Cart.CartID, PlaceId); + // resetto + resetShowData(); + raiseReset(); + } + protected void lbtInvalidatePartCart_Click(object sender, EventArgs e) + { + // solo se ho in sessione dati... + if (cmp_ItemDet.ItemId > 0 && cmp_KS_Cart.CartID > 0 && !string.IsNullOrEmpty(ItemExtCode)) + { + // esegue la stored di reset dell'intero cart... + DLMan.taIL.invalidateByPartCart(cmp_KS_Cart.CartID,ItemExtCode, PlaceId); + } + // resetto + resetShowData(); + raiseReset(); + } + + + } + /// + /// MOdalità invalid su KittingSmart + /// + public enum invalidMode + { + ND = 0, + Part, + Cart + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_kittingSmartAdvInvalid.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_kittingSmartAdvInvalid.ascx.designer.cs new file mode 100644 index 0000000..0b2e7f3 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_kittingSmartAdvInvalid.ascx.designer.cs @@ -0,0 +1,170 @@ +//------------------------------------------------------------------------------ +// +// 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_kittingSmartAdvInvalid + { + + /// + /// Controllo titleCart. + /// + /// + /// 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 titleCart; + + /// + /// Controllo hfMode. + /// + /// + /// 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 hfMode; + + /// + /// Controllo lblPart. + /// + /// + /// 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 lblPart; + + /// + /// Controllo lblCart. + /// + /// + /// 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 lblCart; + + /// + /// Controllo lbtInvalidatePartCart. + /// + /// + /// 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.LinkButton lbtInvalidatePartCart; + + /// + /// Controllo lbtInvalidateCart. + /// + /// + /// 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.LinkButton lbtInvalidateCart; + + /// + /// Controllo cmp_barcode. + /// + /// + /// 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_barcode cmp_barcode; + + /// + /// Controllo hfLastBCode. + /// + /// + /// 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 hfLastBCode; + + /// + /// Controllo hfLastObject. + /// + /// + /// 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 hfLastObject; + + /// + /// Controllo hfLastValidBCode. + /// + /// + /// 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 hfLastValidBCode; + + /// + /// Controllo divError. + /// + /// + /// 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 divError; + + /// + /// Controllo lblErrorMsg. + /// + /// + /// 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 lblErrorMsg; + + /// + /// Controllo divInfo. + /// + /// + /// 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 divInfo; + + /// + /// Controllo lblSuccessMsg. + /// + /// + /// 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 lblSuccessMsg; + + /// + /// Controllo hfItemExtCode. + /// + /// + /// 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 hfItemExtCode; + + /// + /// Controllo cmp_ItemDet. + /// + /// + /// 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_ItemDet cmp_ItemDet; + + /// + /// 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; + } +}