From 01317f04ad64e30bf921159f783a3dd44b47b95d Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Thu, 29 Aug 2019 10:36:51 +0200 Subject: [PATCH] Aggiunto pulsante print stack in stack building --- NKC_WF/WebUserControls/cmp_stackBuilding.ascx | 78 +++++++++++-------- .../WebUserControls/cmp_stackBuilding.ascx.cs | 37 ++++++--- .../cmp_stackBuilding.ascx.designer.cs | 18 +++++ 3 files changed, 90 insertions(+), 43 deletions(-) diff --git a/NKC_WF/WebUserControls/cmp_stackBuilding.ascx b/NKC_WF/WebUserControls/cmp_stackBuilding.ascx index da23fc1..4349c3d 100644 --- a/NKC_WF/WebUserControls/cmp_stackBuilding.ascx +++ b/NKC_WF/WebUserControls/cmp_stackBuilding.ascx @@ -7,42 +7,52 @@

STACK BUILDING

-
- - - - -
-
- NEXT - <%# Eval("Prepared","{0:ddd yyyy-MM-dd HH:mm}") %> +
+
+
+
+
+ + <%----%> +
+
+
PRINT
+
-
-
-
<%# Eval("SheetIndex") %>
-
<%# Eval("MaterDesc") %>
-
<%# Eval("MaterExtCode") %>
+ <%----%> + +
+
+
+
+
+ + +
+
+ + +
+
+ NEXT + <%# Eval("Prepared","{0:ddd yyyy-MM-dd HH:mm}") %> +
+
+
+
<%# Eval("SheetIndex") %>
+
<%# Eval("MaterDesc") %>
+
<%# Eval("MaterExtCode") %>
+
-
- - - - - - - - + + + + + + + + +
- -Quando un operatore prende in carico uno stack DEVE andare avanti oppure salvarlo incompleto -
-Mentre lo fa gli viene mostrato graficamente la pila con info a supporto del MATERIALE che deve usare e dellos tato dellos tack (quanti fatti). Codice colore bootstrap... -
-Visne mostrato in modo evidente il PROSSIMO pannello atteso, e qualche icona x spiegare che si procede DAL BASSO ALL'ALTO -
-ad ogni lettura di un codice (tipo etichetta posizioen amgazzino) viene chiesta conferma (o seconda lettura uguale), a quel punto SE E' CORRETTO lo prendiamo coem caricato, sennò MOSTRA ERRORE E COLORA TUTTO DI ROSSO -
-quando è completa una pila/stack proponiamo STAMPA FOGLIO - diff --git a/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs b/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs index c521c4d..2c632ea 100644 --- a/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs @@ -1,10 +1,6 @@ using AppData; using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; using System.Web.UI; -using System.Web.UI.WebControls; namespace NKC_WF.WebUserControls { @@ -20,6 +16,14 @@ namespace NKC_WF.WebUserControls } cmp_barcode.eh_doRefresh += Cmp_barcode_eh_doRefresh; } + // se NON ci sono altri campi "next" allora posso msotrare stampa... + private void checkPrint() + { + DS_App.SheetListDataTable nextTbl = DataLayer.man.taSHL.getNextByStack(StackId); + // se tab vuota --> HO FINITO, mostro stampa... + divPrint.Visible = (nextTbl.Count == 0); + } + /// /// Comando barcode letto /// @@ -44,7 +48,7 @@ namespace NKC_WF.WebUserControls switch (decoData.codeType) { case codeType.UNK: - cmp_barcode.showOutput("text-danger","Unknown Data"); + cmp_barcode.showOutput("text-danger", "Unknown Data"); break; case codeType.Item: cmp_barcode.showOutput("text-warning", "Item - ignored"); @@ -53,7 +57,7 @@ namespace NKC_WF.WebUserControls // verifico SE il materiale SIA quello dello sheet richeisto dallos tack corrente... DS_App.SheetListDataTable nextTbl = DataLayer.man.taSHL.getNextByStack(StackId); // se tab vuota --> HO FINITO!!!! - if (nextTbl.Count==0) + if (nextTbl.Count == 0) { cmp_barcode.showOutput("badge badge-warning", $"STACK IS COMPLETED, {decoData.description}"); } @@ -61,7 +65,7 @@ namespace NKC_WF.WebUserControls else { string codReq = nextTbl[0].MaterExtCode; - if(codReq== decoData.code) + if (codReq == decoData.code) { cmp_barcode.showOutput("badge badge-success", $"SHEET RECORDED: {decoData.description}"); // chiamo stored x indicare preparato @@ -87,8 +91,14 @@ namespace NKC_WF.WebUserControls } // reset comando cmp_barcode.inputAcquired = ""; - // aggiorno repeater... + // aggiorno... + doUpdate(); + } + + public void doUpdate() + { repCtrl.DataBind(); + checkPrint(); } public int StackId @@ -98,7 +108,7 @@ namespace NKC_WF.WebUserControls hfStackId.Value = value.ToString(); lastCmd = ""; cmp_barcode.resetMessage(); - repCtrl.DataBind(); + doUpdate(); } get { @@ -133,5 +143,14 @@ namespace NKC_WF.WebUserControls } return answ; } + /// + /// Chiesta stampa stack corrente + /// + /// + /// + protected void lbtPrint_Click(object sender, EventArgs e) + { + // chiamo procedura stampa report x stack + } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.designer.cs index 069e937..ad8dbec 100644 --- a/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.designer.cs @@ -12,6 +12,24 @@ namespace NKC_WF.WebUserControls { public partial class cmp_stackBuilding { + /// + /// Controllo divPrint. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divPrint; + + /// + /// Controllo hlPrint. + /// + /// + /// 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.HyperLink hlPrint; + /// /// Controllo hfBarcode. ///