diff --git a/NKC_WF/WebUserControls/cmp_batchList.ascx b/NKC_WF/WebUserControls/cmp_batchList.ascx index b4783c3..406fdee 100644 --- a/NKC_WF/WebUserControls/cmp_batchList.ascx +++ b/NKC_WF/WebUserControls/cmp_batchList.ascx @@ -20,6 +20,7 @@
<%: traduci("CallList") %> +
diff --git a/NKC_WF/WebUserControls/cmp_batchList.ascx.cs b/NKC_WF/WebUserControls/cmp_batchList.ascx.cs index bab483f..c77af42 100644 --- a/NKC_WF/WebUserControls/cmp_batchList.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchList.ascx.cs @@ -1,5 +1,6 @@ using AppData; using NKC_SDK; +using SteamWare; using System; using System.Web.UI; using System.Web.UI.WebControls; @@ -89,33 +90,42 @@ namespace NKC_WF.WebUserControls { case BatchStatus.Imported: break; + case BatchStatus.EstimationRequested: answ = "btn btn-sm pe-none btn-info"; break; + case BatchStatus.EstimationDone: answ = "btn btn-sm pe-none btn-primary"; break; + case BatchStatus.NestRequested: answ = "btn btn-sm pe-none btn-warning"; break; + case BatchStatus.NestDone: //answ = "font-weight-bold text-success"; answ = "btn btn-sm pe-none btn-success"; break; + case BatchStatus.Approved: answ = "btn btn-sm pe-none btn-success"; break; + case BatchStatus.Discarded: answ = "btn btn-sm pe-none btn-secondary"; break; + case BatchStatus.Errors: case BatchStatus.ErrorsOnEstim: case BatchStatus.ErrorsOnNesting: answ = "btn btn-sm pe-none btn-danger"; break; + case BatchStatus.PartOk: answ = "btn btn-sm pe-none btn-outline-success"; break; + case BatchStatus.PartKo: answ = "btn btn-sm pe-none btn-outline-secondary"; break; @@ -155,15 +165,12 @@ namespace NKC_WF.WebUserControls public void doUpdate() { + lblLastRefresh.Text = $"{DateTime.Now:HH:mm:ss}"; checkFixOds(); grView.DataBind(); currSelRow = lastSelRow; var currBStatus = CurrBatchStatus; - // solo se il batch è in fase di stima/nesting... - if (currBStatus == BatchStatus.NestRequested || currBStatus == BatchStatus.EstimationRequested) - { - fixDetails(); - } + fixDetails(); } /// @@ -270,15 +277,17 @@ namespace NKC_WF.WebUserControls get { int answ = -1; - if (!string.IsNullOrEmpty(hfLastSelRow.Value)) + try { - int.TryParse(hfLastSelRow.Value, out answ); + answ = memLayer.ML.IntSessionObj("UsrLastBatchSel"); } + catch + { } return answ; } set { - hfLastSelRow.Value = value.ToString(); + memLayer.ML.setSessionVal("UsrLastBatchSel", value); } } @@ -397,11 +406,7 @@ namespace NKC_WF.WebUserControls protected void Timer1_Tick(object sender, EventArgs e) { - // solo se NON HO righe selezionato... - if (currSelRow < 0) - { - doUpdate(); - } + doUpdate(); } #endregion Protected Methods @@ -410,7 +415,7 @@ namespace NKC_WF.WebUserControls private int fastTimer = 4000; - private int slowTimer = 120000; + private int slowTimer = 8000; #endregion Private Fields @@ -516,7 +521,7 @@ namespace NKC_WF.WebUserControls // reimposto timer rapido... Timer1.Interval = fastTimer; checkFixOds(); - grView.SelectedIndex = -1; + currSelRow = -1; lastSelRow = -1; grView.DataBind(); divDetail.Visible = false; diff --git a/NKC_WF/WebUserControls/cmp_batchList.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_batchList.ascx.designer.cs index 79997cb..d7cc0ed 100644 --- a/NKC_WF/WebUserControls/cmp_batchList.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_batchList.ascx.designer.cs @@ -68,6 +68,15 @@ namespace NKC_WF.WebUserControls /// protected global::System.Web.UI.UpdatePanel updPanelGrView; + /// + /// lblLastRefresh control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblLastRefresh; + /// /// chkShowSplit control. /// diff --git a/NKC_WF/site/OrderManager.aspx b/NKC_WF/site/OrderManager.aspx index 637a5aa..e34428a 100644 --- a/NKC_WF/site/OrderManager.aspx +++ b/NKC_WF/site/OrderManager.aspx @@ -1,5 +1,4 @@ -<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="OrderManager.aspx.cs" Inherits="NKC_WF.OrderManager" %> - +<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="OrderManager.aspx.cs" Inherits="NKC_WF.OrderManager" EnableEventValidation="false" %> <%@ Register Src="~/WebUserControls/cmp_fileUpload.ascx" TagPrefix="uc1" TagName="cmp_fileUpload" %> <%@ Register Src="~/WebUserControls/cmp_batchList.ascx" TagPrefix="uc1" TagName="cmp_batchList" %>