diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index fcb067c..b9d35f6 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -8507,6 +8507,8 @@ 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[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@minStatus", 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("@maxStatus", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[4].Connection = this.Connection; this._commandCollection[4].CommandText = "dbo.stp_IL_updateSheetStatus"; @@ -8577,7 +8579,7 @@ SELECT ItemID, ItemStatus, OrdID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, Ite [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.ItemListDataTable getBySearch(global::System.Nullable ItemID, string ItemDtmx) { + public virtual DS_App.ItemListDataTable getBySearch(global::System.Nullable ItemID, string ItemDtmx, global::System.Nullable minStatus, global::System.Nullable maxStatus) { this.Adapter.SelectCommand = this.CommandCollection[3]; if ((ItemID.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(ItemID.Value)); @@ -8591,6 +8593,18 @@ SELECT ItemID, ItemStatus, OrdID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, Ite else { this.Adapter.SelectCommand.Parameters[2].Value = ((string)(ItemDtmx)); } + if ((minStatus.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[3].Value = ((int)(minStatus.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value; + } + if ((maxStatus.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[4].Value = ((int)(maxStatus.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[4].Value = global::System.DBNull.Value; + } DS_App.ItemListDataTable dataTable = new DS_App.ItemListDataTable(); this.Adapter.Fill(dataTable); return dataTable; diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index 1347199..f94514e 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -605,6 +605,8 @@ SELECT ItemID, ItemStatus, OrdID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, Ite + + @@ -622,7 +624,7 @@ SELECT ItemID, ItemStatus, OrdID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, Ite - + dbo.stp_IL_updateSheetStatusPU @@ -634,7 +636,7 @@ SELECT ItemID, ItemStatus, OrdID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, Ite - + dbo.stp_IL_updateStatus @@ -901,7 +903,7 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart - + @@ -933,7 +935,7 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart - + @@ -955,7 +957,7 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart - + @@ -1010,7 +1012,7 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart - + @@ -1082,7 +1084,7 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart - + @@ -1090,7 +1092,7 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart - + @@ -1151,7 +1153,7 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart - + @@ -1184,7 +1186,7 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart - + @@ -1200,7 +1202,7 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart - + @@ -1258,9 +1260,9 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart - - - + + + \ No newline at end of file diff --git a/AppData/DS_App.xss b/AppData/DS_App.xss index 501a44e..3f775ea 100644 --- a/AppData/DS_App.xss +++ b/AppData/DS_App.xss @@ -11,10 +11,10 @@ - - - - + + + + @@ -44,12 +44,12 @@ - 989 - 188 + 1110 + 172 988 - 188 + 172 diff --git a/NKC_WF/MachineUnloadSmart.aspx b/NKC_WF/MachineUnloadSmart.aspx index 52a0d73..e74264e 100644 --- a/NKC_WF/MachineUnloadSmart.aspx +++ b/NKC_WF/MachineUnloadSmart.aspx @@ -60,7 +60,7 @@
<%: traduci("scrapped") %> - <%: traduci("toSecOp") %> + <%: traduci("toPark") %>
<%: traduci("ResetSel") %> diff --git a/NKC_WF/MachineUnloadSmart.aspx.cs b/NKC_WF/MachineUnloadSmart.aspx.cs index 8bd1055..27fa114 100644 --- a/NKC_WF/MachineUnloadSmart.aspx.cs +++ b/NKC_WF/MachineUnloadSmart.aspx.cs @@ -126,7 +126,7 @@ namespace NKC_WF switch (tipoCod) { case codeType.Item: - tabItem = DataLayer.man.taIL.getBySearch(codeInt, rawData); + tabItem = DataLayer.man.taIL.getBySearch(codeInt, rawData, 0, 999); if (tabItem.Count == 1) { showItemDetail(true, tabItem[0], false); @@ -137,7 +137,13 @@ namespace NKC_WF } break; case codeType.ItemGeneric: - tabItem = DataLayer.man.taIL.getBySearch(0, rawData); + // PRIMA CERCSE ne ho in stato 1..3 + tabItem = DataLayer.man.taIL.getBySearch(0, rawData, 1, 3); + if (tabItem.Count == 0) + { + // se NON ne trovo cerci FINO a stato 5... + tabItem = DataLayer.man.taIL.getBySearch(0, rawData, 1, 5); + } if (tabItem.Count == 1) { showItemDetail(true, tabItem[0], false); @@ -225,23 +231,52 @@ namespace NKC_WF lblItemDesc.Text = itemRow.ItemDesc; lblItemDtmx.Text = itemRow.ItemDtmx; itemIdSelected = itemRow.ItemID; - // CONTROLLO SIA in stato 1 --> worked... - if (itemRow.StatusID == 1 || itemRow.StatusID == 2) + // CONTROLLO SIA in stato 1 --> worked, 2--> selected, 3--> parked... + switch (itemRow.StatusID) { - // salvo che è in STATO 2 (picked up) --> HARD CODED su macchna WRK001 - DataLayer.man.taIL.updateStatus(itemRow.ItemID, 2, "WRK001"); - // verifico cosa devo mostrare come PROX passaggio... - showCart = itemRow.ProcessesReq == "0"; - showBin = itemRow.ProcessesReq == "2"; - secOp = itemRow.PostProcList; - showSecOp = (secOp != "0"); - doUpdate(); - } - else - { - lblErrorMsg.Text = "ERROR: Item not ready"; - itemIdSelected = 0; - divItemError.Visible = true; + case 0: + lblErrorMsg.Text = "ERROR: Item not ready"; + itemIdSelected = 0; + divItemError.Visible = true; + break; + case 1: + case 2: + case 3: + // salvo che è in STATO 2 (picked up) --> HARD CODED su macchna WRK001 + DataLayer.man.taIL.updateStatus(itemRow.ItemID, 2, "WRK001"); + // verifico cosa devo mostrare come PROX passaggio... + showCart = itemRow.ProcessesReq == "0"; + showBin = itemRow.ProcessesReq == "2"; + secOp = itemRow.PostProcList; + showSecOp = (secOp != "0"); + doUpdate(); + break; + case 4: + lblErrorMsg.Text = "ERROR: Item already on CART!"; + itemIdSelected = 0; + divItemError.Visible = true; + break; + case 5: + // fino a concorrenza qta richiesta sposto, POI do errori + lblErrorMsg.Text = "ERROR: ALL Item already scanned on BIN!"; + itemIdSelected = 0; + divItemError.Visible = true; + break; + case 6: + lblErrorMsg.Text = "ERROR: Item already at KIT STATION!"; + itemIdSelected = 0; + divItemError.Visible = true; + break; + case 999: + lblErrorMsg.Text = "ERROR: Item declared SCRAP!"; + itemIdSelected = 0; + divItemError.Visible = true; + break; + default: + lblErrorMsg.Text = "ERROR: Item status UNKNOWN!"; + itemIdSelected = 0; + divItemError.Visible = true; + break; } } lbtResetSel.Visible = (itemIdSelected != 0); @@ -262,7 +297,7 @@ namespace NKC_WF // fix visibilità lbtCancel.Visible = showBtn; lbtScrapped.Visible = showBtn; - lbtSecOp.Visible = showBtn; + lbtParkArea.Visible = showBtn; } } @@ -275,7 +310,7 @@ namespace NKC_WF lblLastBCode.Text = ""; lbtCancel.Visible = false; lbtScrapped.Visible = false; - lbtSecOp.Visible = false; + lbtParkArea.Visible = false; lbtResetSel.Visible = (itemIdSelected != 0); } @@ -370,6 +405,13 @@ namespace NKC_WF } } - + protected void lbtParkArea_Click(object sender, EventArgs e) + { + // resetto item selezionato... + DataLayer.man.taIL.updateStatus(itemIdSelected, 3, "WRK001"); + itemIdSelected = 0; + showItemDetail(false, null, false); + lblMessage.Text = "Item Parked"; + } } } \ No newline at end of file diff --git a/NKC_WF/MachineUnloadSmart.aspx.designer.cs b/NKC_WF/MachineUnloadSmart.aspx.designer.cs index f4dfca5..8c8c717 100644 --- a/NKC_WF/MachineUnloadSmart.aspx.designer.cs +++ b/NKC_WF/MachineUnloadSmart.aspx.designer.cs @@ -175,13 +175,13 @@ namespace NKC_WF { protected global::System.Web.UI.WebControls.LinkButton lbtScrapped; /// - /// Controllo lbtSecOp. + /// Controllo lbtParkArea. /// /// /// 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 lbtSecOp; + protected global::System.Web.UI.WebControls.LinkButton lbtParkArea; /// /// Controllo lbtResetSel.