From 289fa0ffd85efa20eabdfb97d1763cc8e2ed24dd Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 24 Sep 2021 10:05:21 +0200 Subject: [PATCH] Fix gestione DXF: invalidati i running nest e impedisce caricamento + di 1 x volta --- AppData/DS_App.Designer.cs | 149 +++++++++++------- AppData/DS_App.xsd | 132 +++++++++------- AppData/DS_App.xss | 2 +- NKC_WF/WebUserControls/cmp_fileUpload.ascx | 1 + NKC_WF/WebUserControls/cmp_fileUpload.ascx.cs | 24 ++- .../cmp_fileUpload.ascx.designer.cs | 9 ++ NKC_WF/site/DxfValidation.aspx | 11 +- NKC_WF/site/DxfValidation.aspx.cs | 11 ++ NKC_WF/site/DxfValidation.aspx.designer.cs | 9 ++ NKC_WF/site/KitRequestImporter.aspx | 2 +- NKC_WF/site/OrderManager.aspx | 2 +- 11 files changed, 237 insertions(+), 115 deletions(-) diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index 8786b34..d06ea67 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -29453,7 +29453,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[30]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[32]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_BatchList"; @@ -29555,91 +29555,101 @@ namespace AppData.DS_AppTableAdapters { this._commandCollection[15].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[16] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[16].Connection = this.Connection; - this._commandCollection[16].CommandText = "dbo.stp_Batch_getNextAvailable"; + this._commandCollection[16].CommandText = "dbo.stp_Batch_getNestRunning"; 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[16].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 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_getRunning"; + this._commandCollection[17].CommandText = "dbo.stp_Batch_getNextAvailable"; 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("@PlaceCod", 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_getSched"; + this._commandCollection[18].CommandText = "dbo.stp_Batch_getRunning"; 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[19] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[19].Connection = this.Connection; - this._commandCollection[19].CommandText = "dbo.stp_Batch_getSplitByKey"; + this._commandCollection[19].CommandText = "dbo.stp_Batch_getSched"; 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("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 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_Batch_makeDescendantByKey"; + this._commandCollection[20].CommandText = "dbo.stp_Batch_getSplitByKey"; 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[20].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[21] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[21].Connection = this.Connection; - this._commandCollection[21].CommandText = "dbo.stp_Batch_redoPartValid"; + this._commandCollection[21].CommandText = "dbo.stp_Batch_invalidateRunning"; 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("@Takt", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 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_refuseNesting"; + this._commandCollection[22].CommandText = "dbo.stp_Batch_makeDescendantByKey"; 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("@userName", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[22].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[23] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[23].Connection = this.Connection; - this._commandCollection[23].CommandText = "dbo.stp_Batch_resetAllNesting"; + this._commandCollection[23].CommandText = "dbo.stp_Batch_redoPartValid"; 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("@Takt", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 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_resetPartUnValid"; + this._commandCollection[24].CommandText = "dbo.stp_Batch_refuseNesting"; 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("@userName", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 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_zzz_resetProdCall"; + this._commandCollection[25].CommandText = "dbo.stp_Batch_resetAllNesting"; 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[26] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[26].Connection = this.Connection; - this._commandCollection[26].CommandText = "dbo.stp_Batch_resetTree"; + this._commandCollection[26].CommandText = "dbo.stp_Batch_resetPartUnValid"; this._commandCollection[26].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[26].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[26].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[27] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[27].Connection = this.Connection; - this._commandCollection[27].CommandText = "dbo.stp_Batch_updatePlaceCod"; + this._commandCollection[27].CommandText = "dbo.stp_zzz_resetProdCall"; this._commandCollection[27].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[27].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[27].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[27].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[28] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[28].Connection = this.Connection; - this._commandCollection[28].CommandText = "dbo.stp_Batch_updateSchedPrior"; + this._commandCollection[28].CommandText = "dbo.stp_Batch_resetTree"; this._commandCollection[28].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[28].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[28].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[28].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[28].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[29] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[29].Connection = this.Connection; - this._commandCollection[29].CommandText = "dbo.stp_Batch_updateStatus"; + this._commandCollection[29].CommandText = "dbo.stp_Batch_updatePlaceCod"; this._commandCollection[29].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[29].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[29].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[29].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[29].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[29].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[29].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[29].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[30] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[30].Connection = this.Connection; + this._commandCollection[30].CommandText = "dbo.stp_Batch_updateSchedPrior"; + this._commandCollection[30].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[30].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[30].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[30].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[31] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[31].Connection = this.Connection; + this._commandCollection[31].CommandText = "dbo.stp_Batch_updateStatus"; + this._commandCollection[31].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[31].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[31].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[31].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[31].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[31].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()] @@ -29807,8 +29817,19 @@ 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 getNextAvailable(string PlaceCod) { + public virtual DS_App.BatchListDataTable getNestRunning() { 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 getNextAvailable(string PlaceCod) { + this.Adapter.SelectCommand = this.CommandCollection[17]; if ((PlaceCod == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -29825,17 +29846,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 getRunning() { - 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")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_App.BatchListDataTable getSched() { this.Adapter.SelectCommand = this.CommandCollection[18]; DS_App.BatchListDataTable dataTable = new DS_App.BatchListDataTable(); this.Adapter.Fill(dataTable); @@ -29846,8 +29856,19 @@ 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 getSplitByKey(global::System.Nullable BatchID) { + public virtual DS_App.BatchListDataTable getSched() { this.Adapter.SelectCommand = this.CommandCollection[19]; + 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 getSplitByKey(global::System.Nullable BatchID) { + this.Adapter.SelectCommand = this.CommandCollection[20]; if ((BatchID.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(BatchID.Value)); } @@ -30095,11 +30116,33 @@ 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 invalidateRunning() { + 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)) { + 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 makeDescendantByKey(global::System.Nullable BatchID, string PlaceCodAnces) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[20]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[22]; if ((BatchID.HasValue == true)) { command.Parameters[1].Value = ((int)(BatchID.Value)); } @@ -30133,7 +30176,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 redoPartValid(string Takt) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[21]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[23]; if ((Takt == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } @@ -30161,7 +30204,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 refuseNesting(global::System.Nullable BatchID, string userName) { - 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)); } @@ -30195,7 +30238,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[23]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[25]; if ((BatchID.HasValue == true)) { command.Parameters[1].Value = ((int)(BatchID.Value)); } @@ -30223,7 +30266,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[24]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[26]; global::System.Data.ConnectionState previousConnectionState = command.Connection.State; if (((command.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -30245,7 +30288,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[25]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[27]; global::System.Data.ConnectionState previousConnectionState = command.Connection.State; if (((command.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -30267,7 +30310,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[26]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[28]; if ((Original_BatchID.HasValue == true)) { command.Parameters[1].Value = ((int)(Original_BatchID.Value)); } @@ -30295,7 +30338,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 updatePlaceCod(global::System.Nullable Original_BatchID, string PlaceCod) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[27]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[29]; if ((Original_BatchID.HasValue == true)) { command.Parameters[1].Value = ((int)(Original_BatchID.Value)); } @@ -30329,7 +30372,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[28]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[30]; if ((BatchID.HasValue == true)) { command.Parameters[1].Value = ((int)(BatchID.Value)); } @@ -30363,7 +30406,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[29]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[31]; if ((BatchID.HasValue == true)) { command.Parameters[1].Value = ((int)(BatchID.Value)); } diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index 69cf47d..da84aab 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -214,6 +214,16 @@ FROM v_BatchList + + + + dbo.stp_Batch_getNestRunning + + + + + + @@ -256,6 +266,16 @@ FROM v_BatchList + + + + dbo.stp_Batch_invalidateRunning + + + + + + @@ -3851,7 +3871,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -3909,7 +3929,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -3934,7 +3954,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -3989,7 +4009,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4062,7 +4082,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4131,7 +4151,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4164,7 +4184,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4236,7 +4256,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4255,7 +4275,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4286,7 +4306,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4294,7 +4314,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4311,7 +4331,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4320,7 +4340,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4351,7 +4371,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4359,7 +4379,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4375,7 +4395,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4383,7 +4403,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4411,7 +4431,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4447,7 +4467,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4463,7 +4483,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4473,7 +4493,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4490,7 +4510,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4503,7 +4523,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4552,7 +4572,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4581,7 +4601,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4623,7 +4643,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4734,7 +4754,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4797,7 +4817,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4842,7 +4862,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4868,7 +4888,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4961,7 +4981,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5024,7 +5044,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5083,7 +5103,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5132,7 +5152,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5171,7 +5191,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5224,7 +5244,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5241,7 +5261,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5254,7 +5274,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5276,7 +5296,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5304,7 +5324,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5341,7 +5361,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5375,7 +5395,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5417,7 +5437,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5430,7 +5450,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5631,18 +5651,18 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - - - - - - - - - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/AppData/DS_App.xss b/AppData/DS_App.xss index dc113d6..8521ad0 100644 --- a/AppData/DS_App.xss +++ b/AppData/DS_App.xss @@ -4,7 +4,7 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + diff --git a/NKC_WF/WebUserControls/cmp_fileUpload.ascx b/NKC_WF/WebUserControls/cmp_fileUpload.ascx index 443bbd6..79bd358 100644 --- a/NKC_WF/WebUserControls/cmp_fileUpload.ascx +++ b/NKC_WF/WebUserControls/cmp_fileUpload.ascx @@ -5,6 +5,7 @@ +
<%: traduci("cancel") %> diff --git a/NKC_WF/WebUserControls/cmp_fileUpload.ascx.cs b/NKC_WF/WebUserControls/cmp_fileUpload.ascx.cs index f22a1a5..ab538c5 100644 --- a/NKC_WF/WebUserControls/cmp_fileUpload.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_fileUpload.ascx.cs @@ -50,6 +50,20 @@ namespace NKC_WF.WebUserContols } } + public bool checkRunning + { + get + { + bool answ = true; + bool.TryParse(hfChkRunning.Value, out answ); + return answ; + } + set + { + hfChkRunning.Value = value.ToString(); + } + } + /// /// Prefisso file abilitato /// @@ -189,6 +203,7 @@ namespace NKC_WF.WebUserContols string batchName = ""; string savedFilename = ""; string contentType = ""; + divMessagge.Visible = false; DateTime adesso = DateTime.Now; string dirFrom = Server.MapPath(_tempUploadDir); // se c'รจ un file @@ -230,12 +245,19 @@ namespace NKC_WF.WebUserContols { // controllo se ci sia un batch duplicato checkFileOk = DLMan.taBL.getApprovedByTakt(batchName).Count == 0; + lblMessage.Text = $"{traduci("Error_BatchIsApproved")}"; + } + // se richiesto controllo NON ci siano altri task running + if (checkRunning) + { + // controllo se ci sia un batch duplicato + checkFileOk = DLMan.taBL.getNestRunning().Count == 0; + lblMessage.Text = $"{traduci("Error_OtherBatchTaskRunning")}"; } if (!checkFileOk) { divMessagge.Visible = true; - lblMessage.Text = $"{traduci("Error_BatchIsApproved")}"; } else { diff --git a/NKC_WF/WebUserControls/cmp_fileUpload.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_fileUpload.ascx.designer.cs index 93c711a..f7efb51 100644 --- a/NKC_WF/WebUserControls/cmp_fileUpload.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_fileUpload.ascx.designer.cs @@ -59,6 +59,15 @@ namespace NKC_WF.WebUserContols /// protected global::System.Web.UI.WebControls.HiddenField hfChkBatchApp; + /// + /// hfChkRunning control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField hfChkRunning; + /// /// divFileUpl control. /// diff --git a/NKC_WF/site/DxfValidation.aspx b/NKC_WF/site/DxfValidation.aspx index 8a7847c..87de212 100644 --- a/NKC_WF/site/DxfValidation.aspx +++ b/NKC_WF/site/DxfValidation.aspx @@ -7,12 +7,19 @@
-

<%: traduci("DxfValidation") %>

+
+
+

<%: traduci("DxfValidation") %>

+
+
+ <%: traduci("InvalidatePending") %> +
+
- +
diff --git a/NKC_WF/site/DxfValidation.aspx.cs b/NKC_WF/site/DxfValidation.aspx.cs index 5f8e3a4..a84847e 100644 --- a/NKC_WF/site/DxfValidation.aspx.cs +++ b/NKC_WF/site/DxfValidation.aspx.cs @@ -101,8 +101,19 @@ namespace NKC_WF.site #region Protected Methods + /// + /// Chiamata x rendere UNVALID ogni task pending + /// + /// + /// + protected void lbtInvalidPending_Click(object sender, EventArgs e) + { + DLMan.taBL.invalidateRunning(); + } + protected void Page_Load(object sender, EventArgs e) { + lbtInvalidPending.DataBind(); cmp_fileUpload.eh_FileUploaded += Cmp_fileUpload_eh_FileUploaded; } diff --git a/NKC_WF/site/DxfValidation.aspx.designer.cs b/NKC_WF/site/DxfValidation.aspx.designer.cs index d42ceae..ba79b51 100644 --- a/NKC_WF/site/DxfValidation.aspx.designer.cs +++ b/NKC_WF/site/DxfValidation.aspx.designer.cs @@ -14,6 +14,15 @@ namespace NKC_WF.site public partial class DxfValidation { + /// + /// lbtInvalidPending control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton lbtInvalidPending; + /// /// cmp_fileUpload control. /// diff --git a/NKC_WF/site/KitRequestImporter.aspx b/NKC_WF/site/KitRequestImporter.aspx index 18dea56..d6426de 100644 --- a/NKC_WF/site/KitRequestImporter.aspx +++ b/NKC_WF/site/KitRequestImporter.aspx @@ -13,7 +13,7 @@
- +
diff --git a/NKC_WF/site/OrderManager.aspx b/NKC_WF/site/OrderManager.aspx index ca5976b..20bf991 100644 --- a/NKC_WF/site/OrderManager.aspx +++ b/NKC_WF/site/OrderManager.aspx @@ -12,7 +12,7 @@

<%: traduci("OrderManager") %>

- +