From 83610491d332a8290e0d8ac0bc45e2458f15c5f1 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 21 Jan 2020 21:31:22 +0100 Subject: [PATCH 1/4] Pulizia codice e creazione metodi x salvare parametri correnti macchina --- AppData/ComLib.cs | 129 +++++++++++++++--- Jenkinsfile | 2 +- NKC_SDK/Objects.cs | 3 +- .../WebUserControls/cmp_unloadSmart.ascx.cs | 22 +-- 4 files changed, 115 insertions(+), 41 deletions(-) diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index 6840eee..4d15966 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -126,23 +126,6 @@ namespace AppData return answ; } - //public object getEstAnsw(int BatchId) - //{ - // List answ = null; - - // var collNAA = database.GetCollection("NestAnswArchive"); - // // oggetto filtraggio x nest answ - // var builderNAA = Builders.Filter; - // var filtBatchId = builderNAA.Eq(u => u.BatchID, BatchId); - - // var datiCorrenti = collNAA.Find(filtBatchId); - // foreach (var item in datiCorrenti) - // { - - // } - // return answ; - //} - /// /// restitusice ultima chiamata REST registrata su REDIS /// @@ -1704,6 +1687,118 @@ namespace AppData return currCss; } + /// + /// IP del device + /// + /// + public static string GetIPAddress() + { + HttpContext context = HttpContext.Current; + string ipAddress = context.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; + + if (!string.IsNullOrEmpty(ipAddress)) + { + string[] addresses = ipAddress.Split(','); + if (addresses.Length != 0) + { + return addresses[0]; + } + } + + return context.Request.ServerVariables["REMOTE_ADDR"]; + } + + /// + /// Calcola area REDIS per MACCHINA + /// + /// + /// + public static string machineArea(string machineCod) + { + string answ = memLayer.ML.redHash($"currMachineData:{machineCod}"); + return answ; + } + /// + /// Fornisce un dictionary di valori ATTUALI per una specifica macchina + /// + /// + /// + public Dictionary getCurrMachineData(string machineCod) + { + Dictionary answ = new Dictionary(); + // cerco in REDIS + string rawData = memLayer.ML.getRSV(machineArea(machineCod)); + if (!string.IsNullOrEmpty(rawData)) + { + answ = JsonConvert.DeserializeObject>(rawData); + } + else + { + // se non trovo creo un oggetto NUOVO e vuoto x ogni oggetto... e salvo... + answ.Add("BatchID", "0"); + answ.Add("SheetID_load", "0"); + answ.Add("SheetID_print", "0"); + answ.Add("SheetID_work", "0"); + answ.Add("SheetID_unload", "0"); + // serializzo e salvo! + saveMachineData(machineCod, answ); + } + // restituisco! + return answ; + } + /// + /// Salvataggio array dati di una macchina + /// + /// + /// + /// + public bool saveMachineData(string machineCod, Dictionary paramsArray) + { + bool answ = false; + try + { + // serializzo e salvo! + string rawData = JsonConvert.SerializeObject(paramsArray); + memLayer.ML.setRSV(machineArea(machineCod), rawData); + answ = true; + } + catch + { } + // restituisco! + return answ; + } + /// + /// Fornisce un dictionary di valori ATTUALI per una specifica macchina + /// + /// + /// + /// + /// + public bool saveMachineParam(string machineCod, string Key, string Val) + { + bool answ = false; + // recupero i dati + try + { + var currData = getCurrMachineData(machineCod); + // aggiorno il record + if (currData.ContainsKey(Key)) + { + currData[Key] = Val; + } + // oppure aggiungo... + else + { + currData.Add(Key, Val); + } + // salvo... + saveMachineData(machineCod, currData); + answ = true; + } + catch + { } + return answ; + } #endregion diff --git a/Jenkinsfile b/Jenkinsfile index 58d5d60..194d45c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=211']) { + withEnv(['NEXT_BUILD_NUMBER=212']) { // 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_SDK/Objects.cs b/NKC_SDK/Objects.cs index 6cb2ad3..c302bb4 100644 --- a/NKC_SDK/Objects.cs +++ b/NKC_SDK/Objects.cs @@ -440,7 +440,6 @@ namespace NKC_SDK #endregion - #region classi per PROD /// @@ -609,5 +608,5 @@ namespace NKC_SDK #endregion - + } diff --git a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs index 4c810cd..3677ebe 100644 --- a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs @@ -22,26 +22,7 @@ namespace NKC_WF.WebUserControls /// Sheet selezionato... /// protected int SheetID; - /// - /// IP del device - /// - /// - protected string GetIPAddress() - { - System.Web.HttpContext context = System.Web.HttpContext.Current; - string ipAddress = context.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; - if (!string.IsNullOrEmpty(ipAddress)) - { - string[] addresses = ipAddress.Split(','); - if (addresses.Length != 0) - { - return addresses[0]; - } - } - - return context.Request.ServerVariables["REMOTE_ADDR"]; - } protected string secOp { get @@ -66,12 +47,12 @@ namespace NKC_WF.WebUserControls { SheetID = sheetList[0].SheetID; } + deviceId = ComLib.GetIPAddress().Replace(".", "0").Replace(":", "0"); } protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { - deviceId = GetIPAddress().Replace(".", "_"); resetIcons(); updateCurrData(); } @@ -197,7 +178,6 @@ namespace NKC_WF.WebUserControls { // salvo in item sel... updateCurrData(); - deviceId = GetIPAddress().Replace(".", "0").Replace(":", "0"); ComLib.saveItemPickup(SheetID, deviceId, itemDtmx); } From 0692cd56b7ba43c31c9a7341ba8357591357775d Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 21 Jan 2020 21:53:03 +0100 Subject: [PATCH 2/4] Avanzamento conf ComLib... --- AppData/ComLib.cs | 63 ++++++++++++++++++--- Jenkinsfile | 2 +- NKC_WF/WebUserControls/cmp_taktList.ascx.cs | 8 +-- 3 files changed, 61 insertions(+), 12 deletions(-) diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index 4d15966..7f9f736 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -169,8 +169,6 @@ namespace AppData #region definizione classi impiegate con PROD - - public static string PositionStatusDescr(object value) { string answ = ""; @@ -188,6 +186,12 @@ namespace AppData case BatchPosition.StackDone: answ = traduci("StackDone"); break; + case BatchPosition.Current: + answ = traduci("StackCurrent"); + break; + case BatchPosition.Completed: + answ = traduci("StackCompleted"); + break; default: break; } @@ -1719,6 +1723,49 @@ namespace AppData return answ; } /// + /// Recupera prossimo batch da DB (NEXT... da db x status... ok SOLO x singola macchina) + /// + protected int getNextBatch + { + get + { + int answ = 0; + try + { + var currData = DataLayer.man.taBL.getNextAvailable(); + if (currData.Count > 0) + { + answ = currData[0].BatchID; + } + } + catch + { } + return answ; + } + } + /// + /// Recupera SHEET da batch e sstati permessi... + /// + /// + /// + /// + /// + protected int getSheetIdByBatch(int BatchID, int minVal, int maxVal) + { + int answ = 0; + try + { + var tabSheet = DataLayer.man.taSHL.getByMLStatus(BatchID, minVal, maxVal); + if (tabSheet.Count > 0) + { + answ = tabSheet[0].SheetID; + } + } + catch + { } + return answ; + } + /// /// Fornisce un dictionary di valori ATTUALI per una specifica macchina /// /// @@ -1734,12 +1781,14 @@ namespace AppData } else { + // recupero batch e sheet... + int batchId = getNextBatch; // se non trovo creo un oggetto NUOVO e vuoto x ogni oggetto... e salvo... - answ.Add("BatchID", "0"); - answ.Add("SheetID_load", "0"); - answ.Add("SheetID_print", "0"); - answ.Add("SheetID_work", "0"); - answ.Add("SheetID_unload", "0"); + answ.Add("BatchID", batchId.ToString()); + answ.Add("SheetID_load", getSheetIdByBatch(batchId, 0, 1).ToString()); + answ.Add("SheetID_print", getSheetIdByBatch(batchId, 1, 2).ToString()); + answ.Add("SheetID_work", getSheetIdByBatch(batchId, 2, 3).ToString()); + answ.Add("SheetID_unload", getSheetIdByBatch(batchId, 3, 5).ToString()); // serializzo e salvo! saveMachineData(machineCod, answ); } diff --git a/Jenkinsfile b/Jenkinsfile index 194d45c..75623ab 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=212']) { + withEnv(['NEXT_BUILD_NUMBER=213']) { // 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_taktList.ascx.cs b/NKC_WF/WebUserControls/cmp_taktList.ascx.cs index b549567..d731cdb 100644 --- a/NKC_WF/WebUserControls/cmp_taktList.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_taktList.ascx.cs @@ -12,7 +12,7 @@ namespace NKC_WF.WebUserControls { protected void Page_Load(object sender, EventArgs e) { - if(!Page.IsPostBack) + if (!Page.IsPostBack) { checkVisibility(); } @@ -24,7 +24,7 @@ namespace NKC_WF.WebUserControls grView.Visible = !divSelected.Visible; // imposto css titolo... string titleClass = "row font-weight-bold"; - if(divSelected.Visible) + if (divSelected.Visible) { titleClass += " table-primary"; } @@ -78,11 +78,11 @@ namespace NKC_WF.WebUserControls return answ; } /// - /// Converte il codice POSITION in effettivo campo + /// Converte il codice POSITION di un BATCH in traduzione /// /// /// - public string PStatus(object _status) + public string BatchPositionStatus(object _status) { string answ = ComLib.PositionStatusDescr(_status); return answ; From c13343a4568f8b35eefee1b307a841b13af75469 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Thu, 23 Jan 2020 17:26:03 +0100 Subject: [PATCH 3/4] Fix BIN/CART unload display + fix bunk --- Jenkinsfile | 2 +- NKC_WF/WebUserControls/cmp_MU_bins.ascx | 2 +- NKC_WF/WebUserControls/cmp_MU_carts.ascx | 2 +- NKC_WF/WebUserControls/cmp_taktList.ascx | 2 +- NKC_WF/site/MachineUnload.aspx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 75623ab..e44b379 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=213']) { + withEnv(['NEXT_BUILD_NUMBER=214']) { // 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_MU_bins.ascx b/NKC_WF/WebUserControls/cmp_MU_bins.ascx index 9c83e3b..2133eee 100644 --- a/NKC_WF/WebUserControls/cmp_MU_bins.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_bins.ascx @@ -16,7 +16,7 @@ - + diff --git a/NKC_WF/WebUserControls/cmp_MU_carts.ascx b/NKC_WF/WebUserControls/cmp_MU_carts.ascx index a5f05c2..5174a46 100644 --- a/NKC_WF/WebUserControls/cmp_MU_carts.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_carts.ascx @@ -16,7 +16,7 @@ - + diff --git a/NKC_WF/WebUserControls/cmp_taktList.ascx b/NKC_WF/WebUserControls/cmp_taktList.ascx index 4194632..5a5d685 100644 --- a/NKC_WF/WebUserControls/cmp_taktList.ascx +++ b/NKC_WF/WebUserControls/cmp_taktList.ascx @@ -39,7 +39,7 @@ - + diff --git a/NKC_WF/site/MachineUnload.aspx b/NKC_WF/site/MachineUnload.aspx index 3852d07..e83fc30 100644 --- a/NKC_WF/site/MachineUnload.aspx +++ b/NKC_WF/site/MachineUnload.aspx @@ -27,7 +27,7 @@ - + From ce94e2d6f1343e481818445bc9cfa53efb9061cf Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Thu, 23 Jan 2020 18:23:49 +0100 Subject: [PATCH 4/4] 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; + } }