From 082a80bd3ec84df271e803afcc6952cb00ee4886 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 9 Jun 2021 12:01:12 +0200 Subject: [PATCH 01/10] ancora fix gfrafici pagina batch --- NKC_WF/WebUserControls/cmp_batchList.ascx | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/NKC_WF/WebUserControls/cmp_batchList.ascx b/NKC_WF/WebUserControls/cmp_batchList.ascx index cf0b4d2..cdcf9e1 100644 --- a/NKC_WF/WebUserControls/cmp_batchList.ascx +++ b/NKC_WF/WebUserControls/cmp_batchList.ascx @@ -68,18 +68,10 @@ - <%# Eval("Takt") %> +   <%# Eval("Takt") %> - <%-- - - - - - - - --%>
@@ -88,8 +80,8 @@
- - + +
From a31dfe70b0b978eac1745de76b79ab8b6f04dd39 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 9 Jun 2021 15:16:56 +0200 Subject: [PATCH 02/10] Ancora restyling grafico --- AppData/DS_App.Designer.cs | 33 +++++++- AppData/DS_App.xsd | 8 ++ AppData/DS_App.xss | 2 +- NKC_WF/WebUserControls/cmp_batchList.ascx | 8 +- NKC_WF/WebUserControls/cmp_fileUpload.ascx | 18 ++-- .../cmp_fileUpload.ascx.designer.cs | 82 +++++++++---------- NKC_WF/site/OrderManager.aspx | 14 ++-- 7 files changed, 102 insertions(+), 63 deletions(-) diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index 72907ec..3796295 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -1658,6 +1658,8 @@ namespace AppData { private global::System.Data.DataColumn columnBatchType; + private global::System.Data.DataColumn columnPlaceCod; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public BatchListDataTable() { @@ -1859,6 +1861,14 @@ namespace AppData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn PlaceCodColumn { + get { + return this.columnPlaceCod; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -1916,7 +1926,8 @@ namespace AppData { int NumStacks, int NumSheets, string Errors, - int BatchType) { + int BatchType, + string PlaceCod) { BatchListRow rowBatchListRow = ((BatchListRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, @@ -1939,7 +1950,8 @@ namespace AppData { NumStacks, NumSheets, Errors, - BatchType}; + BatchType, + PlaceCod}; rowBatchListRow.ItemArray = columnValuesArray; this.Rows.Add(rowBatchListRow); return rowBatchListRow; @@ -1990,6 +2002,7 @@ namespace AppData { this.columnNumSheets = base.Columns["NumSheets"]; this.columnErrors = base.Columns["Errors"]; this.columnBatchType = base.Columns["BatchType"]; + this.columnPlaceCod = base.Columns["PlaceCod"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -2037,6 +2050,8 @@ namespace AppData { base.Columns.Add(this.columnErrors); this.columnBatchType = new global::System.Data.DataColumn("BatchType", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnBatchType); + this.columnPlaceCod = new global::System.Data.DataColumn("PlaceCod", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPlaceCod); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnBatchID}, true)); this.columnBatchID.AutoIncrement = true; @@ -2066,6 +2081,8 @@ namespace AppData { this.columnErrors.ReadOnly = true; this.columnErrors.MaxLength = 2147483647; this.columnBatchType.AllowDBNull = false; + this.columnPlaceCod.AllowDBNull = false; + this.columnPlaceCod.MaxLength = 50; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -17173,6 +17190,17 @@ namespace AppData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string PlaceCod { + get { + return ((string)(this[this.tableBatchList.PlaceCodColumn])); + } + set { + this[this.tableBatchList.PlaceCodColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsNestingReqNull() { @@ -25922,6 +25950,7 @@ namespace AppData.DS_AppTableAdapters { tableMapping.ColumnMappings.Add("NumSheets", "NumSheets"); tableMapping.ColumnMappings.Add("Errors", "Errors"); tableMapping.ColumnMappings.Add("BatchType", "BatchType"); + tableMapping.ColumnMappings.Add("PlaceCod", "PlaceCod"); this._adapter.TableMappings.Add(tableMapping); } diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index 4caf786..886f1c0 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -41,6 +41,7 @@ FROM v_BatchList + @@ -3282,6 +3283,13 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE + + + + + + + diff --git a/AppData/DS_App.xss b/AppData/DS_App.xss index 6782251..4ca9cbc 100644 --- a/AppData/DS_App.xss +++ b/AppData/DS_App.xss @@ -41,7 +41,7 @@ - + diff --git a/NKC_WF/WebUserControls/cmp_batchList.ascx b/NKC_WF/WebUserControls/cmp_batchList.ascx index cdcf9e1..106275c 100644 --- a/NKC_WF/WebUserControls/cmp_batchList.ascx +++ b/NKC_WF/WebUserControls/cmp_batchList.ascx @@ -5,15 +5,14 @@
-
+
-
-

<%: traduci("CallList") %>

+ <%: traduci("CallList") %>
<%: traduci("FilterStatus") %> @@ -68,8 +67,7 @@ -   <%# Eval("Takt") %> - +   <%# Eval("Takt") %> diff --git a/NKC_WF/WebUserControls/cmp_fileUpload.ascx b/NKC_WF/WebUserControls/cmp_fileUpload.ascx index 80839bb..4d161ca 100644 --- a/NKC_WF/WebUserControls/cmp_fileUpload.ascx +++ b/NKC_WF/WebUserControls/cmp_fileUpload.ascx @@ -4,20 +4,20 @@ -
-
- <%: traduci("cancel") %> +
+
+ <%: traduci("cancel") %>
-
+
-
- <%: traduci("doUpload") %> +
+ <%: traduci("doUpload") %>
-
-
- <%: traduci("UploadFile") %> +
+
+ <%: traduci("UploadFile") %>
diff --git a/NKC_WF/WebUserControls/cmp_fileUpload.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_fileUpload.ascx.designer.cs index 46da4f5..c33fc23 100644 --- a/NKC_WF/WebUserControls/cmp_fileUpload.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_fileUpload.ascx.designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ -// -// Codice generato da uno strumento. +// +// This code was generated by a tool. // -// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se -// il codice viene rigenerato. -// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// //------------------------------------------------------------------------------ namespace NKC_WF.WebUserContols @@ -15,110 +15,110 @@ namespace NKC_WF.WebUserContols { /// - /// Controllo hfWriteEnabled. + /// hfWriteEnabled control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.HiddenField hfWriteEnabled; /// - /// Controllo hfForceRedirect. + /// hfForceRedirect control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.HiddenField hfForceRedirect; /// - /// Controllo hfFilePrefix. + /// hfFilePrefix control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.HiddenField hfFilePrefix; /// - /// Controllo hfFileSuffix. + /// hfFileSuffix control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.HiddenField hfFileSuffix; /// - /// Controllo divFileUpl. + /// divFileUpl control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl divFileUpl; /// - /// Controllo lbtCancel. + /// lbtCancel control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.LinkButton lbtCancel; /// - /// Controllo FileUpload1. + /// FileUpload1 control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.FileUpload FileUpload1; /// - /// Controllo lbtUpload. + /// lbtUpload control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.LinkButton lbtUpload; /// - /// Controllo divNewEdit. + /// divNewEdit control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl divNewEdit; /// - /// Controllo btnAdd. + /// btnAdd control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.LinkButton btnAdd; /// - /// Controllo divMessagge. + /// divMessagge control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl divMessagge; /// - /// Controllo lblMessage. + /// lblMessage control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblMessage; } diff --git a/NKC_WF/site/OrderManager.aspx b/NKC_WF/site/OrderManager.aspx index fae7c73..6d052ab 100644 --- a/NKC_WF/site/OrderManager.aspx +++ b/NKC_WF/site/OrderManager.aspx @@ -7,14 +7,18 @@
-

<%: traduci("OrderManager") %>

-
-
-
+
+

<%: traduci("OrderManager") %>

+
+
-
+
+
+
+
+
From 4046eb92f5bfb5dc0bf96608cc648f39df3f93a5 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 9 Jun 2021 15:39:47 +0200 Subject: [PATCH 03/10] Continuo costruzione split ratio --- NKC_WF/WebUserControls/cmp_batchDetail.ascx | 48 ++++++++++---- .../WebUserControls/cmp_batchDetail.ascx.cs | 5 ++ .../cmp_batchDetail.ascx.designer.cs | 64 ++++++++++++------- 3 files changed, 82 insertions(+), 35 deletions(-) diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx b/NKC_WF/WebUserControls/cmp_batchDetail.ascx index 4eb4d66..d60e3b1 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx @@ -1,6 +1,5 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_batchDetail.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_batchDetail" %> -
@@ -9,25 +8,25 @@
- <%# traduci("SendToEstim") %> - <%# traduci("StopEstim") %> - <%# traduci("SendToNest") %> - <%# traduci("StopNest") %> - <%# traduci("AcceptNest") %>
@@ -75,7 +74,6 @@ -
@@ -97,3 +95,29 @@
+ +
+
+ NE01 +
+
+ Split ratio: + +
+
+ NE02 +
+
+ +
+
+ ORD LIST NE01 - summary +
+ table detail +
+
+ ORD LIST NE02- summary +
+ table detail +
+
\ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs index 6e0e10f..8bb9549 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs @@ -279,6 +279,11 @@ namespace NKC_WF.WebUserControls return num / den; } + protected void txtRatio_TextChanged(object sender, EventArgs e) + { + lblSplitRatio.Text = txtRatio.Text; + } + #endregion Protected Methods #region Internal Methods diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs index caac34b..b225acc 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ -// -// Codice generato da uno strumento. +// +// This code was generated by a tool. // -// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se -// il codice viene rigenerato. -// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// //------------------------------------------------------------------------------ namespace NKC_WF.WebUserControls @@ -15,57 +15,75 @@ namespace NKC_WF.WebUserControls { /// - /// Controllo frmView. + /// frmView control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.FormView frmView; /// - /// Controllo hfBatchId. + /// hfBatchId control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.HiddenField hfBatchId; /// - /// Controllo ods. + /// ods control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.ObjectDataSource ods; /// - /// Controllo lblMatDet. + /// lblMatDet control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblMatDet; /// - /// Controllo lblProdDet. + /// lblProdDet control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblProdDet; /// - /// Controllo lblTestJson. + /// lblTestJson control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblTestJson; + + /// + /// lblSplitRatio control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblSplitRatio; + + /// + /// txtRatio control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtRatio; } } From db42222472675605e2b7fa418315432ee62ef6c0 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 9 Jun 2021 17:50:23 +0200 Subject: [PATCH 04/10] Aggiunta procedura generazione descendants --- AppData/DS_App.Designer.cs | 152 +++++++++++++----- AppData/DS_App.xsd | 11 ++ .../WebUserControls/cmp_batchDetail.ascx.cs | 46 ++++++ 3 files changed, 165 insertions(+), 44 deletions(-) diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index 3796295..6f356c0 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -25964,7 +25964,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[24]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[26]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_BatchList"; @@ -26041,75 +26041,88 @@ namespace AppData.DS_AppTableAdapters { this._commandCollection[11].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodPosition", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[12] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[12].Connection = this.Connection; - this._commandCollection[12].CommandText = "dbo.stp_Batch_getForBunkMan"; + this._commandCollection[12].CommandText = "dbo.stp_Batch_getDescendantByKey"; this._commandCollection[12].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[12].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[12].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaxPosition", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[12].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[13] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[13].Connection = this.Connection; - this._commandCollection[13].CommandText = "dbo.stp_Batch_getLastByTakt"; + this._commandCollection[13].CommandText = "dbo.stp_Batch_getForBunkMan"; this._commandCollection[13].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[13].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[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Takt", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaxPosition", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[14] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[14].Connection = this.Connection; - this._commandCollection[14].CommandText = "dbo.stp_Batch_getNextAvailable"; + this._commandCollection[14].CommandText = "dbo.stp_Batch_getLastByTakt"; this._commandCollection[14].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[14].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[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Takt", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[15] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[15].Connection = this.Connection; - this._commandCollection[15].CommandText = "dbo.stp_Batch_getRunning"; + this._commandCollection[15].CommandText = "dbo.stp_Batch_getNextAvailable"; this._commandCollection[15].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[15].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[16] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[16].Connection = this.Connection; - this._commandCollection[16].CommandText = "dbo.stp_Batch_getSched"; + this._commandCollection[16].CommandText = "dbo.stp_Batch_getRunning"; this._commandCollection[16].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[16].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[17] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[17].Connection = this.Connection; - this._commandCollection[17].CommandText = "dbo.stp_Batch_redoPartValid"; + this._commandCollection[17].CommandText = "dbo.stp_Batch_getSched"; this._commandCollection[17].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[17].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[17].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Takt", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[18] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[18].Connection = this.Connection; - this._commandCollection[18].CommandText = "dbo.stp_Batch_resetAllNesting"; + this._commandCollection[18].CommandText = "dbo.stp_Batch_makeDescendantByKey"; this._commandCollection[18].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[18].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[18].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[18].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCodAnces", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[19] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[19].Connection = this.Connection; - this._commandCollection[19].CommandText = "dbo.stp_Batch_resetPartUnValid"; + this._commandCollection[19].CommandText = "dbo.stp_Batch_redoPartValid"; this._commandCollection[19].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[19].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[19].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Takt", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[20] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[20].Connection = this.Connection; - this._commandCollection[20].CommandText = "dbo.stp_zzz_resetProdCall"; + this._commandCollection[20].CommandText = "dbo.stp_Batch_resetAllNesting"; this._commandCollection[20].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[20].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[20].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[21] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[21].Connection = this.Connection; - this._commandCollection[21].CommandText = "dbo.stp_Batch_resetTree"; + this._commandCollection[21].CommandText = "dbo.stp_Batch_resetPartUnValid"; this._commandCollection[21].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[21].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[21].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[22] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[22].Connection = this.Connection; - this._commandCollection[22].CommandText = "dbo.stp_Batch_updateSchedPrior"; + this._commandCollection[22].CommandText = "dbo.stp_zzz_resetProdCall"; this._commandCollection[22].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[22].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[22].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[22].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SchedPrio", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[23] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[23].Connection = this.Connection; - this._commandCollection[23].CommandText = "dbo.stp_Batch_updateStatus"; + this._commandCollection[23].CommandText = "dbo.stp_Batch_resetTree"; this._commandCollection[23].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[23].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[23].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[23].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Status", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[23].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EnvNum", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[23].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TotalTime", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[23].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[24] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[24].Connection = this.Connection; + this._commandCollection[24].CommandText = "dbo.stp_Batch_updateSchedPrior"; + this._commandCollection[24].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[24].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[24].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[24].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SchedPrio", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[25] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[25].Connection = this.Connection; + this._commandCollection[25].CommandText = "dbo.stp_Batch_updateStatus"; + this._commandCollection[25].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[25].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[25].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[25].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Status", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[25].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EnvNum", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[25].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TotalTime", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -26203,8 +26216,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.BatchListDataTable getForBunkMan(global::System.Nullable MaxPosition) { + public virtual DS_App.BatchListDataTable getDescendByKey(global::System.Nullable BatchID) { this.Adapter.SelectCommand = this.CommandCollection[12]; + if ((BatchID.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(BatchID.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + DS_App.BatchListDataTable dataTable = new DS_App.BatchListDataTable(); + 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.BatchListDataTable getForBunkMan(global::System.Nullable MaxPosition) { + this.Adapter.SelectCommand = this.CommandCollection[13]; if ((MaxPosition.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(MaxPosition.Value)); } @@ -26221,7 +26251,7 @@ namespace AppData.DS_AppTableAdapters { [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_App.BatchListDataTable getLastByTakt(string Takt) { - this.Adapter.SelectCommand = this.CommandCollection[13]; + this.Adapter.SelectCommand = this.CommandCollection[14]; if ((Takt == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -26238,17 +26268,6 @@ namespace AppData.DS_AppTableAdapters { [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_App.BatchListDataTable getNextAvailable() { - this.Adapter.SelectCommand = this.CommandCollection[14]; - DS_App.BatchListDataTable dataTable = new DS_App.BatchListDataTable(); - 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.BatchListDataTable getRunning() { this.Adapter.SelectCommand = this.CommandCollection[15]; DS_App.BatchListDataTable dataTable = new DS_App.BatchListDataTable(); this.Adapter.Fill(dataTable); @@ -26259,13 +26278,24 @@ 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.BatchListDataTable getSched() { + public virtual DS_App.BatchListDataTable getRunning() { this.Adapter.SelectCommand = this.CommandCollection[16]; DS_App.BatchListDataTable dataTable = new DS_App.BatchListDataTable(); 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.BatchListDataTable getSched() { + this.Adapter.SelectCommand = this.CommandCollection[17]; + DS_App.BatchListDataTable dataTable = new DS_App.BatchListDataTable(); + 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")] @@ -26502,11 +26532,45 @@ namespace AppData.DS_AppTableAdapters { 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 makeDescendantByKey(global::System.Nullable BatchID, string PlaceCodAnces) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[18]; + if ((BatchID.HasValue == true)) { + command.Parameters[1].Value = ((int)(BatchID.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + if ((PlaceCodAnces == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(PlaceCodAnces)); + } + 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 redoPartValid(string Takt) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[17]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[19]; if ((Takt == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } @@ -26534,7 +26598,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")] public virtual int resetNesting(global::System.Nullable BatchID) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[18]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[20]; if ((BatchID.HasValue == true)) { command.Parameters[1].Value = ((int)(BatchID.Value)); } @@ -26562,7 +26626,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")] public virtual int resetPartUnValid() { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[19]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[21]; global::System.Data.ConnectionState previousConnectionState = command.Connection.State; if (((command.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -26584,7 +26648,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")] public virtual int resetProdCall() { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[20]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[22]; global::System.Data.ConnectionState previousConnectionState = command.Connection.State; if (((command.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -26606,7 +26670,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")] public virtual int resetTree(global::System.Nullable Original_BatchID) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[21]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[23]; if ((Original_BatchID.HasValue == true)) { command.Parameters[1].Value = ((int)(Original_BatchID.Value)); } @@ -26634,7 +26698,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")] public virtual int updateSchedPrior(global::System.Nullable BatchID, global::System.Nullable SchedPrio) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[22]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[24]; if ((BatchID.HasValue == true)) { command.Parameters[1].Value = ((int)(BatchID.Value)); } @@ -26668,7 +26732,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")] public virtual int updateStatus(global::System.Nullable BatchID, global::System.Nullable Status, string EnvNum, global::System.Nullable TotalTime) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[23]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[25]; if ((BatchID.HasValue == true)) { command.Parameters[1].Value = ((int)(BatchID.Value)); } diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index 886f1c0..2847515 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -169,6 +169,17 @@ FROM v_BatchList + + + + dbo.stp_Batch_getDescendantByKey + + + + + + + diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs index 8bb9549..4432b37 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs @@ -10,6 +10,25 @@ namespace NKC_WF.WebUserControls { public partial class cmp_batchDetail : BaseUserControl { + #region Protected Fields + + // place master hard-coded + protected string PlaceCod = "VIRTNE"; + + #endregion Protected Fields + + #region Protected Properties + + protected DS_App.BatchListDataTable tabDesc + { + get + { + return ComLib.BatchDescendant(BatchId); + } + } + + #endregion Protected Properties + #region Public Properties public int BatchId @@ -214,6 +233,24 @@ namespace NKC_WF.WebUserControls #endregion Public Properties + #region Private Methods + + private void checkCreateDescendant() + { + // se ho un batchId... + if (BatchId != 0) + { + // verifico se ho descendant + if (tabDesc.Rows.Count == 0) + { + // altrimenti creo... + DLMan.taBL.makeDescendantByKey(BatchId, PlaceCod); + } + } + } + + #endregion Private Methods + #region Protected Methods protected void lbtAccept_Click(object sender, EventArgs e) @@ -263,6 +300,15 @@ namespace NKC_WF.WebUserControls raiseEvent(); } + /// + /// Init di base + /// + /// + protected override void OnInit(EventArgs e) + { + checkCreateDescendant(); + } + protected void Page_Load(object sender, EventArgs e) { } From 53d2096adc5ca0e10c1d589fc60dcb648dd24d44 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 9 Jun 2021 17:50:53 +0200 Subject: [PATCH 05/10] Completo aggiunta metodi comLib x descendants (cache) --- AppData/ComLib.cs | 44 ++++++++++++++++++++++++++++++++++++++++++++ AppData/DS_App.xsd | 12 ++++++++++++ 2 files changed, 56 insertions(+) diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index abc8739..8a1150f 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -52,6 +52,8 @@ namespace AppData /// public static ComLib man = new ComLib(); + public static string redBatchDescend = "NKC:SERV:BATCHDESCEND"; + public static string redMachUnloadCount = "NKC:SERV:MACH_UNLOAD:COUNT"; public static string redMachUnloadForce = "NKC:SERV:MACH_UNLOAD:FORCERELOAD"; @@ -670,6 +672,39 @@ namespace AppData return answ; } + /// + /// Elenco dei + /// + public static DS_App.BatchListDataTable BatchDescendant(int BatchId) + { + DataLayer DLMan = new DataLayer(); + string rawData = ""; + DS_App.BatchListDataTable answ = new DS_App.BatchListDataTable(); + // cerco in redis + if (memLayer.ML.redKeyPresent(redBatchDescend)) + { + rawData = memLayer.ML.getRSV(redBatchDescend); + if (!string.IsNullOrEmpty(rawData)) + { + try + { + answ = JsonConvert.DeserializeObject(rawData); + } + catch + { } + } + // se vuoto rileggo + if (answ.Count == 0) + { + answ = DLMan.taBL.getDescendByKey(BatchId); + // salvo in cache + rawData = JsonConvert.SerializeObject(answ); + memLayer.ML.setRSV(redBatchDescend, rawData, 5 * 60); + } + } + return answ; + } + public static string BatchStatusDescr(object value) { string answ = ""; @@ -1618,6 +1653,15 @@ namespace AppData return answ; } + /// + /// Reset della cache dei BatchDescendant x ID indicato + /// + /// + public static void ResetBatchDescendant(int BatchId) + { + memLayer.ML.setRSV(redBatchDescend, "", 10); + } + /// /// resetta la richeista corrente in modo che non ce ne siano altre in coda /// diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index 2847515..c0975e3 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -232,6 +232,18 @@ FROM v_BatchList + + + + dbo.stp_Batch_makeDescendantByKey + + + + + + + + From 3464a5013881a028daa7e659cf01e820fb326f0c Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 9 Jun 2021 17:53:34 +0200 Subject: [PATCH 06/10] fix creazione descendant su set BatchID --- NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs index 4432b37..41a8c77 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs @@ -210,6 +210,7 @@ namespace NKC_WF.WebUserControls lblTestJson.Text = "
" + sbDebug.Replace("\r\n", "
").ToString(); } } + checkCreateDescendant(); } get { From ce3d27bbda534a78f9e29ce672857f404cfbfa55 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 9 Jun 2021 18:26:01 +0200 Subject: [PATCH 07/10] Ancora update visualizzazione detail --- NKC_WF/WebUserControls/cmp_batchDetail.ascx | 7 ++++--- NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs | 6 +++++- .../cmp_batchDetail.ascx.designer.cs | 18 ++++++++++++++++++ 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx b/NKC_WF/WebUserControls/cmp_batchDetail.ascx index d60e3b1..211e412 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx @@ -98,14 +98,15 @@
- NE01 + NE01 + %
- Split ratio:
- NE02 + NE02 + %
diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs index 41a8c77..3278732 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs @@ -328,7 +328,11 @@ namespace NKC_WF.WebUserControls protected void txtRatio_TextChanged(object sender, EventArgs e) { - lblSplitRatio.Text = txtRatio.Text; + int valRatio = 0; + int.TryParse(txtRatio.Text, out valRatio); + lblRatio01.Text = $"{valRatio}"; + lblRatio02.Text = $"{100 - valRatio}"; + lblSplitRatio.Text = $"{valRatio}/{100 - valRatio}"; } #endregion Protected Methods diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs index b225acc..c6828d8 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs @@ -68,6 +68,15 @@ namespace NKC_WF.WebUserControls /// protected global::System.Web.UI.WebControls.Label lblTestJson; + /// + /// lblRatio01 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblRatio01; + /// /// lblSplitRatio control. /// @@ -77,6 +86,15 @@ namespace NKC_WF.WebUserControls /// protected global::System.Web.UI.WebControls.Label lblSplitRatio; + /// + /// lblRatio02 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblRatio02; + /// /// txtRatio control. /// From dc4601ff7e893a2a46aae80f6ee36aa7ae2c5a4c Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 9 Jun 2021 19:30:55 +0200 Subject: [PATCH 08/10] Continuo redistribuzione dati ordini --- AppData/ComLib.cs | 114 +++++++++++++++--- NKC_WF/NKC_WF.csproj | 8 ++ NKC_WF/WebUserControls/cmp_batchDetail.ascx | 14 +-- .../WebUserControls/cmp_batchDetail.ascx.cs | 47 +++++++- .../cmp_batchDetail.ascx.designer.cs | 27 +++-- NKC_WF/WebUserControls/cmp_orderExtList.ascx | 4 + .../WebUserControls/cmp_orderExtList.ascx.cs | 27 +++++ .../cmp_orderExtList.ascx.designer.cs | 35 ++++++ 8 files changed, 241 insertions(+), 35 deletions(-) create mode 100644 NKC_WF/WebUserControls/cmp_orderExtList.ascx create mode 100644 NKC_WF/WebUserControls/cmp_orderExtList.ascx.cs create mode 100644 NKC_WF/WebUserControls/cmp_orderExtList.ascx.designer.cs diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index 8a1150f..55ad501 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -53,23 +53,15 @@ namespace AppData public static ComLib man = new ComLib(); public static string redBatchDescend = "NKC:SERV:BATCHDESCEND"; - public static string redMachUnloadCount = "NKC:SERV:MACH_UNLOAD:COUNT"; - public static string redMachUnloadForce = "NKC:SERV:MACH_UNLOAD:FORCERELOAD"; - public static string redMLCurrBunk = "NKC:SERV:TAKT:CurrBunk"; - public static string redMsgCount = "NKC:SERV:BREQ:MCount"; - public static string redMsgList = "NKC:SERV:BREQ:MList"; - public static string redNestAnsw = "NKC:NEST:BANSW"; - + public static string redOrders = "NKC:SERV:ORDERS"; public static string redOutPath = "NKC:SERV:BREQ"; - public static string redProdAnsw = "NKC:PROD:BUNKS"; - public static string redProdReq = "NKC:SERV:BUNKS"; /// @@ -673,17 +665,18 @@ namespace AppData } /// - /// Elenco dei + /// Elenco dei Batch descendant di un batch ancestor /// public static DS_App.BatchListDataTable BatchDescendant(int BatchId) { DataLayer DLMan = new DataLayer(); + string redKey = $"{redBatchDescend}:{BatchId}"; string rawData = ""; DS_App.BatchListDataTable answ = new DS_App.BatchListDataTable(); // cerco in redis - if (memLayer.ML.redKeyPresent(redBatchDescend)) + if (memLayer.ML.redKeyPresent(redKey)) { - rawData = memLayer.ML.getRSV(redBatchDescend); + rawData = memLayer.ML.getRSV(redKey); if (!string.IsNullOrEmpty(rawData)) { try @@ -699,7 +692,7 @@ namespace AppData answ = DLMan.taBL.getDescendByKey(BatchId); // salvo in cache rawData = JsonConvert.SerializeObject(answ); - memLayer.ML.setRSV(redBatchDescend, rawData, 5 * 60); + memLayer.ML.setRSV(redKey, rawData, 5 * 60); } } return answ; @@ -1377,6 +1370,88 @@ namespace AppData return answ; } +#if false + /// + /// Elenco degli orders dato Batch + /// + public static DS_App.OrderListDataTable OrdersByBatch(int BatchId) + { + DataLayer DLMan = new DataLayer(); + string redKey = $"{redOrders}:BYBATCH:{BatchId}"; + string rawData = ""; + DS_App.OrderListDataTable answ = new DS_App.OrderListDataTable(); + // cerco in redis + if (memLayer.ML.redKeyPresent(redKey)) + { + rawData = memLayer.ML.getRSV(redKey); + if (!string.IsNullOrEmpty(rawData)) + { + try + { + answ = JsonConvert.DeserializeObject(rawData); + } + catch + { } + } + // se vuoto rileggo + if (answ.Count == 0) + { + answ = DLMan.taOL.getByBatch(BatchId); + // salvo in cache + rawData = JsonConvert.SerializeObject(answ); + memLayer.ML.setRSV(redKey, rawData, 5 * 60); + } + } + return answ; + } +#endif + + /// + /// Elenco degli orders dato Batch + /// + public static Dictionary OrdersExtByBatch(int BatchId, string PlaceCod) + { + DataLayer DLMan = new DataLayer(); + string redKey = $"{redOrders}:BYBATCH:{BatchId}"; + string rawData = ""; + Dictionary answ = new Dictionary(); + + // cerco in redis + if (memLayer.ML.redKeyPresent(redKey)) + { + rawData = memLayer.ML.getRSV(redKey); + if (!string.IsNullOrEmpty(rawData)) + { + try + { + answ = JsonConvert.DeserializeObject>(rawData); + } + catch + { } + } + // se vuoto rileggo + if (answ.Count == 0) + { + var tabBatchDesc = BatchDescendant(BatchId); + + // recupero ordini MAIN + DS_App.OrderListDataTable currOrders = DLMan.taOL.getByBatch(BatchId); + answ.Add(PlaceCod, currOrders); + + // recupero ordini dei 2 descendant... + foreach (var item in tabBatchDesc) + { + currOrders = DLMan.taOL.getByBatch(item.BatchID); + answ.Add(item.PlaceCod, currOrders); + } + // salvo in cache + rawData = JsonConvert.SerializeObject(answ); + memLayer.ML.setRSV(redKey, rawData, 5 * 60); + } + } + return answ; + } + public static string PositionStatusDescr(object value) { string answ = ""; @@ -1659,7 +1734,8 @@ namespace AppData /// public static void ResetBatchDescendant(int BatchId) { - memLayer.ML.setRSV(redBatchDescend, "", 10); + string redKey = $"{redBatchDescend}:{BatchId}"; + memLayer.ML.setRSV(redKey, "", 10); } /// @@ -1735,6 +1811,16 @@ namespace AppData return answ; } + /// + /// Reset della cache dei BatchDescendant x ID indicato + /// + /// + public static void ResetOrderByBatch(int BatchId) + { + string redKey = $"{redOrders}:BYBATCH:{BatchId}"; + memLayer.ML.setRSV(redKey, "", 10); + } + /// /// Resetto i dati PRIMA di salvare i nuovi dati dal nesting /// diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index 5cd68cc..b702569 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -530,6 +530,7 @@ + @@ -1489,6 +1490,13 @@ cmp_OOLI_detail.ascx + + cmp_orderExtList.ascx + ASPXCodeBehind + + + cmp_orderExtList.ascx + cmp_orderPrint.ascx ASPXCodeBehind diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx b/NKC_WF/WebUserControls/cmp_batchDetail.ascx index 211e412..cfc9285 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx @@ -1,4 +1,5 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_batchDetail.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_batchDetail" %> +<%@ Register Src="~/WebUserControls/cmp_orderExtList.ascx" TagPrefix="uc1" TagName="cmp_orderExtList" %> @@ -97,14 +98,11 @@
-
+
NE01 %
-
- -
-
+
NE02 %
@@ -113,12 +111,10 @@
ORD LIST NE01 - summary -
- table detail +
ORD LIST NE02- summary -
- table detail +
\ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs index 3278732..84014b5 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs @@ -19,7 +19,10 @@ namespace NKC_WF.WebUserControls #region Protected Properties - protected DS_App.BatchListDataTable tabDesc + /// + /// Tabella dei batch Descendant di quello corrente + /// + protected DS_App.BatchListDataTable tabBatchDesc { get { @@ -27,6 +30,15 @@ namespace NKC_WF.WebUserControls } } + protected Dictionary TabOrders + { + get + { + // cerco in redis + return ComLib.OrdersExtByBatch(BatchId, PlaceCod); + } + } + #endregion Protected Properties #region Public Properties @@ -211,6 +223,7 @@ namespace NKC_WF.WebUserControls } } checkCreateDescendant(); + showBatchDescendant(); } get { @@ -242,7 +255,7 @@ namespace NKC_WF.WebUserControls if (BatchId != 0) { // verifico se ho descendant - if (tabDesc.Rows.Count == 0) + if (tabBatchDesc.Rows.Count == 0) { // altrimenti creo... DLMan.taBL.makeDescendantByKey(BatchId, PlaceCod); @@ -250,6 +263,25 @@ namespace NKC_WF.WebUserControls } } + /// + /// Mostro dati dei Batch descendant + /// + private void showBatchDescendant() + { + // se ho qualcosa aggiorno visualizzazione... + if (TabOrders.Count > 0) + { + // se ne ho nel MAIN --> redistribuisco + if (TabOrders["VIRTNE"].Count > 0) + { + // suddivido + } + // ...e poi mostro + cmp_orderExtListNE01.CurrOrders = TabOrders["NE01"]; + cmp_orderExtListNE02.CurrOrders = TabOrders["NE02"]; + } + } + #endregion Private Methods #region Protected Methods @@ -326,13 +358,22 @@ namespace NKC_WF.WebUserControls return num / den; } + /// + /// Elenco ordini dato BatchID + /// + /// + /// + protected DS_App.OrderListDataTable tabOrdersByBatch(int BatchId) + { + return ComLib.OrdersByBatch(BatchId); + } + protected void txtRatio_TextChanged(object sender, EventArgs e) { int valRatio = 0; int.TryParse(txtRatio.Text, out valRatio); lblRatio01.Text = $"{valRatio}"; lblRatio02.Text = $"{100 - valRatio}"; - lblSplitRatio.Text = $"{valRatio}/{100 - valRatio}"; } #endregion Protected Methods diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs index c6828d8..89acaa7 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs @@ -77,15 +77,6 @@ namespace NKC_WF.WebUserControls /// protected global::System.Web.UI.WebControls.Label lblRatio01; - /// - /// lblSplitRatio control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label lblSplitRatio; - /// /// lblRatio02 control. /// @@ -103,5 +94,23 @@ namespace NKC_WF.WebUserControls /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.TextBox txtRatio; + + /// + /// cmp_orderExtListNE01 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::NKC_WF.WebUserControls.cmp_orderExtList cmp_orderExtListNE01; + + /// + /// cmp_orderExtListNE02 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::NKC_WF.WebUserControls.cmp_orderExtList cmp_orderExtListNE02; } } diff --git a/NKC_WF/WebUserControls/cmp_orderExtList.ascx b/NKC_WF/WebUserControls/cmp_orderExtList.ascx new file mode 100644 index 0000000..3e39959 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_orderExtList.ascx @@ -0,0 +1,4 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_orderExtList.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_orderExtList" %> + + + \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_orderExtList.ascx.cs b/NKC_WF/WebUserControls/cmp_orderExtList.ascx.cs new file mode 100644 index 0000000..5870a4c --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_orderExtList.ascx.cs @@ -0,0 +1,27 @@ +using AppData; +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_orderExtList : System.Web.UI.UserControl + { + #region Public Properties + + public DS_App.OrderListDataTable CurrOrders { get; set; } + + #endregion Public Properties + + #region Protected Methods + + protected void Page_Load(object sender, EventArgs e) + { + } + + #endregion Protected Methods + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_orderExtList.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_orderExtList.ascx.designer.cs new file mode 100644 index 0000000..9316e98 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_orderExtList.ascx.designer.cs @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace NKC_WF.WebUserControls +{ + + + public partial class cmp_orderExtList + { + + /// + /// grView control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.GridView grView; + + /// + /// ods control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource ods; + } +} From 5a570d6ad0ec6dfb5edf6f7a97b296333a2aada2 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 10 Jun 2021 19:14:24 +0200 Subject: [PATCH 09/10] Algoritmo bilanciamento vers 0.3 --- AppData/ComLib.cs | 27 +- Jenkinsfile | 4 +- NKC_SDK/Objects.cs | 42 +++ NKC_WF/WebUserControls/cmp_batchDetail.ascx | 13 +- .../WebUserControls/cmp_batchDetail.ascx.cs | 254 ++++++++++++++++-- .../cmp_batchDetail.ascx.designer.cs | 27 ++ NKC_WF/WebUserControls/cmp_orderExtList.ascx | 2 +- .../WebUserControls/cmp_orderExtList.ascx.cs | 18 +- 8 files changed, 350 insertions(+), 37 deletions(-) diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index 55ad501..7006225 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -1411,23 +1411,26 @@ namespace AppData /// public static Dictionary OrdersExtByBatch(int BatchId, string PlaceCod) { - DataLayer DLMan = new DataLayer(); - string redKey = $"{redOrders}:BYBATCH:{BatchId}"; - string rawData = ""; Dictionary answ = new Dictionary(); - - // cerco in redis - if (memLayer.ML.redKeyPresent(redKey)) + if (BatchId > 0) { - rawData = memLayer.ML.getRSV(redKey); - if (!string.IsNullOrEmpty(rawData)) + DataLayer DLMan = new DataLayer(); + string redKey = $"{redOrders}:BYBATCH:{BatchId}"; + string rawData = ""; + + // cerco in redis + if (memLayer.ML.redKeyPresent(redKey)) { - try + rawData = memLayer.ML.getRSV(redKey); + if (!string.IsNullOrEmpty(rawData)) { - answ = JsonConvert.DeserializeObject>(rawData); + try + { + answ = JsonConvert.DeserializeObject>(rawData); + } + catch + { } } - catch - { } } // se vuoto rileggo if (answ.Count == 0) diff --git a/Jenkinsfile b/Jenkinsfile index ac19a4b..a67882d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,8 +12,8 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { withEnv(['NEXT_BUILD_NUMBER=393']) { - // env.versionNumber = VersionNumber(versionNumberString : '1.3.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) - env.versionNumber = VersionNumber(versionNumberString : '1.3.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') + // env.versionNumber = VersionNumber(versionNumberString : '2.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) + env.versionNumber = VersionNumber(versionNumberString : '2.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '1.3.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'NKC' } diff --git a/NKC_SDK/Objects.cs b/NKC_SDK/Objects.cs index edc2075..851603f 100644 --- a/NKC_SDK/Objects.cs +++ b/NKC_SDK/Objects.cs @@ -604,6 +604,48 @@ namespace NKC_SDK #endregion Public Properties } + /// + /// Classe simulazione di un assegnazione di un set di ordini (compreso score) + /// + public class OrderSetSim + { + #region Public Properties + + /// + /// Valore attuale (somma dei punteggi degli elementi) + /// + public double ActualValue + { + get + { + return OrderSet.Sum(x => x.Value); + } + } + + /// + /// Valore score (scostamento target/actual) + /// + public double IndexScore + { + get + { + return Math.Abs(TargetValue - ActualValue); + } + } + + /// + /// Vettore Ordini + durate + /// + public Dictionary OrderSet { get; set; } = new Dictionary(); + + /// + /// Valore target durate desiderate + /// + public double TargetValue { get; set; } = 0; + + #endregion Public Properties + } + /// /// Classe che rappresenta stato ordine ricevuto via REDIS da NESTING /// diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx b/NKC_WF/WebUserControls/cmp_batchDetail.ascx index cfc9285..fe8c3f1 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx @@ -106,15 +106,22 @@ NE02 %
-
+
+ +
+
+
+
+ +
ORD LIST NE01 - summary - +
ORD LIST NE02- summary - +
\ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs index 84014b5..382397e 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs @@ -19,6 +19,20 @@ namespace NKC_WF.WebUserControls #region Protected Properties + protected bool needSave + { + get + { + bool answ = true; + bool.TryParse(hfNeedSave.Value, out answ); + return answ; + } + set + { + hfNeedSave.Value = $"{value}"; + } + } + /// /// Tabella dei batch Descendant di quello corrente /// @@ -30,7 +44,7 @@ namespace NKC_WF.WebUserControls } } - protected Dictionary TabOrders + protected Dictionary TabOrdersFromDb { get { @@ -39,6 +53,19 @@ namespace NKC_WF.WebUserControls } } + protected int valRatio + { + get + { + int answ = 50; + if (!string.IsNullOrEmpty(txtRatio.Text)) + { + int.TryParse(txtRatio.Text, out answ); + } + return answ; + } + } + #endregion Protected Properties #region Public Properties @@ -222,8 +249,11 @@ namespace NKC_WF.WebUserControls lblTestJson.Text = "
" + sbDebug.Replace("\r\n", "
").ToString(); } } - checkCreateDescendant(); - showBatchDescendant(); + if (BatchId > 0) + { + checkCreateDescendant(); + showBatchDescendant(); + } } get { @@ -263,11 +293,110 @@ namespace NKC_WF.WebUserControls } } + /// + /// effettua ribilanciamento ordini partendo da elenco completo e poi assegnando a impianti + /// + private void rebalanceOrder() + { + // costruisco vettore durata ordini + OrderSetSim FullSet = new OrderSetSim(); + OrderSetSim SetNe01 = new OrderSetSim(); + OrderSetSim SetNe02 = new OrderSetSim(); + + // creo liste x i valori da processare... + Dictionary RawList = new Dictionary(); + Dictionary OrderedList = new Dictionary(); + + Dictionary TabOrders = new Dictionary(TabOrdersFromDb); + + if (TabOrders.ContainsKey("VIRTNE")) + { + foreach (var item in TabOrders["VIRTNE"]) + { + RawList.Add(item.OrdID, item.EstProcTime); + } + } + if (TabOrders.ContainsKey("NE01")) + { + foreach (var item in TabOrders["NE01"]) + { + RawList.Add(item.OrdID, item.EstProcTime); + } + } + if (TabOrders.ContainsKey("NE02")) + { + foreach (var item in TabOrders["NE02"]) + { + RawList.Add(item.OrdID, item.EstProcTime); + } + } + + // ordino la lista x processing successivo + OrderedList = RawList.OrderBy(x => x.Value).ToDictionary(t => t.Key, t => t.Value); + + // salvo i set + FullSet.OrderSet = OrderedList; + // IndexScore = errore di stima corrente + double IScoreCurr = FullSet.ActualValue; + + // lavoro sull'ottimizzare il MINORE + double ValRatio = (double)valRatio / 100; + if (ValRatio <= 0.5) + { + SetNe01.TargetValue = FullSet.ActualValue * ValRatio; + SetNe01.OrderSet = findLocalMin(OrderedList, SetNe01.TargetValue, IScoreCurr); + // l'altro è la differenza + SetNe02.OrderSet = OrderedList; + foreach (var item in SetNe01.OrderSet) + { + SetNe02.OrderSet.Remove(item.Key); + } + } + else + { + SetNe02.TargetValue = FullSet.ActualValue * (1 - ValRatio); + SetNe02.OrderSet = findLocalMin(OrderedList, SetNe02.TargetValue, IScoreCurr); + // l'altro è la differenza + SetNe01.OrderSet = OrderedList; + foreach (var item in SetNe02.OrderSet) + { + SetNe01.OrderSet.Remove(item.Key); + } + } + + // riorganizzo tabOrders... + List OrdersNe01 = new List(); + List OrdersNe02 = new List(); + foreach (var groupItem in TabOrders) + { + // ora guardo gli ordini... + foreach (var orderItem in groupItem.Value) + { + if (SetNe01.OrderSet.ContainsKey(orderItem.OrdID)) + { + OrdersNe01.Add(new OrderPrev() { OrderId = orderItem.OrdID, OrderExtCode = orderItem.OrderExtCode, NumBin = orderItem.EstNumBin, NumCart = orderItem.EstNumCart, TotTime = orderItem.EstProcTime }); + } + else + { + OrdersNe02.Add(new OrderPrev() { OrderId = orderItem.OrdID, OrderExtCode = orderItem.OrderExtCode, NumBin = orderItem.EstNumBin, NumCart = orderItem.EstNumCart, TotTime = orderItem.EstProcTime }); + } + } + } + + // ...e poi mostro + cmp_orderExtListNE01.CurrOrders = OrdersNe01; + cmp_orderExtListNE02.CurrOrders = OrdersNe02; + + // --> richiede salvataggio + needSave = true; + } + /// /// Mostro dati dei Batch descendant /// private void showBatchDescendant() { + Dictionary TabOrders = new Dictionary(TabOrdersFromDb); // se ho qualcosa aggiorno visualizzazione... if (TabOrders.Count > 0) { @@ -275,10 +404,14 @@ namespace NKC_WF.WebUserControls if (TabOrders["VIRTNE"].Count > 0) { // suddivido + rebalanceOrder(); + } + else + { + //// ...e poi mostro + //cmp_orderExtListNE01.CurrOrders = TabOrders["NE01"]; + //cmp_orderExtListNE02.CurrOrders = TabOrders["NE02"]; } - // ...e poi mostro - cmp_orderExtListNE01.CurrOrders = TabOrders["NE01"]; - cmp_orderExtListNE02.CurrOrders = TabOrders["NE02"]; } } @@ -286,6 +419,94 @@ namespace NKC_WF.WebUserControls #region Protected Methods + /// + /// Cerca il set con lo score migliore calcolando x subset della lista ordinata + /// + /// Lista ordinata oggetti (INT) + valore + /// Valore desiderato (comeSOMMA) + /// Indice score = errore minimo da migliorare + /// + protected Dictionary findLocalMin(Dictionary OrderedList, double TargetVal, double CurrIndexScore) + { + Dictionary answ = new Dictionary(); + List Candidates = new List(); + OrderSetSim CurrSimSet = new OrderSetSim(); + + // parte dal valore (singolo) più piccolo tra quelli maggiori del target... se c'è... + var OrdSup = OrderedList.Where(x => x.Value > TargetVal).OrderBy(x => x.Value); + if (OrdSup != null && OrdSup.Any()) + { + var currOrder = OrdSup.FirstOrDefault(); + CurrSimSet = new OrderSetSim(); + CurrSimSet.TargetValue = TargetVal; + CurrSimSet.OrderSet.Add(currOrder.Key, currOrder.Value); + // se lo score è migliorativo... + if (CurrSimSet.IndexScore < CurrIndexScore) + { + Candidates.Add(CurrSimSet); + CurrIndexScore = CurrSimSet.IndexScore; + } + } + + // ora guardo gli elementi restanti.. se ci sono + var OrdInf = OrderedList.Where(x => x.Value <= TargetVal).OrderByDescending(x => x.Value).ToDictionary(t => t.Key, t => t.Value); + if (OrdInf != null && OrdInf.Any()) + { + var currOrder = OrdInf.FirstOrDefault(); + CurrSimSet = new OrderSetSim(); + CurrSimSet.TargetValue = TargetVal; + CurrSimSet.OrderSet.Add(currOrder.Key, currOrder.Value); + // se lo score è migliorativo... + if (CurrSimSet.IndexScore < CurrIndexScore) + { + Candidates.Add(CurrSimSet); + CurrIndexScore = CurrSimSet.IndexScore; + } + // prendo i restanti tranne il primo + OrdInf.Remove(currOrder.Key); + // se rimane qualcosa... + if (OrdInf != null && OrdInf.Any()) + { + // calcolo il minimo locale nei 2 casi, da soli + Dictionary TestOrderSet01 = findLocalMin(OrdInf, TargetVal, CurrIndexScore); + if (TestOrderSet01.Count > 0) + { + OrderSetSim CurrSet = new OrderSetSim(); + CurrSet.TargetValue = TargetVal; + CurrSet.OrderSet = TestOrderSet01; + if (CurrSet.IndexScore < CurrIndexScore) + { + Candidates.Add(CurrSimSet); + CurrIndexScore = CurrSimSet.IndexScore; + } + } + // ...e con il primo valore... + Dictionary TestOrderSet02 = findLocalMin(OrdInf, TargetVal - currOrder.Value, CurrIndexScore); + TestOrderSet02.Add(currOrder.Key, currOrder.Value); + // verifico se migliorativo... + if (TestOrderSet02.Count > 0) + { + OrderSetSim CurrSet = new OrderSetSim(); + CurrSet.TargetValue = TargetVal - currOrder.Value; + CurrSet.OrderSet = TestOrderSet02; + if (CurrSet.IndexScore < CurrIndexScore) + { + Candidates.Add(CurrSimSet); + CurrIndexScore = CurrSimSet.IndexScore; + } + } + } + } + // cerco il minimo... + if (Candidates != null && Candidates.Count > 0) + { + answ = Candidates.OrderBy(x => x.IndexScore).FirstOrDefault().OrderSet; + } + + // calcolo il minimo e lo restituisco... + return answ; + } + protected void lbtAccept_Click(object sender, EventArgs e) { // registro accettazione Nesting @@ -293,6 +514,14 @@ namespace NKC_WF.WebUserControls raiseEvent(); } + protected void lbtCancel_Click(object sender, EventArgs e) + { + } + + protected void lbtSave_Click(object sender, EventArgs e) + { + } + protected void lbtSendEstim_Click(object sender, EventArgs e) { // invia a redis una richiesta... @@ -358,20 +587,9 @@ namespace NKC_WF.WebUserControls return num / den; } - /// - /// Elenco ordini dato BatchID - /// - /// - /// - protected DS_App.OrderListDataTable tabOrdersByBatch(int BatchId) - { - return ComLib.OrdersByBatch(BatchId); - } - protected void txtRatio_TextChanged(object sender, EventArgs e) { - int valRatio = 0; - int.TryParse(txtRatio.Text, out valRatio); + rebalanceOrder(); lblRatio01.Text = $"{valRatio}"; lblRatio02.Text = $"{100 - valRatio}"; } diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs index 89acaa7..6f31710 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs @@ -86,6 +86,24 @@ namespace NKC_WF.WebUserControls /// protected global::System.Web.UI.WebControls.Label lblRatio02; + /// + /// lbtSave control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton lbtSave; + + /// + /// hfNeedSave control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField hfNeedSave; + /// /// txtRatio control. /// @@ -95,6 +113,15 @@ namespace NKC_WF.WebUserControls /// protected global::System.Web.UI.WebControls.TextBox txtRatio; + /// + /// lbtCancel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton lbtCancel; + /// /// cmp_orderExtListNE01 control. /// diff --git a/NKC_WF/WebUserControls/cmp_orderExtList.ascx b/NKC_WF/WebUserControls/cmp_orderExtList.ascx index 3e39959..215679e 100644 --- a/NKC_WF/WebUserControls/cmp_orderExtList.ascx +++ b/NKC_WF/WebUserControls/cmp_orderExtList.ascx @@ -1,4 +1,4 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_orderExtList.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_orderExtList" %> - + \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_orderExtList.ascx.cs b/NKC_WF/WebUserControls/cmp_orderExtList.ascx.cs index 5870a4c..9d95bd2 100644 --- a/NKC_WF/WebUserControls/cmp_orderExtList.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_orderExtList.ascx.cs @@ -1,6 +1,8 @@ using AppData; +using NKC_SDK; using System; using System.Collections.Generic; +using System.Data; using System.Linq; using System.Web; using System.Web.UI; @@ -12,7 +14,21 @@ namespace NKC_WF.WebUserControls { #region Public Properties - public DS_App.OrderListDataTable CurrOrders { get; set; } + public List _CurrOrders { get; set; } = new List(); + + public List CurrOrders + { + get + { + return _CurrOrders; + } + set + { + _CurrOrders = value; + grView.DataSource = value; + grView.DataBind(); + } + } #endregion Public Properties From a030bd19521f46b9618b28a8ac1924c2a53a35b0 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 11 Jun 2021 12:55:20 +0200 Subject: [PATCH 10/10] update ritorno messaggio da stima... --- AppData/ComLib.cs | 31 +- AppData/DS_App.Designer.cs | 1299 ++++++++++++++--- AppData/DS_App.xsd | 310 +++- AppData/DS_App.xss | 193 +-- AppData/DataLayer.cs | 3 + NKC_WF/Controllers/BatchProcController.cs | 2 +- .../WebUserControls/cmp_batchDetail.ascx.cs | 66 +- 7 files changed, 1451 insertions(+), 453 deletions(-) diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index 7006225..85cb47e 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -1407,11 +1407,13 @@ namespace AppData #endif /// - /// Elenco degli orders dato Batch + /// Elenco degli orders dato Batch (Ancestor/Principale) /// - public static Dictionary OrdersExtByBatch(int BatchId, string PlaceCod) + /// + /// + public static DS_App.OrderListTreeDataTable OrdersExtByBatch(int BatchId) { - Dictionary answ = new Dictionary(); + DS_App.OrderListTreeDataTable answ = new DS_App.OrderListTreeDataTable(); if (BatchId > 0) { DataLayer DLMan = new DataLayer(); @@ -1426,7 +1428,7 @@ namespace AppData { try { - answ = JsonConvert.DeserializeObject>(rawData); + answ = JsonConvert.DeserializeObject(rawData); } catch { } @@ -1435,18 +1437,9 @@ namespace AppData // se vuoto rileggo if (answ.Count == 0) { - var tabBatchDesc = BatchDescendant(BatchId); + // recupero ordini dato il batch MAIN + answ = DLMan.taOLT.getByBatchTree(BatchId); - // recupero ordini MAIN - DS_App.OrderListDataTable currOrders = DLMan.taOL.getByBatch(BatchId); - answ.Add(PlaceCod, currOrders); - - // recupero ordini dei 2 descendant... - foreach (var item in tabBatchDesc) - { - currOrders = DLMan.taOL.getByBatch(item.BatchID); - answ.Add(item.PlaceCod, currOrders); - } // salvo in cache rawData = JsonConvert.SerializeObject(answ); memLayer.ML.setRSV(redKey, rawData, 5 * 60); @@ -2495,16 +2488,18 @@ namespace AppData } /// - /// Salvo dati su PartList ricevuti da Nesting (stima) + /// Salvo dati di OrderId ricevuti da Nesting (stima) /// /// - public static void updateExtEstimFromNesting(List OrdExtList) + public static void updateExtEstimFromNesting(int BatchId, List OrdExtList) { DataLayer DLMan = new DataLayer(); + // svuoto x batch... + DLMan.taOLT.deleteByBatch(BatchId); // salvo elenco materiali x ogni item... foreach (var currItem in OrdExtList) { - DLMan.taOL.updateExtEst(currItem.OrderId, currItem.NumBin, currItem.NumCart, currItem.NumPart, currItem.TotTime); + DLMan.taOLT.insert(BatchId, currItem.OrderId, currItem.OrderExtCode, currItem.NumBin, currItem.NumCart, currItem.NumPart, currItem.TotTime); } } diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index 6f356c0..e679883 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -98,6 +98,8 @@ namespace AppData { private SheetsPreviewDataTable tableSheetsPreview; + private OrderListTreeDataTable tableOrderListTree; + private global::System.Data.DataRelation relationFK_ItemList_Materials1; private global::System.Data.DataRelation relationFK_OffOrd2Item_OfflineOrderList; @@ -259,6 +261,9 @@ namespace AppData { if ((ds.Tables["SheetsPreview"] != null)) { base.Tables.Add(new SheetsPreviewDataTable(ds.Tables["SheetsPreview"])); } + if ((ds.Tables["OrderListTree"] != null)) { + base.Tables.Add(new OrderListTreeDataTable(ds.Tables["OrderListTree"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -647,6 +652,16 @@ namespace AppData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public OrderListTreeDataTable OrderListTree { + get { + return this.tableOrderListTree; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.BrowsableAttribute(true)] @@ -825,6 +840,9 @@ namespace AppData { if ((ds.Tables["SheetsPreview"] != null)) { base.Tables.Add(new SheetsPreviewDataTable(ds.Tables["SheetsPreview"])); } + if ((ds.Tables["OrderListTree"] != null)) { + base.Tables.Add(new OrderListTreeDataTable(ds.Tables["OrderListTree"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -1080,6 +1098,12 @@ namespace AppData { this.tableSheetsPreview.InitVars(); } } + this.tableOrderListTree = ((OrderListTreeDataTable)(base.Tables["OrderListTree"])); + if ((initTable == true)) { + if ((this.tableOrderListTree != null)) { + this.tableOrderListTree.InitVars(); + } + } this.relationFK_ItemList_Materials1 = this.Relations["FK_ItemList_Materials1"]; this.relationFK_OffOrd2Item_OfflineOrderList = this.Relations["FK_OffOrd2Item_OfflineOrderList"]; this.relationFK_ItemList_KitList = this.Relations["FK_ItemList_KitList"]; @@ -1175,6 +1199,8 @@ namespace AppData { base.Tables.Add(this.tableFileValidation); this.tableSheetsPreview = new SheetsPreviewDataTable(); base.Tables.Add(this.tableSheetsPreview); + this.tableOrderListTree = new OrderListTreeDataTable(); + base.Tables.Add(this.tableOrderListTree); this.relationFK_ItemList_Materials1 = new global::System.Data.DataRelation("FK_ItemList_Materials1", new global::System.Data.DataColumn[] { this.tableMaterials.MatIDColumn}, new global::System.Data.DataColumn[] { this.tableItemList.MatIDColumn}, false); @@ -1443,6 +1469,12 @@ namespace AppData { return false; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private bool ShouldSerializeOrderListTree() { + return false; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { @@ -1609,6 +1641,9 @@ namespace AppData { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public delegate void SheetsPreviewRowChangeEventHandler(object sender, SheetsPreviewRowChangeEvent e); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public delegate void OrderListTreeRowChangeEventHandler(object sender, OrderListTreeRowChangeEvent e); + /// ///Represents the strongly named DataTable class. /// @@ -3320,14 +3355,6 @@ namespace AppData { private global::System.Data.DataColumn columnKittingDate; - private global::System.Data.DataColumn columnEstNumBin; - - private global::System.Data.DataColumn columnEstNumCart; - - private global::System.Data.DataColumn columnEstNumPart; - - private global::System.Data.DataColumn columnEstProcTime; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public OrderListDataTable() { @@ -3465,38 +3492,6 @@ namespace AppData { } } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public global::System.Data.DataColumn EstNumBinColumn { - get { - return this.columnEstNumBin; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public global::System.Data.DataColumn EstNumCartColumn { - get { - return this.columnEstNumCart; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public global::System.Data.DataColumn EstNumPartColumn { - get { - return this.columnEstNumPart; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public global::System.Data.DataColumn EstProcTimeColumn { - get { - return this.columnEstProcTime; - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -3534,24 +3529,7 @@ namespace AppData { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public OrderListRow AddOrderListRow( - int OrdID, - string OrdType, - string DestPlant, - string FamilyCode, - string OrdDtmx, - string OrderExtCode, - string OrderDesc, - string OrderNote, - int KitQty, - System.DateTime ImportDate, - string ImportUser, - string OrdCodOrig, - System.DateTime KittingDate, - int EstNumBin, - int EstNumCart, - int EstNumPart, - double EstProcTime) { + public OrderListRow AddOrderListRow(int OrdID, string OrdType, string DestPlant, string FamilyCode, string OrdDtmx, string OrderExtCode, string OrderDesc, string OrderNote, int KitQty, System.DateTime ImportDate, string ImportUser, string OrdCodOrig, System.DateTime KittingDate) { OrderListRow rowOrderListRow = ((OrderListRow)(this.NewRow())); object[] columnValuesArray = new object[] { OrdID, @@ -3566,11 +3544,7 @@ namespace AppData { ImportDate, ImportUser, OrdCodOrig, - KittingDate, - EstNumBin, - EstNumCart, - EstNumPart, - EstProcTime}; + KittingDate}; rowOrderListRow.ItemArray = columnValuesArray; this.Rows.Add(rowOrderListRow); return rowOrderListRow; @@ -3613,10 +3587,6 @@ namespace AppData { this.columnImportUser = base.Columns["ImportUser"]; this.columnOrdCodOrig = base.Columns["OrdCodOrig"]; this.columnKittingDate = base.Columns["KittingDate"]; - this.columnEstNumBin = base.Columns["EstNumBin"]; - this.columnEstNumCart = base.Columns["EstNumCart"]; - this.columnEstNumPart = base.Columns["EstNumPart"]; - this.columnEstProcTime = base.Columns["EstProcTime"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -3648,14 +3618,6 @@ namespace AppData { base.Columns.Add(this.columnOrdCodOrig); this.columnKittingDate = new global::System.Data.DataColumn("KittingDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnKittingDate); - this.columnEstNumBin = new global::System.Data.DataColumn("EstNumBin", typeof(int), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnEstNumBin); - this.columnEstNumCart = new global::System.Data.DataColumn("EstNumCart", typeof(int), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnEstNumCart); - this.columnEstNumPart = new global::System.Data.DataColumn("EstNumPart", typeof(int), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnEstNumPart); - this.columnEstProcTime = new global::System.Data.DataColumn("EstProcTime", typeof(double), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnEstProcTime); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnOrdID}, true)); this.columnOrdID.AllowDBNull = false; @@ -3679,10 +3641,6 @@ namespace AppData { this.columnImportUser.AllowDBNull = false; this.columnImportUser.MaxLength = 50; this.columnOrdCodOrig.MaxLength = 50; - this.columnEstNumBin.AllowDBNull = false; - this.columnEstNumCart.AllowDBNull = false; - this.columnEstNumPart.AllowDBNull = false; - this.columnEstProcTime.AllowDBNull = false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -16895,6 +16853,356 @@ namespace AppData { } } + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class OrderListTreeDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnBatchID; + + private global::System.Data.DataColumn columnOrdID; + + private global::System.Data.DataColumn columnOrderExtCode; + + private global::System.Data.DataColumn columnEstNumBin; + + private global::System.Data.DataColumn columnEstNumCart; + + private global::System.Data.DataColumn columnEstNumPart; + + private global::System.Data.DataColumn columnEstProcTime; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public OrderListTreeDataTable() { + this.TableName = "OrderListTree"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal OrderListTreeDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected OrderListTreeDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn BatchIDColumn { + get { + return this.columnBatchID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn OrdIDColumn { + get { + return this.columnOrdID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn OrderExtCodeColumn { + get { + return this.columnOrderExtCode; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn EstNumBinColumn { + get { + return this.columnEstNumBin; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn EstNumCartColumn { + get { + return this.columnEstNumCart; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn EstNumPartColumn { + get { + return this.columnEstNumPart; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn EstProcTimeColumn { + get { + return this.columnEstProcTime; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public OrderListTreeRow this[int index] { + get { + return ((OrderListTreeRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event OrderListTreeRowChangeEventHandler OrderListTreeRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event OrderListTreeRowChangeEventHandler OrderListTreeRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event OrderListTreeRowChangeEventHandler OrderListTreeRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event OrderListTreeRowChangeEventHandler OrderListTreeRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void AddOrderListTreeRow(OrderListTreeRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public OrderListTreeRow AddOrderListTreeRow(int BatchID, int OrdID, string OrderExtCode, int EstNumBin, int EstNumCart, int EstNumPart, double EstProcTime) { + OrderListTreeRow rowOrderListTreeRow = ((OrderListTreeRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + BatchID, + OrdID, + OrderExtCode, + EstNumBin, + EstNumCart, + EstNumPart, + EstProcTime}; + rowOrderListTreeRow.ItemArray = columnValuesArray; + this.Rows.Add(rowOrderListTreeRow); + return rowOrderListTreeRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public OrderListTreeRow FindByBatchIDOrdID(int BatchID, int OrdID) { + return ((OrderListTreeRow)(this.Rows.Find(new object[] { + BatchID, + OrdID}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataTable Clone() { + OrderListTreeDataTable cln = ((OrderListTreeDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new OrderListTreeDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.columnBatchID = base.Columns["BatchID"]; + this.columnOrdID = base.Columns["OrdID"]; + this.columnOrderExtCode = base.Columns["OrderExtCode"]; + this.columnEstNumBin = base.Columns["EstNumBin"]; + this.columnEstNumCart = base.Columns["EstNumCart"]; + this.columnEstNumPart = base.Columns["EstNumPart"]; + this.columnEstProcTime = base.Columns["EstProcTime"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.columnBatchID = new global::System.Data.DataColumn("BatchID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnBatchID); + this.columnOrdID = new global::System.Data.DataColumn("OrdID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnOrdID); + this.columnOrderExtCode = new global::System.Data.DataColumn("OrderExtCode", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnOrderExtCode); + this.columnEstNumBin = new global::System.Data.DataColumn("EstNumBin", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnEstNumBin); + this.columnEstNumCart = new global::System.Data.DataColumn("EstNumCart", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnEstNumCart); + this.columnEstNumPart = new global::System.Data.DataColumn("EstNumPart", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnEstNumPart); + this.columnEstProcTime = new global::System.Data.DataColumn("EstProcTime", typeof(double), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnEstProcTime); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnBatchID, + this.columnOrdID}, true)); + this.columnBatchID.AllowDBNull = false; + this.columnOrdID.AllowDBNull = false; + this.columnOrderExtCode.AllowDBNull = false; + this.columnOrderExtCode.MaxLength = 250; + this.columnEstNumBin.AllowDBNull = false; + this.columnEstNumCart.AllowDBNull = false; + this.columnEstNumPart.AllowDBNull = false; + this.columnEstProcTime.AllowDBNull = false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public OrderListTreeRow NewOrderListTreeRow() { + return ((OrderListTreeRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new OrderListTreeRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(OrderListTreeRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.OrderListTreeRowChanged != null)) { + this.OrderListTreeRowChanged(this, new OrderListTreeRowChangeEvent(((OrderListTreeRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.OrderListTreeRowChanging != null)) { + this.OrderListTreeRowChanging(this, new OrderListTreeRowChangeEvent(((OrderListTreeRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.OrderListTreeRowDeleted != null)) { + this.OrderListTreeRowDeleted(this, new OrderListTreeRowChangeEvent(((OrderListTreeRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.OrderListTreeRowDeleting != null)) { + this.OrderListTreeRowDeleting(this, new OrderListTreeRowChangeEvent(((OrderListTreeRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void RemoveOrderListTreeRow(OrderListTreeRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + DS_App ds = new DS_App(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "OrderListTreeDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + /// ///Represents strongly named DataRow class. /// @@ -18265,50 +18573,6 @@ namespace AppData { } } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public int EstNumBin { - get { - return ((int)(this[this.tableOrderList.EstNumBinColumn])); - } - set { - this[this.tableOrderList.EstNumBinColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public int EstNumCart { - get { - return ((int)(this[this.tableOrderList.EstNumCartColumn])); - } - set { - this[this.tableOrderList.EstNumCartColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public int EstNumPart { - get { - return ((int)(this[this.tableOrderList.EstNumPartColumn])); - } - set { - this[this.tableOrderList.EstNumPartColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public double EstProcTime { - get { - return ((double)(this[this.tableOrderList.EstProcTimeColumn])); - } - set { - this[this.tableOrderList.EstProcTimeColumn] = value; - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsOrdDtmxNull() { @@ -24546,6 +24810,98 @@ namespace AppData { } } + /// + ///Represents strongly named DataRow class. + /// + public partial class OrderListTreeRow : global::System.Data.DataRow { + + private OrderListTreeDataTable tableOrderListTree; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal OrderListTreeRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableOrderListTree = ((OrderListTreeDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int BatchID { + get { + return ((int)(this[this.tableOrderListTree.BatchIDColumn])); + } + set { + this[this.tableOrderListTree.BatchIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int OrdID { + get { + return ((int)(this[this.tableOrderListTree.OrdIDColumn])); + } + set { + this[this.tableOrderListTree.OrdIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string OrderExtCode { + get { + return ((string)(this[this.tableOrderListTree.OrderExtCodeColumn])); + } + set { + this[this.tableOrderListTree.OrderExtCodeColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int EstNumBin { + get { + return ((int)(this[this.tableOrderListTree.EstNumBinColumn])); + } + set { + this[this.tableOrderListTree.EstNumBinColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int EstNumCart { + get { + return ((int)(this[this.tableOrderListTree.EstNumCartColumn])); + } + set { + this[this.tableOrderListTree.EstNumCartColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int EstNumPart { + get { + return ((int)(this[this.tableOrderListTree.EstNumPartColumn])); + } + set { + this[this.tableOrderListTree.EstNumPartColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public double EstProcTime { + get { + return ((double)(this[this.tableOrderListTree.EstProcTimeColumn])); + } + set { + this[this.tableOrderListTree.EstProcTimeColumn] = value; + } + } + } + /// ///Row event argument class /// @@ -25803,6 +26159,40 @@ namespace AppData { } } } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public class OrderListTreeRowChangeEvent : global::System.EventArgs { + + private OrderListTreeRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public OrderListTreeRowChangeEvent(OrderListTreeRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public OrderListTreeRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } } } namespace AppData.DS_AppTableAdapters { @@ -27929,10 +28319,6 @@ namespace AppData.DS_AppTableAdapters { tableMapping.ColumnMappings.Add("ImportUser", "ImportUser"); tableMapping.ColumnMappings.Add("OrdCodOrig", "OrdCodOrig"); tableMapping.ColumnMappings.Add("KittingDate", "KittingDate"); - tableMapping.ColumnMappings.Add("EstNumBin", "EstNumBin"); - tableMapping.ColumnMappings.Add("EstNumCart", "EstNumCart"); - tableMapping.ColumnMappings.Add("EstNumPart", "EstNumPart"); - tableMapping.ColumnMappings.Add("EstProcTime", "EstProcTime"); this._adapter.TableMappings.Add(tableMapping); } @@ -27946,10 +28332,12 @@ 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[4]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT * FROM v_OrderList"; + this._commandCollection[0].CommandText = "SELECT OrdID, OrdType, DestPlant, FamilyCode, OrdDtmx, OrderExtCode, OrderDesc, O" + + "rderNote, KitQty, ImportDate, ImportUser, OrdCodOrig, KittingDate FROM v_OrderLi" + + "st"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; @@ -27963,16 +28351,6 @@ namespace AppData.DS_AppTableAdapters { this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[2].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[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CartDtmx", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); - this._commandCollection[3].Connection = this.Connection; - this._commandCollection[3].CommandText = "dbo.stp_OL_updateExtEst"; - this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure; - this._commandCollection[3].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[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OrdID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EstNumBin", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EstNumCart", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EstNumPart", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EstProcTime", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -28032,58 +28410,6 @@ namespace AppData.DS_AppTableAdapters { 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")] - public virtual int updateExtEst(global::System.Nullable Original_OrdID, global::System.Nullable EstNumBin, global::System.Nullable EstNumCart, global::System.Nullable EstNumPart, global::System.Nullable EstProcTime) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; - if ((Original_OrdID.HasValue == true)) { - command.Parameters[1].Value = ((int)(Original_OrdID.Value)); - } - else { - command.Parameters[1].Value = global::System.DBNull.Value; - } - if ((EstNumBin.HasValue == true)) { - command.Parameters[2].Value = ((int)(EstNumBin.Value)); - } - else { - command.Parameters[2].Value = global::System.DBNull.Value; - } - if ((EstNumCart.HasValue == true)) { - command.Parameters[3].Value = ((int)(EstNumCart.Value)); - } - else { - command.Parameters[3].Value = global::System.DBNull.Value; - } - if ((EstNumPart.HasValue == true)) { - command.Parameters[4].Value = ((int)(EstNumPart.Value)); - } - else { - command.Parameters[4].Value = global::System.DBNull.Value; - } - if ((EstProcTime.HasValue == true)) { - command.Parameters[5].Value = ((double)(EstProcTime.Value)); - } - else { - command.Parameters[5].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; - } } /// @@ -38707,6 +39033,495 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE } } + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class OrderListTreeTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public OrderListTreeTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "OrderListTree"; + tableMapping.ColumnMappings.Add("BatchID", "BatchID"); + tableMapping.ColumnMappings.Add("OrdID", "OrdID"); + tableMapping.ColumnMappings.Add("OrderExtCode", "OrderExtCode"); + tableMapping.ColumnMappings.Add("EstNumBin", "EstNumBin"); + tableMapping.ColumnMappings.Add("EstNumCart", "EstNumCart"); + tableMapping.ColumnMappings.Add("EstNumPart", "EstNumPart"); + tableMapping.ColumnMappings.Add("EstProcTime", "EstProcTime"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = @"DELETE FROM [OrderListTree] WHERE (([BatchID] = @Original_BatchID) AND ([OrdID] = @Original_OrdID) AND ([OrderExtCode] = @Original_OrderExtCode) AND ([EstNumBin] = @Original_EstNumBin) AND ([EstNumCart] = @Original_EstNumCart) AND ([EstNumPart] = @Original_EstNumPart) AND ([EstProcTime] = @Original_EstProcTime))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BatchID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BatchID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OrdID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrdID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OrderExtCode", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrderExtCode", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_EstNumBin", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EstNumBin", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_EstNumCart", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EstNumCart", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_EstNumPart", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EstNumPart", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_EstProcTime", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EstProcTime", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.CommandText = @"INSERT INTO [OrderListTree] ([BatchID], [OrdID], [OrderExtCode], [EstNumBin], [EstNumCart], [EstNumPart], [EstProcTime]) VALUES (@BatchID, @OrdID, @OrderExtCode, @EstNumBin, @EstNumCart, @EstNumPart, @EstProcTime); +SELECT BatchID, OrdID, OrderExtCode, EstNumBin, EstNumCart, EstNumPart, EstProcTime FROM OrderListTree WHERE (BatchID = @BatchID) AND (OrdID = @OrdID)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BatchID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OrdID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrdID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OrderExtCode", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrderExtCode", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EstNumBin", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EstNumBin", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EstNumCart", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EstNumCart", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EstNumPart", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EstNumPart", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EstProcTime", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EstProcTime", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.CommandText = @"UPDATE [OrderListTree] SET [BatchID] = @BatchID, [OrdID] = @OrdID, [OrderExtCode] = @OrderExtCode, [EstNumBin] = @EstNumBin, [EstNumCart] = @EstNumCart, [EstNumPart] = @EstNumPart, [EstProcTime] = @EstProcTime WHERE (([BatchID] = @Original_BatchID) AND ([OrdID] = @Original_OrdID) AND ([OrderExtCode] = @Original_OrderExtCode) AND ([EstNumBin] = @Original_EstNumBin) AND ([EstNumCart] = @Original_EstNumCart) AND ([EstNumPart] = @Original_EstNumPart) AND ([EstProcTime] = @Original_EstProcTime)); +SELECT BatchID, OrdID, OrderExtCode, EstNumBin, EstNumCart, EstNumPart, EstProcTime FROM OrderListTree WHERE (BatchID = @BatchID) AND (OrdID = @OrdID)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BatchID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OrdID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrdID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OrderExtCode", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrderExtCode", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EstNumBin", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EstNumBin", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EstNumCart", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EstNumCart", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EstNumPart", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EstNumPart", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EstProcTime", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EstProcTime", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BatchID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BatchID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OrdID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrdID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OrderExtCode", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrderExtCode", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_EstNumBin", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EstNumBin", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_EstNumCart", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EstNumCart", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_EstNumPart", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EstNumPart", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_EstProcTime", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EstProcTime", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::AppData.Properties.Settings.Default.Sauder_NKCConnectionString; + } + + [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[7]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT * FROM OrderListTree"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[1].Connection = this.Connection; + this._commandCollection[1].CommandText = "dbo.stp_OLT_delete"; + this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[1].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[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OrdID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[2].Connection = this.Connection; + this._commandCollection[2].CommandText = "dbo.stp_OLT_deleteByBatch"; + this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[2].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[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[3].Connection = this.Connection; + this._commandCollection[3].CommandText = "dbo.stp_OLT_getByBatch"; + this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[3].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[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", 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_OLT_getByBatchTree"; + 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("@BatchID", 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_OLT_insert"; + 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("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OrdID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OrderExtCode", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EstNumBin", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EstNumCart", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EstNumPart", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EstProcTime", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 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_OLT_updateBatch"; + 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("@Original_BatchID", 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("@Original_OrdID", 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("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + } + + [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.Fill, true)] + public virtual int Fill(DS_App.OrderListTreeDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + 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")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual DS_App.OrderListTreeDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + DS_App.OrderListTreeDataTable dataTable = new DS_App.OrderListTreeDataTable(); + 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.OrderListTreeDataTable getByBatch(global::System.Nullable BatchID) { + this.Adapter.SelectCommand = this.CommandCollection[3]; + if ((BatchID.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(BatchID.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + DS_App.OrderListTreeDataTable dataTable = new DS_App.OrderListTreeDataTable(); + 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.OrderListTreeDataTable getByBatchTree(global::System.Nullable BatchID) { + this.Adapter.SelectCommand = this.CommandCollection[4]; + if ((BatchID.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(BatchID.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + DS_App.OrderListTreeDataTable dataTable = new DS_App.OrderListTreeDataTable(); + 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")] + public virtual int Update(DS_App.OrderListTreeDataTable dataTable) { + return this.Adapter.Update(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")] + public virtual int Update(DS_App dataSet) { + return this.Adapter.Update(dataSet, "OrderListTree"); + } + + [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 Update(global::System.Data.DataRow dataRow) { + return this.Adapter.Update(new global::System.Data.DataRow[] { + dataRow}); + } + + [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 Update(global::System.Data.DataRow[] dataRows) { + return this.Adapter.Update(dataRows); + } + + [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 delete(global::System.Nullable Original_BatchID, global::System.Nullable Original_OrdID) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; + if ((Original_BatchID.HasValue == true)) { + command.Parameters[1].Value = ((int)(Original_BatchID.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + if ((Original_OrdID.HasValue == true)) { + command.Parameters[2].Value = ((int)(Original_OrdID.Value)); + } + else { + command.Parameters[2].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 deleteByBatch(global::System.Nullable Original_BatchID) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2]; + if ((Original_BatchID.HasValue == true)) { + command.Parameters[1].Value = ((int)(Original_BatchID.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 insert(global::System.Nullable BatchID, global::System.Nullable OrdID, string OrderExtCode, global::System.Nullable EstNumBin, global::System.Nullable EstNumCart, global::System.Nullable EstNumPart, global::System.Nullable EstProcTime) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5]; + if ((BatchID.HasValue == true)) { + command.Parameters[1].Value = ((int)(BatchID.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + if ((OrdID.HasValue == true)) { + command.Parameters[2].Value = ((int)(OrdID.Value)); + } + else { + command.Parameters[2].Value = global::System.DBNull.Value; + } + if ((OrderExtCode == null)) { + command.Parameters[3].Value = global::System.DBNull.Value; + } + else { + command.Parameters[3].Value = ((string)(OrderExtCode)); + } + if ((EstNumBin.HasValue == true)) { + command.Parameters[4].Value = ((int)(EstNumBin.Value)); + } + else { + command.Parameters[4].Value = global::System.DBNull.Value; + } + if ((EstNumCart.HasValue == true)) { + command.Parameters[5].Value = ((int)(EstNumCart.Value)); + } + else { + command.Parameters[5].Value = global::System.DBNull.Value; + } + if ((EstNumPart.HasValue == true)) { + command.Parameters[6].Value = ((int)(EstNumPart.Value)); + } + else { + command.Parameters[6].Value = global::System.DBNull.Value; + } + if ((EstProcTime.HasValue == true)) { + command.Parameters[7].Value = ((double)(EstProcTime.Value)); + } + else { + command.Parameters[7].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 updateBatch(global::System.Nullable Original_BatchID, global::System.Nullable Original_OrdID, global::System.Nullable BatchID) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6]; + if ((Original_BatchID.HasValue == true)) { + command.Parameters[1].Value = ((int)(Original_BatchID.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + if ((Original_OrdID.HasValue == true)) { + command.Parameters[2].Value = ((int)(Original_OrdID.Value)); + } + else { + command.Parameters[2].Value = global::System.DBNull.Value; + } + if ((BatchID.HasValue == true)) { + command.Parameters[3].Value = ((int)(BatchID.Value)); + } + else { + command.Parameters[3].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; + } + } + /// ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios /// @@ -38745,6 +39560,8 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE private FileValidationTableAdapter _fileValidationTableAdapter; + private OrderListTreeTableAdapter _orderListTreeTableAdapter; + private bool _backupDataSetBeforeUpdate; private global::System.Data.IDbConnection _connection; @@ -38942,6 +39759,20 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + + "a", "System.Drawing.Design.UITypeEditor")] + public OrderListTreeTableAdapter OrderListTreeTableAdapter { + get { + return this._orderListTreeTableAdapter; + } + set { + this._orderListTreeTableAdapter = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool BackupDataSetBeforeUpdate { @@ -39013,6 +39844,10 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE && (this._fileValidationTableAdapter.Connection != null))) { return this._fileValidationTableAdapter.Connection; } + if (((this._orderListTreeTableAdapter != null) + && (this._orderListTreeTableAdapter.Connection != null))) { + return this._orderListTreeTableAdapter.Connection; + } return null; } set { @@ -39065,6 +39900,9 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE if ((this._fileValidationTableAdapter != null)) { count = (count + 1); } + if ((this._orderListTreeTableAdapter != null)) { + count = (count + 1); + } return count; } } @@ -39112,6 +39950,15 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE allChangedRows.AddRange(updatedRows); } } + if ((this._fileValidationTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.FileValidation.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._fileValidationTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } if ((this._itemValidationTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.ItemValidation.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -39121,12 +39968,12 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE allChangedRows.AddRange(updatedRows); } } - if ((this._fileValidationTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.FileValidation.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + if ((this._remnantsTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.Remnants.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { - result = (result + this._fileValidationTableAdapter.Update(updatedRows)); + result = (result + this._remnantsTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } @@ -39184,12 +40031,12 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE allChangedRows.AddRange(updatedRows); } } - if ((this._remnantsTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.Remnants.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + if ((this._orderListTreeTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.OrderListTree.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { - result = (result + this._remnantsTableAdapter.Update(updatedRows)); + result = (result + this._orderListTreeTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } @@ -39235,6 +40082,14 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE allAddedRows.AddRange(addedRows); } } + if ((this._fileValidationTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.FileValidation.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._fileValidationTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } if ((this._itemValidationTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.ItemValidation.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -39243,11 +40098,11 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE allAddedRows.AddRange(addedRows); } } - if ((this._fileValidationTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.FileValidation.Select(null, null, global::System.Data.DataViewRowState.Added); + if ((this._remnantsTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.Remnants.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { - result = (result + this._fileValidationTableAdapter.Update(addedRows)); + result = (result + this._remnantsTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } @@ -39299,11 +40154,11 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE allAddedRows.AddRange(addedRows); } } - if ((this._remnantsTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.Remnants.Select(null, null, global::System.Data.DataViewRowState.Added); + if ((this._orderListTreeTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.OrderListTree.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { - result = (result + this._remnantsTableAdapter.Update(addedRows)); + result = (result + this._orderListTreeTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } @@ -39317,11 +40172,11 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private int UpdateDeletedRows(DS_App dataSet, global::System.Collections.Generic.List allChangedRows) { int result = 0; - if ((this._remnantsTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.Remnants.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if ((this._orderListTreeTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.OrderListTree.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { - result = (result + this._remnantsTableAdapter.Update(deletedRows)); + result = (result + this._orderListTreeTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } @@ -39373,11 +40228,11 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE allChangedRows.AddRange(deletedRows); } } - if ((this._fileValidationTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.FileValidation.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if ((this._remnantsTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.Remnants.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { - result = (result + this._fileValidationTableAdapter.Update(deletedRows)); + result = (result + this._remnantsTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } @@ -39389,6 +40244,14 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE allChangedRows.AddRange(deletedRows); } } + if ((this._fileValidationTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.FileValidation.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._fileValidationTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } if ((this._finalKitTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.FinalKit.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -39525,6 +40388,11 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + "tring."); } + if (((this._orderListTreeTableAdapter != null) + && (this.MatchTableAdapterConnection(this._orderListTreeTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + + "tring."); + } global::System.Data.IDbConnection workConnection = this.Connection; if ((workConnection == null)) { throw new global::System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana" + @@ -39674,6 +40542,15 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE adaptersWithAcceptChangesDuringUpdate.Add(this._fileValidationTableAdapter.Adapter); } } + if ((this._orderListTreeTableAdapter != null)) { + revertConnections.Add(this._orderListTreeTableAdapter, this._orderListTreeTableAdapter.Connection); + this._orderListTreeTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._orderListTreeTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._orderListTreeTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._orderListTreeTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._orderListTreeTableAdapter.Adapter); + } + } // //---- Perform updates ----------- // @@ -39784,6 +40661,10 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE this._fileValidationTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._fileValidationTableAdapter])); this._fileValidationTableAdapter.Transaction = null; } + if ((this._orderListTreeTableAdapter != null)) { + this._orderListTreeTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._orderListTreeTableAdapter])); + this._orderListTreeTableAdapter.Transaction = null; + } if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) { global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count]; adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters); diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index c0975e3..2c72408 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -232,7 +232,7 @@ FROM v_BatchList - + dbo.stp_Batch_makeDescendantByKey @@ -244,7 +244,7 @@ FROM v_BatchList - + dbo.stp_Batch_redoPartValid @@ -255,7 +255,7 @@ FROM v_BatchList - + dbo.stp_Batch_resetAllNesting @@ -266,7 +266,7 @@ FROM v_BatchList - + dbo.stp_Batch_resetPartUnValid @@ -276,7 +276,7 @@ FROM v_BatchList - + dbo.stp_zzz_resetProdCall @@ -286,7 +286,7 @@ FROM v_BatchList - + dbo.stp_Batch_resetTree @@ -297,7 +297,7 @@ FROM v_BatchList - + dbo.stp_Batch_updateSchedPrior @@ -309,7 +309,7 @@ FROM v_BatchList - + dbo.stp_Batch_updateStatus @@ -649,7 +649,7 @@ FROM v_SheetList - SELECT * FROM v_OrderList + SELECT OrdID, OrdType, DestPlant, FamilyCode, OrdDtmx, OrderExtCode, OrderDesc, OrderNote, KitQty, ImportDate, ImportUser, OrdCodOrig, KittingDate FROM v_OrderList @@ -669,10 +669,6 @@ FROM v_SheetList - - - - @@ -697,21 +693,6 @@ FROM v_SheetList - - - - dbo.stp_OL_updateExtEst - - - - - - - - - - - @@ -3250,6 +3231,155 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE + + + + + + DELETE FROM [OrderListTree] WHERE (([BatchID] = @Original_BatchID) AND ([OrdID] = @Original_OrdID) AND ([OrderExtCode] = @Original_OrderExtCode) AND ([EstNumBin] = @Original_EstNumBin) AND ([EstNumCart] = @Original_EstNumCart) AND ([EstNumPart] = @Original_EstNumPart) AND ([EstProcTime] = @Original_EstProcTime)) + + + + + + + + + + + + + + INSERT INTO [OrderListTree] ([BatchID], [OrdID], [OrderExtCode], [EstNumBin], [EstNumCart], [EstNumPart], [EstProcTime]) VALUES (@BatchID, @OrdID, @OrderExtCode, @EstNumBin, @EstNumCart, @EstNumPart, @EstProcTime); +SELECT BatchID, OrdID, OrderExtCode, EstNumBin, EstNumCart, EstNumPart, EstProcTime FROM OrderListTree WHERE (BatchID = @BatchID) AND (OrdID = @OrdID) + + + + + + + + + + + + + + SELECT * FROM OrderListTree + + + + + + UPDATE [OrderListTree] SET [BatchID] = @BatchID, [OrdID] = @OrdID, [OrderExtCode] = @OrderExtCode, [EstNumBin] = @EstNumBin, [EstNumCart] = @EstNumCart, [EstNumPart] = @EstNumPart, [EstProcTime] = @EstProcTime WHERE (([BatchID] = @Original_BatchID) AND ([OrdID] = @Original_OrdID) AND ([OrderExtCode] = @Original_OrderExtCode) AND ([EstNumBin] = @Original_EstNumBin) AND ([EstNumCart] = @Original_EstNumCart) AND ([EstNumPart] = @Original_EstNumPart) AND ([EstProcTime] = @Original_EstProcTime)); +SELECT BatchID, OrdID, OrderExtCode, EstNumBin, EstNumCart, EstNumPart, EstProcTime FROM OrderListTree WHERE (BatchID = @BatchID) AND (OrdID = @OrdID) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dbo.stp_OLT_delete + + + + + + + + + + + + dbo.stp_OLT_deleteByBatch + + + + + + + + + + + dbo.stp_OLT_getByBatch + + + + + + + + + + + dbo.stp_OLT_getByBatchTree + + + + + + + + + + + dbo.stp_OLT_insert + + + + + + + + + + + + + + + + + dbo.stp_OLT_updateBatch + + + + + + + + + + + @@ -3258,7 +3388,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -3316,7 +3446,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -3341,7 +3471,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -3396,7 +3526,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -3466,14 +3596,10 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - - - - - + @@ -3542,7 +3668,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -3575,7 +3701,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -3647,7 +3773,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -3666,7 +3792,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -3697,7 +3823,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -3705,7 +3831,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -3722,7 +3848,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -3731,7 +3857,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -3762,7 +3888,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -3770,7 +3896,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -3786,7 +3912,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -3794,7 +3920,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -3822,7 +3948,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -3858,7 +3984,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -3874,7 +4000,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -3884,7 +4010,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -3901,7 +4027,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -3914,7 +4040,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -3963,7 +4089,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -3992,7 +4118,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -4034,7 +4160,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -4145,7 +4271,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -4208,7 +4334,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -4253,7 +4379,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -4279,7 +4405,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -4372,7 +4498,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -4435,7 +4561,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -4494,7 +4620,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -4543,7 +4669,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -4582,7 +4708,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -4635,7 +4761,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -4652,7 +4778,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE - + @@ -4665,6 +4791,25 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE + + + + + + + + + + + + + + + + + + + @@ -4806,20 +4951,25 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE + + + + + - - - - - - - - - - - + + + + + + + + + + + \ No newline at end of file diff --git a/AppData/DS_App.xss b/AppData/DS_App.xss index 4ca9cbc..359458c 100644 --- a/AppData/DS_App.xss +++ b/AppData/DS_App.xss @@ -4,180 +4,181 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - 1197 - 146 + 1189 + 282 - 1161 - 146 + 1153 + 282 - + - 1044 - 866 + 1028 + 934 - 1044 - 794 + 1028 + 862 - + 806 - 68 + 216 - 861 - 68 + 853 + 216 - + - 986 - 400 + 1116 + 468 - 986 - 458 + 1116 + 553 + + + 1091 + 553 - + - 707 - 340 + 699 + 408 - 707 - 278 + 699 + 358 - + - 592 - 286 + 482 + 336 - 677 - 286 - - - 677 - 278 + 612 + 336 - + - 1129 - 400 + 1113 + 468 - 1129 - 660 + 1113 + 728 - + - 1380 - 529 + 1364 + 597 - 1380 - 457 + 1364 + 525 - + - 1161 - 361 + 1153 + 429 - 1264 - 361 + 1256 + 429 - + - 131 - 457 + 115 + 525 - 131 - 374 + 115 + 442 - + - 292 - 257 + 284 + 393 - 247 - 257 + 239 + 393 diff --git a/AppData/DataLayer.cs b/AppData/DataLayer.cs index c3c859b..134334b 100644 --- a/AppData/DataLayer.cs +++ b/AppData/DataLayer.cs @@ -32,6 +32,7 @@ namespace AppData public DS_AppTableAdapters.OKOITableAdapter taOKOI; public DS_AppTableAdapters.OKOI_sumTableAdapter taOKOI_Sum; public DS_AppTableAdapters.OrderListTableAdapter taOL; + public DS_AppTableAdapters.OrderListTreeTableAdapter taOLT; public DS_AppTableAdapters.OffOrd2ItemTableAdapter taOO2I; public DS_AppTableAdapters.OtherItemTableAdapter taOtItem; public DS_ReportTableAdapters.PrintJobQueueTableAdapter taPJQ; @@ -175,6 +176,7 @@ namespace AppData taOKOI = new DS_AppTableAdapters.OKOITableAdapter(); taOKOI_Sum = new DS_AppTableAdapters.OKOI_sumTableAdapter(); taOL = new DS_AppTableAdapters.OrderListTableAdapter(); + taOLT = new DS_AppTableAdapters.OrderListTreeTableAdapter(); taOtItem = new DS_AppTableAdapters.OtherItemTableAdapter(); taPL = new DS_AppTableAdapters.PackListTableAdapter(); taPLC = new DS_AppTableAdapters.PackCheckTableAdapter(); @@ -224,6 +226,7 @@ namespace AppData taOKOI.Connection.ConnectionString = connString; taOKOI_Sum.Connection.ConnectionString = connString; taOL.Connection.ConnectionString = connString; + taOLT.Connection.ConnectionString = connString; taOtItem.Connection.ConnectionString = connString; taPL.Connection.ConnectionString = connString; taPLC.Connection.ConnectionString = connString; diff --git a/NKC_WF/Controllers/BatchProcController.cs b/NKC_WF/Controllers/BatchProcController.cs index 243bd9d..20d846c 100644 --- a/NKC_WF/Controllers/BatchProcController.cs +++ b/NKC_WF/Controllers/BatchProcController.cs @@ -389,7 +389,7 @@ namespace NKC_WF.Controllers ComLib.updatePartsFromNesting(rispStima.PartList); // aggiorno la risposta dei tempi di esecuzione (+ NUM cart/part) degli ordini x permettere aggiustamenti - ComLib.updateExtEstimFromNesting(rispStima.EstOrderList); + ComLib.updateExtEstimFromNesting(rispStima.BatchID, rispStima.EstOrderList); // aggiorno cadPath x items che non abbiano valorizzato... string dxfFolder = memLayer.ML.CRS("drawingFolder"); diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs index 382397e..d4932dc 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs @@ -36,7 +36,7 @@ namespace NKC_WF.WebUserControls /// /// Tabella dei batch Descendant di quello corrente /// - protected DS_App.BatchListDataTable tabBatchDesc + protected DS_App.BatchListDataTable TabBatchDesc { get { @@ -44,12 +44,12 @@ namespace NKC_WF.WebUserControls } } - protected Dictionary TabOrdersFromDb + protected DS_App.OrderListTreeDataTable TabOrdersFromDb { get { // cerco in redis - return ComLib.OrdersExtByBatch(BatchId, PlaceCod); + return ComLib.OrdersExtByBatch(BatchId); } } @@ -285,7 +285,7 @@ namespace NKC_WF.WebUserControls if (BatchId != 0) { // verifico se ho descendant - if (tabBatchDesc.Rows.Count == 0) + if (TabBatchDesc.Rows.Count == 0) { // altrimenti creo... DLMan.taBL.makeDescendantByKey(BatchId, PlaceCod); @@ -307,28 +307,11 @@ namespace NKC_WF.WebUserControls Dictionary RawList = new Dictionary(); Dictionary OrderedList = new Dictionary(); - Dictionary TabOrders = new Dictionary(TabOrdersFromDb); + var TabOrders = TabOrdersFromDb; - if (TabOrders.ContainsKey("VIRTNE")) + foreach (var item in TabOrders) { - foreach (var item in TabOrders["VIRTNE"]) - { - RawList.Add(item.OrdID, item.EstProcTime); - } - } - if (TabOrders.ContainsKey("NE01")) - { - foreach (var item in TabOrders["NE01"]) - { - RawList.Add(item.OrdID, item.EstProcTime); - } - } - if (TabOrders.ContainsKey("NE02")) - { - foreach (var item in TabOrders["NE02"]) - { - RawList.Add(item.OrdID, item.EstProcTime); - } + RawList.Add(item.OrdID, item.EstProcTime); } // ordino la lista x processing successivo @@ -367,19 +350,15 @@ namespace NKC_WF.WebUserControls // riorganizzo tabOrders... List OrdersNe01 = new List(); List OrdersNe02 = new List(); - foreach (var groupItem in TabOrders) + foreach (var orderItem in TabOrders) { - // ora guardo gli ordini... - foreach (var orderItem in groupItem.Value) + if (SetNe01.OrderSet.ContainsKey(orderItem.OrdID)) { - if (SetNe01.OrderSet.ContainsKey(orderItem.OrdID)) - { - OrdersNe01.Add(new OrderPrev() { OrderId = orderItem.OrdID, OrderExtCode = orderItem.OrderExtCode, NumBin = orderItem.EstNumBin, NumCart = orderItem.EstNumCart, TotTime = orderItem.EstProcTime }); - } - else - { - OrdersNe02.Add(new OrderPrev() { OrderId = orderItem.OrdID, OrderExtCode = orderItem.OrderExtCode, NumBin = orderItem.EstNumBin, NumCart = orderItem.EstNumCart, TotTime = orderItem.EstProcTime }); - } + OrdersNe01.Add(new OrderPrev() { OrderId = orderItem.OrdID, OrderExtCode = orderItem.OrderExtCode, NumBin = orderItem.EstNumBin, NumCart = orderItem.EstNumCart, TotTime = orderItem.EstProcTime }); + } + else + { + OrdersNe02.Add(new OrderPrev() { OrderId = orderItem.OrdID, OrderExtCode = orderItem.OrderExtCode, NumBin = orderItem.EstNumBin, NumCart = orderItem.EstNumCart, TotTime = orderItem.EstProcTime }); } } @@ -396,22 +375,11 @@ namespace NKC_WF.WebUserControls /// private void showBatchDescendant() { - Dictionary TabOrders = new Dictionary(TabOrdersFromDb); // se ho qualcosa aggiorno visualizzazione... - if (TabOrders.Count > 0) + if (TabOrdersFromDb.Count > 0) { - // se ne ho nel MAIN --> redistribuisco - if (TabOrders["VIRTNE"].Count > 0) - { - // suddivido - rebalanceOrder(); - } - else - { - //// ...e poi mostro - //cmp_orderExtListNE01.CurrOrders = TabOrders["NE01"]; - //cmp_orderExtListNE02.CurrOrders = TabOrders["NE02"]; - } + // suddivido + rebalanceOrder(); } }