From 4b5e2db0ff310cdec371e86e046d421626099776 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 11 Aug 2020 19:58:53 +0200 Subject: [PATCH] Fix varix gestione UNLOAD: finalmente OK refresh! (timer fuori updatePnl svg) --- AppData/ComLib.cs | 131 +++++++++--------- .../WebUserControls/cmp_offOrderDetail.ascx | 5 +- .../cmp_offOrderDetail.ascx.cs | 4 +- NKC_WF/site/MachineOffline.aspx | 2 +- NKC_WF/site/MachineUnload.aspx | 71 +++++----- NKC_WF/site/MachineUnload.aspx.cs | 20 +-- NKC_WF/site/MachineUnload.aspx.designer.cs | 36 ++--- 7 files changed, 127 insertions(+), 142 deletions(-) diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index 8f1bf96..58a0df6 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -1901,75 +1901,80 @@ namespace AppData // solo se sheet > 0... if (sheetID > 0) { - // elenco items da foglio!!! - var tabItems = DataLayer.man.taIL.getBySheet(sheetID); - List itemsAll = new List(); - List itemsDepo = new List(); - List itemsCart = new List(); - List itemsBin = new List(); - List itemsSecOp = new List(); - List itemsScrap = new List(); - - //se ho items... - if (tabItems.Count > 0) + try { - // ciclo! - foreach (var item in tabItems) + // elenco items da foglio!!! + var tabItems = DataLayer.man.taIL.getBySheet(sheetID); + List itemsAll = new List(); + List itemsDepo = new List(); + List itemsCart = new List(); + List itemsBin = new List(); + List itemsSecOp = new List(); + List itemsScrap = new List(); + + //se ho items... + if (tabItems.Count > 0) { - // aggiungoncomunque a lista generale... - itemsAll.Add(item.ItemDtmx); - // controllo se sia SCRAP - if (item.StatusID >= 990) + // ciclo! + foreach (var item in tabItems) { - itemsScrap.Add(item.ItemDtmx); - } - // controllo SE sia stato depositato... check status 3/4 - else if (item.StatusID == 3 || item.StatusID == 4) - { - itemsDepo.Add(item.ItemDtmx); - } - else if (item.ProcessesReq.Contains("PaintFlag")) - { - itemsBin.Add(item.ItemDtmx); - } - else - { - itemsCart.Add(item.ItemDtmx); - } - // controllo ANCHE postprocessing - if (item.PostProcList != "") - { - itemsSecOp.Add(item.ItemDtmx); + // aggiungoncomunque a lista generale... + itemsAll.Add(item.ItemDtmx); + // controllo se sia SCRAP + if (item.StatusID >= 990) + { + itemsScrap.Add(item.ItemDtmx); + } + // controllo SE sia stato depositato... check status 3/4 + else if (item.StatusID == 3 || item.StatusID == 4) + { + itemsDepo.Add(item.ItemDtmx); + } + else if (item.ProcessesReq.Contains("PaintFlag")) + { + itemsBin.Add(item.ItemDtmx); + } + else + { + itemsCart.Add(item.ItemDtmx); + } + // controllo ANCHE postprocessing + if (item.PostProcList != "") + { + itemsSecOp.Add(item.ItemDtmx); + } } } + + + // FIX BIN + answ = updateCssByItemList(answ, redKeyBase, "ItemsBin", itemsBin, dataCacheTTL); + + // FIX CART + answ = updateCssByItemList(answ, redKeyBase, "ItemsCart", itemsCart, dataCacheTTL); + + // FIX Scaricati + answ = updateCssByItemList(answ, redKeyBase, "ItemsDepo", itemsDepo, dataCacheTTL); + + // FIX SEC-OP + answ = updateCssByItemList(answ, redKeyBase, "ItemsSecOp", itemsSecOp, dataCacheTTL); + + // FIX SCRAP + answ = updateCssByItemList(answ, redKeyBase, "ItemsScrap", itemsScrap, dataCacheTTL); + + // FIXED SEL da array oggetti selezionati... + answ = updateCssByPickedItems(answ, redKeyBase, "ItemsSel", dataCacheTTL); + + + // INFINE serializzo e salvo tutti gli items trovati... + string serVal = JsonConvert.SerializeObject(itemsAll); + memLayer.ML.setRSV($"{redKeyBase}:ItemsAll", serVal, dataCacheTTL); + + // salvo redis css! + memLayer.ML.setRSV($"{redKeyBase}:Css", answ, dataCacheTTL); } - - - // FIX BIN - answ = updateCssByItemList(answ, redKeyBase, "ItemsBin", itemsBin, dataCacheTTL); - - // FIX CART - answ = updateCssByItemList(answ, redKeyBase, "ItemsCart", itemsCart, dataCacheTTL); - - // FIX Scaricati - answ = updateCssByItemList(answ, redKeyBase, "ItemsDepo", itemsDepo, dataCacheTTL); - - // FIX SEC-OP - answ = updateCssByItemList(answ, redKeyBase, "ItemsSecOp", itemsSecOp, dataCacheTTL); - - // FIX SCRAP - answ = updateCssByItemList(answ, redKeyBase, "ItemsScrap", itemsScrap, dataCacheTTL); - - // FIXED SEL da array oggetti selezionati... - answ = updateCssByPickedItems(answ, redKeyBase, "ItemsSel", dataCacheTTL); - - - // INFINE serializzo e salvo tutti gli items trovati... - string serVal = JsonConvert.SerializeObject(itemsAll); - memLayer.ML.setRSV($"{redKeyBase}:ItemsAll", serVal, dataCacheTTL); - - // salvo redis css! - memLayer.ML.setRSV($"{redKeyBase}:Css", answ, dataCacheTTL); + catch + { } } return answ; diff --git a/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx b/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx index 1c88ba5..6190021 100644 --- a/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx +++ b/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx @@ -24,8 +24,9 @@ MAKE CNC PROG
- PRINT LABELS - ITEM DONE + <%-- PRINT LABELS--%> + <%-- ITEM DONE--%> + ITEM DONE
diff --git a/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx.cs index 9df63d6..45d5931 100644 --- a/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx.cs @@ -67,6 +67,7 @@ namespace NKC_WF.WebUserControls protected void lbtPrintLabels_Click(object sender, EventArgs e) { bool allOk = true; +#if false // chiamo procedura stampa report x etichette dei pezzi lavorati offline string printer = DataLayer.man.getPrinter("PC-MACHINE-OFFLINE"); // ciclo tra TUTTI gli item compresi in questo Offline Order @@ -75,7 +76,8 @@ namespace NKC_WF.WebUserControls { // lancio stampa allOk = allOk && DataLayer.man.stampaDoc(item.ItemID.ToString(), printer, tipoDocumento.docPart, Request.UserHostName); - } + } +#endif if (allOk) { // registro che ho stampato... 2! diff --git a/NKC_WF/site/MachineOffline.aspx b/NKC_WF/site/MachineOffline.aspx index e04e0c8..921c3ec 100644 --- a/NKC_WF/site/MachineOffline.aspx +++ b/NKC_WF/site/MachineOffline.aspx @@ -6,7 +6,7 @@ - +
diff --git a/NKC_WF/site/MachineUnload.aspx b/NKC_WF/site/MachineUnload.aspx index 715f1e1..2fc76c2 100644 --- a/NKC_WF/site/MachineUnload.aspx +++ b/NKC_WF/site/MachineUnload.aspx @@ -9,51 +9,46 @@
-<%-- - --%> -
-

<%: traduci("MachineUnload") %> (<%: hfBatchID.Value %>)

-
- - +
+

<%: traduci("MachineUnload") %> (<%: hfBatchID.Value %>)

+
+ + + + + + + + +
+
+ - - - + -
-
- - - - - -
-
- - - - - - -
-
- - - - - -
-
- +
+
+ - + + + +
+
+ + +
- <%-- - --%> + <%-- + + + + --%> +
+
diff --git a/NKC_WF/site/MachineUnload.aspx.cs b/NKC_WF/site/MachineUnload.aspx.cs index 704434c..1b959cd 100644 --- a/NKC_WF/site/MachineUnload.aspx.cs +++ b/NKC_WF/site/MachineUnload.aspx.cs @@ -101,20 +101,20 @@ namespace NKC_WF { // in base al num di sec dell'ora decido cosa aggiornare... int counter = numWaitSvg; - // ogni 2 sec bin/cart doUpdate(); - if (counter % 5 == 0) + // ogni x cicli + if (counter % 10 == 0) { cmp_MU_stats.doUpdate(); upnlStats.DataBind(); } - //if (counter % 2 == 0) - //{ - cmp_MU_carts.doUpdate(); - upnlCarts.DataBind(); - cmp_MU_bins.doUpdate(); - upnlCarts.DataBind(); - //} + if (counter % 2 == 0) + { + cmp_MU_carts.doUpdate(); + upnlCarts.DataBind(); + cmp_MU_bins.doUpdate(); + upnlCarts.DataBind(); + } incrNumWait(); } /// @@ -140,7 +140,7 @@ namespace NKC_WF /// protected void incrNumWait() { - if (numWaitSvg > 10) + if (numWaitSvg > 30) { memLayer.ML.resetRCnt(redProdReq); Response.Redirect(Request.RawUrl); diff --git a/NKC_WF/site/MachineUnload.aspx.designer.cs b/NKC_WF/site/MachineUnload.aspx.designer.cs index cb5ee38..dbdbd7b 100644 --- a/NKC_WF/site/MachineUnload.aspx.designer.cs +++ b/NKC_WF/site/MachineUnload.aspx.designer.cs @@ -23,6 +23,15 @@ namespace NKC_WF /// protected global::System.Web.UI.UpdatePanel upnlStats; + /// + /// Controllo timerSvg. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.Timer timerSvg; + /// /// Controllo hfBatchID. /// @@ -77,15 +86,6 @@ namespace NKC_WF /// protected global::System.Web.UI.UpdatePanel upnlDrawings; - /// - /// Controllo timerSvg. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.Timer timerSvg; - /// /// Controllo cmp_MU_svgViewer. /// @@ -112,23 +112,5 @@ namespace NKC_WF /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::NKC_WF.WebUserControls.cmp_MU_carts cmp_MU_carts; - - /// - /// Controllo upnlSuggest. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.UpdatePanel upnlSuggest; - - /// - /// Controllo cmp_MU_suggestions. - /// - /// - /// 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_MU_suggestions cmp_MU_suggestions; } }