diff --git a/NKC_WF/OrderManager.aspx.cs b/NKC_WF/OrderManager.aspx.cs index 5a708ad..e626863 100644 --- a/NKC_WF/OrderManager.aspx.cs +++ b/NKC_WF/OrderManager.aspx.cs @@ -37,10 +37,6 @@ namespace NKC_WF if (!Page.IsPostBack) { doUpdate(); -#if false - processPending(); - checkVisibility(); -#endif } cmp_batchList.eh_doRefresh += Cmp_batchList_eh_doRefresh; cmp_fileUpload.eh_doRefresh += Cmp_fileUpload_eh_doRefresh; @@ -83,17 +79,11 @@ namespace NKC_WF private void Cmp_fileUpload_eh_doRefresh(object sender, EventArgs e) { doUpdate(); -#if false - checkVisibility(); -#endif } private void Cmp_batchList_eh_doRefresh(object sender, EventArgs e) { doUpdate(); -#if false - checkVisibility(); -#endif } public void doUpdate() @@ -101,80 +91,5 @@ namespace NKC_WF } -#if false - private void processPending() - { - // se trova batch non riportati in REDIS li scrive x richiedere processing - string batchKey = $"{batchOutChannel}:{currBatchID}"; - bool reqPresent = !string.IsNullOrEmpty(memLayer.ML.getRSV(batchKey)); - if (!reqPresent) - { - // !!!FIXME!!! leggere da DB!!! - - var articoli = new List(); - var articolo = new Part() - { - PartId = 1, - PartExtCode = "abc.2345", - MatId = 2, - PartQty = 2, - CadFilePath = @"c:\temp\prova.dxf" - }; - articoli.Add(articolo); - - var divani = new List(); - Kit divano = new Kit() - { - PartList = articoli - }; - divani.Add(divano); - - var ordini = new List(); - Order ordine = new Order() - { - OrderCod = "abcde", - OrderExtCode = "HFA_123456", - DestPlant = "Striker", - //OrderQty = 1, - KitList = divani - }; - ordini.Add(ordine); - - var currBatch = new batchRequest - { - BatchId = currBatchID, - OrderList = ordini - } - ; - string payload = JsonConvert.SerializeObject(currBatch); - memLayer.ML.setRSV(batchKey, payload); - } - } - /// - /// ID del batch corrente - /// - protected int currBatchID - { - get - { - int answ = 0; - if (memLayer.ML.isInSessionObject("BatchID")) - { - answ = memLayer.ML.IntSessionObj("BatchID"); - } - return answ; - } - } - - private void checkVisibility() - { - bool hasBatch = false; - if (currBatchID > 0) - { - hasBatch = true; - } - divStatus.Visible = hasBatch; - } -#endif } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs index 0305cee..45066a8 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs @@ -72,7 +72,7 @@ namespace NKC_WF.WebUserControls // !!!FIXME!!! inviare a redis... // registro su DB nesting iniziato... - DataLayer.man.taBL.updateStatus(BatchId, (int)BatchStatus.Imported, 0); + DataLayer.man.taBL.updateStatus(BatchId, (int)BatchStatus.Imported, -1); raiseEvent(); } @@ -91,7 +91,7 @@ namespace NKC_WF.WebUserControls // !!!FIXME!!! inviare a redis... // registro su DB nesting iniziato... - DataLayer.man.taBL.updateStatus(BatchId, (int)BatchStatus.EstimationDone, 0); + DataLayer.man.taBL.updateStatus(BatchId, (int)BatchStatus.EstimationDone, -1); raiseEvent(); } @@ -102,7 +102,7 @@ namespace NKC_WF.WebUserControls ComLib.sendBatchReq(BatchId, "Nesting"); // registro su DB nesting iniziato... - DataLayer.man.taBL.updateStatus(BatchId, (int)BatchStatus.NestRequested, 0); + DataLayer.man.taBL.updateStatus(BatchId, (int)BatchStatus.NestRequested, -1); raiseEvent(); }