From 5840e770f8d078f4f297aa8fce5b825446db2347 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 19 Dec 2023 10:59:45 +0100 Subject: [PATCH 1/2] Update timing reload + log x problemi smart debice --- NKC_WF/Web.config | 4 ++-- NKC_WF/WebUserControls/cmp_barcode.ascx.cs | 10 ++++++--- NKC_WF/WebUserControls/cmp_unloadSmart.ascx | 9 ++++---- .../WebUserControls/cmp_unloadSmart.ascx.cs | 6 +++++ .../cmp_unloadSmart.ascx.designer.cs | 4 ++-- NKC_WF/site/DBG_QRCode_Unload.aspx | 22 ++++++++++--------- 6 files changed, 34 insertions(+), 21 deletions(-) diff --git a/NKC_WF/Web.config b/NKC_WF/Web.config index 3a89e11..645d23f 100644 --- a/NKC_WF/Web.config +++ b/NKC_WF/Web.config @@ -63,8 +63,8 @@ - - + + diff --git a/NKC_WF/WebUserControls/cmp_barcode.ascx.cs b/NKC_WF/WebUserControls/cmp_barcode.ascx.cs index c6c5025..ade0132 100644 --- a/NKC_WF/WebUserControls/cmp_barcode.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_barcode.ascx.cs @@ -147,9 +147,11 @@ namespace NKC_WF.WebUserControls protected void UiTimer_Tick(object sender, EventArgs e) { - // controllo, se ultima operazione > 1 minuto --> reload! - if (DateTime.Now.Subtract(lastDtInput).TotalMilliseconds > memLayer.ML.confReadInt("smartForceReloadPagina_ms")) + // controllo, se ultima operazione > smartForceReloadPagina_ms --> reload! + var tsLastUpdate = DateTime.Now.Subtract(lastDtInput); + if (tsLastUpdate.TotalMilliseconds > memLayer.ML.confReadInt("smartForceReloadPagina_ms")) { + lgInfo($"cmp_barcode | Reload page for timeout: {tsLastUpdate.TotalSeconds} sec from last update"); inputAcquired = "##"; Response.Redirect(Request.RawUrl); } @@ -174,13 +176,15 @@ namespace NKC_WF.WebUserControls raiseEvent(); } } +#if false else { if (string.IsNullOrEmpty(inputAcquired)) { resetInput(); } - } + } +#endif resetInput(); } diff --git a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx index 1f2d705..ba83d4f 100644 --- a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx +++ b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx @@ -20,8 +20,8 @@
- - + <%-- + --%>

Processing...

@@ -29,9 +29,10 @@
+ Force Reload
- - + <%-- + --%>
diff --git a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs index 9ebd359..eaef86d 100644 --- a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs @@ -888,5 +888,11 @@ namespace NKC_WF.WebUserControls } #endregion Protected Methods + + protected void lbtForceReload_Click(object sender, EventArgs e) + { + lgInfo("UnloadSmart: Requested ForceReload by user"); + Response.Redirect(Request.RawUrl); + } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.designer.cs index 975874e..bfc465e 100644 --- a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.designer.cs @@ -105,13 +105,13 @@ namespace NKC_WF.WebUserControls protected global::System.Web.UI.WebControls.HiddenField hfShowSecOp; /// - /// updProgSmartUnload control. + /// lbtForceReload control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.UpdateProgress updProgSmartUnload; + protected global::System.Web.UI.WebControls.LinkButton lbtForceReload; /// /// divItemDet control. diff --git a/NKC_WF/site/DBG_QRCode_Unload.aspx b/NKC_WF/site/DBG_QRCode_Unload.aspx index 14d4d3d..c94073c 100644 --- a/NKC_WF/site/DBG_QRCode_Unload.aspx +++ b/NKC_WF/site/DBG_QRCode_Unload.aspx @@ -27,19 +27,21 @@
QR size - - - - - + + + + + + +
NUM Righe: - - - - - + + + + +
From ff73f8d804c731e28e4f0df5436196310039c3ee Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 19 Dec 2023 11:00:01 +0100 Subject: [PATCH 2/2] fix display errore SOLO in caso di lock --- NKC_WF/WebUserControls/cmp_unloadSmart.ascx | 8 ++++---- NKC_WF/WebUserControls/cmp_unloadSmart.ascx.designer.cs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx index ba83d4f..55be330 100644 --- a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx +++ b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx @@ -20,8 +20,8 @@
- <%-- - --%> + +

Processing...

@@ -31,8 +31,8 @@
Force Reload
- <%--
-
--%> +
+
diff --git a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.designer.cs index bfc465e..975874e 100644 --- a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.designer.cs @@ -105,13 +105,13 @@ namespace NKC_WF.WebUserControls protected global::System.Web.UI.WebControls.HiddenField hfShowSecOp; /// - /// lbtForceReload control. + /// updProgSmartUnload control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.LinkButton lbtForceReload; + protected global::System.Web.UI.UpdateProgress updProgSmartUnload; /// /// divItemDet control.