diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index 326b1b9..d7db62a 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -2780,7 +2780,7 @@ namespace AppData { private global::System.Data.DataColumn columnItemID; - private global::System.Data.DataColumn columnItemStatus; + private global::System.Data.DataColumn columnStatusID; private global::System.Data.DataColumn columnOrdID; @@ -2847,9 +2847,9 @@ namespace AppData { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public global::System.Data.DataColumn ItemStatusColumn { + public global::System.Data.DataColumn StatusIDColumn { get { - return this.columnItemStatus; + return this.columnStatusID; } } @@ -2978,11 +2978,11 @@ namespace AppData { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public ItemListRow AddItemListRow(int ItemStatus, OrderListRow parentOrderListRowByFK_ItemList_OrderList1, string ItemDtmx, string ItemExtCode, string ItemDesc, string ItemNote, int ItemQty, MaterialsRow parentMaterialsRowByFK_ItemList_Materials1, bool MachiningReq, string PostProcList, string ProcessesReq, string CadFilePath) { + public ItemListRow AddItemListRow(int StatusID, OrderListRow parentOrderListRowByFK_ItemList_OrderList1, string ItemDtmx, string ItemExtCode, string ItemDesc, string ItemNote, int ItemQty, MaterialsRow parentMaterialsRowByFK_ItemList_Materials1, bool MachiningReq, string PostProcList, string ProcessesReq, string CadFilePath) { ItemListRow rowItemListRow = ((ItemListRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, - ItemStatus, + StatusID, null, ItemDtmx, ItemExtCode, @@ -3030,7 +3030,7 @@ namespace AppData { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal void InitVars() { this.columnItemID = base.Columns["ItemID"]; - this.columnItemStatus = base.Columns["ItemStatus"]; + this.columnStatusID = base.Columns["StatusID"]; this.columnOrdID = base.Columns["OrdID"]; this.columnItemDtmx = base.Columns["ItemDtmx"]; this.columnItemExtCode = base.Columns["ItemExtCode"]; @@ -3049,8 +3049,8 @@ namespace AppData { private void InitClass() { this.columnItemID = new global::System.Data.DataColumn("ItemID", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnItemID); - this.columnItemStatus = new global::System.Data.DataColumn("ItemStatus", typeof(int), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnItemStatus); + this.columnStatusID = new global::System.Data.DataColumn("StatusID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnStatusID); this.columnOrdID = new global::System.Data.DataColumn("OrdID", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnOrdID); this.columnItemDtmx = new global::System.Data.DataColumn("ItemDtmx", typeof(string), null, global::System.Data.MappingType.Element); @@ -3081,7 +3081,7 @@ namespace AppData { this.columnItemID.AllowDBNull = false; this.columnItemID.ReadOnly = true; this.columnItemID.Unique = true; - this.columnItemStatus.AllowDBNull = false; + this.columnStatusID.AllowDBNull = false; this.columnItemDtmx.MaxLength = 50; this.columnItemExtCode.AllowDBNull = false; this.columnItemExtCode.MaxLength = 250; @@ -5477,12 +5477,12 @@ namespace AppData { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public int ItemStatus { + public int StatusID { get { - return ((int)(this[this.tableItemList.ItemStatusColumn])); + return ((int)(this[this.tableItemList.StatusIDColumn])); } set { - this[this.tableItemList.ItemStatusColumn] = value; + this[this.tableItemList.StatusIDColumn] = value; } } @@ -8366,7 +8366,7 @@ SELECT OrdID, OrdType, DestPlant, FamilyCode, OrdCodDtmx, OrderExtCode, OrderDes tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "ItemList"; tableMapping.ColumnMappings.Add("ItemID", "ItemID"); - tableMapping.ColumnMappings.Add("ItemStatus", "ItemStatus"); + tableMapping.ColumnMappings.Add("StatusID", "StatusID"); tableMapping.ColumnMappings.Add("OrdID", "OrdID"); tableMapping.ColumnMappings.Add("ItemDtmx", "ItemDtmx"); tableMapping.ColumnMappings.Add("ItemExtCode", "ItemExtCode"); @@ -8460,7 +8460,7 @@ SELECT ItemID, ItemStatus, OrdID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, Ite [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[4]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[6]; 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"; @@ -8484,6 +8484,22 @@ SELECT ItemID, ItemStatus, OrdID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, Ite this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ItemID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ItemDtmx", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[4].Connection = this.Connection; + this._commandCollection[4].CommandText = "dbo.stp_IL_updateSheetStatus"; + 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("@SheetID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StatusID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 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_IL_updateStatus"; + this._commandCollection[5].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ItemID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].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[5].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()] @@ -8947,6 +8963,86 @@ SELECT ItemID, ItemStatus, OrdID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, Ite } 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 updateSheetStatus(global::System.Nullable SheetID, global::System.Nullable StatusID, string PlaceCod) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4]; + if ((SheetID.HasValue == true)) { + command.Parameters[1].Value = ((int)(SheetID.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + if ((StatusID.HasValue == true)) { + command.Parameters[2].Value = ((int)(StatusID.Value)); + } + else { + command.Parameters[2].Value = global::System.DBNull.Value; + } + 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 updateStatus(global::System.Nullable ItemID, global::System.Nullable StatusID, string PlaceCod) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5]; + if ((ItemID.HasValue == true)) { + command.Parameters[1].Value = ((int)(ItemID.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + if ((StatusID.HasValue == true)) { + command.Parameters[2].Value = ((int)(StatusID.Value)); + } + else { + command.Parameters[2].Value = global::System.DBNull.Value; + } + 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; + } } /// @@ -9564,17 +9660,23 @@ SELECT BinID, CreationBins, BinNum, BinDtmx FROM Bins WHERE (BinID = @BinID)"; [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[2]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT BinID, CreationBins, BinNum, BinDtmx FROM dbo.Bins"; 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_BIN_getByKey"; + this._commandCollection[1].CommandText = "dbo.stp_BIN_getByItemID"; 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("@BinID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].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[2] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[2].Connection = this.Connection; + this._commandCollection[2].CommandText = "dbo.stp_BIN_getByKey"; + this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[2].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[2].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, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -9605,8 +9707,25 @@ SELECT BinID, CreationBins, BinNum, BinDtmx FROM Bins WHERE (BinID = @BinID)"; [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.BinsDataTable getByKey(global::System.Nullable BinID) { + public virtual DS_App.BinsDataTable getByItemID(global::System.Nullable ItemID) { this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((ItemID.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(ItemID.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + DS_App.BinsDataTable dataTable = new DS_App.BinsDataTable(); + 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.BinsDataTable getByKey(global::System.Nullable BinID) { + this.Adapter.SelectCommand = this.CommandCollection[2]; if ((BinID.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(BinID.Value)); } @@ -9940,17 +10059,23 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart [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[2]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT CartID, CreationCarts, CartNum, CartDtmx FROM dbo.Carts"; 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_CART_getByKey"; + this._commandCollection[1].CommandText = "dbo.stp_CART_getByItemID"; 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, "", "", "")); + this._commandCollection[1].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[2] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[2].Connection = this.Connection; + this._commandCollection[2].CommandText = "dbo.stp_CART_getByKey"; + this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[2].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[2].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()] @@ -9981,8 +10106,25 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart [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.CartsDataTable getByKey(global::System.Nullable CartID) { + public virtual DS_App.CartsDataTable getByItemID(global::System.Nullable ItemID) { this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((ItemID.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(ItemID.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + DS_App.CartsDataTable dataTable = new DS_App.CartsDataTable(); + 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.CartsDataTable getByKey(global::System.Nullable CartID) { + this.Adapter.SelectCommand = this.CommandCollection[2]; if ((CartID.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(CartID.Value)); } diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index 98759da..8ac64ce 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -550,7 +550,7 @@ SELECT ItemID, ItemStatus, OrdID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, Ite - + @@ -598,6 +598,32 @@ SELECT ItemID, ItemStatus, OrdID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, Ite + + + + dbo.stp_IL_updateSheetStatus + + + + + + + + + + + + + dbo.stp_IL_updateStatus + + + + + + + + + @@ -740,6 +766,17 @@ SELECT BinID, CreationBins, BinNum, BinDtmx FROM Bins WHERE (BinID = @BinID) + + + + dbo.stp_BIN_getByItemID + + + + + + + @@ -809,6 +846,17 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart + + + + dbo.stp_CART_getByItemID + + + + + + + @@ -1023,7 +1071,7 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart - + diff --git a/AppData/DS_App.xss b/AppData/DS_App.xss index 772f235..501a44e 100644 --- a/AppData/DS_App.xss +++ b/AppData/DS_App.xss @@ -4,17 +4,17 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - + - - + + @@ -45,11 +45,11 @@ 989 - 109 + 188 - 908 - 109 + 988 + 188 diff --git a/NKC_WF/MachineUnloadSmart.aspx b/NKC_WF/MachineUnloadSmart.aspx index 24910e3..d67e71f 100644 --- a/NKC_WF/MachineUnloadSmart.aspx +++ b/NKC_WF/MachineUnloadSmart.aspx @@ -36,6 +36,7 @@
+
CART
diff --git a/NKC_WF/MachineUnloadSmart.aspx.cs b/NKC_WF/MachineUnloadSmart.aspx.cs index 5162942..de9f8df 100644 --- a/NKC_WF/MachineUnloadSmart.aspx.cs +++ b/NKC_WF/MachineUnloadSmart.aspx.cs @@ -5,6 +5,20 @@ namespace NKC_WF { public partial class MachineUnloadSmart : BasePage { + protected bool showBin = false; + protected bool showCart = false; + protected bool showSecOp = false; + protected string secOp + { + get + { + return hfSecOp.Value; + } + set + { + hfSecOp.Value = value; + } + } protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) @@ -179,6 +193,12 @@ namespace NKC_WF lblItemDesc.Text = itemRow.ItemDesc; lblItemDtmx.Text = itemRow.ItemDtmx; itemIdSelected = itemRow.ItemID; + // verifico cosa devo mostrare come PROX passaggio... + showCart = itemRow.ProcessesReq == "0"; + showBin = itemRow.ProcessesReq == "2"; + secOp = itemRow.PostProcList; + showSecOp = (secOp != "0"); + doUpdate(); } } @@ -207,39 +227,59 @@ namespace NKC_WF private void doUpdate() { -#if false - lblLastBCode.Text = "BCode letto... fake!"; + // reset grafico + icnCart.Attributes.Remove("class"); + icnCart.Attributes.Add("class", "btn btn-sm btn-block btn-outline-secondary"); + icnBin.Attributes.Remove("class"); + icnBin.Attributes.Add("class", "btn btn-sm btn-block btn-outline-secondary"); + icnSecOp.Attributes.Remove("class"); + icnSecOp.Attributes.Add("class", "btn btn-sm btn-block btn-outline-secondary"); + // ora processo + lblLastBCode.Text = "------"; + lblMessage.Text = "----"; + lblDestination.Text = "--"; // in base al secondo mostro uno o altro... - int secondo = DateTime.Now.Second; - switch (secondo % 4) + if (showCart) { - case 0: - icnCart.Attributes.Remove("class"); - icnCart.Attributes.Add("class", "btn btn-sm btn-block btn-success"); - lblMessage.Text = "Riconosciuto item"; - lblDestination.Text = "SEND TO CART CR00012"; - lblDestination.CssClass = "text-success"; - break; - case 1: - icnBin.Attributes.Remove("class"); - icnBin.Attributes.Add("class", "btn btn-sm btn-block btn-primary"); - lblMessage.Text = "Riconosciuto item"; - lblDestination.Text = "SEND TO BIN BIN00010"; - lblDestination.CssClass = "text-primary"; - break; - case 2: - icnSecOp.Attributes.Remove("class"); - icnSecOp.Attributes.Add("class", "btn btn-sm btn-block btn-info"); - lblMessage.Text = "Riconosciuto item"; - lblDestination.Text = "SEND TO SEC OP"; - lblDestination.CssClass = "text-info"; - break; - case 3: - default: - resetIcons(); - break; - } -#endif + icnCart.Attributes.Remove("class"); + icnCart.Attributes.Add("class", "btn btn-sm btn-block btn-success"); + lblMessage.Text = "Item recognized"; + var tabCart = DataLayer.man.taCR.getByItemID(itemIdSelected); + if (tabCart.Count == 1) + { + lblDestination.Text = $"SEND TO CART {tabCart[0].CartDtmx}"; + } + else + { + lblDestination.Text = $"ERROR SEARCHING CART: {tabCart.Count} found!"; + } + lblDestination.CssClass = "text-success"; + } + else if (showBin) + { + icnBin.Attributes.Remove("class"); + icnBin.Attributes.Add("class", "btn btn-sm btn-block btn-primary"); + lblMessage.Text = "Item recognized"; + var tabBin = DataLayer.man.taBN.getByItemID(itemIdSelected); + if (tabBin.Count == 1) + { + lblDestination.Text = $"SEND TO BIN {tabBin[0].BinDtmx}"; + } + else + { + lblDestination.Text = $"ERROR SEARCHING BIN: {tabBin.Count} found!"; + } + lblDestination.CssClass = "text-primary"; + } + if (showSecOp) + { + icnSecOp.Attributes.Remove("class"); + icnSecOp.Attributes.Add("class", "btn btn-sm btn-block btn-info"); + lblMessage.Text = "Item recognized"; + lblLastBCode.Text = $"DO SEC OP: {secOp}"; + lblLastBCode.CssClass = "text-info"; + } + } protected void lbtCancel_Click(object sender, EventArgs e) diff --git a/NKC_WF/MachineUnloadSmart.aspx.designer.cs b/NKC_WF/MachineUnloadSmart.aspx.designer.cs index a40ea6e..e28863c 100644 --- a/NKC_WF/MachineUnloadSmart.aspx.designer.cs +++ b/NKC_WF/MachineUnloadSmart.aspx.designer.cs @@ -93,6 +93,15 @@ namespace NKC_WF { /// protected global::System.Web.UI.WebControls.Label lblErrorMsg; + /// + /// Controllo hfSecOp. + /// + /// + /// 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 hfSecOp; + /// /// Controllo icnCart. ///