diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index 27da0f8..9beaf05 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -1596,42 +1596,6 @@ namespace AppData return answ; } -#if false - /// - /// Elenco degli orders dato Batch - /// - public static DS_App.OrderListDataTable OrdersByBatch(int BatchId) - { - DataLayer DLMan = new DataLayer(); - string redKey = $"{redOrders}:BYBATCH:{BatchId}"; - string rawData = ""; - DS_App.OrderListDataTable answ = new DS_App.OrderListDataTable(); - // cerco in redis - if (memLayer.ML.redKeyPresent(redKey)) - { - rawData = memLayer.ML.getRSV(redKey); - if (!string.IsNullOrEmpty(rawData)) - { - try - { - answ = JsonConvert.DeserializeObject(rawData); - } - catch - { } - } - // se vuoto rileggo - if (answ.Count == 0) - { - answ = DLMan.taOL.getByBatch(BatchId); - // salvo in cache - rawData = JsonConvert.SerializeObject(answ); - memLayer.ML.setRSV(redKey, rawData, 5 * 60); - } - } - return answ; - } -#endif - /// /// Elenco degli orders dato Batch (Ancestor/Principale) /// diff --git a/NKC_WF/WebUserControls/cmp_orderPrint.ascx b/NKC_WF/WebUserControls/cmp_orderPrint.ascx index a2050a9..3ceabe0 100644 --- a/NKC_WF/WebUserControls/cmp_orderPrint.ascx +++ b/NKC_WF/WebUserControls/cmp_orderPrint.ascx @@ -6,6 +6,7 @@ +
diff --git a/NKC_WF/WebUserControls/cmp_orderPrint.ascx.cs b/NKC_WF/WebUserControls/cmp_orderPrint.ascx.cs index 5418fb7..d4a5efa 100644 --- a/NKC_WF/WebUserControls/cmp_orderPrint.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_orderPrint.ascx.cs @@ -11,11 +11,26 @@ namespace NKC_WF.WebUserControls { protected void Page_Load(object sender, EventArgs e) { - if(!Page.IsPostBack) + if (!Page.IsPostBack) { } } - + /// + /// Macchina selezionata + /// + public string MachineSel + { + get + { + return hfMachineSel.Value; + } + set + { + hfMachineSel.Value = value; + cmp_MU_bins.MachineSel = value; + cmp_MU_carts.MachineSel = value; + } + } /// /// BatchId corrente... /// @@ -26,6 +41,13 @@ namespace NKC_WF.WebUserControls hfBatchID.Value = value.ToString(); cmp_MU_bins.BatchId = value; cmp_MU_carts.BatchId = value; + // calcolo macchina + var tabBL = DLMan.taBL.getByKey(value); + if (tabBL != null && tabBL.Count > 0) + { + var rigaBL = tabBL[0]; + MachineSel = rigaBL.PlaceCod; + } } get { diff --git a/NKC_WF/WebUserControls/cmp_orderPrint.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_orderPrint.ascx.designer.cs index 0f076a3..2bb88b3 100644 --- a/NKC_WF/WebUserControls/cmp_orderPrint.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_orderPrint.ascx.designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ -// -// Codice generato da uno strumento. +// +// This code was generated by a tool. // -// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se -// il codice viene rigenerato. -// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// //------------------------------------------------------------------------------ namespace NKC_WF.WebUserControls @@ -15,29 +15,38 @@ namespace NKC_WF.WebUserControls { /// - /// Controllo hfBatchID. + /// hfBatchID control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.HiddenField hfBatchID; /// - /// Controllo cmp_MU_bins. + /// hfMachineSel control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField hfMachineSel; + + /// + /// cmp_MU_bins control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::NKC_WF.WebUserControls.cmp_MU_bins cmp_MU_bins; /// - /// Controllo cmp_MU_carts. + /// cmp_MU_carts control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::NKC_WF.WebUserControls.cmp_MU_carts cmp_MU_carts; }