From 9284088c36d07a520dc72dd54fae7041fed1bfda Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 7 Aug 2020 12:59:28 +0200 Subject: [PATCH 1/4] Various Fix on QueueController --- NKC_WF/Controllers/PrintQueueController.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/NKC_WF/Controllers/PrintQueueController.cs b/NKC_WF/Controllers/PrintQueueController.cs index 9a00e39..a38740a 100644 --- a/NKC_WF/Controllers/PrintQueueController.cs +++ b/NKC_WF/Controllers/PrintQueueController.cs @@ -2,6 +2,7 @@ using Newtonsoft.Json; using NKC_SDK; using SteamWare; +using System; using System.Collections.Generic; using System.Data; using System.IO; @@ -27,10 +28,10 @@ namespace NKC_WF.Controllers { int answ = 0; // resetto conteggio in redis... - DS_Report.PrintJobQueueDataTable nextJob = DataLayer.man.taPJQ.getWaiting(); - if (nextJob != null) + DS_Report.PrintJobQueueDataTable tabPJQ = DataLayer.man.taPJQ.getWaiting(); + if (tabPJQ != null) { - answ = nextJob.Count; + answ = tabPJQ.Count; } return answ; } @@ -153,7 +154,9 @@ namespace NKC_WF.Controllers } else { - // recupero da dbe e salvo + // chiudo gli zombie (stampe non chiuse)... + DataLayer.man.taPJQ.chiudiZoombie(DateTime.Now.AddMilliseconds(-memLayer.ML.CRI("zombieMsTime"))); + // recupero da db e salvo answ = countWaitingDb; memLayer.ML.setRSV(redQueueCount, answ.ToString(), memLayer.ML.CRI("cacheQueueSec")); } @@ -222,7 +225,7 @@ namespace NKC_WF.Controllers int.TryParse(printAnsw.ticketNum, out idxPJQ); DataLayer.man.taPJQ.updateStato(idxPJQ, printAnsw.newStatus); // resetto conteggio in redis... - memLayer.ML.setRSV(redQueueCount, countWaitingDb.ToString(), 30); + memLayer.ML.setRSV(redQueueCount, countWaitingDb.ToString(), memLayer.ML.CRI("cacheQueueSec")); answ = "OK"; } } @@ -233,6 +236,5 @@ namespace NKC_WF.Controllers } #endregion - } } From c8a343bb19f321c3012748e96fce778b405aa1db Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 7 Aug 2020 13:00:11 +0200 Subject: [PATCH 2/4] Fix for reload pages --- NKC_WF/WebUserControls/cmp_menuTop.ascx | 9 +- NKC_WF/WebUserControls/cmp_menuTop.ascx.cs | 27 +----- .../cmp_menuTop.ascx.designer.cs | 95 +++++++++---------- NKC_WF/site/ForceReload.aspx | 16 ++++ NKC_WF/site/ForceReload.aspx.cs | 29 ++++++ NKC_WF/site/ForceReload.aspx.designer.cs | 26 +++++ NKC_WF/site/UpdateVoc.aspx.cs | 9 +- 7 files changed, 129 insertions(+), 82 deletions(-) create mode 100644 NKC_WF/site/ForceReload.aspx create mode 100644 NKC_WF/site/ForceReload.aspx.cs create mode 100644 NKC_WF/site/ForceReload.aspx.designer.cs diff --git a/NKC_WF/WebUserControls/cmp_menuTop.ascx b/NKC_WF/WebUserControls/cmp_menuTop.ascx index 9efb3b1..ff55cb8 100644 --- a/NKC_WF/WebUserControls/cmp_menuTop.ascx +++ b/NKC_WF/WebUserControls/cmp_menuTop.ascx @@ -1,8 +1,8 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_menuTop.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_menuTop" %>