diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index c1eaf8a..05fe969 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -1003,20 +1003,24 @@ namespace AppData { private global::System.Data.DataColumn columnNestingResp; + private global::System.Data.DataColumn columnSTATUS; + + private global::System.Data.DataColumn columnPosition; + private global::System.Data.DataColumn columnTotalTime; private global::System.Data.DataColumn columnApprovDate; private global::System.Data.DataColumn columnApprovUser; - private global::System.Data.DataColumn columnSTATUS; + private global::System.Data.DataColumn columnEnvNum; + + private global::System.Data.DataColumn columnNumErr; private global::System.Data.DataColumn columnNumOrders; private global::System.Data.DataColumn columnNumItems; - private global::System.Data.DataColumn columnPosition; - private global::System.Data.DataColumn columnNumStacks; private global::System.Data.DataColumn columnNumSheets; @@ -1094,6 +1098,22 @@ namespace AppData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn STATUSColumn { + get { + return this.columnSTATUS; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn PositionColumn { + get { + return this.columnPosition; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn TotalTimeColumn { @@ -1120,9 +1140,17 @@ namespace AppData { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public global::System.Data.DataColumn STATUSColumn { + public global::System.Data.DataColumn EnvNumColumn { get { - return this.columnSTATUS; + return this.columnEnvNum; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn NumErrColumn { + get { + return this.columnNumErr; } } @@ -1142,14 +1170,6 @@ namespace AppData { } } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public global::System.Data.DataColumn PositionColumn { - get { - return this.columnPosition; - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn NumStacksColumn { @@ -1203,7 +1223,7 @@ namespace AppData { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public BatchListRow AddBatchListRow(string Takt, System.DateTime DueDate, System.DateTime NestingReq, System.DateTime NestingResp, decimal TotalTime, System.DateTime ApprovDate, string ApprovUser, int STATUS, int NumOrders, int NumItems, int Position, int NumStacks, int NumSheets) { + public BatchListRow AddBatchListRow(string Takt, System.DateTime DueDate, System.DateTime NestingReq, System.DateTime NestingResp, int STATUS, int Position, decimal TotalTime, System.DateTime ApprovDate, string ApprovUser, string EnvNum, int NumErr, int NumOrders, int NumItems, int NumStacks, int NumSheets) { BatchListRow rowBatchListRow = ((BatchListRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, @@ -1211,13 +1231,15 @@ namespace AppData { DueDate, NestingReq, NestingResp, + STATUS, + Position, TotalTime, ApprovDate, ApprovUser, - STATUS, + EnvNum, + NumErr, NumOrders, NumItems, - Position, NumStacks, NumSheets}; rowBatchListRow.ItemArray = columnValuesArray; @@ -1254,13 +1276,15 @@ namespace AppData { this.columnDueDate = base.Columns["DueDate"]; this.columnNestingReq = base.Columns["NestingReq"]; this.columnNestingResp = base.Columns["NestingResp"]; + this.columnSTATUS = base.Columns["STATUS"]; + this.columnPosition = base.Columns["Position"]; this.columnTotalTime = base.Columns["TotalTime"]; this.columnApprovDate = base.Columns["ApprovDate"]; this.columnApprovUser = base.Columns["ApprovUser"]; - this.columnSTATUS = base.Columns["STATUS"]; + this.columnEnvNum = base.Columns["EnvNum"]; + this.columnNumErr = base.Columns["NumErr"]; this.columnNumOrders = base.Columns["NumOrders"]; this.columnNumItems = base.Columns["NumItems"]; - this.columnPosition = base.Columns["Position"]; this.columnNumStacks = base.Columns["NumStacks"]; this.columnNumSheets = base.Columns["NumSheets"]; } @@ -1278,20 +1302,24 @@ namespace AppData { base.Columns.Add(this.columnNestingReq); this.columnNestingResp = new global::System.Data.DataColumn("NestingResp", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnNestingResp); + this.columnSTATUS = new global::System.Data.DataColumn("STATUS", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnSTATUS); + this.columnPosition = new global::System.Data.DataColumn("Position", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPosition); this.columnTotalTime = new global::System.Data.DataColumn("TotalTime", typeof(decimal), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnTotalTime); this.columnApprovDate = new global::System.Data.DataColumn("ApprovDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnApprovDate); this.columnApprovUser = new global::System.Data.DataColumn("ApprovUser", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnApprovUser); - this.columnSTATUS = new global::System.Data.DataColumn("STATUS", typeof(int), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnSTATUS); + this.columnEnvNum = new global::System.Data.DataColumn("EnvNum", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnEnvNum); + this.columnNumErr = new global::System.Data.DataColumn("NumErr", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnNumErr); this.columnNumOrders = new global::System.Data.DataColumn("NumOrders", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnNumOrders); this.columnNumItems = new global::System.Data.DataColumn("NumItems", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnNumItems); - this.columnPosition = new global::System.Data.DataColumn("Position", typeof(int), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnPosition); this.columnNumStacks = new global::System.Data.DataColumn("NumStacks", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnNumStacks); this.columnNumSheets = new global::System.Data.DataColumn("NumSheets", typeof(int), null, global::System.Data.MappingType.Element); @@ -1307,13 +1335,16 @@ namespace AppData { this.columnTakt.AllowDBNull = false; this.columnTakt.MaxLength = 50; this.columnDueDate.AllowDBNull = false; + this.columnSTATUS.AllowDBNull = false; + this.columnPosition.AllowDBNull = false; this.columnTotalTime.AllowDBNull = false; this.columnApprovUser.AllowDBNull = false; this.columnApprovUser.MaxLength = 50; - this.columnSTATUS.AllowDBNull = false; + this.columnEnvNum.AllowDBNull = false; + this.columnEnvNum.MaxLength = 50; + this.columnNumErr.ReadOnly = true; this.columnNumOrders.ReadOnly = true; this.columnNumItems.ReadOnly = true; - this.columnPosition.AllowDBNull = false; this.columnNumStacks.ReadOnly = true; this.columnNumSheets.ReadOnly = true; } @@ -7883,6 +7914,28 @@ namespace AppData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int STATUS { + get { + return ((int)(this[this.tableBatchList.STATUSColumn])); + } + set { + this[this.tableBatchList.STATUSColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int Position { + get { + return ((int)(this[this.tableBatchList.PositionColumn])); + } + set { + this[this.tableBatchList.PositionColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public decimal TotalTime { @@ -7923,12 +7976,28 @@ namespace AppData { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public int STATUS { + public string EnvNum { get { - return ((int)(this[this.tableBatchList.STATUSColumn])); + return ((string)(this[this.tableBatchList.EnvNumColumn])); } set { - this[this.tableBatchList.STATUSColumn] = value; + this[this.tableBatchList.EnvNumColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int NumErr { + get { + try { + return ((int)(this[this.tableBatchList.NumErrColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'NumErr\' nella tabella \'BatchList\' è DBNull.", e); + } + } + set { + this[this.tableBatchList.NumErrColumn] = value; } } @@ -7964,17 +8033,6 @@ namespace AppData { } } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public int Position { - get { - return ((int)(this[this.tableBatchList.PositionColumn])); - } - set { - this[this.tableBatchList.PositionColumn] = value; - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int NumStacks { @@ -8043,6 +8101,18 @@ namespace AppData { this[this.tableBatchList.ApprovDateColumn] = global::System.Convert.DBNull; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsNumErrNull() { + return this.IsNull(this.tableBatchList.NumErrColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetNumErrNull() { + this[this.tableBatchList.NumErrColumn] = global::System.Convert.DBNull; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsNumOrdersNull() { @@ -11276,13 +11346,15 @@ namespace AppData.DS_AppTableAdapters { tableMapping.ColumnMappings.Add("DueDate", "DueDate"); tableMapping.ColumnMappings.Add("NestingReq", "NestingReq"); tableMapping.ColumnMappings.Add("NestingResp", "NestingResp"); + tableMapping.ColumnMappings.Add("STATUS", "STATUS"); + tableMapping.ColumnMappings.Add("Position", "Position"); tableMapping.ColumnMappings.Add("TotalTime", "TotalTime"); tableMapping.ColumnMappings.Add("ApprovDate", "ApprovDate"); tableMapping.ColumnMappings.Add("ApprovUser", "ApprovUser"); - tableMapping.ColumnMappings.Add("STATUS", "STATUS"); + tableMapping.ColumnMappings.Add("EnvNum", "EnvNum"); + tableMapping.ColumnMappings.Add("NumErr", "NumErr"); tableMapping.ColumnMappings.Add("NumOrders", "NumOrders"); tableMapping.ColumnMappings.Add("NumItems", "NumItems"); - tableMapping.ColumnMappings.Add("Position", "Position"); tableMapping.ColumnMappings.Add("NumStacks", "NumStacks"); tableMapping.ColumnMappings.Add("NumSheets", "NumSheets"); this._adapter.TableMappings.Add(tableMapping); @@ -11301,9 +11373,7 @@ namespace AppData.DS_AppTableAdapters { this._commandCollection = new global::System.Data.SqlClient.SqlCommand[8]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT BatchID, Takt, DueDate, NestingReq, NestingResp, STATUS, Position, " + - "TotalTime, ApprovDate, ApprovUser, NumOrders, NumItems, NumStacks, NumSheets\r\nFR" + - "OM v_BatchList"; + this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_BatchList"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; @@ -11348,6 +11418,7 @@ namespace AppData.DS_AppTableAdapters { this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Status", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EnvNum", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TotalTime", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } @@ -11502,7 +11573,7 @@ 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 updateStatus(global::System.Nullable BatchID, global::System.Nullable Status, global::System.Nullable TotalTime) { + 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[7]; if ((BatchID.HasValue == true)) { command.Parameters[1].Value = ((int)(BatchID.Value)); @@ -11516,11 +11587,17 @@ namespace AppData.DS_AppTableAdapters { else { command.Parameters[2].Value = global::System.DBNull.Value; } - if ((TotalTime.HasValue == true)) { - command.Parameters[3].Value = ((decimal)(TotalTime.Value)); + if ((EnvNum == null)) { + command.Parameters[3].Value = global::System.DBNull.Value; } else { - command.Parameters[3].Value = global::System.DBNull.Value; + command.Parameters[3].Value = ((string)(EnvNum)); + } + if ((TotalTime.HasValue == true)) { + command.Parameters[4].Value = ((decimal)(TotalTime.Value)); + } + else { + command.Parameters[4].Value = global::System.DBNull.Value; } global::System.Data.ConnectionState previousConnectionState = command.Connection.State; if (((command.Connection.State & global::System.Data.ConnectionState.Open) @@ -18829,21 +18906,35 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( [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[2]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[4]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT *\r\nFROM ErrorsLog"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; - this._commandCollection[1].CommandText = "dbo.stp_EL_insert"; + this._commandCollection[1].CommandText = "dbo.stp_EL_deteteByParent"; this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DtRif", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ErrType", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ParentUid", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Uid", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Description", global::System.Data.SqlDbType.NVarChar, 2147483647, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[2].Connection = this.Connection; + this._commandCollection[2].CommandText = "dbo.stp_EL_getByParent"; + this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ErrType", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ParentUid", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[3].Connection = this.Connection; + this._commandCollection[3].CommandText = "dbo.stp_EL_insert"; + this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DtRif", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ErrType", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ParentUid", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Uid", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Description", global::System.Data.SqlDbType.NVarChar, 2147483647, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -18870,12 +18961,35 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( 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.ErrorsLogDataTable getByParent(string ErrType, string ParentUid) { + this.Adapter.SelectCommand = this.CommandCollection[2]; + if ((ErrType == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(ErrType)); + } + if ((ParentUid == null)) { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = ((string)(ParentUid)); + } + DS_App.ErrorsLogDataTable dataTable = new DS_App.ErrorsLogDataTable(); + 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.ErrorsLogDataTable insertQuery(global::System.Nullable DtRif, string ErrType, string ParentUid, string Uid, string Description) { - this.Adapter.SelectCommand = this.CommandCollection[1]; + this.Adapter.SelectCommand = this.CommandCollection[3]; if ((DtRif.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((System.DateTime)(DtRif.Value)); } @@ -18939,6 +19053,40 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( public virtual int Update(global::System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int deteteByParent(string ErrType, string ParentUid) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; + if ((ErrType == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(ErrType)); + } + if ((ParentUid == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(ParentUid)); + } + 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; + } } /// diff --git a/AppData/DS_App.cs b/AppData/DS_App.cs index 9784dd1..bcc4c3a 100644 --- a/AppData/DS_App.cs +++ b/AppData/DS_App.cs @@ -2,9 +2,9 @@ { - partial class DS_App - { - } + partial class DS_App + { + } } namespace AppData.DS_AppTableAdapters { diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index 92fb525..9de5c2b 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -12,8 +12,8 @@ - SELECT BatchID, Takt, DueDate, NestingReq, NestingResp, STATUS, Position, TotalTime, ApprovDate, ApprovUser, NumOrders, NumItems, NumStacks, NumSheets -FROM v_BatchList + SELECT * +FROM v_BatchList @@ -25,13 +25,15 @@ FROM v_BatchList + + - + + - @@ -110,6 +112,7 @@ FROM v_BatchList + @@ -1771,6 +1774,30 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( + + + + dbo.stp_EL_deteteByParent + + + + + + + + + + + + dbo.stp_EL_getByParent + + + + + + + + @@ -1796,7 +1823,7 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( - + @@ -1810,6 +1837,8 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( + + @@ -1819,16 +1848,22 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( - + + + + + + + + - - + @@ -1850,7 +1885,7 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( - + @@ -1905,7 +1940,7 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( - + @@ -1978,7 +2013,7 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( - + @@ -1986,7 +2021,7 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( - + @@ -2055,7 +2090,7 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( - + @@ -2088,7 +2123,7 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( - + @@ -2111,7 +2146,7 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( - + @@ -2127,7 +2162,7 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( - + @@ -2151,7 +2186,7 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( - + @@ -2159,7 +2194,7 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( - + @@ -2176,7 +2211,7 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( - + @@ -2185,7 +2220,7 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( - + @@ -2216,7 +2251,7 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( - + @@ -2224,7 +2259,7 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( - + @@ -2240,7 +2275,7 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( - + @@ -2248,7 +2283,7 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( - + @@ -2276,7 +2311,7 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( - + @@ -2396,18 +2431,18 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( - - - - - - - - - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/AppData/DS_App.xss b/AppData/DS_App.xss index e6c4c97..3d5a6d1 100644 --- a/AppData/DS_App.xss +++ b/AppData/DS_App.xss @@ -6,25 +6,25 @@ --> - - - + + + - + - - + + - + - - - - - - + + + + + + @@ -66,7 +66,7 @@ - 805 + 788 122 @@ -111,7 +111,7 @@ - + 1129 @@ -147,7 +147,7 @@ - + 131 @@ -159,14 +159,14 @@ - + 352 293 - 206 + 247 293 diff --git a/Jenkinsfile b/Jenkinsfile index db028da..ac6e39b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=134']) { + withEnv(['NEXT_BUILD_NUMBER=135']) { // env.versionNumber = VersionNumber(versionNumberString : '0.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '0.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'NKC' diff --git a/NKC_SDK/Objects.cs b/NKC_SDK/Objects.cs index 06ba2fe..b465bc1 100644 --- a/NKC_SDK/Objects.cs +++ b/NKC_SDK/Objects.cs @@ -267,7 +267,7 @@ namespace NKC_SDK /// /// Elenco errori riscontrati /// - public List ErrorsList { get; set; } = null; + public List ErrorList { get; set; } = null; } /// /// Risposta NESTING x la STIMA iniziale diff --git a/NKC_WF/Controllers/BatchProcController.cs b/NKC_WF/Controllers/BatchProcController.cs index e2031c6..3d1771b 100644 --- a/NKC_WF/Controllers/BatchProcController.cs +++ b/NKC_WF/Controllers/BatchProcController.cs @@ -98,9 +98,21 @@ namespace NKC_WF.Controllers memLayer.ML.setRSV(redKey, content); // deserializzo. - baseNestAnsw currBunk = JsonConvert.DeserializeObject(content); + baseNestAnsw batchProcAnsw = JsonConvert.DeserializeObject(content); + // se ho errori inizioa salvarli... + if (batchProcAnsw.ErrorList.Count > 0) + { + // procedura idempotente: elimino eventuali dati della "busta" precedente... + DataLayer.man.taEL.deteteByParent("", batchProcAnsw.EnvNum); + // ora insert + foreach (var item in batchProcAnsw.ErrorList) + { + // salvo log errore... + DataLayer.man.taEL.insertQuery(DateTime.Now, item.ErrType, $"{batchProcAnsw.EnvNum}", $"{item.Uid}", $"{item.Description}"); + } + } // se non nullo... - if (currBunk != null) + if (batchProcAnsw != null) { /************************************************* * IN BASE al tipo di risposta saprò se @@ -109,9 +121,9 @@ namespace NKC_WF.Controllers * ... * *************************************************/ - if (currBunk.OrderType == oType.BatchRequest) + if (batchProcAnsw.OrderType == oType.BatchRequest) { - if (currBunk.ProcType == 1) + if (batchProcAnsw.ProcType == 1) { int bStatus = 0; // deserializzo come BatchreqIniziale (stima) @@ -139,7 +151,7 @@ namespace NKC_WF.Controllers break; } // SALVO info riguardo al batch running - DataLayer.man.taBL.updateStatus(rispStima.BatchID, bStatus, (decimal)rispStima.EstimatedWorktime); + DataLayer.man.taBL.updateStatus(rispStima.BatchID, bStatus, rispStima.EnvNum, (decimal)rispStima.EstimatedWorktime); // salvo udpate elenco ITEMS ComLib.updatePartsFromNesting(rispStima.PartList); // aggiorno cadPath x items che non abbiano valorizzato... @@ -175,7 +187,7 @@ namespace NKC_WF.Controllers break; } // SALVO info riguardo al batch completato - DataLayer.man.taBL.updateStatus(rispNest.BatchID, bStatus, (decimal)rispNest.EstimatedWorktime); + DataLayer.man.taBL.updateStatus(rispNest.BatchID, bStatus, rispNest.EnvNum, (decimal)rispNest.EstimatedWorktime); // aggiorno il resto SOLO SE status == completo... if (rispNest.ProcessStatus == procStatus.completed) { @@ -189,7 +201,7 @@ namespace NKC_WF.Controllers answ = "OK"; } } - else if (currBunk.OrderType == oType.OfflineOrder) + else if (batchProcAnsw.OrderType == oType.OfflineOrder) { // deserializzo come OfflineOrder nestReplyOffOrd rispNest = JsonConvert.DeserializeObject(content); diff --git a/NKC_WF/ErrorsLog.aspx b/NKC_WF/ErrorsLog.aspx new file mode 100644 index 0000000..2f5b179 --- /dev/null +++ b/NKC_WF/ErrorsLog.aspx @@ -0,0 +1,16 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/SiteContent.master" AutoEventWireup="true" CodeBehind="ErrorsLog.aspx.cs" Inherits="NKC_WF.ErrorsLog" %> + +<%@ Register Src="~/WebUserControls/cmp_ErrorsLog.ascx" TagPrefix="uc1" TagName="cmp_ErrorsLog" %> + + + +
+
+ Errors List +
+
+ +
+
+ +
diff --git a/NKC_WF/ErrorsLog.aspx.cs b/NKC_WF/ErrorsLog.aspx.cs new file mode 100644 index 0000000..973883f --- /dev/null +++ b/NKC_WF/ErrorsLog.aspx.cs @@ -0,0 +1,21 @@ +using SteamWare; +using System; +using System.Web.UI; + +namespace NKC_WF +{ + public partial class ErrorsLog : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + string PUID = memLayer.ML.QSS("PUID"); + if (PUID != "") + { + cmp_ErrorsLog.Puid = PUID; + } + } + } + } +} \ No newline at end of file diff --git a/NKC_WF/ErrorsLog.aspx.designer.cs b/NKC_WF/ErrorsLog.aspx.designer.cs new file mode 100644 index 0000000..0a345b7 --- /dev/null +++ b/NKC_WF/ErrorsLog.aspx.designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace NKC_WF +{ + + + public partial class ErrorsLog + { + + /// + /// Controllo cmp_ErrorsLog. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::NKC_WF.WebUserControls.cmp_ErrorsLog cmp_ErrorsLog; + } +} diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index b725a16..57e854d 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -257,6 +257,7 @@ SheetColor.css + @@ -280,6 +281,7 @@ + @@ -453,6 +455,13 @@ DevUtils.aspx + + ErrorsLog.aspx + ASPXCodeBehind + + + ErrorsLog.aspx + Global.asax @@ -611,6 +620,13 @@ cmp_devUtils.ascx + + cmp_ErrorsLog.ascx + ASPXCodeBehind + + + cmp_ErrorsLog.ascx + cmp_fileUpload.ascx diff --git a/NKC_WF/WebUserControls/cmp_ErrorsLog.ascx b/NKC_WF/WebUserControls/cmp_ErrorsLog.ascx new file mode 100644 index 0000000..436c1a8 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_ErrorsLog.ascx @@ -0,0 +1,19 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_ErrorsLog.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_ErrorsLog" %> + + + + <%----%> + + + + + + + + + + + + + + \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_ErrorsLog.ascx.cs b/NKC_WF/WebUserControls/cmp_ErrorsLog.ascx.cs new file mode 100644 index 0000000..c3ff8c6 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_ErrorsLog.ascx.cs @@ -0,0 +1,27 @@ +using System; + +namespace NKC_WF.WebUserControls +{ + public partial class cmp_ErrorsLog : System.Web.UI.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + /// + /// PArametro filtraggio errori + /// + public string Puid + { + get + { + return hfPuid.Value; + } + set + { + hfPuid.Value = value; + grView.DataBind(); + } + } + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_ErrorsLog.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_ErrorsLog.ascx.designer.cs new file mode 100644 index 0000000..c1b0999 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_ErrorsLog.ascx.designer.cs @@ -0,0 +1,44 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace NKC_WF.WebUserControls +{ + + + public partial class cmp_ErrorsLog + { + + /// + /// Controllo grView. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.GridView grView; + + /// + /// Controllo ods. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource ods; + + /// + /// Controllo hfPuid. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfPuid; + } +} diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs index 45066a8..2b68a39 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs @@ -72,7 +72,7 @@ namespace NKC_WF.WebUserControls // !!!FIXME!!! inviare a redis... // registro su DB nesting iniziato... - DataLayer.man.taBL.updateStatus(BatchId, (int)BatchStatus.Imported, -1); + DataLayer.man.taBL.updateStatus(BatchId, (int)BatchStatus.Imported, "", -1); raiseEvent(); } @@ -83,7 +83,7 @@ namespace NKC_WF.WebUserControls ComLib.sendBatchReq(BatchId, "Estimation"); // registro su DB nesting iniziato... - DataLayer.man.taBL.updateStatus(BatchId, (int)BatchStatus.EstimationRequested, 0); + DataLayer.man.taBL.updateStatus(BatchId, (int)BatchStatus.EstimationRequested, "", 0); raiseEvent(); } protected void lbtStopNesting_Click(object sender, EventArgs e) @@ -91,7 +91,7 @@ namespace NKC_WF.WebUserControls // !!!FIXME!!! inviare a redis... // registro su DB nesting iniziato... - DataLayer.man.taBL.updateStatus(BatchId, (int)BatchStatus.EstimationDone, -1); + DataLayer.man.taBL.updateStatus(BatchId, (int)BatchStatus.EstimationDone, "", -1); raiseEvent(); } @@ -102,7 +102,7 @@ namespace NKC_WF.WebUserControls ComLib.sendBatchReq(BatchId, "Nesting"); // registro su DB nesting iniziato... - DataLayer.man.taBL.updateStatus(BatchId, (int)BatchStatus.NestRequested, -1); + DataLayer.man.taBL.updateStatus(BatchId, (int)BatchStatus.NestRequested, "", -1); raiseEvent(); } diff --git a/NKC_WF/WebUserControls/cmp_batchList.ascx b/NKC_WF/WebUserControls/cmp_batchList.ascx index 8847b36..a0322b8 100644 --- a/NKC_WF/WebUserControls/cmp_batchList.ascx +++ b/NKC_WF/WebUserControls/cmp_batchList.ascx @@ -55,7 +55,15 @@ <%# BStatus(Eval("Status")) %> - + + + <%# Eval("NumErr") %> err + + + + + +