diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index d3396e1..16a3b66 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -2,10 +2,6 @@ using SteamWare; using System; using System.Collections.Generic; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace AppData { @@ -30,6 +26,8 @@ namespace AppData protected static string redMsgCount = "NKC:SERV:BREQ:MCount"; protected static string redMsgList = "NKC:SERV:BREQ:MList"; + protected static string redMLCurrStack = "NKC:SERV:TAKT:CurrStack"; + #endregion #region definizione classi impiegate con PROD @@ -123,7 +121,7 @@ namespace AppData switch (pStatus) { case BatchPosition.NotStarted: - answ = traduci("NotStarted"); + answ = traduci("NotStarted"); break; case BatchPosition.StackStarted: answ = traduci("Stacking"); @@ -627,6 +625,21 @@ namespace AppData return null; } + /// + /// Valore dello Stack correntemente in processing per ML (MachineLoad) + /// + public static string taktMLCurrStack + { + get + { + return memLayer.ML.getRSV(redMLCurrStack); + } + set + { + memLayer.ML.setRSV(redMLCurrStack, value); + } + } + #endregion } diff --git a/NKC_WF/WebUserControls/cmp_stackLoading.ascx.cs b/NKC_WF/WebUserControls/cmp_stackLoading.ascx.cs index eb02842..6cf69c5 100644 --- a/NKC_WF/WebUserControls/cmp_stackLoading.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_stackLoading.ascx.cs @@ -81,7 +81,6 @@ namespace NKC_WF.WebUserControls cmp_barcode.showOutput("badge badge-warning", "Sheet - ignored"); break; case codeType.Stack: - // verifico SE lo stack esista... DS_App.StackListDataTable tabStack = DataLayer.man.taSTL.getByKey(decoData.codeInt); if (tabStack.Count == 0) @@ -90,33 +89,40 @@ namespace NKC_WF.WebUserControls } else { - } - DS_App.SheetListDataTable nextTbl = DataLayer.man.taSHL.getNextByStack(StackId); - // se tab vuota --> HO FINITO!!!! - if (nextTbl.Count == 0) - { - cmp_barcode.showOutput("badge badge-warning", $"STACK IS COMPLETED, {decoData.description}"); - } - // se ho valori --> controllo se corretto... - else - { - string codReq = nextTbl[0].MatExtCode.ToString(); - if (codReq == decoData.codeInt.ToString()) + // controllo sia quello RICHIESTO, eventualemtne permetteremo TUTTI quelli del giorno in ogni ordine... + if (decoData.codeInt == cmp_stackNextloading.StackIdReq) { - cmp_barcode.showOutput("badge badge-success", $"SHEET RECORDED: {decoData.description}"); - // chiamo stored x indicare preparato - DataLayer.man.taSHL.setPrepared(nextTbl[0].SheetID); + cmp_barcode.showOutput("badge badge-success", $"STACK OK, {decoData.description}"); + ComLib.taktMLCurrStack = decoData.code; } else { - cmp_barcode.showOutput("badge badge-danger", $"WRONG SHEET: {decoData.description}"); + cmp_barcode.showOutput("badge badge-danger", $"WRONG STACK, {decoData.description}"); } } + //DS_App.SheetListDataTable nextTbl = DataLayer.man.taSHL.getNextByStack(StackId); + //// se tab vuota --> HO FINITO!!!! + //if (nextTbl.Count == 0) + //{ + // cmp_barcode.showOutput("badge badge-warning", $"STACK IS COMPLETED, {decoData.description}"); + //} + //// se ho valori --> controllo se corretto... + //else + //{ + // string codReq = nextTbl[0].MatExtCode.ToString(); + // if (codReq == decoData.codeInt.ToString()) + // { + // cmp_barcode.showOutput("badge badge-success", $"SHEET RECORDED: {decoData.description}"); + // // chiamo stored x indicare preparato + // DataLayer.man.taSHL.setPrepared(nextTbl[0].SheetID); + // } + // else + // { + // cmp_barcode.showOutput("badge badge-danger", $"WRONG SHEET: {decoData.description}"); + // } + //} - - - - cmp_barcode.showOutput("badge badge-warning", "Stack - ignored"); + //cmp_barcode.showOutput("badge badge-warning", "Stack - ignored"); break; case codeType.Batch: cmp_barcode.showOutput("badge badge-warning", "Batch - ignored"); diff --git a/NKC_WF/WebUserControls/cmp_stackNextloading.ascx.cs b/NKC_WF/WebUserControls/cmp_stackNextloading.ascx.cs index ba39077..6c3d170 100644 --- a/NKC_WF/WebUserControls/cmp_stackNextloading.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_stackNextloading.ascx.cs @@ -28,5 +28,15 @@ namespace NKC_WF.WebUserControls { frmView.DataBind(); } + + public int StackIdReq + { + get + { + int answ = 0; + int.TryParse(frmView.SelectedValue.ToString(), out answ); + return answ; + } + } } } \ No newline at end of file