From 8bb4580ba29f876801fa638dcc0032051fb67725 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 16 Sep 2021 16:01:48 +0200 Subject: [PATCH 1/2] =?UTF-8?q?Aggiunto=20verifica=20batch=20gi=C3=A0=20ap?= =?UTF-8?q?provati=20in=20import?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AppData/DS_App.Designer.cs | 207 ++++++++++-------- AppData/DS_App.xsd | 123 ++++++----- NKC_WF/WebUserControls/cmp_fileUpload.ascx | 1 + NKC_WF/WebUserControls/cmp_fileUpload.ascx.cs | 52 ++++- .../cmp_fileUpload.ascx.designer.cs | 9 + NKC_WF/site/OrderManager.aspx | 2 +- NKC_WF/site/OrderManager.aspx.cs | 3 +- 7 files changed, 235 insertions(+), 162 deletions(-) diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index 954bf04..8786b34 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[29]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[30]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_BatchList"; @@ -29510,130 +29510,136 @@ namespace AppData.DS_AppTableAdapters { this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[9] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[9].Connection = this.Connection; - this._commandCollection[9].CommandText = "dbo.stp_Batch_getByKey"; + this._commandCollection[9].CommandText = "dbo.stp_Batch_getApprovedByTakt"; this._commandCollection[9].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Takt", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[10] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[10].Connection = this.Connection; - this._commandCollection[10].CommandText = "dbo.stp_Batch_getByStatus"; + this._commandCollection[10].CommandText = "dbo.stp_Batch_getByKey"; this._commandCollection[10].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Status", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SearchVal", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ShowSplit", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PartValid", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[11] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[11].Connection = this.Connection; - this._commandCollection[11].CommandText = "dbo.stp_Batch_getCurrentByMachine"; + this._commandCollection[11].CommandText = "dbo.stp_Batch_getByStatus"; this._commandCollection[11].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[11].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[11].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[11].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[11].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SearchVal", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[11].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ShowSplit", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[11].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PartValid", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 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_getDescendantByKey"; + this._commandCollection[12].CommandText = "dbo.stp_Batch_getCurrentByMachine"; 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("@BatchID", 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("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 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_getForBunkMan"; + this._commandCollection[13].CommandText = "dbo.stp_Batch_getDescendantByKey"; 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("@MaxPosition", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[13].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[14] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[14].Connection = this.Connection; - this._commandCollection[14].CommandText = "dbo.stp_Batch_getLastByTakt"; + this._commandCollection[14].CommandText = "dbo.stp_Batch_getForBunkMan"; 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[14].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[15] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[15].Connection = this.Connection; - this._commandCollection[15].CommandText = "dbo.stp_Batch_getNextAvailable"; + this._commandCollection[15].CommandText = "dbo.stp_Batch_getLastByTakt"; 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[15].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[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_getRunning"; + this._commandCollection[16].CommandText = "dbo.stp_Batch_getNextAvailable"; 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_getSched"; + this._commandCollection[17].CommandText = "dbo.stp_Batch_getRunning"; 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[18] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[18].Connection = this.Connection; - this._commandCollection[18].CommandText = "dbo.stp_Batch_getSplitByKey"; + this._commandCollection[18].CommandText = "dbo.stp_Batch_getSched"; 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[19] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[19].Connection = this.Connection; - this._commandCollection[19].CommandText = "dbo.stp_Batch_makeDescendantByKey"; + this._commandCollection[19].CommandText = "dbo.stp_Batch_getSplitByKey"; 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[19].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[20] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[20].Connection = this.Connection; - this._commandCollection[20].CommandText = "dbo.stp_Batch_redoPartValid"; + this._commandCollection[20].CommandText = "dbo.stp_Batch_makeDescendantByKey"; 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("@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].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_refuseNesting"; + this._commandCollection[21].CommandText = "dbo.stp_Batch_redoPartValid"; 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("@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].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[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_resetAllNesting"; + this._commandCollection[22].CommandText = "dbo.stp_Batch_refuseNesting"; 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[23] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[23].Connection = this.Connection; - this._commandCollection[23].CommandText = "dbo.stp_Batch_resetPartUnValid"; + this._commandCollection[23].CommandText = "dbo.stp_Batch_resetAllNesting"; 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[24] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[24].Connection = this.Connection; - this._commandCollection[24].CommandText = "dbo.stp_zzz_resetProdCall"; + this._commandCollection[24].CommandText = "dbo.stp_Batch_resetPartUnValid"; 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[25] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[25].Connection = this.Connection; - this._commandCollection[25].CommandText = "dbo.stp_Batch_resetTree"; + this._commandCollection[25].CommandText = "dbo.stp_zzz_resetProdCall"; 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("@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[26] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[26].Connection = this.Connection; - this._commandCollection[26].CommandText = "dbo.stp_Batch_updatePlaceCod"; + this._commandCollection[26].CommandText = "dbo.stp_Batch_resetTree"; 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[26].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[27] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[27].Connection = this.Connection; - this._commandCollection[27].CommandText = "dbo.stp_Batch_updateSchedPrior"; + this._commandCollection[27].CommandText = "dbo.stp_Batch_updatePlaceCod"; 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("@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("@SchedPrio", 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("@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_updateStatus"; + this._commandCollection[28].CommandText = "dbo.stp_Batch_updateSchedPrior"; 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("@Status", 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("@EnvNum", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[28].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[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[29] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[29].Connection = this.Connection; + this._commandCollection[29].CommandText = "dbo.stp_Batch_updateStatus"; + 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, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -29664,8 +29670,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 getByKey(global::System.Nullable BatchID) { + public virtual DS_App.BatchListDataTable getApprovedByTakt(string Takt) { this.Adapter.SelectCommand = this.CommandCollection[9]; + if ((Takt == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(Takt)); + } + 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 getByKey(global::System.Nullable BatchID) { + this.Adapter.SelectCommand = this.CommandCollection[10]; if ((BatchID.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(BatchID.Value)); } @@ -29682,7 +29705,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 getByStatus(global::System.Nullable Status, string SearchVal, global::System.Nullable ShowSplit, global::System.Nullable PartValid) { - this.Adapter.SelectCommand = this.CommandCollection[10]; + this.Adapter.SelectCommand = this.CommandCollection[11]; if ((Status.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(Status.Value)); } @@ -29717,7 +29740,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 getCurrentByMachine(string PlaceCod) { - this.Adapter.SelectCommand = this.CommandCollection[11]; + this.Adapter.SelectCommand = this.CommandCollection[12]; if ((PlaceCod == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -29734,7 +29757,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 getDescendByKey(global::System.Nullable BatchID) { - this.Adapter.SelectCommand = this.CommandCollection[12]; + this.Adapter.SelectCommand = this.CommandCollection[13]; if ((BatchID.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(BatchID.Value)); } @@ -29751,7 +29774,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 getForBunkMan(global::System.Nullable MaxPosition) { - this.Adapter.SelectCommand = this.CommandCollection[13]; + this.Adapter.SelectCommand = this.CommandCollection[14]; if ((MaxPosition.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(MaxPosition.Value)); } @@ -29768,7 +29791,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[14]; + this.Adapter.SelectCommand = this.CommandCollection[15]; if ((Takt == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -29785,7 +29808,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 getNextAvailable(string PlaceCod) { - this.Adapter.SelectCommand = this.CommandCollection[15]; + this.Adapter.SelectCommand = this.CommandCollection[16]; if ((PlaceCod == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -29802,17 +29825,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[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); @@ -29823,8 +29835,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[18]; + 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[19]; if ((BatchID.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(BatchID.Value)); } @@ -30076,7 +30099,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 makeDescendantByKey(global::System.Nullable BatchID, string PlaceCodAnces) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[19]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[20]; if ((BatchID.HasValue == true)) { command.Parameters[1].Value = ((int)(BatchID.Value)); } @@ -30110,7 +30133,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[20]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[21]; if ((Takt == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } @@ -30138,7 +30161,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[21]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[22]; if ((BatchID.HasValue == true)) { command.Parameters[1].Value = ((int)(BatchID.Value)); } @@ -30172,7 +30195,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[22]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[23]; if ((BatchID.HasValue == true)) { command.Parameters[1].Value = ((int)(BatchID.Value)); } @@ -30200,28 +30223,6 @@ namespace AppData.DS_AppTableAdapters { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int resetPartUnValid() { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[23]; - 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 resetProdCall() { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[24]; global::System.Data.ConnectionState previousConnectionState = command.Connection.State; if (((command.Connection.State & global::System.Data.ConnectionState.Open) @@ -30243,8 +30244,30 @@ namespace AppData.DS_AppTableAdapters { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int resetTree(global::System.Nullable Original_BatchID) { + public virtual int resetProdCall() { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[25]; + 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 resetTree(global::System.Nullable Original_BatchID) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[26]; if ((Original_BatchID.HasValue == true)) { command.Parameters[1].Value = ((int)(Original_BatchID.Value)); } @@ -30272,7 +30295,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[26]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[27]; if ((Original_BatchID.HasValue == true)) { command.Parameters[1].Value = ((int)(Original_BatchID.Value)); } @@ -30306,7 +30329,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[27]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[28]; if ((BatchID.HasValue == true)) { command.Parameters[1].Value = ((int)(BatchID.Value)); } @@ -30340,7 +30363,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[28]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[29]; if ((BatchID.HasValue == true)) { command.Parameters[1].Value = ((int)(BatchID.Value)); } diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index 75d6ef6..69cf47d 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -134,6 +134,17 @@ FROM v_BatchList + + + + dbo.stp_Batch_getApprovedByTakt + + + + + + + @@ -3840,7 +3851,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -3898,7 +3909,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -3923,7 +3934,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -3978,7 +3989,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4051,7 +4062,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4120,7 +4131,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4153,7 +4164,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4225,7 +4236,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4244,7 +4255,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4275,7 +4286,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4283,7 +4294,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4300,7 +4311,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4309,7 +4320,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4340,7 +4351,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4348,7 +4359,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4364,7 +4375,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4372,7 +4383,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4400,7 +4411,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4436,7 +4447,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4452,7 +4463,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4462,7 +4473,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4479,7 +4490,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4492,7 +4503,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4541,7 +4552,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4570,7 +4581,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4612,7 +4623,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4723,7 +4734,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4786,7 +4797,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4831,7 +4842,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4857,7 +4868,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4950,7 +4961,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5013,7 +5024,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5072,7 +5083,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5121,7 +5132,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5160,7 +5171,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5213,7 +5224,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5230,7 +5241,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5243,7 +5254,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5265,7 +5276,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5293,7 +5304,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5330,7 +5341,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5364,7 +5375,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5406,7 +5417,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5419,7 +5430,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5620,18 +5631,18 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - - - - - - - - - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_fileUpload.ascx b/NKC_WF/WebUserControls/cmp_fileUpload.ascx index 4d161ca..443bbd6 100644 --- a/NKC_WF/WebUserControls/cmp_fileUpload.ascx +++ b/NKC_WF/WebUserControls/cmp_fileUpload.ascx @@ -4,6 +4,7 @@ +
<%: traduci("cancel") %> diff --git a/NKC_WF/WebUserControls/cmp_fileUpload.ascx.cs b/NKC_WF/WebUserControls/cmp_fileUpload.ascx.cs index 65267f9..f22a1a5 100644 --- a/NKC_WF/WebUserControls/cmp_fileUpload.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_fileUpload.ascx.cs @@ -36,6 +36,20 @@ namespace NKC_WF.WebUserContols #region Public Properties + public bool checkBatchAppr + { + get + { + bool answ = true; + bool.TryParse(hfChkBatchApp.Value, out answ); + return answ; + } + set + { + hfChkBatchApp.Value = value.ToString(); + } + } + /// /// Prefisso file abilitato /// @@ -169,6 +183,7 @@ namespace NKC_WF.WebUserContols protected void Upload(object sender, EventArgs e) { + bool checkFileOk = true; string uplFileName = ""; string uploadedFilename = ""; string batchName = ""; @@ -210,19 +225,34 @@ namespace NKC_WF.WebUserContols } else { - contentType = FileUpload1.PostedFile.ContentType; - // accedo allo stream del file allegato - using (Stream fs = FileUpload1.PostedFile.InputStream) + // se richiesto controllo duplicati + if (checkBatchAppr) { - // scrivo su file - FileStream file = new FileStream(savedFilename, FileMode.Create, FileAccess.Write); - fs.CopyTo(file); - file.Close(); - // log! - logger.lg.scriviLog($"Effettuato salvataggio file {uploadedFilename} come {savedFilename}"); + // controllo se ci sia un batch duplicato + checkFileOk = DLMan.taBL.getApprovedByTakt(batchName).Count == 0; + } + + if (!checkFileOk) + { + divMessagge.Visible = true; + lblMessage.Text = $"{traduci("Error_BatchIsApproved")}"; + } + else + { + contentType = FileUpload1.PostedFile.ContentType; + // accedo allo stream del file allegato + using (Stream fs = FileUpload1.PostedFile.InputStream) + { + // scrivo su file + FileStream file = new FileStream(savedFilename, FileMode.Create, FileAccess.Write); + fs.CopyTo(file); + file.Close(); + // log! + logger.lg.scriviLog($"Effettuato salvataggio file {uploadedFilename} come {savedFilename}"); + } + // segnaloc he ho CARICATO IN LOCALE il file + reportFileUploaded(new FileUploadEventArgs(dirFrom, uplFileName, batchName)); } - // segnaloc he ho CARICATO IN LOCALE il file - reportFileUploaded(new FileUploadEventArgs(dirFrom, uplFileName, batchName)); } } } diff --git a/NKC_WF/WebUserControls/cmp_fileUpload.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_fileUpload.ascx.designer.cs index c33fc23..93c711a 100644 --- a/NKC_WF/WebUserControls/cmp_fileUpload.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_fileUpload.ascx.designer.cs @@ -50,6 +50,15 @@ namespace NKC_WF.WebUserContols /// protected global::System.Web.UI.WebControls.HiddenField hfFileSuffix; + /// + /// hfChkBatchApp control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField hfChkBatchApp; + /// /// divFileUpl control. /// diff --git a/NKC_WF/site/OrderManager.aspx b/NKC_WF/site/OrderManager.aspx index 6d052ab..ca5976b 100644 --- a/NKC_WF/site/OrderManager.aspx +++ b/NKC_WF/site/OrderManager.aspx @@ -12,7 +12,7 @@

<%: traduci("OrderManager") %>

- +
diff --git a/NKC_WF/site/OrderManager.aspx.cs b/NKC_WF/site/OrderManager.aspx.cs index 4e76478..ceb7085 100644 --- a/NKC_WF/site/OrderManager.aspx.cs +++ b/NKC_WF/site/OrderManager.aspx.cs @@ -54,7 +54,7 @@ namespace NKC_WF { /*-------------------------------------------- * Note validazione: - * - leggo cSV + * - leggo CSV * - carico su DB * - verifico (come ora x DXF) TUTTI i particolari * - cerco su tab ItemValidation @@ -185,7 +185,6 @@ namespace NKC_WF { } } Response.Redirect(Request.RawUrl); - //doUpdate(); } /// From 4cc1bfbd8f8e6c6db6bb68da386f6e2eea92b266 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 16 Sep 2021 16:03:05 +0200 Subject: [PATCH 2/2] Fix comportamento file upload x kit e test dxf --- NKC_WF/site/DxfValidation.aspx | 2 +- NKC_WF/site/DxfValidation.aspx.designer.cs | 28 +++++----- NKC_WF/site/KitRequestImporter.aspx | 2 +- .../site/KitRequestImporter.aspx.designer.cs | 52 +++++++++---------- 4 files changed, 42 insertions(+), 42 deletions(-) diff --git a/NKC_WF/site/DxfValidation.aspx b/NKC_WF/site/DxfValidation.aspx index e07f14e..8a7847c 100644 --- a/NKC_WF/site/DxfValidation.aspx +++ b/NKC_WF/site/DxfValidation.aspx @@ -12,7 +12,7 @@
- +
diff --git a/NKC_WF/site/DxfValidation.aspx.designer.cs b/NKC_WF/site/DxfValidation.aspx.designer.cs index 0a2ebe8..d42ceae 100644 --- a/NKC_WF/site/DxfValidation.aspx.designer.cs +++ b/NKC_WF/site/DxfValidation.aspx.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.site @@ -15,29 +15,29 @@ namespace NKC_WF.site { /// - /// Controllo cmp_fileUpload. + /// cmp_fileUpload 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::NKC_WF.WebUserContols.cmp_fileUpload cmp_fileUpload; /// - /// Controllo divFileList. + /// divFileList 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 divFileList; /// - /// Controllo cmp_batchList. + /// cmp_batchList 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::NKC_WF.WebUserControls.cmp_batchList cmp_batchList; } diff --git a/NKC_WF/site/KitRequestImporter.aspx b/NKC_WF/site/KitRequestImporter.aspx index 68ee123..18dea56 100644 --- a/NKC_WF/site/KitRequestImporter.aspx +++ b/NKC_WF/site/KitRequestImporter.aspx @@ -13,7 +13,7 @@
- +
diff --git a/NKC_WF/site/KitRequestImporter.aspx.designer.cs b/NKC_WF/site/KitRequestImporter.aspx.designer.cs index 14918c7..a2562cd 100644 --- a/NKC_WF/site/KitRequestImporter.aspx.designer.cs +++ b/NKC_WF/site/KitRequestImporter.aspx.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 @@ -15,65 +15,65 @@ namespace NKC_WF { /// - /// Controllo cmp_fileUpload. + /// cmp_fileUpload 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::NKC_WF.WebUserContols.cmp_fileUpload cmp_fileUpload; /// - /// Controllo upnlCheck. + /// upnlCheck 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.UpdatePanel upnlCheck; /// - /// Controllo cmp_kitImpCheck. + /// cmp_kitImpCheck 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::NKC_WF.WebUserControls.cmp_kitImpCheck cmp_kitImpCheck; /// - /// Controllo divKitList. + /// divKitList 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 divKitList; /// - /// Controllo upnlList. + /// upnlList 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.UpdatePanel upnlList; /// - /// Controllo cmp_kitList. + /// cmp_kitList 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::NKC_WF.WebUserControls.cmp_kitList cmp_kitList; /// - /// Controllo Timer1. + /// Timer1 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.Timer Timer1; }