From ce94e2d6f1343e481818445bc9cfa53efb9061cf Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Thu, 23 Jan 2020 18:23:49 +0100 Subject: [PATCH] OK selezione e deselezione ITEMS --- AppData/ComLib.cs | 5 ++ Jenkinsfile | 2 +- NKC_WF/WebUserControls/cmp_unloadSmart.ascx | 3 + .../WebUserControls/cmp_unloadSmart.ascx.cs | 63 ++++++++++++++----- .../cmp_unloadSmart.ascx.designer.cs | 27 ++++++++ NKC_WF/site/MachineUnloadSmart.aspx | 1 + NKC_WF/site/MachineUnloadSmart.aspx.cs | 37 ++++++++++- .../site/MachineUnloadSmart.aspx.designer.cs | 39 +++++++----- 8 files changed, 145 insertions(+), 32 deletions(-) diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index 7f9f736..cfe958b 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -1616,7 +1616,12 @@ namespace AppData // sostituisco dictData.Remove(deviceId); } + // salvo! + rawData = JsonConvert.SerializeObject(dictData); + memLayer.ML.setRSV($"{redKeyBase}:ItemsSel", rawData); answ = true; + // reset memoria redis del CSS x obbligare refresh... + memLayer.ML.setRSV($"{redKeyBase}:Css", ""); } catch { } diff --git a/Jenkinsfile b/Jenkinsfile index e44b379..12628cc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=214']) { + withEnv(['NEXT_BUILD_NUMBER=215']) { // env.versionNumber = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') diff --git a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx index dc8e2b9..f4e051e 100644 --- a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx +++ b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx @@ -3,6 +3,9 @@ <%@ Register Src="~/WebUserControls/cmp_barcode.ascx" TagPrefix="uc1" TagName="cmp_barcode" %>
+ + +

<%: traduci("MachineUnloadSmart") %>

diff --git a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs index 3677ebe..10e08ad 100644 --- a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs @@ -12,17 +12,34 @@ namespace NKC_WF.WebUserControls /// /// ID univoco da IP /// - protected string deviceId = "AAA"; + protected string DeviceId + { + set + { + hfDeviceId.Value = value; + } + get + { + return hfDeviceId.Value; + } + } - /// - /// Batch selezionato - /// - protected int BatchID; /// /// Sheet selezionato... /// - protected int SheetID; - + protected int SheetID + { + set + { + hfSheetID.Value = value.ToString(); + } + get + { + int answ = 0; + int.TryParse(hfSheetID.Value, out answ); + return answ; + } + } protected string secOp { get @@ -39,15 +56,29 @@ namespace NKC_WF.WebUserControls /// protected void updateCurrData() { - //!!!FIXME!!! fare calcolo del VERO batch corrente... - BatchID = 242; // FORSE 5/5?!? - var sheetList = DataLayer.man.taSHL.getByMLStatus(BatchID, 3, 5); + var sheetList = DataLayer.man.taSHL.getByMLStatus(BatchId, 3, 5); if (sheetList.Count > 0) { SheetID = sheetList[0].SheetID; } - deviceId = ComLib.GetIPAddress().Replace(".", "0").Replace(":", "0"); + DeviceId = ComLib.GetIPAddress().Replace(".", "0").Replace(":", "0"); + } + /// + /// Batch corrente... + /// + public int BatchId + { + set + { + hfBatchID.Value = value.ToString(); + } + get + { + int answ = 0; + int.TryParse(hfBatchID.Value, out answ); + return answ; + } } protected void Page_Load(object sender, EventArgs e) { @@ -124,7 +155,7 @@ namespace NKC_WF.WebUserControls case codeType.UNK: cmp_barcode.showOutput("text-danger", $"Unknown Data: {decoData.rawData} --> no action"); // elimino item sel... - ComLib.resetItemPickup(SheetID, deviceId); + ComLib.resetItemPickup(SheetID, DeviceId); doRaiseEv = true; break; case codeType.Item: @@ -164,7 +195,7 @@ namespace NKC_WF.WebUserControls default: cmp_barcode.showOutput("text-danger", $"Unknown Data: {decoData.rawData} --> no action"); // elimino item sel... - ComLib.resetItemPickup(SheetID, deviceId); + ComLib.resetItemPickup(SheetID, DeviceId); break; } @@ -178,7 +209,7 @@ namespace NKC_WF.WebUserControls { // salvo in item sel... updateCurrData(); - ComLib.saveItemPickup(SheetID, deviceId, itemDtmx); + ComLib.saveItemPickup(SheetID, DeviceId, itemDtmx); } /// @@ -237,7 +268,7 @@ namespace NKC_WF.WebUserControls DataLayer.man.taIL.updateStatus(itemIdSelected, 4, "WRK001"); lblDestination.Text = $"Item {itemIdSelected} PUT IN CART {rawData}"; // elimino item sel... - ComLib.resetItemPickup(SheetID, deviceId); + ComLib.resetItemPickup(SheetID, DeviceId); } } break; @@ -257,7 +288,7 @@ namespace NKC_WF.WebUserControls DataLayer.man.taIL.updateStatus(itemIdSelected, 5, "WRK001"); lblDestination.Text = $"Item {itemIdSelected} PUT IN BIN {rawData}"; // elimino item sel... - ComLib.resetItemPickup(SheetID, deviceId); + ComLib.resetItemPickup(SheetID, DeviceId); } } break; diff --git a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.designer.cs index f458543..73d796d 100644 --- a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.designer.cs @@ -14,6 +14,33 @@ namespace NKC_WF.WebUserControls public partial class cmp_unloadSmart { + /// + /// Controllo hfBatchID. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfBatchID; + + /// + /// Controllo hfSheetID. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfSheetID; + + /// + /// Controllo hfDeviceId. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfDeviceId; + /// /// Controllo cmp_barcode. /// diff --git a/NKC_WF/site/MachineUnloadSmart.aspx b/NKC_WF/site/MachineUnloadSmart.aspx index 4aba26d..c6a1bcd 100644 --- a/NKC_WF/site/MachineUnloadSmart.aspx +++ b/NKC_WF/site/MachineUnloadSmart.aspx @@ -5,5 +5,6 @@ + diff --git a/NKC_WF/site/MachineUnloadSmart.aspx.cs b/NKC_WF/site/MachineUnloadSmart.aspx.cs index 58d6fb3..0b42cc3 100644 --- a/NKC_WF/site/MachineUnloadSmart.aspx.cs +++ b/NKC_WF/site/MachineUnloadSmart.aspx.cs @@ -1,6 +1,41 @@ -namespace NKC_WF +using System; + +namespace NKC_WF { public partial class MachineUnloadSmart : BasePage { + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + doUpdate(); + } + } + /// + /// Batch corrente... + /// + public int BatchId + { + set + { + hfBatchID.Value = value.ToString(); + } + get + { + int answ = 0; + int.TryParse(hfBatchID.Value, out answ); + return answ; + } + } + /// + /// Aggiorna componente principale e child components + /// + private void doUpdate() + { + //!!!FIXME!!! fare calcolo del VERO batch corrente... + BatchId = 242; // fixed x test! + // aggiorno child + cmp_unloadSmart.BatchId = BatchId; + } } } \ No newline at end of file diff --git a/NKC_WF/site/MachineUnloadSmart.aspx.designer.cs b/NKC_WF/site/MachineUnloadSmart.aspx.designer.cs index 73704a3..00c20b0 100644 --- a/NKC_WF/site/MachineUnloadSmart.aspx.designer.cs +++ b/NKC_WF/site/MachineUnloadSmart.aspx.designer.cs @@ -7,18 +7,29 @@ // //------------------------------------------------------------------------------ -namespace NKC_WF { - - - public partial class MachineUnloadSmart { - - /// - /// Controllo cmp_unloadSmart. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::NKC_WF.WebUserControls.cmp_unloadSmart cmp_unloadSmart; - } +namespace NKC_WF +{ + + + public partial class MachineUnloadSmart + { + + /// + /// Controllo hfBatchID. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfBatchID; + + /// + /// Controllo cmp_unloadSmart. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::NKC_WF.WebUserControls.cmp_unloadSmart cmp_unloadSmart; + } }