diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index f7d3788..5e34bb6 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -1510,23 +1510,28 @@ namespace AppData DS_App.SheetListRow answ = null; if (BatchID > 0) { - DS_App.SheetListDataTable tabSheets = null; - // cerco in cache.... - if (cachedCurrSheetTab != null) + try { - tabSheets = cachedCurrSheetTab; - } - else - { - // recupero sheet corrente da Bunk... - tabSheets = DataLayer.man.taSHL.getByMLStatus(BatchID, 5, 5); - // salvo in redis - cachedCurrSheetTab = tabSheets; - } - if (tabSheets.Count > 0) - { - answ = tabSheets[0]; + DS_App.SheetListDataTable tabSheets = null; + // cerco in cache.... + if (cachedCurrSheetTab != null) + { + tabSheets = cachedCurrSheetTab; + } + else + { + // recupero sheet corrente da Bunk... + tabSheets = DataLayer.man.taSHL.getByMLStatus(BatchID, 5, 5); + // salvo in redis + cachedCurrSheetTab = tabSheets; + } + if (tabSheets != null && tabSheets.Count > 0) + { + answ = tabSheets[0]; + } } + catch + { } } return answ; } diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index 521fad3..89194ff 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -5462,8 +5462,9 @@ namespace AppData { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public CartsRow FindByCartID(int CartID) { + public CartsRow FindByBatchIDCartID(int BatchID, int CartID) { return ((CartsRow)(this.Rows.Find(new object[] { + BatchID, CartID}))); } @@ -5511,13 +5512,14 @@ namespace AppData { this.columnTotItemLoad = new global::System.Data.DataColumn("TotItemLoad", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnTotItemLoad); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnBatchID, this.columnCartID}, true)); this.columnCartID.AutoIncrement = true; this.columnCartID.AutoIncrementSeed = -1; this.columnCartID.AutoIncrementStep = -1; this.columnCartID.AllowDBNull = false; this.columnCartID.ReadOnly = true; - this.columnCartID.Unique = true; + this.columnBatchID.AllowDBNull = false; this.columnCartIndex.AllowDBNull = false; this.columnCartDtmx.ReadOnly = true; this.columnCartDtmx.MaxLength = 10; @@ -18041,12 +18043,7 @@ namespace AppData { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int BatchID { get { - try { - return ((int)(this[this.tableCarts.BatchIDColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("Il valore della colonna \'BatchID\' nella tabella \'Carts\' รจ DBNull.", e); - } + return ((int)(this[this.tableCarts.BatchIDColumn])); } set { this[this.tableCarts.BatchIDColumn] = value; @@ -18123,18 +18120,6 @@ namespace AppData { } } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public bool IsBatchIDNull() { - return this.IsNull(this.tableCarts.BatchIDColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public void SetBatchIDNull() { - this[this.tableCarts.BatchIDColumn] = global::System.Convert.DBNull; - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsCartDtmxNull() { diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index 8f21041..65700d9 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -2620,7 +2620,7 @@ FROM v_PackListDet - + dbo.stp_PL_acquireItems @@ -2634,7 +2634,7 @@ FROM v_PackListDet - + dbo.stp_PL_acquireOtherItems @@ -2649,7 +2649,7 @@ FROM v_PackListDet - + dbo.stp_PL_acquirePaint @@ -2664,7 +2664,7 @@ FROM v_PackListDet - + dbo.stp_PL_closeCart @@ -2988,7 +2988,7 @@ FROM v_OKIB - + @@ -3038,7 +3038,7 @@ FROM v_OKIB - + @@ -3063,7 +3063,7 @@ FROM v_OKIB - + @@ -3118,7 +3118,7 @@ FROM v_OKIB - + @@ -3191,7 +3191,7 @@ FROM v_OKIB - + @@ -3199,7 +3199,7 @@ FROM v_OKIB - + @@ -3268,7 +3268,7 @@ FROM v_OKIB - + @@ -3301,7 +3301,7 @@ FROM v_OKIB - + @@ -3342,11 +3342,11 @@ FROM v_OKIB - + - + @@ -3361,7 +3361,7 @@ FROM v_OKIB - + @@ -3385,7 +3385,7 @@ FROM v_OKIB - + @@ -3393,7 +3393,7 @@ FROM v_OKIB - + @@ -3410,7 +3410,7 @@ FROM v_OKIB - + @@ -3419,7 +3419,7 @@ FROM v_OKIB - + @@ -3450,7 +3450,7 @@ FROM v_OKIB - + @@ -3458,7 +3458,7 @@ FROM v_OKIB - + @@ -3474,7 +3474,7 @@ FROM v_OKIB - + @@ -3482,7 +3482,7 @@ FROM v_OKIB - + @@ -3510,7 +3510,7 @@ FROM v_OKIB - + @@ -3546,7 +3546,7 @@ FROM v_OKIB - + @@ -3562,7 +3562,7 @@ FROM v_OKIB - + @@ -3572,7 +3572,7 @@ FROM v_OKIB - + @@ -3589,7 +3589,7 @@ FROM v_OKIB - + @@ -3602,7 +3602,7 @@ FROM v_OKIB - + @@ -3651,7 +3651,7 @@ FROM v_OKIB - + @@ -3680,7 +3680,7 @@ FROM v_OKIB - + @@ -3722,7 +3722,7 @@ FROM v_OKIB - + @@ -3831,7 +3831,7 @@ FROM v_OKIB - + @@ -3894,7 +3894,7 @@ FROM v_OKIB - + @@ -3939,7 +3939,7 @@ FROM v_OKIB - + @@ -3965,7 +3965,7 @@ FROM v_OKIB - + @@ -4058,7 +4058,7 @@ FROM v_OKIB - + @@ -4121,7 +4121,7 @@ FROM v_OKIB - + @@ -4180,7 +4180,7 @@ FROM v_OKIB - + @@ -4229,7 +4229,7 @@ FROM v_OKIB - + @@ -4284,6 +4284,7 @@ FROM v_OKIB + @@ -4387,18 +4388,18 @@ FROM v_OKIB - - - - - - - - - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/AppData/DS_App.xss b/AppData/DS_App.xss index 09adb00..c866773 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. --> - + @@ -17,7 +17,7 @@ - + @@ -33,12 +33,12 @@ - - + + - + @@ -82,7 +82,7 @@ - 823 + 806 68 diff --git a/NKC_WF/WebUserControls/cmp_KS_Items.ascx b/NKC_WF/WebUserControls/cmp_KS_Items.ascx index ccd5eef..46776f7 100644 --- a/NKC_WF/WebUserControls/cmp_KS_Items.ascx +++ b/NKC_WF/WebUserControls/cmp_KS_Items.ascx @@ -2,6 +2,8 @@ <%@ Register Src="~/WebUserControls/cmp_KS_currCart.ascx" TagPrefix="uc1" TagName="cmp_KS_currCart" %> <%@ Register Src="~/WebUserControls/cmp_KS_currItm.ascx" TagPrefix="uc1" TagName="cmp_KS_currItm" %> +<%@ Register Src="~/WebUserControls/cmp_KS_OkibCart.ascx" TagPrefix="uc1" TagName="cmp_KS_OkibCart" %> + @@ -9,7 +11,7 @@
- +
@@ -28,7 +30,7 @@
- <%: traduci("AddItem") %> + <%: traduci("AddItemKit") %>
diff --git a/NKC_WF/WebUserControls/cmp_KS_Items.ascx.cs b/NKC_WF/WebUserControls/cmp_KS_Items.ascx.cs index 7976b89..ed5c45b 100644 --- a/NKC_WF/WebUserControls/cmp_KS_Items.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_KS_Items.ascx.cs @@ -146,11 +146,13 @@ namespace NKC_WF.WebUserControls if (!ItemValid) { showConfirmItem = NeedPaint || NeedSecOp; + ItemValid = !showConfirmItem; } divItemValid.Visible = showConfirmItem; // moastro messaggi errore secondo caso lblNeedSecOp.Visible = NeedSecOp; lblNeedPaint.Visible = NeedPaint; + fixVisibility(); } private void fixVisibility() { @@ -159,13 +161,13 @@ namespace NKC_WF.WebUserControls cmp_KS_currCart.Visible = showBtns; // se ho item e cart --> mostro buttons calcolati! lbtAddItem.Visible = false; - if (showBtns && ItemValid) + if (showBtns) { // verifico SE item e cart corrispondono x mostrare button var tabCarts = DataLayer.man.taCR.getByItemID(ItemID); if (tabCarts != null) { - if (tabCarts.Count == 1) + if (tabCarts.Count > 0) { if (tabCarts[0].CartID == CartID) { @@ -177,7 +179,6 @@ namespace NKC_WF.WebUserControls } public void doUpdate() { - fixVisibility(); // effettua controlli vari checkItemValidated(); } @@ -200,6 +201,7 @@ namespace NKC_WF.WebUserControls // resetto CartID = 0; ItemID = 0; + doUpdate(); // sollevo evento raiseEvent(); } diff --git a/NKC_WF/WebUserControls/cmp_kittingSmart.ascx b/NKC_WF/WebUserControls/cmp_kittingSmart.ascx index 8134dbf..42178c5 100644 --- a/NKC_WF/WebUserControls/cmp_kittingSmart.ascx +++ b/NKC_WF/WebUserControls/cmp_kittingSmart.ascx @@ -31,16 +31,19 @@
-
+
-
+
+
+ +
diff --git a/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.cs b/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.cs index 3ce18a0..f174a24 100644 --- a/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.cs @@ -92,6 +92,16 @@ namespace NKC_WF.WebUserControls cmp_barcode.eh_doReset += Cmp_barcode_eh_doReset; cmp_KS_BinCart.eh_doRefresh += cmp_KS_BinCart_eh_doRefresh; cmp_KS_OtherItemsCart.eh_doRefresh += cmp_KS_OtherItemsCart_eh_doRefresh; + cmp_KS_Items.eh_doRefresh += cmp_KS_Items_eh_doRefresh; + } + + private void cmp_KS_Items_eh_doRefresh(object sender, EventArgs e) + { + displInfo("PART added", true); + // resetto BIN & CART + resetBin(); + resetCart(); + resetItem(); } private void cmp_KS_OtherItemsCart_eh_doRefresh(object sender, EventArgs e) @@ -674,6 +684,19 @@ namespace NKC_WF.WebUserControls lblItemCode.Text = itemRow.ItemExtCode; lblItemDesc.Text = itemRow.ItemDesc; lblItemDtmx.Text = itemRow.ItemDtmx; + // cerco kit --> cart... + string cartDtmx = "-"; + try + { + var tabCart = DataLayer.man.taCR.getByItemID(itemRow.ItemID); + if (tabCart != null && tabCart.Count > 0) + { + cartDtmx = tabCart[0].CartDtmx; + } + } + catch + { } + lblItemCartDtmx.Text = cartDtmx; setItem(itemRow.ItemDtmx, itemRow.ItemID); // CONTROLLO SIA in stato 1 --> worked, 2--> selected, 100--> parked... switch (itemRow.StatusID) @@ -763,7 +786,7 @@ namespace NKC_WF.WebUserControls private void fixVisibility() { // reset grafico - cmp_KS_Cart.Visible = cmp_KS_Cart.CartID > 0 && (cmp_KS_BinCart.BinID + cmp_KS_OtherItemsCart.OtherItemID == 0); + cmp_KS_Cart.Visible = cmp_KS_Cart.CartID > 0 && (cmp_KS_BinCart.BinID + cmp_KS_OtherItemsCart.OtherItemID + cmp_KS_Items.ItemID == 0); cmp_KS_BinCart.Visible = cmp_KS_BinCart.BinID > 0; cmp_KS_OtherItemsCart.Visible = cmp_KS_OtherItemsCart.OtherItemID > 0; cmp_KS_Items.Visible = cmp_KS_Items.ItemID > 0; diff --git a/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.designer.cs index f6cfcd6..84f9e0c 100644 --- a/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.designer.cs @@ -158,6 +158,15 @@ namespace NKC_WF.WebUserControls /// protected global::System.Web.UI.WebControls.Label lblItemDtmx; + /// + /// Controllo lblItemCartDtmx. + /// + /// + /// 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 lblItemCartDtmx; + /// /// Controllo divError. /// diff --git a/NKC_WF/WebUserControls/cmp_orderSched.ascx.cs b/NKC_WF/WebUserControls/cmp_orderSched.ascx.cs index 955c668..e6ca72d 100644 --- a/NKC_WF/WebUserControls/cmp_orderSched.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_orderSched.ascx.cs @@ -95,6 +95,7 @@ namespace NKC_WF.WebUserControls /// protected void lbtReset_Click(object sender, EventArgs e) { + fixSchedOrd(); grView.SelectedIndex = -1; grView.DataBind(); raiseReset(); diff --git a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs index 9fd8c4d..9ee6e7d 100644 --- a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs @@ -197,6 +197,7 @@ namespace NKC_WF.WebUserControls // reset comando cmp_barcode.inputAcquired = ""; + ComLib.man.resetSheetUnload(SheetID); // aggiorno... doUpdate(); } diff --git a/NKC_WF/site/MachineUnload.aspx.cs b/NKC_WF/site/MachineUnload.aspx.cs index 263fed3..b326a32 100644 --- a/NKC_WF/site/MachineUnload.aspx.cs +++ b/NKC_WF/site/MachineUnload.aspx.cs @@ -95,6 +95,12 @@ namespace NKC_WF else { BatchId = 0; + ComLib.man.resetSheetUnload(0); + } + // se sheet/bunk 0 --> update! + if (BatchId == 0 && SheetId == 0) + { + needUpdate = true; } return needUpdate; }