From 4b1297f5c63df3fc34352a90fc0c7d7a2e080ecf Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 24 Sep 2019 17:14:22 +0200 Subject: [PATCH] Appunti pagine mancanti --- NKC_WF/MachineUnloadSmart.aspx | 4 +- NKC_WF/MachineUnloadSmart.aspx.cs | 83 +++++++++++++++++++-- NKC_WF/MachineUnloadSmart.aspx.designer.cs | 9 +++ NKC_WF/WebUserControls/cmp_homeButtons.ascx | 6 ++ 4 files changed, 95 insertions(+), 7 deletions(-) diff --git a/NKC_WF/MachineUnloadSmart.aspx b/NKC_WF/MachineUnloadSmart.aspx index fb75c54..d9ae1ff 100644 --- a/NKC_WF/MachineUnloadSmart.aspx +++ b/NKC_WF/MachineUnloadSmart.aspx @@ -11,6 +11,7 @@
+
@@ -29,7 +30,8 @@ <%: traduci("cancel") %>
-
+ +

diff --git a/NKC_WF/MachineUnloadSmart.aspx.cs b/NKC_WF/MachineUnloadSmart.aspx.cs index 7896806..08a7b2e 100644 --- a/NKC_WF/MachineUnloadSmart.aspx.cs +++ b/NKC_WF/MachineUnloadSmart.aspx.cs @@ -1,4 +1,5 @@ -using System; +using AppData; +using System; namespace NKC_WF { @@ -6,7 +7,80 @@ namespace NKC_WF { protected void Page_Load(object sender, EventArgs e) { - fixIcons(); + if (!Page.IsPostBack) + { + resetIcons(); + } + cmp_barcode.eh_doRefresh += Cmp_barcode_eh_doRefresh; + cmp_barcode.eh_doReset += Cmp_barcode_eh_doReset; + } + /// + /// Comando barcode letto + /// + protected string lastCmd + { + get + { + return hfBarcode.Value; + } + set + { + hfBarcode.Value = value; + } + } + + private void Cmp_barcode_eh_doReset(object sender, EventArgs e) + { + resetIcons(); + } + + private void Cmp_barcode_eh_doRefresh(object sender, EventArgs e) + { + bool doRaiseEv = false; + // processo evento.. + lastCmd = cmp_barcode.inputAcquired.ToUpper(); + if (lastCmd == "") doRaiseEv = true; + // processiamo barcode letto + decodedData decoData = DataLayer.man.decodeBcode(lastCmd); + switch (decoData.codeType) + { + case codeType.UNK: + break; + case codeType.Item: + break; + case codeType.Material: + break; + case codeType.Sheet: + break; + case codeType.Stack: + break; + case codeType.Batch: + break; + default: + break; + } + + // reset comando + cmp_barcode.inputAcquired = ""; + // aggiorno... + doUpdate(); +#if false + // se richiesto faccio raiseEvent + if (doRaiseEv) + { + cmp_stackNextloading.doUpdate(); + raiseEvent(); + } +#endif + + } + + private void doUpdate() + { + lblDestination.CssClass = "text-secondary"; + lblMessage.Text = ""; + lblDestination.Text = ""; + lblLastBCode.Text = ""; } private void fixIcons() @@ -39,10 +113,7 @@ namespace NKC_WF break; case 3: default: - lblDestination.CssClass = "text-secondary"; - lblMessage.Text = ""; - lblDestination.Text = ""; - lblLastBCode.Text = ""; + resetIcons(); break; } } diff --git a/NKC_WF/MachineUnloadSmart.aspx.designer.cs b/NKC_WF/MachineUnloadSmart.aspx.designer.cs index 4f7703a..e6ea9d7 100644 --- a/NKC_WF/MachineUnloadSmart.aspx.designer.cs +++ b/NKC_WF/MachineUnloadSmart.aspx.designer.cs @@ -21,6 +21,15 @@ namespace NKC_WF { /// protected global::NKC_WF.WebUserControls.cmp_barcode cmp_barcode; + /// + /// Controllo hfBarcode. + /// + /// + /// 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 hfBarcode; + /// /// Controllo icnCart. /// diff --git a/NKC_WF/WebUserControls/cmp_homeButtons.ascx b/NKC_WF/WebUserControls/cmp_homeButtons.ascx index 72f2471..e05a119 100644 --- a/NKC_WF/WebUserControls/cmp_homeButtons.ascx +++ b/NKC_WF/WebUserControls/cmp_homeButtons.ascx @@ -34,6 +34,12 @@ <%: traduci("SecondScreen") %> + + <%: traduci("GlobalSearch") %> + + + <%: traduci("LabelsPrint") %> +