From f10dacc8a84c16f99a6bb7c455c63379a7f7301c Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sat, 25 Jul 2020 16:31:24 +0200 Subject: [PATCH 1/3] Maybe fix rilettura multipla --- Jenkinsfile | 2 +- NKC_WF/WebUserControls/cmp_barcode.ascx.cs | 1 - NKC_WF/WebUserControls/cmp_stackBuilding.ascx | 2 +- NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs | 1 + 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 76911d1..6fbb817 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,7 +11,7 @@ pipeline { steps { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=293']) { + withEnv(['NEXT_BUILD_NUMBER=294']) { // env.versionNumber = VersionNumber(versionNumberString : '0.10.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '0.10.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '0.10.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') diff --git a/NKC_WF/WebUserControls/cmp_barcode.ascx.cs b/NKC_WF/WebUserControls/cmp_barcode.ascx.cs index 8c77c62..14b8812 100644 --- a/NKC_WF/WebUserControls/cmp_barcode.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_barcode.ascx.cs @@ -85,7 +85,6 @@ namespace NKC_WF.WebUserControls /// public void resetInput() { - //inputAcquired = ""; valueRead = ""; txtBarcode.Focus(); } diff --git a/NKC_WF/WebUserControls/cmp_stackBuilding.ascx b/NKC_WF/WebUserControls/cmp_stackBuilding.ascx index 3b3d441..36020d2 100644 --- a/NKC_WF/WebUserControls/cmp_stackBuilding.ascx +++ b/NKC_WF/WebUserControls/cmp_stackBuilding.ascx @@ -61,7 +61,7 @@ - + diff --git a/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs b/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs index da03635..0e29703 100644 --- a/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs @@ -86,6 +86,7 @@ namespace NKC_WF.WebUserControls // chiamo stored x indicare preparato DataLayer.man.taSHL.setPrepared(nextTbl[0].SheetID); cmp_barcode.resetInput(); + lastCmd = ""; } else { From 35f6226238368c5145f2824e53748c9da8cdebae Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sat, 25 Jul 2020 16:41:02 +0200 Subject: [PATCH 2/3] nuovo test fix bunk prepare --- Jenkinsfile | 2 +- NKC_WF/WebUserControls/cmp_stackBuilding.ascx | 2 +- NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6fbb817..d69dbf4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,7 +11,7 @@ pipeline { steps { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=294']) { + withEnv(['NEXT_BUILD_NUMBER=295']) { // env.versionNumber = VersionNumber(versionNumberString : '0.10.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '0.10.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '0.10.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') diff --git a/NKC_WF/WebUserControls/cmp_stackBuilding.ascx b/NKC_WF/WebUserControls/cmp_stackBuilding.ascx index 36020d2..3b3d441 100644 --- a/NKC_WF/WebUserControls/cmp_stackBuilding.ascx +++ b/NKC_WF/WebUserControls/cmp_stackBuilding.ascx @@ -61,7 +61,7 @@ - + diff --git a/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs b/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs index 0e29703..579f9af 100644 --- a/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs @@ -85,14 +85,15 @@ namespace NKC_WF.WebUserControls cmp_barcode.showOutput("badge badge-success", $"SHEET RECORDED: {decoData.description}"); // chiamo stored x indicare preparato DataLayer.man.taSHL.setPrepared(nextTbl[0].SheetID); - cmp_barcode.resetInput(); - lastCmd = ""; } else { cmp_barcode.showOutput("badge badge-danger", $"WRONG SHEET: {decoData.description}"); } } + cmp_barcode.inputAcquired = ""; + lastCmd = ""; + cmp_barcode.resetInput(); break; case codeType.Sheet: cmp_barcode.showOutput("badge badge-warning", "Sheet - ignored"); From f2a24318ca3012b922d25aab6d15f94b1a52fb08 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sat, 25 Jul 2020 17:10:25 +0200 Subject: [PATCH 3/3] Restore comportamento senza updatePanel x BUNK --- NKC_WF/NKC_WF.csproj | 8 ++ .../WebUserControls/cmp_StackBuildDetail.ascx | 44 ++++++++++ .../cmp_StackBuildDetail.ascx.cs | 84 +++++++++++++++++++ .../cmp_StackBuildDetail.ascx.designer.cs | 71 ++++++++++++++++ NKC_WF/WebUserControls/cmp_barcode.ascx.cs | 8 +- NKC_WF/WebUserControls/cmp_stackBuilding.ascx | 45 +--------- .../WebUserControls/cmp_stackBuilding.ascx.cs | 56 ++----------- .../cmp_stackBuilding.ascx.designer.cs | 58 +------------ 8 files changed, 223 insertions(+), 151 deletions(-) create mode 100644 NKC_WF/WebUserControls/cmp_StackBuildDetail.ascx create mode 100644 NKC_WF/WebUserControls/cmp_StackBuildDetail.ascx.cs create mode 100644 NKC_WF/WebUserControls/cmp_StackBuildDetail.ascx.designer.cs diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index a3c5d21..f60558c 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -430,6 +430,7 @@ + @@ -1194,6 +1195,13 @@ cmp_slider.ascx + + cmp_StackBuildDetail.ascx + ASPXCodeBehind + + + cmp_StackBuildDetail.ascx + cmp_stackBuilding.ascx ASPXCodeBehind diff --git a/NKC_WF/WebUserControls/cmp_StackBuildDetail.ascx b/NKC_WF/WebUserControls/cmp_StackBuildDetail.ascx new file mode 100644 index 0000000..262e244 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_StackBuildDetail.ascx @@ -0,0 +1,44 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_StackBuildDetail.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_StackBuildDetail" %> + +<%-- + --%> + + + +
+
+ NEXT + <%# Eval("Prepared","{0:ddd yyyy-MM-dd HH:mm}") %> +
+
+
+
<%# Eval("SheetIndex") %>
+
<%# Eval("MatDesc") %>
+
<%# Eval("MatExtCode") %>
+
+
+
+
+
+ + + + + + + + + +
+
+
+
+
+ + + + + +<%-- +
+
--%> diff --git a/NKC_WF/WebUserControls/cmp_StackBuildDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_StackBuildDetail.ascx.cs new file mode 100644 index 0000000..add13d2 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_StackBuildDetail.ascx.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace NKC_WF.WebUserControls +{ + public partial class cmp_StackBuildDetail : BaseUserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + + + public string cssFlashNext(object _isNext) + { + string answ = ""; + if (_isNext.ToString() == "1") + { + answ = " flashColor"; + } + return answ; + } + public string cssByPrepared(object _prepared, object _isNext) + { + string answ = "table-secondary border border-secondary border-thick rounded"; + if (_isNext.ToString() == "1") + { + answ = "table-primary flashColor rounded"; + } + else + { + if (!string.IsNullOrEmpty(_prepared.ToString())) + { + answ = "table-success border border-success border-thick rounded"; + } + } + return answ; + } + public string getProgressStyle(object _num, object _den) + { + string answ = "width: 10%"; + int num = 0; + int den = 1; + int.TryParse(_num.ToString(), out num); + int.TryParse(_den.ToString(), out den); + answ = $"width: {num * 100 / den}%"; + return answ; + } + +#if false + protected void Unnamed1_Tick(object sender, EventArgs e) + { + doUpdate(); + } +#endif + + + public void doUpdate() + { + repCtrl.DataBind(); + + repProgress.DataBind(); + } + + public int StackId + { + set + { + hfStackId.Value = value.ToString(); + doUpdate(); + } + get + { + int answ = 0; + int.TryParse(hfStackId.Value, out answ); + return answ; + } + } + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_StackBuildDetail.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_StackBuildDetail.ascx.designer.cs new file mode 100644 index 0000000..0d8a3fd --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_StackBuildDetail.ascx.designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace NKC_WF.WebUserControls +{ + + + public partial class cmp_StackBuildDetail + { + + /// + /// Controllo chkRedux. + /// + /// + /// 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.CheckBox chkRedux; + + /// + /// Controllo repCtrl. + /// + /// + /// 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.Repeater repCtrl; + + /// + /// Controllo hfStackId. + /// + /// + /// 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 hfStackId; + + /// + /// 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 repProgress. + /// + /// + /// 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.Repeater repProgress; + + /// + /// Controllo odsAdvance. + /// + /// + /// 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 odsAdvance; + } +} diff --git a/NKC_WF/WebUserControls/cmp_barcode.ascx.cs b/NKC_WF/WebUserControls/cmp_barcode.ascx.cs index 14b8812..7059774 100644 --- a/NKC_WF/WebUserControls/cmp_barcode.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_barcode.ascx.cs @@ -12,10 +12,10 @@ namespace NKC_WF.WebUserControls resetInput(); resetMessage(); } - else if (string.IsNullOrEmpty(inputAcquired)) - { - checkRaiseEv(); - } + //else if (string.IsNullOrEmpty(inputAcquired)) + //{ + // checkRaiseEv(); + //} } /// /// evento modifica testo diff --git a/NKC_WF/WebUserControls/cmp_stackBuilding.ascx b/NKC_WF/WebUserControls/cmp_stackBuilding.ascx index 3b3d441..138cd4d 100644 --- a/NKC_WF/WebUserControls/cmp_stackBuilding.ascx +++ b/NKC_WF/WebUserControls/cmp_stackBuilding.ascx @@ -1,5 +1,7 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_stackBuilding.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_stackBuilding" %> <%@ Register Src="~/WebUserControls/cmp_barcode.ascx" TagPrefix="uc1" TagName="cmp_barcode" %> +<%@ Register Src="~/WebUserControls/cmp_StackBuildDetail.ascx" TagPrefix="uc1" TagName="cmp_StackBuildDetail" %> +
@@ -22,48 +24,7 @@
- - - - - -
-
- NEXT - <%# Eval("Prepared","{0:ddd yyyy-MM-dd HH:mm}") %> -
-
-
-
<%# Eval("SheetIndex") %>
-
<%# Eval("MatDesc") %>
-
<%# Eval("MatExtCode") %>
-
-
-
-
-
- - - - - - - - - -
-
-
-
-
- - - - - - -
-
+
diff --git a/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs b/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs index 579f9af..a448c2b 100644 --- a/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs @@ -45,6 +45,7 @@ namespace NKC_WF.WebUserControls private void Cmp_barcode_eh_doRefresh(object sender, EventArgs e) { + bool doRaiseEv = false; lastCmd = cmp_barcode.inputAcquired.ToUpper(); processLastCmd(doRaiseEv); @@ -91,9 +92,6 @@ namespace NKC_WF.WebUserControls cmp_barcode.showOutput("badge badge-danger", $"WRONG SHEET: {decoData.description}"); } } - cmp_barcode.inputAcquired = ""; - lastCmd = ""; - cmp_barcode.resetInput(); break; case codeType.Sheet: cmp_barcode.showOutput("badge badge-warning", "Sheet - ignored"); @@ -110,13 +108,15 @@ namespace NKC_WF.WebUserControls default: break; } + lastCmd = ""; + cmp_barcode.inputAcquired = ""; + cmp_barcode.resetInput(); return doRaiseEv; } public void doUpdate() { - repCtrl.DataBind(); - repProgress.DataBind(); + cmp_StackBuildDetail.doUpdate(); checkPrint(); } @@ -124,7 +124,7 @@ namespace NKC_WF.WebUserControls { set { - hfStackId.Value = value.ToString(); + cmp_StackBuildDetail.StackId = value; lastCmd = ""; cmp_barcode.resetMessage(); ComLib.updateBatchPositionByBunk(value); @@ -132,37 +132,10 @@ namespace NKC_WF.WebUserControls } get { - int answ = 0; - int.TryParse(hfStackId.Value, out answ); - return answ; + return cmp_StackBuildDetail.StackId; } } - public string cssFlashNext(object _isNext) - { - string answ = ""; - if (_isNext.ToString() == "1") - { - answ = " flashColor"; - } - return answ; - } - public string cssByPrepared(object _prepared, object _isNext) - { - string answ = "table-secondary border border-secondary border-thick rounded"; - if (_isNext.ToString() == "1") - { - answ = "table-primary flashColor rounded"; - } - else - { - if (!string.IsNullOrEmpty(_prepared.ToString())) - { - answ = "table-success border border-success border-thick rounded"; - } - } - return answ; - } /// /// Chiesta stampa stack corrente /// @@ -177,20 +150,5 @@ namespace NKC_WF.WebUserControls ComLib.updateBatchPositionByBunk(StackId); } - public string getProgressStyle(object _num, object _den) - { - string answ = "width: 10%"; - int num = 0; - int den = 1; - int.TryParse(_num.ToString(), out num); - int.TryParse(_den.ToString(), out den); - answ = $"width: {num * 100 / den}%"; - return answ; - } - - protected void Unnamed1_Tick(object sender, EventArgs e) - { - doUpdate(); - } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.designer.cs index b005300..3bd3251 100644 --- a/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.designer.cs @@ -51,66 +51,12 @@ namespace NKC_WF.WebUserControls protected global::System.Web.UI.WebControls.HiddenField hfLastBCode; /// - /// Controllo updBunk. + /// Controllo cmp_StackBuildDetail. /// /// /// 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 updBunk; - - /// - /// Controllo chkRedux. - /// - /// - /// 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.CheckBox chkRedux; - - /// - /// Controllo repCtrl. - /// - /// - /// 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.Repeater repCtrl; - - /// - /// Controllo hfStackId. - /// - /// - /// 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 hfStackId; - - /// - /// 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 repProgress. - /// - /// - /// 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.Repeater repProgress; - - /// - /// Controllo odsAdvance. - /// - /// - /// 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 odsAdvance; + protected global::NKC_WF.WebUserControls.cmp_StackBuildDetail cmp_StackBuildDetail; } }