From ab2e3040bdf29b56e264a421fb5541a31c174994 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 12 May 2021 17:33:44 +0200 Subject: [PATCH] fix comportamento tablet x perdita sel numPzPallet + display ODL --- Jenkinsfile | 2 +- MP-TAB/WebUserControls/BaseUserControl.cs | 14 +++++++++++--- MP-TAB/WebUserControls/mod_ODL.ascx.cs | 8 ++++++-- MapoDb/DataLayer.cs | 1 + 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5af67e07..e27637ea 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,7 +13,7 @@ pipeline { steps { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=1422']) { + withEnv(['NEXT_BUILD_NUMBER=1423']) { // env.versionNumber = VersionNumber(versionNumberString : '6.13.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '6.13.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'MAPO' diff --git a/MP-TAB/WebUserControls/BaseUserControl.cs b/MP-TAB/WebUserControls/BaseUserControl.cs index 96e825c7..da5d8efa 100644 --- a/MP-TAB/WebUserControls/BaseUserControl.cs +++ b/MP-TAB/WebUserControls/BaseUserControl.cs @@ -227,6 +227,11 @@ namespace MoonProTablet.WebUserControls set { memLayer.ML.setSessionVal("idxODL", value); + // resetto cache redis + if(value==0) + { + DataLayerObj.emptyCurrODL(idxMacchina); + } } } @@ -235,10 +240,13 @@ namespace MoonProTablet.WebUserControls get { string answ = ""; - var odlDetail = DataLayerObj.currODLRowTab(idxMacchina); - if (odlDetail != null && odlDetail.Rows.Count > 0) + if (idxOdl > 0) { - answ = odlDetail[0].KeyRichiesta; + var odlDetail = DataLayerObj.currODLRowTab(idxMacchina); + if (odlDetail != null && odlDetail.Rows.Count > 0) + { + answ = odlDetail[0].KeyRichiesta; + } } return answ; } diff --git a/MP-TAB/WebUserControls/mod_ODL.ascx.cs b/MP-TAB/WebUserControls/mod_ODL.ascx.cs index 79fa1d0d..40fd976a 100644 --- a/MP-TAB/WebUserControls/mod_ODL.ascx.cs +++ b/MP-TAB/WebUserControls/mod_ODL.ascx.cs @@ -1319,8 +1319,12 @@ namespace MoonProTablet.WebUserControls // leggo idxOdl da ultimo odl attivo x macchina int idxODLStart = DataLayerObj.taODL.getByMacchina(idxMacchinaFix)[0].IdxODL; int idxEvento = 1; // !!!HARD CODED - // aggiorno (se necessario) note e tempo setup - DataLayerObj.taODL.updateSetup(idxODLStart, DataLayerObj.MatrOpr, TCRichAttr, PzPallet, txtNote.Text); + // se le note sono visibili + if (divNote.Visible) + { + // aggiorno (se necessario) note e tempo setup + DataLayerObj.taODL.updateSetup(idxODLStart, DataLayerObj.MatrOpr, TCRichAttr, PzPallet, txtNote.Text); + } // controllo se TC Assegnato != TCRichiesto allora invio email x verifiche... DS_ProdTempi.ODLRow rigaOdl = DataLayerObj.taODL.getByIdx(idxODLStart, false)[0]; if (rigaOdl.TCAssegnato != TCRichAttr) diff --git a/MapoDb/DataLayer.cs b/MapoDb/DataLayer.cs index 5effd777..ba74f171 100644 --- a/MapoDb/DataLayer.cs +++ b/MapoDb/DataLayer.cs @@ -1450,6 +1450,7 @@ namespace MapoDb try { memLayer.ML.redDelKey(currODLHash(idxMacchina)); + memLayer.ML.redDelKey(currOdlRowHash(idxMacchina)); answ = "OK"; } catch