From 91b9a17f8535c4e780806f607cb57cd6542f7baf Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Wed, 12 Aug 2020 20:07:54 +0200 Subject: [PATCH] Ancora fix vari x refresh css + svg in unload --- NKC_WF/Controllers/getMUCssController.cs | 8 -------- NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx | 6 ++++-- NKC_WF/WebUserControls/cmp_unloadSmart.ascx | 4 ++-- NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs | 3 ++- NKC_WF/site/MachineUnload.aspx.cs | 11 +---------- 5 files changed, 9 insertions(+), 23 deletions(-) diff --git a/NKC_WF/Controllers/getMUCssController.cs b/NKC_WF/Controllers/getMUCssController.cs index 5b6844e..dc201de 100644 --- a/NKC_WF/Controllers/getMUCssController.cs +++ b/NKC_WF/Controllers/getMUCssController.cs @@ -50,14 +50,6 @@ namespace NKC_WF.Controllers { answ = memLayer.ML.getRSV(redKey); } - //if (!memLayer.ML.redKeyPresent(redKey)) - //{ - // memLayer.ML.setRSV(redKey, answ, dataCacheTTL / 2); - //} - //else - //{ - // answ = memLayer.ML.getRSV(redKey); - //} // RICALCOLO SOLO SE non trovo in REDIS (perché invalidato) if (string.IsNullOrEmpty(answ)) // se vuoto lo calcolo... diff --git a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx index 947f555..befb80b 100644 --- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx @@ -23,16 +23,18 @@ }).then(function (data) { // se è cambiato... if (data != lastVal) { + console.log("Changed cssRev: data=" + data + " | lastVal=" + lastVal); $('#uplTavola').load(location.href + ' #dynCss'); document.getElementById('<%=hfCurrRev.ClientID%>').value = data; - } - }); + } + }); // qui leggo la versione del BUNK (con cambio foglio...) $.ajax({ url: "../api/getMUSheetRev/" + BunkId }).then(function (data) { // se è cambiato... if (data != lastValBunk) { + console.log("Changed SheetReview: data=" + data + " | lastValBunk=" + lastValBunk); // ricarico intera pagina! location.reload(); document.getElementById('<%=hfCurrBunkRev.ClientID%>').value = data; diff --git a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx index a72e2ea..4570920 100644 --- a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx +++ b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx @@ -60,7 +60,7 @@
- <%: traduci("cancel") %> + <%: traduci("ResetItemPickup") %>
@@ -73,7 +73,7 @@ <%: traduci("toPark") %>
- <%: traduci("ResetSel") %> + <%: traduci("ResetSheetPickup") %>
diff --git a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs index 9ee6e7d..052dd2b 100644 --- a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs @@ -474,7 +474,8 @@ namespace NKC_WF.WebUserControls case 2: case 100: // salvo che è in STATO 2 (picked up) - DataLayer.man.taIL.updateStatus(itemRow.ItemID, 2, PlaceId); + DataLayer currDataLayer = new DataLayer(); + currDataLayer.taIL.updateStatus(itemRow.ItemID, 2, PlaceId); // verifico cosa devo mostrare come PROX passaggio... showCart = string.IsNullOrEmpty(itemRow.ProcessesReq); showBin = (itemRow.ProcessesReq.Contains("PaintFlag")); diff --git a/NKC_WF/site/MachineUnload.aspx.cs b/NKC_WF/site/MachineUnload.aspx.cs index 416f0a6..fb864d1 100644 --- a/NKC_WF/site/MachineUnload.aspx.cs +++ b/NKC_WF/site/MachineUnload.aspx.cs @@ -110,17 +110,9 @@ namespace NKC_WF int counter = numWaitSvg; doUpdate(); // ogni x cicli - if (counter % 5 == 0) + if (counter % 10 == 0) { cmp_MU_stats.doUpdate(); - -#if false - // verifico se c'è richiesta reload UNLOAD... - if (!string.IsNullOrEmpty(memLayer.ML.getRSV(redProdForceReload))) - { - Response.Redirect(Request.RawUrl); - } -#endif } if (counter % 2 == 0) { @@ -165,7 +157,6 @@ namespace NKC_WF if (numWaitSvg > 30) { memLayer.ML.resetRCnt(redProdReq); - Response.Redirect(Request.RawUrl); } memLayer.ML.setRCntI(redProdReq); }