From 8f5bfb62bdc70d8006e7476f4658334d90912500 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sat, 15 Feb 2020 18:06:50 +0100 Subject: [PATCH 1/2] Update x force reload --- NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx | 15 +++++++++++++++ .../WebUserControls/cmp_MU_svgViewer.ascx.cs | 17 +++++++++++++++++ .../cmp_MU_svgViewer.ascx.designer.cs | 18 ++++++++++++++++++ NKC_WF/site/MachineUnload.aspx.cs | 1 + 4 files changed, 51 insertions(+) diff --git a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx index 10f00af..fe7f3d6 100644 --- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx @@ -3,16 +3,20 @@
+ + diff --git a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs index 4f24d08..2dc0dc1 100644 --- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs @@ -12,6 +12,23 @@ namespace NKC_WF.WebUserControls { public partial class cmp_MU_svgViewer : System.Web.UI.UserControl { + /// + /// BatchId corrente... + /// + public int BatchId + { + set + { + hfBatchId.Value = value.ToString(); + doUpdate(); + } + get + { + int answ = 0; + int.TryParse(hfBatchId.Value, out answ); + return answ; + } + } /// /// Foglio corrente... /// diff --git a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs index 4fe8c5e..4cc4fa9 100644 --- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs @@ -14,6 +14,15 @@ namespace NKC_WF.WebUserControls public partial class cmp_MU_svgViewer { + /// + /// 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 hfSheetId. /// @@ -41,6 +50,15 @@ namespace NKC_WF.WebUserControls /// protected global::System.Web.UI.WebControls.HiddenField hfCurrRev; + /// + /// Controllo hfCurrBunkRev. + /// + /// + /// 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 hfCurrBunkRev; + /// /// Controllo svgTable. /// diff --git a/NKC_WF/site/MachineUnload.aspx.cs b/NKC_WF/site/MachineUnload.aspx.cs index 9539cde..8ee3978 100644 --- a/NKC_WF/site/MachineUnload.aspx.cs +++ b/NKC_WF/site/MachineUnload.aspx.cs @@ -57,6 +57,7 @@ namespace NKC_WF cmp_MU_stats.BatchId = BatchId; cmp_MU_bins.BatchId = BatchId; cmp_MU_carts.BatchId = BatchId; + cmp_MU_svgViewer.BatchId = BatchId; cmp_MU_svgViewer.SheetId = SheetId; } /// From 007e2c67cbc51967f99a2b35a004dc9c664eb871 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sat, 15 Feb 2020 18:09:36 +0100 Subject: [PATCH 2/2] Update x refresh condizionale corretto --- NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs index 2dc0dc1..0a80eba 100644 --- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs @@ -94,6 +94,11 @@ namespace NKC_WF.WebUserControls } protected void Page_Load(object sender, EventArgs e) { + if(!Page.IsPostBack) + { + // scrivo valore revisione batch! + hfCurrBunkRev.Value = ComLib.getSheetRevByBunk(BatchId).ToString(); + } } } } \ No newline at end of file