diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index 9be6c97..d272db4 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -1398,36 +1398,37 @@ namespace AppData public static DS_App.StackListRow getCurrBunk() { DS_App.StackListRow answ = null; + DS_App.StackListDataTable tabBunk = null; // cerco in cache.... - if (cachedCurrBunk != null) + if (cachedCurrBunkTab != null) { - answ = cachedCurrBunk; + tabBunk = cachedCurrBunkTab; } else { - var tabStl = DataLayer.man.taSTL.getLoaded(); - if (tabStl.Count > 0) - { - answ = tabStl[0]; - } + tabBunk = DataLayer.man.taSTL.getLoaded(); // salvo in redis - cachedCurrBunk = answ; + cachedCurrBunkTab = tabBunk; + } + if (tabBunk.Count > 0) + { + answ = tabBunk[0]; } return answ; } - protected static DS_App.StackListRow cachedCurrBunk + protected static DS_App.StackListDataTable cachedCurrBunkTab { get { - DS_App.StackListRow answ = null; + DS_App.StackListDataTable answ = null; string rawData = memLayer.ML.getRSV(redCurrBunkTabKey()); if (!string.IsNullOrEmpty(rawData)) { try { // deserializzo... - answ = JsonConvert.DeserializeObject(rawData); + answ = JsonConvert.DeserializeObject(rawData); } catch { } @@ -1468,38 +1469,39 @@ namespace AppData DS_App.SheetListRow answ = null; if (BatchID > 0) { + DS_App.SheetListDataTable tabSheets = null; // cerco in cache.... - if (cachedCurrSheet != null) + if (cachedCurrSheetTab != null) { - answ = cachedCurrSheet; + tabSheets = cachedCurrSheetTab; } else { // recupero sheet corrente da Bunk... - DS_App.SheetListDataTable tabSheets = DataLayer.man.taSHL.getByMLStatus(BatchID, 5, 5); - if (tabSheets.Count > 0) - { - answ = tabSheets[0]; - } + tabSheets = DataLayer.man.taSHL.getByMLStatus(BatchID, 5, 5); // salvo in redis - cachedCurrSheet = answ; + cachedCurrSheetTab = tabSheets; + } + if (tabSheets.Count > 0) + { + answ = tabSheets[0]; } } return answ; } - protected static DS_App.SheetListRow cachedCurrSheet + protected static DS_App.SheetListDataTable cachedCurrSheetTab { get { - DS_App.SheetListRow answ = null; + DS_App.SheetListDataTable answ = null; string rawData = memLayer.ML.getRSV(redCurrSheetTabKey()); if (!string.IsNullOrEmpty(rawData)) { try { // deserializzo... - answ = JsonConvert.DeserializeObject(rawData); + answ = JsonConvert.DeserializeObject(rawData); } catch { } @@ -1510,7 +1512,7 @@ namespace AppData { string rawData = JsonConvert.SerializeObject(value); // TTL 5 sec - memLayer.ML.setRSV(redCurrSheetTabKey(), rawData, 2); + memLayer.ML.setRSV(redCurrSheetTabKey(), rawData, 5); } } /// diff --git a/NKC_WF/App_Start/NKC_Startup.cs b/NKC_WF/App_Start/NKC_Startup.cs index 6294eb9..9633367 100644 --- a/NKC_WF/App_Start/NKC_Startup.cs +++ b/NKC_WF/App_Start/NKC_Startup.cs @@ -15,8 +15,10 @@ namespace NKC_WF.App_Start { // inizializzo appConf prima di tutto il resto... memLayer.ML.resetAppConf(); + logger.lg.scriviLog("resetAppConf DONE", tipoLog.STARTUP); // reset vocabolario DataWrap.DW.resetVocabolario(); + logger.lg.scriviLog("resetVocabolario DONE", tipoLog.STARTUP); logger.lg.scriviLog("Completed preliminary setup AppConf execution", tipoLog.STARTUP); } catch (Exception exc) diff --git a/NKC_WF/WebUserControls/cmp_secScreen.ascx.cs b/NKC_WF/WebUserControls/cmp_secScreen.ascx.cs index 9c9be95..bfeed6b 100644 --- a/NKC_WF/WebUserControls/cmp_secScreen.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_secScreen.ascx.cs @@ -39,7 +39,11 @@ namespace NKC_WF.WebUserControls DS_App.SheetListRow currSheet = ComLib.getCurrSheet(currBunk.BatchID); if (currSheet != null) { - SheetId = currSheet.SheetID; + // se variato... + if (SheetId != currSheet.SheetID) + { + SheetId = currSheet.SheetID; + } } } else