From 0ecc72ebe78c96292d21430aac1a027e54cd7ce3 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sat, 25 Jan 2020 14:29:49 +0100 Subject: [PATCH 01/11] Fix menu Dev x pagina test QRCode --- Jenkinsfile | 2 +- NKC_WF/WebUserControls/cmp_devUtils.ascx | 3 +++ NKC_WF/WebUserControls/cmp_devUtils.ascx.designer.cs | 9 +++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0bafec8..7f78fc1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=221']) { + withEnv(['NEXT_BUILD_NUMBER=222']) { // env.versionNumber = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '0.9.${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_devUtils.ascx b/NKC_WF/WebUserControls/cmp_devUtils.ascx index a68b48c..c52c181 100644 --- a/NKC_WF/WebUserControls/cmp_devUtils.ascx +++ b/NKC_WF/WebUserControls/cmp_devUtils.ascx @@ -10,5 +10,8 @@
SAVE
LAST Call
+
+ DEBUG
QRCode
+
diff --git a/NKC_WF/WebUserControls/cmp_devUtils.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_devUtils.ascx.designer.cs index 9e4cc58..4292d9a 100644 --- a/NKC_WF/WebUserControls/cmp_devUtils.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_devUtils.ascx.designer.cs @@ -40,5 +40,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.LinkButton lbtSaveLastAnsw; + + /// + /// Controllo hlDbgQrCode. + /// + /// + /// 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.HyperLink hlDbgQrCode; } } From c9aeb349b487cab6baca1fefd81d94d19d8e03a3 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sat, 25 Jan 2020 15:37:00 +0100 Subject: [PATCH 02/11] Inizio aggiunta bunk e sheets x preview... --- NKC_WF/NKC_WF.csproj | 24 ++++ NKC_WF/WebUserControls/cmp_BP_bunkList.ascx | 40 +++++++ .../WebUserControls/cmp_BP_bunkList.ascx.cs | 110 ++++++++++++++++++ .../cmp_BP_bunkList.ascx.designer.cs | 44 +++++++ NKC_WF/WebUserControls/cmp_BU_sheetList.ascx | 1 + .../WebUserControls/cmp_BU_sheetList.ascx.cs | 17 +++ .../cmp_BU_sheetList.ascx.designer.cs | 17 +++ NKC_WF/WebUserControls/cmp_batchList.ascx | 2 + NKC_WF/WebUserControls/cmp_batchList.ascx.cs | 17 +++ NKC_WF/site/BatchPreview.aspx | 22 ++++ NKC_WF/site/BatchPreview.aspx.cs | 63 ++++++++++ NKC_WF/site/BatchPreview.aspx.designer.cs | 44 +++++++ 12 files changed, 401 insertions(+) create mode 100644 NKC_WF/WebUserControls/cmp_BP_bunkList.ascx create mode 100644 NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.cs create mode 100644 NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.designer.cs create mode 100644 NKC_WF/WebUserControls/cmp_BU_sheetList.ascx create mode 100644 NKC_WF/WebUserControls/cmp_BU_sheetList.ascx.cs create mode 100644 NKC_WF/WebUserControls/cmp_BU_sheetList.ascx.designer.cs create mode 100644 NKC_WF/site/BatchPreview.aspx create mode 100644 NKC_WF/site/BatchPreview.aspx.cs create mode 100644 NKC_WF/site/BatchPreview.aspx.designer.cs diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index 13e9884..eef82dc 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -334,6 +334,7 @@ + @@ -373,6 +374,8 @@ + + @@ -530,6 +533,13 @@ ASPXCodeBehind + + BatchPreview.aspx + ASPXCodeBehind + + + BatchPreview.aspx + Contact.aspx ASPXCodeBehind @@ -763,6 +773,20 @@ cmp_batchList.ascx + + cmp_BP_bunkList.ascx + ASPXCodeBehind + + + cmp_BP_bunkList.ascx + + + cmp_BU_sheetList.ascx + ASPXCodeBehind + + + cmp_BU_sheetList.ascx + cmp_devUtils.ascx ASPXCodeBehind diff --git a/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx new file mode 100644 index 0000000..ec850c4 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx @@ -0,0 +1,40 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_BP_bunkList.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_BP_bunkList" %> + + + + + + + + + + No Record + + + + + + + + + + + + + +
+
Sheets: <%# Eval("NumSheetsPrepared") %> / <%# Eval("NumSheets") %>
+
items: <%# Eval("NumItems") %>
+
+
+ +
+ +
+
+ + + + + + diff --git a/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.cs b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.cs new file mode 100644 index 0000000..056be76 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.cs @@ -0,0 +1,110 @@ +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_BP_bunkList : BaseUserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + /// + /// Batch corrente... + /// + public int BatchId + { + set + { + hfBatchID.Value = value.ToString(); + } + get + { + int answ = 0; + int.TryParse(hfBatchID.Value, out answ); + return answ; + } + } + + protected void grView_RowCommand(object sender, GridViewCommandEventArgs e) + { + // recupero argomento = Takt... + try + { + string stack = e.CommandArgument.ToString(); + //lblStack.Text = stack; + } + catch + { } + } + protected void grView_SelectedIndexChanged(object sender, EventArgs e) + { + checkVisibility(); + raiseEvent(); + } + /// + /// comando reset + /// + /// + /// + protected void lbtReset_Click(object sender, EventArgs e) + { + resetSelezione(); + } + + private void checkVisibility() + { + //divSelected.Visible = StackIdSel > 0; + //grView.Visible = !divSelected.Visible; + //// imposto css titolo... + //string titleClass = "row font-weight-bold"; + //if (divSelected.Visible) + //{ + // titleClass += " table-info"; + //} + //divTitle.Attributes.Remove("class"); + //divTitle.Attributes.Add("class", titleClass); + } + public void resetSelezione() + { + //lblStack.Text = ""; + grView.SelectedIndex = -1; + grView.DataBind(); + checkVisibility(); + raiseEvent(); + } + + public int selIndex + { + get + { + return grView.SelectedIndex; + } + set + { + grView.SelectedIndex = value; + } + } + /// + /// StackId selezionato + /// + public int StackIdSel + { + get + { + int answ = 0; + try + { + int.TryParse(grView.SelectedValue.ToString(), out answ); + } + catch + { } + return answ; + } + } + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.designer.cs new file mode 100644 index 0000000..9772c52 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.designer.cs @@ -0,0 +1,44 @@ +//------------------------------------------------------------------------------ +// +// 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_BP_bunkList + { + + /// + /// Controllo grView. + /// + /// + /// 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.GridView grView; + + /// + /// 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; + } +} diff --git a/NKC_WF/WebUserControls/cmp_BU_sheetList.ascx b/NKC_WF/WebUserControls/cmp_BU_sheetList.ascx new file mode 100644 index 0000000..5f69f22 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_BU_sheetList.ascx @@ -0,0 +1 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_BU_sheetList.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_BU_sheetList" %> diff --git a/NKC_WF/WebUserControls/cmp_BU_sheetList.ascx.cs b/NKC_WF/WebUserControls/cmp_BU_sheetList.ascx.cs new file mode 100644 index 0000000..1942e51 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_BU_sheetList.ascx.cs @@ -0,0 +1,17 @@ +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_BU_sheetList : System.Web.UI.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_BU_sheetList.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_BU_sheetList.ascx.designer.cs new file mode 100644 index 0000000..f5855ae --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_BU_sheetList.ascx.designer.cs @@ -0,0 +1,17 @@ +//------------------------------------------------------------------------------ +// +// 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_BU_sheetList + { + } +} diff --git a/NKC_WF/WebUserControls/cmp_batchList.ascx b/NKC_WF/WebUserControls/cmp_batchList.ascx index e9f9b64..d11cb97 100644 --- a/NKC_WF/WebUserControls/cmp_batchList.ascx +++ b/NKC_WF/WebUserControls/cmp_batchList.ascx @@ -60,6 +60,7 @@ + <%# BStatus(Eval("Status")) %> @@ -102,3 +103,4 @@ + diff --git a/NKC_WF/WebUserControls/cmp_batchList.ascx.cs b/NKC_WF/WebUserControls/cmp_batchList.ascx.cs index 9abfdfd..55b7b43 100644 --- a/NKC_WF/WebUserControls/cmp_batchList.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchList.ascx.cs @@ -138,6 +138,23 @@ namespace NKC_WF.WebUserControls } return answ; } + /// + /// Verifica se sia visualizzabile preview dato stato + /// + /// + /// + public bool isPreviewVisible(object _status) + { + bool answ = false; + int status = -1; + int.TryParse(_status.ToString(), out status); + if (status > 3) + { + answ = true; + } + return answ; + } + /// /// Converte il codice stato in effettivo campo /// diff --git a/NKC_WF/site/BatchPreview.aspx b/NKC_WF/site/BatchPreview.aspx new file mode 100644 index 0000000..35c0bb7 --- /dev/null +++ b/NKC_WF/site/BatchPreview.aspx @@ -0,0 +1,22 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="BatchPreview.aspx.cs" Inherits="NKC_WF.site.BatchPreview" %> + +<%@ Register Src="~/WebUserControls/cmp_BP_bunkList.ascx" TagPrefix="uc1" TagName="cmp_BP_bunkList" %> +<%@ Register Src="~/WebUserControls/cmp_BU_sheetList.ascx" TagPrefix="uc1" TagName="cmp_BU_sheetList" %> + + + + + +
+
+ +
+
+

Batch preview - start | pause | stop

+ Immagine corrente +
+
+ +
+
+
diff --git a/NKC_WF/site/BatchPreview.aspx.cs b/NKC_WF/site/BatchPreview.aspx.cs new file mode 100644 index 0000000..e3b95c0 --- /dev/null +++ b/NKC_WF/site/BatchPreview.aspx.cs @@ -0,0 +1,63 @@ +using SteamWare; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace NKC_WF.site +{ + public partial class BatchPreview : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + doUpdate(); + } + cmp_BP_bunkList.eh_doRefresh += Cmp_BP_bunkList_eh_doRefresh; + } + + private void Cmp_BP_bunkList_eh_doRefresh(object sender, EventArgs e) + { + // aggiorno sheets + } + + protected int bunkIndex + { + get + { + return cmp_BP_bunkList.selIndex; + } + set + { + cmp_BP_bunkList.selIndex = value; + } + } + protected int StackId + { + get + { + return cmp_BP_bunkList.StackIdSel; + } + } + + private void doUpdate() + { + cmp_BP_bunkList.BatchId = BatchId; + } + + /// + /// Batch corrente... + /// + public int BatchId + { + get + { + int answ = memLayer.ML.QSI("BatchId"); + return answ; + } + } + } +} \ No newline at end of file diff --git a/NKC_WF/site/BatchPreview.aspx.designer.cs b/NKC_WF/site/BatchPreview.aspx.designer.cs new file mode 100644 index 0000000..78dc727 --- /dev/null +++ b/NKC_WF/site/BatchPreview.aspx.designer.cs @@ -0,0 +1,44 @@ +//------------------------------------------------------------------------------ +// +// 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.site +{ + + + public partial class BatchPreview + { + + /// + /// 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 cmp_BP_bunkList. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::NKC_WF.WebUserControls.cmp_BP_bunkList cmp_BP_bunkList; + + /// + /// Controllo cmp_BU_sheetList. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::NKC_WF.WebUserControls.cmp_BU_sheetList cmp_BU_sheetList; + } +} From e73905753d4fe4f94d734de93b228cd2aa51c17e Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sat, 25 Jan 2020 16:27:46 +0100 Subject: [PATCH 03/11] Continuo aggiunta componenti blocco preview --- Jenkinsfile | 2 +- NKC_WF/NKC_WF.csproj | 10 ++-- .../WebUserControls/cmp_BP_bunkList.ascx.cs | 2 +- NKC_WF/WebUserControls/cmp_BP_sheetList.ascx | 4 ++ .../WebUserControls/cmp_BP_sheetList.ascx.cs | 49 +++++++++++++++++++ .../cmp_BP_sheetList.ascx.designer.cs | 35 +++++++++++++ NKC_WF/WebUserControls/cmp_BU_sheetList.ascx | 1 - .../WebUserControls/cmp_BU_sheetList.ascx.cs | 17 ------- .../cmp_BU_sheetList.ascx.designer.cs | 17 ------- NKC_WF/site/BatchPreview.aspx | 11 +++-- NKC_WF/site/BatchPreview.aspx.cs | 4 +- NKC_WF/site/BatchPreview.aspx.designer.cs | 13 ++++- 12 files changed, 116 insertions(+), 49 deletions(-) create mode 100644 NKC_WF/WebUserControls/cmp_BP_sheetList.ascx create mode 100644 NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.cs create mode 100644 NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.designer.cs delete mode 100644 NKC_WF/WebUserControls/cmp_BU_sheetList.ascx delete mode 100644 NKC_WF/WebUserControls/cmp_BU_sheetList.ascx.cs delete mode 100644 NKC_WF/WebUserControls/cmp_BU_sheetList.ascx.designer.cs diff --git a/Jenkinsfile b/Jenkinsfile index 7f78fc1..f840ea5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=222']) { + withEnv(['NEXT_BUILD_NUMBER=223']) { // env.versionNumber = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index eef82dc..83246ea 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -375,7 +375,7 @@ - + @@ -780,12 +780,12 @@ cmp_BP_bunkList.ascx - - cmp_BU_sheetList.ascx + + cmp_BP_sheetList.ascx ASPXCodeBehind - - cmp_BU_sheetList.ascx + + cmp_BP_sheetList.ascx cmp_devUtils.ascx diff --git a/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.cs b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.cs index 056be76..8970f04 100644 --- a/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.cs @@ -92,7 +92,7 @@ namespace NKC_WF.WebUserControls /// /// StackId selezionato /// - public int StackIdSel + public int BunkIdSel { get { diff --git a/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx new file mode 100644 index 0000000..48ae5c5 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx @@ -0,0 +1,4 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_BP_sheetList.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_BP_sheetList" %> + + + \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.cs b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.cs new file mode 100644 index 0000000..63f4aa0 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.cs @@ -0,0 +1,49 @@ +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_BP_sheetList : System.Web.UI.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + /// + /// Batch corrente... + /// + public int BatchId + { + set + { + hfBatchID.Value = value.ToString(); + } + get + { + int answ = 0; + int.TryParse(hfBatchID.Value, out answ); + return answ; + } + } + /// + /// Bunk corrente... + /// + public int BunkId + { + set + { + hfStackID.Value = value.ToString(); + } + 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_BP_sheetList.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.designer.cs new file mode 100644 index 0000000..1a75f88 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.designer.cs @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +// +// 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_BP_sheetList + { + + /// + /// 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 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; + } +} diff --git a/NKC_WF/WebUserControls/cmp_BU_sheetList.ascx b/NKC_WF/WebUserControls/cmp_BU_sheetList.ascx deleted file mode 100644 index 5f69f22..0000000 --- a/NKC_WF/WebUserControls/cmp_BU_sheetList.ascx +++ /dev/null @@ -1 +0,0 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_BU_sheetList.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_BU_sheetList" %> diff --git a/NKC_WF/WebUserControls/cmp_BU_sheetList.ascx.cs b/NKC_WF/WebUserControls/cmp_BU_sheetList.ascx.cs deleted file mode 100644 index 1942e51..0000000 --- a/NKC_WF/WebUserControls/cmp_BU_sheetList.ascx.cs +++ /dev/null @@ -1,17 +0,0 @@ -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_BU_sheetList : System.Web.UI.UserControl - { - protected void Page_Load(object sender, EventArgs e) - { - - } - } -} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_BU_sheetList.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_BU_sheetList.ascx.designer.cs deleted file mode 100644 index f5855ae..0000000 --- a/NKC_WF/WebUserControls/cmp_BU_sheetList.ascx.designer.cs +++ /dev/null @@ -1,17 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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_BU_sheetList - { - } -} diff --git a/NKC_WF/site/BatchPreview.aspx b/NKC_WF/site/BatchPreview.aspx index 35c0bb7..8d1ca50 100644 --- a/NKC_WF/site/BatchPreview.aspx +++ b/NKC_WF/site/BatchPreview.aspx @@ -1,7 +1,10 @@ <%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="BatchPreview.aspx.cs" Inherits="NKC_WF.site.BatchPreview" %> <%@ Register Src="~/WebUserControls/cmp_BP_bunkList.ascx" TagPrefix="uc1" TagName="cmp_BP_bunkList" %> -<%@ Register Src="~/WebUserControls/cmp_BU_sheetList.ascx" TagPrefix="uc1" TagName="cmp_BU_sheetList" %> +<%@ Register Src="~/WebUserControls/cmp_MU_svgViewer.ascx" TagPrefix="uc1" TagName="cmp_MU_svgViewer" %> +<%@ Register Src="~/WebUserControls/cmp_BP_sheetList.ascx" TagPrefix="uc1" TagName="cmp_BP_sheetList" %> + + @@ -9,14 +12,14 @@
- +

Batch preview - start | pause | stop

- Immagine corrente +
- +
diff --git a/NKC_WF/site/BatchPreview.aspx.cs b/NKC_WF/site/BatchPreview.aspx.cs index e3b95c0..ca8c7a1 100644 --- a/NKC_WF/site/BatchPreview.aspx.cs +++ b/NKC_WF/site/BatchPreview.aspx.cs @@ -39,13 +39,15 @@ namespace NKC_WF.site { get { - return cmp_BP_bunkList.StackIdSel; + return cmp_BP_bunkList.BunkIdSel; } } private void doUpdate() { cmp_BP_bunkList.BatchId = BatchId; + cmp_BP_sheetList.BatchId = BatchId; + cmp_BP_sheetList.BunkId = cmp_BP_bunkList.BunkIdSel; } /// diff --git a/NKC_WF/site/BatchPreview.aspx.designer.cs b/NKC_WF/site/BatchPreview.aspx.designer.cs index 78dc727..6395e3f 100644 --- a/NKC_WF/site/BatchPreview.aspx.designer.cs +++ b/NKC_WF/site/BatchPreview.aspx.designer.cs @@ -33,12 +33,21 @@ namespace NKC_WF.site protected global::NKC_WF.WebUserControls.cmp_BP_bunkList cmp_BP_bunkList; /// - /// Controllo cmp_BU_sheetList. + /// Controllo cmp_MU_svgViewer. /// /// /// Campo generato automaticamente. /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// - protected global::NKC_WF.WebUserControls.cmp_BU_sheetList cmp_BU_sheetList; + protected global::NKC_WF.WebUserControls.cmp_MU_svgViewer cmp_MU_svgViewer; + + /// + /// Controllo cmp_BP_sheetList. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::NKC_WF.WebUserControls.cmp_BP_sheetList cmp_BP_sheetList; } } From 76ca46733abe6a14c3fe6b3b579992a56ac10066 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sat, 25 Jan 2020 16:58:22 +0100 Subject: [PATCH 04/11] continua inserimento metodi selezione --- .../WebUserControls/cmp_BP_bunkList.ascx.cs | 2 +- NKC_WF/WebUserControls/cmp_BP_sheetList.ascx | 53 ++++++++++++++++++- .../WebUserControls/cmp_BP_sheetList.ascx.cs | 40 ++++++++------ .../cmp_BP_sheetList.ascx.designer.cs | 27 ++++++---- NKC_WF/site/BatchPreview.aspx.cs | 3 +- 5 files changed, 94 insertions(+), 31 deletions(-) diff --git a/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.cs b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.cs index 8970f04..80dc525 100644 --- a/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.cs @@ -90,7 +90,7 @@ namespace NKC_WF.WebUserControls } } /// - /// StackId selezionato + /// BunkId selezionato /// public int BunkIdSel { diff --git a/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx index 48ae5c5..6b4d44a 100644 --- a/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx +++ b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx @@ -1,4 +1,53 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_BP_sheetList.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_BP_sheetList" %> - - \ No newline at end of file + + + + + + + + No Record + + + + + + + + + + + + + +
+ +
+
+ <%-- + + + --%> + <%-- + --%> + + <%-- + + + + + + + + + + --%> + <%----%> +
+
+ + + + + diff --git a/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.cs b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.cs index 63f4aa0..6fc135e 100644 --- a/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.cs @@ -7,27 +7,11 @@ using System.Web.UI.WebControls; namespace NKC_WF.WebUserControls { - public partial class cmp_BP_sheetList : System.Web.UI.UserControl + public partial class cmp_BP_sheetList : BaseUserControl { protected void Page_Load(object sender, EventArgs e) { - } - /// - /// Batch corrente... - /// - public int BatchId - { - set - { - hfBatchID.Value = value.ToString(); - } - get - { - int answ = 0; - int.TryParse(hfBatchID.Value, out answ); - return answ; - } } /// /// Bunk corrente... @@ -37,6 +21,7 @@ namespace NKC_WF.WebUserControls set { hfStackID.Value = value.ToString(); + grView.DataBind(); } get { @@ -45,5 +30,26 @@ namespace NKC_WF.WebUserControls return answ; } } + /// + /// comando reset + /// + /// + /// + protected void lbtReset_Click(object sender, EventArgs e) + { + resetSelezione(); + } + public void resetSelezione() + { + //lblStack.Text = ""; + grView.SelectedIndex = -1; + grView.DataBind(); + raiseEvent(); + } + + protected void grView_SelectedIndexChanged(object sender, EventArgs e) + { + raiseEvent(); + } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.designer.cs index 1a75f88..7284886 100644 --- a/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.designer.cs @@ -14,15 +14,6 @@ namespace NKC_WF.WebUserControls public partial class cmp_BP_sheetList { - /// - /// 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 hfStackID. /// @@ -31,5 +22,23 @@ 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 hfStackID; + + /// + /// Controllo grView. + /// + /// + /// 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.GridView grView; + + /// + /// 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; } } diff --git a/NKC_WF/site/BatchPreview.aspx.cs b/NKC_WF/site/BatchPreview.aspx.cs index ca8c7a1..072c28c 100644 --- a/NKC_WF/site/BatchPreview.aspx.cs +++ b/NKC_WF/site/BatchPreview.aspx.cs @@ -22,6 +22,7 @@ namespace NKC_WF.site private void Cmp_BP_bunkList_eh_doRefresh(object sender, EventArgs e) { // aggiorno sheets + cmp_BP_sheetList.BunkId = cmp_BP_bunkList.BunkIdSel; } protected int bunkIndex @@ -46,8 +47,6 @@ namespace NKC_WF.site private void doUpdate() { cmp_BP_bunkList.BatchId = BatchId; - cmp_BP_sheetList.BatchId = BatchId; - cmp_BP_sheetList.BunkId = cmp_BP_bunkList.BunkIdSel; } /// From 28cd57c4a5539ced517b231f0d7173d948eaaafa Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sat, 25 Jan 2020 17:09:33 +0100 Subject: [PATCH 05/11] Abbozzati tutti i sistemi... vediamo... --- .../WebUserControls/cmp_BP_bunkList.ascx.cs | 4 ++- NKC_WF/WebUserControls/cmp_BP_sheetList.ascx | 24 ++------------ .../WebUserControls/cmp_BP_sheetList.ascx.cs | 31 +++++++++++++++++++ .../WebUserControls/cmp_MU_svgViewer.ascx.cs | 2 +- NKC_WF/site/BatchPreview.aspx | 10 ++---- NKC_WF/site/BatchPreview.aspx.cs | 8 +++++ 6 files changed, 49 insertions(+), 30 deletions(-) diff --git a/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.cs b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.cs index 80dc525..d3077de 100644 --- a/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.cs @@ -77,7 +77,9 @@ namespace NKC_WF.WebUserControls checkVisibility(); raiseEvent(); } - + /// + /// Indice selezionato + /// public int selIndex { get diff --git a/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx index 6b4d44a..908301d 100644 --- a/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx +++ b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx @@ -18,32 +18,14 @@ - - + +
- <%-- - - - --%> - <%-- - --%> - - <%-- - - - - - - - - - - --%> - <%----%> + diff --git a/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.cs b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.cs index 6fc135e..eee7644 100644 --- a/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.cs @@ -30,6 +30,37 @@ namespace NKC_WF.WebUserControls return answ; } } + // + /// Indice selezionato + /// + public int selIndex + { + get + { + return grView.SelectedIndex; + } + set + { + grView.SelectedIndex = value; + } + } + /// + /// SheetId selezionato + /// + public int SheetIdSel + { + get + { + int answ = 0; + try + { + int.TryParse(grView.SelectedValue.ToString(), out answ); + } + catch + { } + return answ; + } + } /// /// comando reset /// diff --git a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs index 2b34712..8b31830 100644 --- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs @@ -20,7 +20,6 @@ namespace NKC_WF.WebUserControls set { hfBatchID.Value = value.ToString(); - doUpdate(); } get { @@ -37,6 +36,7 @@ namespace NKC_WF.WebUserControls set { hfSheetId.Value = value.ToString(); + doUpdate(); } get { diff --git a/NKC_WF/site/BatchPreview.aspx b/NKC_WF/site/BatchPreview.aspx index 8d1ca50..3c06a36 100644 --- a/NKC_WF/site/BatchPreview.aspx +++ b/NKC_WF/site/BatchPreview.aspx @@ -4,21 +4,17 @@ <%@ Register Src="~/WebUserControls/cmp_MU_svgViewer.ascx" TagPrefix="uc1" TagName="cmp_MU_svgViewer" %> <%@ Register Src="~/WebUserControls/cmp_BP_sheetList.ascx" TagPrefix="uc1" TagName="cmp_BP_sheetList" %> - - - -
-
+
-
+

Batch preview - start | pause | stop

-
+
diff --git a/NKC_WF/site/BatchPreview.aspx.cs b/NKC_WF/site/BatchPreview.aspx.cs index 072c28c..58e63df 100644 --- a/NKC_WF/site/BatchPreview.aspx.cs +++ b/NKC_WF/site/BatchPreview.aspx.cs @@ -17,6 +17,13 @@ namespace NKC_WF.site doUpdate(); } cmp_BP_bunkList.eh_doRefresh += Cmp_BP_bunkList_eh_doRefresh; + cmp_BP_sheetList.eh_doRefresh += Cmp_BP_sheetList_eh_doRefresh; + } + + private void Cmp_BP_sheetList_eh_doRefresh(object sender, EventArgs e) + { + // imposto sheet sul foglio... + cmp_MU_svgViewer.SheetId = cmp_BP_sheetList.SheetIdSel; } private void Cmp_BP_bunkList_eh_doRefresh(object sender, EventArgs e) @@ -47,6 +54,7 @@ namespace NKC_WF.site private void doUpdate() { cmp_BP_bunkList.BatchId = BatchId; + cmp_MU_svgViewer.BatchId = BatchId; } /// From e6ee67637ff3d6d343c1729927fbf496a5ab290d Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sat, 25 Jan 2020 17:31:46 +0100 Subject: [PATCH 06/11] OK PREVIEW!!!! --- AppData/DS_App.Designer.cs | 135 ++++++++++-------- AppData/DS_App.xsd | 79 +++++----- AppData/DS_App.xss | 4 +- NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx | 3 +- .../WebUserControls/cmp_MU_svgViewer.ascx.cs | 53 ++++++- .../cmp_MU_svgViewer.ascx.designer.cs | 9 ++ NKC_WF/site/BatchPreview.aspx.cs | 1 - 7 files changed, 189 insertions(+), 95 deletions(-) diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index 36bc43e..9376b0e 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -14158,7 +14158,7 @@ namespace AppData.DS_AppTableAdapters { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[10]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[11]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_SheetList"; @@ -14185,52 +14185,58 @@ namespace AppData.DS_AppTableAdapters { this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ShStatusEnd", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[4].Connection = this.Connection; - this._commandCollection[4].CommandText = "dbo.stp_Sheets_getByStack"; + this._commandCollection[4].CommandText = "dbo.stp_Sheets_getBySheetID"; this._commandCollection[4].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StackID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SheetID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[5].Connection = this.Connection; - this._commandCollection[5].CommandText = "dbo.stp_Sheets_getNextByStack"; + this._commandCollection[5].CommandText = "dbo.stp_Sheets_getByStack"; this._commandCollection[5].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StackID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[6].Connection = this.Connection; - this._commandCollection[6].CommandText = "dbo.stp_Sheets_insert"; + this._commandCollection[6].CommandText = "dbo.stp_Sheets_getNextByStack"; this._commandCollection[6].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SheetIndex", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MatID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@WrkTimeEst", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StackID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PrintFilePath", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CncFilePath", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DrawFilePath", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[7] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[7].Connection = this.Connection; - this._commandCollection[7].CommandText = "dbo.stp_Sheets_resetPrepared"; + this._commandCollection[7].CommandText = "dbo.stp_Sheets_insert"; this._commandCollection[7].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SheetID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SheetIndex", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MatID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@WrkTimeEst", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StackID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PrintFilePath", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CncFilePath", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DrawFilePath", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[8] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[8].Connection = this.Connection; - this._commandCollection[8].CommandText = "dbo.stp_Sheets_setPrepared"; + this._commandCollection[8].CommandText = "dbo.stp_Sheets_resetPrepared"; this._commandCollection[8].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SheetID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[9] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[9].Connection = this.Connection; - this._commandCollection[9].CommandText = "dbo.stp_Sheets_updDate"; + this._commandCollection[9].CommandText = "dbo.stp_Sheets_setPrepared"; this._commandCollection[9].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SheetID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PrntStart", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PrntEnd", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@WrkStart", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@WrkEnd", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UnlStart", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UnlEnd", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SheetID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[10] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[10].Connection = this.Connection; + this._commandCollection[10].CommandText = "dbo.stp_Sheets_updDate"; + this._commandCollection[10].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SheetID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PrntStart", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PrntEnd", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@WrkStart", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@WrkEnd", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UnlStart", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UnlEnd", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -14307,10 +14313,10 @@ namespace AppData.DS_AppTableAdapters { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_App.SheetListDataTable getByStack(global::System.Nullable StackID) { + public virtual DS_App.SheetListDataTable getBySheetId(global::System.Nullable SheetID) { this.Adapter.SelectCommand = this.CommandCollection[4]; - if ((StackID.HasValue == true)) { - this.Adapter.SelectCommand.Parameters[1].Value = ((int)(StackID.Value)); + if ((SheetID.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(SheetID.Value)); } else { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; @@ -14324,7 +14330,7 @@ namespace AppData.DS_AppTableAdapters { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_App.SheetListDataTable getNextByStack(global::System.Nullable StackID) { + public virtual DS_App.SheetListDataTable getByStack(global::System.Nullable StackID) { this.Adapter.SelectCommand = this.CommandCollection[5]; if ((StackID.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(StackID.Value)); @@ -14341,8 +14347,25 @@ namespace AppData.DS_AppTableAdapters { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_App.SheetListDataTable insertAndReturn(global::System.Nullable SheetIndex, global::System.Nullable MatID, global::System.Nullable WrkTimeEst, global::System.Nullable StackID, string PrintFilePath, string CncFilePath, string DrawFilePath) { + public virtual DS_App.SheetListDataTable getNextByStack(global::System.Nullable StackID) { this.Adapter.SelectCommand = this.CommandCollection[6]; + if ((StackID.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(StackID.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + DS_App.SheetListDataTable dataTable = new DS_App.SheetListDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_App.SheetListDataTable insertAndReturn(global::System.Nullable SheetIndex, global::System.Nullable MatID, global::System.Nullable WrkTimeEst, global::System.Nullable StackID, string PrintFilePath, string CncFilePath, string DrawFilePath) { + this.Adapter.SelectCommand = this.CommandCollection[7]; if ((SheetIndex.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(SheetIndex.Value)); } @@ -14422,34 +14445,6 @@ namespace AppData.DS_AppTableAdapters { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int resetPrepared(global::System.Nullable SheetID) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[7]; - if ((SheetID.HasValue == true)) { - command.Parameters[1].Value = ((int)(SheetID.Value)); - } - else { - command.Parameters[1].Value = global::System.DBNull.Value; - } - global::System.Data.ConnectionState previousConnectionState = command.Connection.State; - if (((command.Connection.State & global::System.Data.ConnectionState.Open) - != global::System.Data.ConnectionState.Open)) { - command.Connection.Open(); - } - int returnValue; - try { - returnValue = command.ExecuteNonQuery(); - } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - command.Connection.Close(); - } - } - return returnValue; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int setPrepared(global::System.Nullable SheetID) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[8]; if ((SheetID.HasValue == true)) { command.Parameters[1].Value = ((int)(SheetID.Value)); @@ -14477,8 +14472,36 @@ namespace AppData.DS_AppTableAdapters { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int updateDate(global::System.Nullable Original_SheetID, global::System.Nullable PrntStart, global::System.Nullable PrntEnd, global::System.Nullable WrkStart, global::System.Nullable WrkEnd, global::System.Nullable UnlStart, global::System.Nullable UnlEnd) { + public virtual int setPrepared(global::System.Nullable SheetID) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[9]; + if ((SheetID.HasValue == true)) { + command.Parameters[1].Value = ((int)(SheetID.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int updateDate(global::System.Nullable Original_SheetID, global::System.Nullable PrntStart, global::System.Nullable PrntEnd, global::System.Nullable WrkStart, global::System.Nullable WrkEnd, global::System.Nullable UnlStart, global::System.Nullable UnlEnd) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[10]; if ((Original_SheetID.HasValue == true)) { command.Parameters[1].Value = ((int)(Original_SheetID.Value)); } diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index 045f938..d688bee 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -369,6 +369,17 @@ FROM v_SheetList + + + + dbo.stp_Sheets_getBySheetID + + + + + + + @@ -1999,7 +2010,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2047,7 +2058,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2069,7 +2080,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2124,7 +2135,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2197,7 +2208,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2205,7 +2216,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2274,7 +2285,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2307,7 +2318,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2333,7 +2344,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2352,7 +2363,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2376,7 +2387,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2384,7 +2395,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2401,7 +2412,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2410,7 +2421,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2441,7 +2452,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2449,7 +2460,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2465,7 +2476,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2473,7 +2484,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2501,7 +2512,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2537,7 +2548,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2553,7 +2564,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2563,7 +2574,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2668,18 +2679,18 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - - - - - - - - - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/AppData/DS_App.xss b/AppData/DS_App.xss index 2455c52..7409636 100644 --- a/AppData/DS_App.xss +++ b/AppData/DS_App.xss @@ -4,11 +4,11 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - + diff --git a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx index 77db5ca..2fb9c67 100644 --- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx @@ -23,4 +23,5 @@ - \ No newline at end of file + + \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs index 8b31830..4bb2091 100644 --- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs @@ -20,6 +20,8 @@ namespace NKC_WF.WebUserControls set { hfBatchID.Value = value.ToString(); + calcSheet(); + doUpdate(); } get { @@ -45,13 +47,54 @@ namespace NKC_WF.WebUserControls return answ; } } + /// + /// Percorso file calcolato + /// + public string filename + { + get + { + return hfFilename.Value; + } + set + { + hfFilename.Value = value; + } + } + protected void calcSheet() + { + // base path + string baseOrig = memLayer.ML.CRS("drawBaseBath").ToLower(); + string baseCurr = memLayer.ML.CRS("srvDrawBaseBath").ToLower(); + //SOLO SE ho batch != 0... + if (BatchId > 0) + { + // FORSE 5/5?!? + var sheetList = DataLayer.man.taSHL.getByMLStatus(BatchId, 3, 5); + if (sheetList.Count > 0) + { + SheetId = sheetList[0].SheetID; +#if false + filename = sheetList[0].DrawFilePath.ToLower().Replace(baseOrig, baseCurr); + // NON DOVREBEB SERVIRE MAP se è già share di rete... anche se è su MEDESIMA macchina + //filename = Server.MapPath(filename); +#endif + } + } +#if false + else if (SheetId > 0) + { + filename = DataLayer.man.taSHL.getByItemID(SheetId)[0].DrawFilePath.ToLower().Replace(baseOrig, baseCurr); + } +#endif + } public void doUpdate() { // recupero ID del foglio corrente string answ = ""; - string filename = ""; try { +#if false // FORSE 5/5?!? var sheetList = DataLayer.man.taSHL.getByMLStatus(BatchId, 3, 5); if (sheetList.Count > 0) @@ -63,6 +106,14 @@ namespace NKC_WF.WebUserControls filename = sheetList[0].DrawFilePath.ToLower().Replace(baseOrig, baseCurr); // NON DOVREBEB SERVIRE MAP se è già share di rete... anche se è su MEDESIMA macchina //filename = Server.MapPath(filename); + } +#endif + string baseOrig = memLayer.ML.CRS("drawBaseBath").ToLower(); + string baseCurr = memLayer.ML.CRS("srvDrawBaseBath").ToLower(); + var tabSheets = DataLayer.man.taSHL.getBySheetId(SheetId); + if (tabSheets.Count > 0) + { + filename = tabSheets[0].DrawFilePath.ToLower().Replace(baseOrig, baseCurr); answ = File.ReadAllText(filename); } } diff --git a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs index 6322cc7..e9c5721 100644 --- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs @@ -40,5 +40,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 hfSheetId; + + /// + /// Controllo hfFilename. + /// + /// + /// 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 hfFilename; } } diff --git a/NKC_WF/site/BatchPreview.aspx.cs b/NKC_WF/site/BatchPreview.aspx.cs index 58e63df..ca8f6ac 100644 --- a/NKC_WF/site/BatchPreview.aspx.cs +++ b/NKC_WF/site/BatchPreview.aspx.cs @@ -54,7 +54,6 @@ namespace NKC_WF.site private void doUpdate() { cmp_BP_bunkList.BatchId = BatchId; - cmp_MU_svgViewer.BatchId = BatchId; } /// From 16cb7f97f8378a6004ea76c55dbc55206ce5f3cd Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sun, 26 Jan 2020 10:35:05 +0100 Subject: [PATCH 07/11] Inizio fix area lettura disegni... --- Jenkinsfile | 18 ------------------ NKC_WF/Web.Release.config | 7 ++++--- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f840ea5..5253fbf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -84,28 +84,10 @@ pipeline { sleep 3 } }, - // SITE_IIS01: { - // if(env.enableIIS01 == "Y") - // { - // sleep 3 - // // SITE - // bat "\"${tool 'MSBuild-15.0'}\" \"/p:AspnetMergePath=C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6.2 Tools\" /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01.pubxml /p:VisualStudioVersion=15.0 /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ NKC_WF/NKC_WF.csproj" - // sleep 1 - // } - // }, failFast: false) } else if (env.BRANCH_NAME == "develop") { parallel ( - // SITE_IIS02: { - // if(env.enableIIS02 == "Y") - // { - // sleep 1 - // // SITE - // bat "\"${tool 'MSBuild-15.0'}\" \"/p:AspnetMergePath=C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6.2 Tools\" /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS02.pubxml /p:VisualStudioVersion=15.0 /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ NKC_WF/NKC_WF.csproj" - // sleep 3 - // } - // }, SITE_IIS01: { if(env.enableIIS01 == "Y") { diff --git a/NKC_WF/Web.Release.config b/NKC_WF/Web.Release.config index 6831f9c..07351d3 100644 --- a/NKC_WF/Web.Release.config +++ b/NKC_WF/Web.Release.config @@ -5,11 +5,12 @@ - + - - + + + From 3caba4ab6c2750ca55119fecc5c5fca537ccd907 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sun, 26 Jan 2020 11:11:14 +0100 Subject: [PATCH 08/11] semplificati metodi visualizzazione SVG --- NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx | 1 - .../WebUserControls/cmp_MU_svgViewer.ascx.cs | 59 ------------------- .../cmp_MU_svgViewer.ascx.designer.cs | 9 --- NKC_WF/site/MachineUnload.aspx.cs | 14 ++++- 4 files changed, 13 insertions(+), 70 deletions(-) diff --git a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx index 2fb9c67..f2bca66 100644 --- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx @@ -22,6 +22,5 @@ - \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs index 4bb2091..25b7a0f 100644 --- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs @@ -12,24 +12,6 @@ namespace NKC_WF.WebUserControls { public partial class cmp_MU_svgViewer : System.Web.UI.UserControl { - /// - /// Batch corrente... - /// - public int BatchId - { - set - { - hfBatchID.Value = value.ToString(); - calcSheet(); - doUpdate(); - } - get - { - int answ = 0; - int.TryParse(hfBatchID.Value, out answ); - return answ; - } - } /// /// Foglio corrente... /// @@ -61,53 +43,12 @@ namespace NKC_WF.WebUserControls hfFilename.Value = value; } } - protected void calcSheet() - { - // base path - string baseOrig = memLayer.ML.CRS("drawBaseBath").ToLower(); - string baseCurr = memLayer.ML.CRS("srvDrawBaseBath").ToLower(); - //SOLO SE ho batch != 0... - if (BatchId > 0) - { - // FORSE 5/5?!? - var sheetList = DataLayer.man.taSHL.getByMLStatus(BatchId, 3, 5); - if (sheetList.Count > 0) - { - SheetId = sheetList[0].SheetID; -#if false - filename = sheetList[0].DrawFilePath.ToLower().Replace(baseOrig, baseCurr); - // NON DOVREBEB SERVIRE MAP se è già share di rete... anche se è su MEDESIMA macchina - //filename = Server.MapPath(filename); -#endif - } - } -#if false - else if (SheetId > 0) - { - filename = DataLayer.man.taSHL.getByItemID(SheetId)[0].DrawFilePath.ToLower().Replace(baseOrig, baseCurr); - } -#endif - } public void doUpdate() { // recupero ID del foglio corrente string answ = ""; try { -#if false - // FORSE 5/5?!? - var sheetList = DataLayer.man.taSHL.getByMLStatus(BatchId, 3, 5); - if (sheetList.Count > 0) - { - SheetId = sheetList[0].SheetID; - // lo leggo da file - string baseOrig = memLayer.ML.CRS("drawBaseBath").ToLower(); - string baseCurr = memLayer.ML.CRS("srvDrawBaseBath").ToLower(); - filename = sheetList[0].DrawFilePath.ToLower().Replace(baseOrig, baseCurr); - // NON DOVREBEB SERVIRE MAP se è già share di rete... anche se è su MEDESIMA macchina - //filename = Server.MapPath(filename); - } -#endif string baseOrig = memLayer.ML.CRS("drawBaseBath").ToLower(); string baseCurr = memLayer.ML.CRS("srvDrawBaseBath").ToLower(); var tabSheets = DataLayer.man.taSHL.getBySheetId(SheetId); diff --git a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs index e9c5721..52b6bbd 100644 --- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs @@ -23,15 +23,6 @@ namespace NKC_WF.WebUserControls /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl svgTable; - /// - /// 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. /// diff --git a/NKC_WF/site/MachineUnload.aspx.cs b/NKC_WF/site/MachineUnload.aspx.cs index 39ceaea..1a21799 100644 --- a/NKC_WF/site/MachineUnload.aspx.cs +++ b/NKC_WF/site/MachineUnload.aspx.cs @@ -38,9 +38,21 @@ namespace NKC_WF BatchId = 242; // fixed x test! // aggiorno child cmp_MU_stats.BatchId = BatchId; - cmp_MU_svgViewer.BatchId = BatchId; cmp_MU_bins.BatchId = BatchId; cmp_MU_carts.BatchId = BatchId; + // calcolo sheet x SVG viewer... + int SheetId = 0; + //SOLO SE ho batch != 0... + if (BatchId > 0) + { + // FORSE 5/5?!? + var sheetList = DataLayer.man.taSHL.getByMLStatus(BatchId, 3, 5); + if (sheetList.Count > 0) + { + SheetId = sheetList[0].SheetID; + } + } + cmp_MU_svgViewer.SheetId = SheetId; } } } \ No newline at end of file From 7055d3a7c124e3fb57fef0074e1c05a1d96d8636 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sun, 26 Jan 2020 11:43:17 +0100 Subject: [PATCH 09/11] Ancora fix x resettare vecchi NESTING in caso di ripetizione --- AppData/ComLib.cs | 12 +++++++++++- NKC_WF/Controllers/BatchProcController.cs | 14 ++++++++------ NKC_WF/WebUserControls/cmp_BP_bunkList.ascx | 7 ++++++- NKC_WF/WebUserControls/cmp_MU_stats.ascx | 10 +++++----- NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs | 6 ++++-- NKC_WF/site/BatchPreview.aspx | 6 +++--- NKC_WF/site/DBG_QRCode_Unload.aspx | 3 --- NKC_WF/site/MachineUnload.aspx | 6 +++--- 8 files changed, 40 insertions(+), 24 deletions(-) diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index 2bb8917..34c9a53 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -738,7 +738,17 @@ namespace AppData return answ; } /// - /// Salvo dati su PartList ricevuti da Nesting (COMPETATO) + /// Resetto i dati PRIMA di salvare i nuovi dati dal nesting + /// + /// + /// + public static void resetPrevDataFromNesting(int BatchID) + { + //elimino dati child MA NON il batch... + DataLayer.man.taBL.deleteTree(BatchID, 0); + } + /// + /// Salvo dati Bunks/Sheets/Parts ricevuti da Nesting (COMPETATO) /// /// /// diff --git a/NKC_WF/Controllers/BatchProcController.cs b/NKC_WF/Controllers/BatchProcController.cs index c08bf1b..c223ff8 100644 --- a/NKC_WF/Controllers/BatchProcController.cs +++ b/NKC_WF/Controllers/BatchProcController.cs @@ -104,7 +104,7 @@ namespace NKC_WF.Controllers // deserializzo. baseNestAnsw batchProcAnsw = JsonConvert.DeserializeObject(content); - // se ho errori inizioa salvarli... + // se ho errori inizio a salvarli... if (batchProcAnsw.ErrorList.Count > 0) { // procedura idempotente: elimino eventuali dati della "busta" precedente... @@ -122,8 +122,8 @@ namespace NKC_WF.Controllers /************************************************* * IN BASE al tipo di risposta saprò se * - è BatchReq / OfflineOrder - * - è stima iniziale o dettaglio (x batch) - * - si tratta di una stima di validazione o meno... + * - è stima iniziale o NEST dettagliato + * - si tratta di una stima di validazione ITEM ... * *************************************************/ if (batchProcAnsw.OrderType == oType.BatchRequest) @@ -137,7 +137,7 @@ namespace NKC_WF.Controllers // 2020.01.16 salvo su mongoDb la risposta... ComLib.man.saveEstAnsw(rispStima); - // recupero info sul batch /KIT specifico x capire se sia di tipo "validation" + // recupero info sul batch / KIT specifico x capire se sia di tipo "validation" bool isValidation = false; var tabOrd = DataLayer.man.taOL.getByBatch(rispStima.BatchID); if (tabOrd.Count > 0) @@ -255,17 +255,19 @@ namespace NKC_WF.Controllers bStatus = 2; break; } - // SALVO info riguardo al batch completato - DataLayer.man.taBL.updateStatus(rispNest.BatchID, bStatus, rispNest.EnvNum, (decimal)rispNest.EstimatedWorktime / 60); // aggiorno il resto SOLO SE status == completo... if (rispNest.ProcessStatus == procStatus.completed) { + // resetto le precedenti elaborazioni: elimino dati child MA NON il batch... + DataLayer.man.taBL.deleteTree(rispNest.BatchID, 0); // salvo info riguardo ai vari Bunk / Sheets / Items... ComLib.updateBunksFromNesting(rispNest.BatchID, rispNest.BunkList); // salvo info x CART & BINS previsti ComLib.updateBinsFromNesting(rispNest.BatchID, rispNest.BinList); ComLib.updateCartsFromNesting(rispNest.BatchID, rispNest.CartList); } + // SALVO info riguardo al batch completato + DataLayer.man.taBL.updateStatus(rispNest.BatchID, bStatus, rispNest.EnvNum, (decimal)rispNest.EstimatedWorktime / 60); // registro OK answ = "OK"; } diff --git a/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx index ec850c4..05377b7 100644 --- a/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx +++ b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx @@ -19,7 +19,12 @@ - + + +
+ +
+
diff --git a/NKC_WF/WebUserControls/cmp_MU_stats.ascx b/NKC_WF/WebUserControls/cmp_MU_stats.ascx index cff9501..d463d19 100644 --- a/NKC_WF/WebUserControls/cmp_MU_stats.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_stats.ascx @@ -5,23 +5,23 @@
-
+
-
+
-
+
-
+
-
+
diff --git a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs index 25b7a0f..77ee4b6 100644 --- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs @@ -47,10 +47,10 @@ namespace NKC_WF.WebUserControls { // recupero ID del foglio corrente string answ = ""; + string baseOrig = memLayer.ML.CRS("drawBaseBath").ToLower(); + string baseCurr = memLayer.ML.CRS("srvDrawBaseBath").ToLower(); try { - string baseOrig = memLayer.ML.CRS("drawBaseBath").ToLower(); - string baseCurr = memLayer.ML.CRS("srvDrawBaseBath").ToLower(); var tabSheets = DataLayer.man.taSHL.getBySheetId(SheetId); if (tabSheets.Count > 0) { @@ -62,6 +62,8 @@ namespace NKC_WF.WebUserControls { } if (answ == "") { + // loggo... + logger.lg.scriviLog($"SVG not found | filename: {filename} | baseOrig: {baseOrig} | baseCurr: {baseCurr} | used default SVG"); // leggo SVG DI DEFAULT che indica NON PRESENTE... filename = Server.MapPath("~/Images/NoData.svg"); answ = File.ReadAllText(filename); diff --git a/NKC_WF/site/BatchPreview.aspx b/NKC_WF/site/BatchPreview.aspx index 3c06a36..c0df410 100644 --- a/NKC_WF/site/BatchPreview.aspx +++ b/NKC_WF/site/BatchPreview.aspx @@ -6,15 +6,15 @@ -
-
+
+

Batch preview - start | pause | stop

-
+
diff --git a/NKC_WF/site/DBG_QRCode_Unload.aspx b/NKC_WF/site/DBG_QRCode_Unload.aspx index f783b8f..9b653e3 100644 --- a/NKC_WF/site/DBG_QRCode_Unload.aspx +++ b/NKC_WF/site/DBG_QRCode_Unload.aspx @@ -4,9 +4,6 @@ <%@ Register Src="~/WebUserControls/cmp_MU_bins.ascx" TagPrefix="uc1" TagName="cmp_MU_bins" %> <%@ Register Src="~/WebUserControls/cmp_MU_Items.ascx" TagPrefix="uc1" TagName="cmp_MU_Items" %> - - - diff --git a/NKC_WF/site/MachineUnload.aspx b/NKC_WF/site/MachineUnload.aspx index e83fc30..e95aec6 100644 --- a/NKC_WF/site/MachineUnload.aspx +++ b/NKC_WF/site/MachineUnload.aspx @@ -17,13 +17,13 @@
-
+
-
+
-
+
From fdb5e44ae2ca4efc7008ff4a4bd230cd7776d406 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sun, 26 Jan 2020 11:43:32 +0100 Subject: [PATCH 10/11] Update vers numb --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5253fbf..2181ebe 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=223']) { + withEnv(['NEXT_BUILD_NUMBER=225']) { // env.versionNumber = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') From 75176bb190fd7b9a2c47a39322c928bbfd0a84b1 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 27 Jan 2020 08:42:19 +0100 Subject: [PATCH 11/11] Gestione virtual dir x disegni --- Jenkinsfile | 2 +- NKC_WF/NKC_WF.csproj | 6 ++++++ NKC_WF/SHARE_NEST/.PlaceHolder.file | 1 + NKC_WF/SHARE_SQL/.PlaceHolder.file | 1 + NKC_WF/Web.Release.config | 10 ++++++---- NKC_WF/Web.config | 1 + NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs | 4 ++++ 7 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 NKC_WF/SHARE_NEST/.PlaceHolder.file create mode 100644 NKC_WF/SHARE_SQL/.PlaceHolder.file diff --git a/Jenkinsfile b/Jenkinsfile index 2181ebe..ac456f2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=225']) { + withEnv(['NEXT_BUILD_NUMBER=226']) { // env.versionNumber = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index 83246ea..790ecb7 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -1053,6 +1053,12 @@ + + Always + + + Always + Web.config diff --git a/NKC_WF/SHARE_NEST/.PlaceHolder.file b/NKC_WF/SHARE_NEST/.PlaceHolder.file new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/NKC_WF/SHARE_NEST/.PlaceHolder.file @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/NKC_WF/SHARE_SQL/.PlaceHolder.file b/NKC_WF/SHARE_SQL/.PlaceHolder.file new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/NKC_WF/SHARE_SQL/.PlaceHolder.file @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/NKC_WF/Web.Release.config b/NKC_WF/Web.Release.config index 07351d3..54e54cd 100644 --- a/NKC_WF/Web.Release.config +++ b/NKC_WF/Web.Release.config @@ -5,12 +5,14 @@ - + + + - - - + + + diff --git a/NKC_WF/Web.config b/NKC_WF/Web.config index 2ca0e82..382a8f6 100644 --- a/NKC_WF/Web.config +++ b/NKC_WF/Web.config @@ -63,6 +63,7 @@ + diff --git a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs index 77ee4b6..4f24d08 100644 --- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs @@ -55,6 +55,10 @@ namespace NKC_WF.WebUserControls if (tabSheets.Count > 0) { filename = tabSheets[0].DrawFilePath.ToLower().Replace(baseOrig, baseCurr); + if(memLayer.ML.CRB("userVirtDir")) + { + filename = Server.MapPath(filename); + } answ = File.ReadAllText(filename); } }