diff --git a/NKC_WF/BasePage.cs b/NKC_WF/BasePage.cs index 78f7fa1..5530e49 100644 --- a/NKC_WF/BasePage.cs +++ b/NKC_WF/BasePage.cs @@ -55,7 +55,20 @@ namespace NKC_WF } #region gestione compresisone viewstate + + /*-------------------------------------------------------------- + * Compressione viewstate + * + * vedere https://www.codeproject.com/Articles/14733/ViewState-Compression + * + * da valutare anche + * https://www.karpach.com/viewstateexception-invalid-viewstate.htm + * https://www.karpach.com/ASP-NET-Global-asax-error-logger.htm + * + *--------------------------------------------------------------*/ + +#if false protected override object LoadPageStateFromPersistenceMedium() { string viewState = Request.Form["__VSTATE"]; @@ -74,7 +87,8 @@ namespace NKC_WF byte[] bytes = Convert.FromBase64String(viewStateString); bytes = Compressor.Compress(bytes); ClientScript.RegisterHiddenField("__VSTATE", Convert.ToBase64String(bytes)); - } + } +#endif #endregion diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx b/NKC_WF/WebUserControls/cmp_batchDetail.ascx index 34dd767..4eb4d66 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx @@ -5,15 +5,30 @@
-

<%: traduci ("BatchDetail") %>

+

<%# traduci ("BatchDetail") %>

- <%: traduci("SendToEstim") %> - <%: traduci("StopEstim") %> - <%: traduci("SendToNest") %> - <%: traduci("StopNest") %> - <%: traduci("AcceptNest") %> + <%# traduci("SendToEstim") %> + <%# traduci("StopEstim") %> + <%# traduci("SendToNest") %> + <%# traduci("StopNest") %> + <%# traduci("AcceptNest") %>
@@ -46,7 +61,7 @@
- <%: traduci ("Min") %> + <%# traduci ("Min") %>
diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs index ef627f6..4a92814 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs @@ -11,7 +11,6 @@ namespace NKC_WF.WebUserControls public partial class cmp_batchDetail : BaseUserControl { - public event EventHandler eh_doRefresh; protected void Page_Load(object sender, EventArgs e) { @@ -303,13 +302,6 @@ namespace NKC_WF.WebUserControls raiseEvent(); } - private void raiseEvent() - { - // se qualcuno ascolta sollevo evento nuovo valore... - if (eh_doRefresh != null) - { - eh_doRefresh(this, new EventArgs()); - } - } + } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs index 19f47e3..caac34b 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs @@ -11,61 +11,61 @@ namespace NKC_WF.WebUserControls { - public partial class cmp_batchDetail - { + public partial class cmp_batchDetail + { - /// - /// Controllo frmView. - /// - /// - /// 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.FormView frmView; + /// + /// Controllo frmView. + /// + /// + /// 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.FormView frmView; - /// - /// Controllo hfBatchId. - /// - /// - /// 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.HiddenField hfBatchId; + /// + /// Controllo hfBatchId. + /// + /// + /// 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.HiddenField hfBatchId; - /// - /// Controllo ods. - /// - /// - /// 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.ObjectDataSource ods; + /// + /// Controllo ods. + /// + /// + /// 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.ObjectDataSource ods; - /// - /// Controllo lblMatDet. - /// - /// - /// 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.Label lblMatDet; + /// + /// Controllo lblMatDet. + /// + /// + /// 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.Label lblMatDet; - /// - /// Controllo lblProdDet. - /// - /// - /// 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.Label lblProdDet; + /// + /// Controllo lblProdDet. + /// + /// + /// 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.Label lblProdDet; - /// - /// Controllo lblTestJson. - /// - /// - /// 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.Label lblTestJson; - } + /// + /// Controllo lblTestJson. + /// + /// + /// 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.Label lblTestJson; + } } diff --git a/NKC_WF/WebUserControls/cmp_batchList.ascx b/NKC_WF/WebUserControls/cmp_batchList.ascx index f7b73e4..fa2706c 100644 --- a/NKC_WF/WebUserControls/cmp_batchList.ascx +++ b/NKC_WF/WebUserControls/cmp_batchList.ascx @@ -2,106 +2,118 @@ <%@ Register Src="~/WebUserControls/cmp_batchDetail.ascx" TagPrefix="uc1" TagName="cmp_batchDetail" %> <%@ Register Src="~/WebUserControls/cmp_numRow.ascx" TagPrefix="uc1" TagName="cmp_numRow" %> -
-
- -
-
-
+ +
-
-

<%: traduci("CallList") %>

+
+ +
-
- <%: traduci("FilterStatus") %> - - - - - - - - <%----%> - - - - - - -   +
+
+
+
+

<%: traduci("CallList") %>

+
+
+ <%: traduci("FilterStatus") %> + + + + + + + + <%----%> + + + + + + +   +
+
-
- - - - - - - <%: traduci("NoRecord") %> - - - - -
- -
-
- -
- - -
-
-
- - - - - <%# BStatus(Eval("Status")) %> - - - - - - <%# $"{Eval("Errors")} (tot: {Eval("NumErrPre")} err)" %> - <%# $"{Eval("Errors")} (tot: {Eval("NumErr")} err)" %> - - - - - - + + + + +
+
+ + + + + + + <%: traduci("NoRecord") %> + + + + +
+ +
+
+ +
+ + +
+
+
+ + + + + <%# BStatus(Eval("Status")) %> + + + + + + <%# $"{Eval("Errors")} (tot: {Eval("NumErrPre")} err)" %> + <%# $"{Eval("Errors")} (tot: {Eval("NumErr")} err)" %> + + + + + + - - -
- - -
-
- -
- -
-
-
-
-
- - - - - - - - - - - - - + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + + + + + + + + + +
+
-
-
+ + diff --git a/NKC_WF/WebUserControls/cmp_batchList.ascx.cs b/NKC_WF/WebUserControls/cmp_batchList.ascx.cs index a5331fe..973a94b 100644 --- a/NKC_WF/WebUserControls/cmp_batchList.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchList.ascx.cs @@ -180,8 +180,10 @@ namespace NKC_WF.WebUserControls { checkFixOds(); grView.SelectedIndex = -1; + lastSelRow = -1; grView.DataBind(); divDetail.Visible = false; + updPanelDetail.Update(); raiseReset(); } @@ -193,21 +195,60 @@ namespace NKC_WF.WebUserControls get { int answ = 0; - int.TryParse(grView.SelectedValue.ToString(), out answ); + if (grView.SelectedValue != null) + { + int.TryParse(grView.SelectedValue.ToString(), out answ); + } return answ; } } + protected int currSelRow + { + get + { + return grView.SelectedIndex; + } + set + { + grView.SelectedIndex = value; + } + } protected void grView_SelectedIndexChanged(object sender, EventArgs e) { - divDetail.Visible = true; + fixDetails(); + } + + private void fixDetails() + { + divDetail.Visible = currSelRow >= 0; + lastSelRow = currSelRow; // recupero BatchId selezionato cmp_batchDetail.BatchId = BatchIdSel; + updPanelDetail.Update(); + } + + protected int lastSelRow + { + get + { + int answ = -1; + if (!string.IsNullOrEmpty(hfLastSelRow.Value)) + { + int.TryParse(hfLastSelRow.Value, out answ); + } + return answ; + } + set + { + hfLastSelRow.Value = value.ToString(); + } } public void doUpdate() { - cmp_batchDetail.doUpdate(); grView.DataBind(); + currSelRow = lastSelRow; + fixDetails(); } protected void grView_PageIndexChanged(object sender, EventArgs e) @@ -258,5 +299,10 @@ namespace NKC_WF.WebUserControls hfDeleteEnabled.Value = value.ToString(); } } + + protected void Timer1_Tick(object sender, EventArgs e) + { + doUpdate(); + } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_batchList.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_batchList.ascx.designer.cs index 20eca46..8708fa6 100644 --- a/NKC_WF/WebUserControls/cmp_batchList.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_batchList.ascx.designer.cs @@ -14,6 +14,15 @@ namespace NKC_WF.WebUserControls public partial class cmp_batchList { + /// + /// Controllo updPanelDetail. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.UpdatePanel updPanelDetail; + /// /// Controllo divDetail. /// @@ -32,6 +41,15 @@ namespace NKC_WF.WebUserControls /// protected global::NKC_WF.WebUserControls.cmp_batchDetail cmp_batchDetail; + /// + /// Controllo hfLastSelRow. + /// + /// + /// 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.HiddenField hfLastSelRow; + /// /// Controllo ddlStatus. /// @@ -50,6 +68,15 @@ namespace NKC_WF.WebUserControls /// protected global::NKC_WF.WebUserControls.cmp_numRow cmp_numRow; + /// + /// Controllo updPanelGrView. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.UpdatePanel updPanelGrView; + /// /// Controllo grView. /// @@ -85,5 +112,14 @@ namespace NKC_WF.WebUserControls /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.HiddenField hfPartValid; + + /// + /// Controllo Timer1. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.Timer Timer1; } } diff --git a/NKC_WF/WebUserControls/cmp_kittingSmart.ascx b/NKC_WF/WebUserControls/cmp_kittingSmart.ascx index 42178c5..ab46e1d 100644 --- a/NKC_WF/WebUserControls/cmp_kittingSmart.ascx +++ b/NKC_WF/WebUserControls/cmp_kittingSmart.ascx @@ -63,7 +63,6 @@

-
diff --git a/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.cs b/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.cs index feb8d70..9ef0004 100644 --- a/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.cs @@ -766,7 +766,6 @@ namespace NKC_WF.WebUserControls private void resetIcons() { lblDestination.CssClass = "text-secondary"; - lblMessage.Text = ""; lblDestination.Text = ""; lblLastBCode.Text = ""; lbtCancel.Visible = false; diff --git a/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.designer.cs index 84f9e0c..c6d5170 100644 --- a/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.designer.cs @@ -221,15 +221,6 @@ namespace NKC_WF.WebUserControls /// protected global::System.Web.UI.WebControls.Label lblLastBCode; - /// - /// Controllo lblMessage. - /// - /// - /// 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.Label lblMessage; - /// /// Controllo lblDestination. /// diff --git a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx index d64e875..ef69fb3 100644 --- a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx +++ b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx @@ -68,7 +68,7 @@
- <%: traduci("scrapped") %> + <%: traduci("scrapped") %> <%: traduci("toPark") %>
diff --git a/NKC_WF/site/OrderManager.aspx b/NKC_WF/site/OrderManager.aspx index 33adf00..d0467b1 100644 --- a/NKC_WF/site/OrderManager.aspx +++ b/NKC_WF/site/OrderManager.aspx @@ -15,13 +15,7 @@
- - - - - - - +
diff --git a/NKC_WF/site/OrderManager.aspx.cs b/NKC_WF/site/OrderManager.aspx.cs index 264de65..91166fa 100644 --- a/NKC_WF/site/OrderManager.aspx.cs +++ b/NKC_WF/site/OrderManager.aspx.cs @@ -231,9 +231,5 @@ namespace NKC_WF cmp_batchList.doUpdate(); } - protected void Timer1_Tick(object sender, EventArgs e) - { - doUpdate(); - } } } \ No newline at end of file diff --git a/NKC_WF/site/OrderManager.aspx.designer.cs b/NKC_WF/site/OrderManager.aspx.designer.cs index 2880fd2..8cdb9e7 100644 --- a/NKC_WF/site/OrderManager.aspx.designer.cs +++ b/NKC_WF/site/OrderManager.aspx.designer.cs @@ -32,15 +32,6 @@ namespace NKC_WF /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl divBatchList; - /// - /// Controllo UpdatePanel1. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.UpdatePanel UpdatePanel1; - /// /// Controllo cmp_batchList. /// @@ -49,14 +40,5 @@ namespace NKC_WF /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::NKC_WF.WebUserControls.cmp_batchList cmp_batchList; - - /// - /// Controllo Timer1. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.Timer Timer1; } }