diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index 219e1fe..057bcd4 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -62,6 +62,8 @@ namespace AppData { private ErrorsLogDataTable tableErrorsLog; + private ItemValidationDataTable tableItemValidation; + private global::System.Data.DataRelation relationFK_BatchReqList_OrderList; private global::System.Data.DataRelation relationFK_ItemList_Materials1; @@ -171,6 +173,9 @@ namespace AppData { if ((ds.Tables["ErrorsLog"] != null)) { base.Tables.Add(new ErrorsLogDataTable(ds.Tables["ErrorsLog"])); } + if ((ds.Tables["ItemValidation"] != null)) { + base.Tables.Add(new ItemValidationDataTable(ds.Tables["ItemValidation"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -379,6 +384,16 @@ namespace AppData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public ItemValidationDataTable ItemValidation { + get { + return this.tableItemValidation; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.BrowsableAttribute(true)] @@ -503,6 +518,9 @@ namespace AppData { if ((ds.Tables["ErrorsLog"] != null)) { base.Tables.Add(new ErrorsLogDataTable(ds.Tables["ErrorsLog"])); } + if ((ds.Tables["ItemValidation"] != null)) { + base.Tables.Add(new ItemValidationDataTable(ds.Tables["ItemValidation"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -650,6 +668,12 @@ namespace AppData { this.tableErrorsLog.InitVars(); } } + this.tableItemValidation = ((ItemValidationDataTable)(base.Tables["ItemValidation"])); + if ((initTable == true)) { + if ((this.tableItemValidation != null)) { + this.tableItemValidation.InitVars(); + } + } this.relationFK_BatchReqList_OrderList = this.Relations["FK_BatchReqList_OrderList"]; this.relationFK_ItemList_Materials1 = this.Relations["FK_ItemList_Materials1"]; this.relationFK_OffOrd2Item_OfflineOrderList = this.Relations["FK_OffOrd2Item_OfflineOrderList"]; @@ -710,6 +734,8 @@ namespace AppData { base.Tables.Add(this.tableCounters); this.tableErrorsLog = new ErrorsLogDataTable(); base.Tables.Add(this.tableErrorsLog); + this.tableItemValidation = new ItemValidationDataTable(); + base.Tables.Add(this.tableItemValidation); this.relationFK_BatchReqList_OrderList = new global::System.Data.DataRelation("FK_BatchReqList_OrderList", new global::System.Data.DataColumn[] { this.tableOrderList.OrdIDColumn}, new global::System.Data.DataColumn[] { this.tableBatchReqList.OrdIDColumn}, false); @@ -874,6 +900,12 @@ namespace AppData { return false; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private bool ShouldSerializeItemValidation() { + return false; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { @@ -986,6 +1018,9 @@ namespace AppData { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public delegate void ErrorsLogRowChangeEventHandler(object sender, ErrorsLogRowChangeEvent e); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public delegate void ItemValidationRowChangeEventHandler(object sender, ItemValidationRowChangeEvent e); + /// ///Represents the strongly named DataTable class. /// @@ -7866,6 +7901,309 @@ namespace AppData { } } + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class ItemValidationDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnItemExtCode; + + private global::System.Data.DataColumn columnBatchID; + + private global::System.Data.DataColumn columnEvalDate; + + private global::System.Data.DataColumn columnStatus; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ItemValidationDataTable() { + this.TableName = "ItemValidation"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal ItemValidationDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected ItemValidationDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn ItemExtCodeColumn { + get { + return this.columnItemExtCode; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn BatchIDColumn { + get { + return this.columnBatchID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn EvalDateColumn { + get { + return this.columnEvalDate; + } + } + + [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")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ItemValidationRow this[int index] { + get { + return ((ItemValidationRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ItemValidationRowChangeEventHandler ItemValidationRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ItemValidationRowChangeEventHandler ItemValidationRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ItemValidationRowChangeEventHandler ItemValidationRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ItemValidationRowChangeEventHandler ItemValidationRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void AddItemValidationRow(ItemValidationRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ItemValidationRow AddItemValidationRow(string ItemExtCode, int BatchID, System.DateTime EvalDate, int Status) { + ItemValidationRow rowItemValidationRow = ((ItemValidationRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + ItemExtCode, + BatchID, + EvalDate, + Status}; + rowItemValidationRow.ItemArray = columnValuesArray; + this.Rows.Add(rowItemValidationRow); + return rowItemValidationRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ItemValidationRow FindByItemExtCode(string ItemExtCode) { + return ((ItemValidationRow)(this.Rows.Find(new object[] { + ItemExtCode}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataTable Clone() { + ItemValidationDataTable cln = ((ItemValidationDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new ItemValidationDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.columnItemExtCode = base.Columns["ItemExtCode"]; + this.columnBatchID = base.Columns["BatchID"]; + this.columnEvalDate = base.Columns["EvalDate"]; + this.columnStatus = base.Columns["Status"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.columnItemExtCode = new global::System.Data.DataColumn("ItemExtCode", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnItemExtCode); + this.columnBatchID = new global::System.Data.DataColumn("BatchID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnBatchID); + this.columnEvalDate = new global::System.Data.DataColumn("EvalDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnEvalDate); + this.columnStatus = new global::System.Data.DataColumn("Status", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnStatus); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnItemExtCode}, true)); + this.columnItemExtCode.AllowDBNull = false; + this.columnItemExtCode.Unique = true; + this.columnItemExtCode.MaxLength = 250; + this.columnBatchID.AllowDBNull = false; + this.columnStatus.AllowDBNull = false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ItemValidationRow NewItemValidationRow() { + return ((ItemValidationRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new ItemValidationRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(ItemValidationRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.ItemValidationRowChanged != null)) { + this.ItemValidationRowChanged(this, new ItemValidationRowChangeEvent(((ItemValidationRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.ItemValidationRowChanging != null)) { + this.ItemValidationRowChanging(this, new ItemValidationRowChangeEvent(((ItemValidationRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.ItemValidationRowDeleted != null)) { + this.ItemValidationRowDeleted(this, new ItemValidationRowChangeEvent(((ItemValidationRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.ItemValidationRowDeleting != null)) { + this.ItemValidationRowDeleting(this, new ItemValidationRowChangeEvent(((ItemValidationRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void RemoveItemValidationRow(ItemValidationRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + DS_App ds = new DS_App(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "ItemValidationDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + /// ///Represents strongly named DataRow class. /// @@ -10629,6 +10967,82 @@ namespace AppData { } } + /// + ///Represents strongly named DataRow class. + /// + public partial class ItemValidationRow : global::System.Data.DataRow { + + private ItemValidationDataTable tableItemValidation; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal ItemValidationRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableItemValidation = ((ItemValidationDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string ItemExtCode { + get { + return ((string)(this[this.tableItemValidation.ItemExtCodeColumn])); + } + set { + this[this.tableItemValidation.ItemExtCodeColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int BatchID { + get { + return ((int)(this[this.tableItemValidation.BatchIDColumn])); + } + set { + this[this.tableItemValidation.BatchIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public System.DateTime EvalDate { + get { + try { + return ((global::System.DateTime)(this[this.tableItemValidation.EvalDateColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'EvalDate\' nella tabella \'ItemValidation\' è DBNull.", e); + } + } + set { + this[this.tableItemValidation.EvalDateColumn] = value; + } + } + + [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.tableItemValidation.StatusColumn])); + } + set { + this[this.tableItemValidation.StatusColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsEvalDateNull() { + return this.IsNull(this.tableItemValidation.EvalDateColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetEvalDateNull() { + this[this.tableItemValidation.EvalDateColumn] = global::System.Convert.DBNull; + } + } + /// ///Row event argument class /// @@ -11274,6 +11688,40 @@ namespace AppData { } } } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public class ItemValidationRowChangeEvent : global::System.EventArgs { + + private ItemValidationRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ItemValidationRowChangeEvent(ItemValidationRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ItemValidationRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } } } namespace AppData.DS_AppTableAdapters { @@ -19172,6 +19620,270 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( } } + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class ItemValidationTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ItemValidationTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "ItemValidation"; + tableMapping.ColumnMappings.Add("ItemExtCode", "ItemExtCode"); + tableMapping.ColumnMappings.Add("BatchID", "BatchID"); + tableMapping.ColumnMappings.Add("EvalDate", "EvalDate"); + tableMapping.ColumnMappings.Add("Status", "Status"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = "DELETE FROM [ItemValidation] WHERE (([ItemExtCode] = @Original_ItemExtCode) AND (" + + "[BatchID] = @Original_BatchID) AND ((@IsNull_EvalDate = 1 AND [EvalDate] IS NULL" + + ") OR ([EvalDate] = @Original_EvalDate)) AND ([Status] = @Original_Status))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ItemExtCode", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ItemExtCode", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BatchID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BatchID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_EvalDate", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EvalDate", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_EvalDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EvalDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Status", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Status", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.CommandText = "INSERT INTO [ItemValidation] ([ItemExtCode], [BatchID], [EvalDate], [Status]) VAL" + + "UES (@ItemExtCode, @BatchID, @EvalDate, @Status);\r\nSELECT ItemExtCode, BatchID, " + + "EvalDate, Status FROM ItemValidation WHERE (ItemExtCode = @ItemExtCode)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ItemExtCode", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ItemExtCode", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BatchID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EvalDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EvalDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Status", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Status", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.CommandText = @"UPDATE [ItemValidation] SET [ItemExtCode] = @ItemExtCode, [BatchID] = @BatchID, [EvalDate] = @EvalDate, [Status] = @Status WHERE (([ItemExtCode] = @Original_ItemExtCode) AND ([BatchID] = @Original_BatchID) AND ((@IsNull_EvalDate = 1 AND [EvalDate] IS NULL) OR ([EvalDate] = @Original_EvalDate)) AND ([Status] = @Original_Status)); +SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExtCode = @ItemExtCode)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ItemExtCode", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ItemExtCode", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BatchID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EvalDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EvalDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Status", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Status", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ItemExtCode", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ItemExtCode", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BatchID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BatchID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_EvalDate", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EvalDate", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_EvalDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EvalDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Status", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Status", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::AppData.Properties.Settings.Default.Sauder_NKCConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "select * from ItemValidation"; + 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_IV_upsertQuery"; + 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("@ItemExtCode", 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("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(DS_App.ItemValidationDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual DS_App.ItemValidationDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + DS_App.ItemValidationDataTable dataTable = new DS_App.ItemValidationDataTable(); + 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.ItemValidationDataTable upsertQuery(string ItemExtCode, global::System.Nullable BatchID) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((ItemExtCode == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(ItemExtCode)); + } + if ((BatchID.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[2].Value = ((int)(BatchID.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + DS_App.ItemValidationDataTable dataTable = new DS_App.ItemValidationDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(DS_App.ItemValidationDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(DS_App dataSet) { + return this.Adapter.Update(dataSet, "ItemValidation"); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow dataRow) { + return this.Adapter.Update(new global::System.Data.DataRow[] { + dataRow}); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow[] dataRows) { + return this.Adapter.Update(dataRows); + } + } + /// ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios /// @@ -19212,6 +19924,8 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( private ErrorsLogTableAdapter _errorsLogTableAdapter; + private ItemValidationTableAdapter _itemValidationTableAdapter; + private bool _backupDataSetBeforeUpdate; private global::System.Data.IDbConnection _connection; @@ -19423,6 +20137,20 @@ 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")] + [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + + "a", "System.Drawing.Design.UITypeEditor")] + public ItemValidationTableAdapter ItemValidationTableAdapter { + get { + return this._itemValidationTableAdapter; + } + set { + this._itemValidationTableAdapter = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool BackupDataSetBeforeUpdate { @@ -19498,6 +20226,10 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( && (this._errorsLogTableAdapter.Connection != null))) { return this._errorsLogTableAdapter.Connection; } + if (((this._itemValidationTableAdapter != null) + && (this._itemValidationTableAdapter.Connection != null))) { + return this._itemValidationTableAdapter.Connection; + } return null; } set { @@ -19553,6 +20285,9 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( if ((this._errorsLogTableAdapter != null)) { count = (count + 1); } + if ((this._itemValidationTableAdapter != null)) { + count = (count + 1); + } return count; } } @@ -19627,6 +20362,15 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( allChangedRows.AddRange(updatedRows); } } + if ((this._countersTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.Counters.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._countersTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } if ((this._order2FinalKitTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.Order2FinalKit.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -19645,33 +20389,6 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( allChangedRows.AddRange(updatedRows); } } - if ((this._nestingTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.Nesting.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); - updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); - if (((updatedRows != null) - && (0 < updatedRows.Length))) { - result = (result + this._nestingTableAdapter.Update(updatedRows)); - allChangedRows.AddRange(updatedRows); - } - } - if ((this._countersTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.Counters.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); - updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); - if (((updatedRows != null) - && (0 < updatedRows.Length))) { - result = (result + this._countersTableAdapter.Update(updatedRows)); - allChangedRows.AddRange(updatedRows); - } - } - if ((this._batchReqListTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.BatchReqList.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); - updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); - if (((updatedRows != null) - && (0 < updatedRows.Length))) { - result = (result + this._batchReqListTableAdapter.Update(updatedRows)); - allChangedRows.AddRange(updatedRows); - } - } if ((this._offOrd2ItemTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.OffOrd2Item.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -19690,6 +20407,33 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( allChangedRows.AddRange(updatedRows); } } + if ((this._batchReqListTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.BatchReqList.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._batchReqListTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + if ((this._nestingTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.Nesting.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._nestingTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + if ((this._itemValidationTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.ItemValidation.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._itemValidationTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } return result; } @@ -19756,6 +20500,14 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( allAddedRows.AddRange(addedRows); } } + if ((this._countersTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.Counters.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._countersTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } if ((this._order2FinalKitTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.Order2FinalKit.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -19772,30 +20524,6 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( allAddedRows.AddRange(addedRows); } } - if ((this._nestingTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.Nesting.Select(null, null, global::System.Data.DataViewRowState.Added); - if (((addedRows != null) - && (0 < addedRows.Length))) { - result = (result + this._nestingTableAdapter.Update(addedRows)); - allAddedRows.AddRange(addedRows); - } - } - if ((this._countersTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.Counters.Select(null, null, global::System.Data.DataViewRowState.Added); - if (((addedRows != null) - && (0 < addedRows.Length))) { - result = (result + this._countersTableAdapter.Update(addedRows)); - allAddedRows.AddRange(addedRows); - } - } - if ((this._batchReqListTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.BatchReqList.Select(null, null, global::System.Data.DataViewRowState.Added); - if (((addedRows != null) - && (0 < addedRows.Length))) { - result = (result + this._batchReqListTableAdapter.Update(addedRows)); - allAddedRows.AddRange(addedRows); - } - } if ((this._offOrd2ItemTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.OffOrd2Item.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -19812,6 +20540,30 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( allAddedRows.AddRange(addedRows); } } + if ((this._batchReqListTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.BatchReqList.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._batchReqListTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + if ((this._nestingTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.Nesting.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._nestingTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + if ((this._itemValidationTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.ItemValidation.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._itemValidationTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } return result; } @@ -19822,6 +20574,30 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private int UpdateDeletedRows(DS_App dataSet, global::System.Collections.Generic.List allChangedRows) { int result = 0; + if ((this._itemValidationTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.ItemValidation.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._itemValidationTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + if ((this._nestingTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.Nesting.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._nestingTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + if ((this._batchReqListTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.BatchReqList.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._batchReqListTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } if ((this._errorsLogTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.ErrorsLog.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -19838,30 +20614,6 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( allChangedRows.AddRange(deletedRows); } } - if ((this._batchReqListTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.BatchReqList.Select(null, null, global::System.Data.DataViewRowState.Deleted); - if (((deletedRows != null) - && (0 < deletedRows.Length))) { - result = (result + this._batchReqListTableAdapter.Update(deletedRows)); - allChangedRows.AddRange(deletedRows); - } - } - if ((this._countersTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.Counters.Select(null, null, global::System.Data.DataViewRowState.Deleted); - if (((deletedRows != null) - && (0 < deletedRows.Length))) { - result = (result + this._countersTableAdapter.Update(deletedRows)); - allChangedRows.AddRange(deletedRows); - } - } - if ((this._nestingTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.Nesting.Select(null, null, global::System.Data.DataViewRowState.Deleted); - if (((deletedRows != null) - && (0 < deletedRows.Length))) { - result = (result + this._nestingTableAdapter.Update(deletedRows)); - allChangedRows.AddRange(deletedRows); - } - } if ((this._binListTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.BinList.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -19878,6 +20630,14 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( allChangedRows.AddRange(deletedRows); } } + if ((this._countersTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.Counters.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._countersTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } if ((this._binsTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.Bins.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -20043,6 +20803,11 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( throw new global::System.ArgumentException("Tutti gli oggetti TableAdapter gestiti da TableAdapterManager devono utilizzare l" + "a stessa stringa di connessione."); } + if (((this._itemValidationTableAdapter != null) + && (this.MatchTableAdapterConnection(this._itemValidationTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("Tutti gli oggetti TableAdapter gestiti da TableAdapterManager devono utilizzare l" + + "a stessa stringa di connessione."); + } global::System.Data.IDbConnection workConnection = this.Connection; if ((workConnection == null)) { throw new global::System.ApplicationException("TableAdapterManager non contiene informazioni di connessione. Impostare la propri" + @@ -20202,6 +20967,15 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( adaptersWithAcceptChangesDuringUpdate.Add(this._errorsLogTableAdapter.Adapter); } } + if ((this._itemValidationTableAdapter != null)) { + revertConnections.Add(this._itemValidationTableAdapter, this._itemValidationTableAdapter.Connection); + this._itemValidationTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._itemValidationTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._itemValidationTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._itemValidationTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._itemValidationTableAdapter.Adapter); + } + } // //---- Perform updates ----------- // @@ -20316,6 +21090,10 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( this._errorsLogTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._errorsLogTableAdapter])); this._errorsLogTableAdapter.Transaction = null; } + if ((this._itemValidationTableAdapter != null)) { + this._itemValidationTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._itemValidationTableAdapter])); + this._itemValidationTableAdapter.Transaction = null; + } if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) { global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count]; adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters); diff --git a/AppData/DS_App.cs b/AppData/DS_App.cs index bcc4c3a..02111b2 100644 --- a/AppData/DS_App.cs +++ b/AppData/DS_App.cs @@ -2,14 +2,7 @@ { - partial class DS_App - { - } -} - -namespace AppData.DS_AppTableAdapters { - - - public partial class ItemListTableAdapter { - } + partial class DS_App + { + } } diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index 9485971..8c1814c 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -1826,6 +1826,79 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( + + + + + + DELETE FROM [ItemValidation] WHERE (([ItemExtCode] = @Original_ItemExtCode) AND ([BatchID] = @Original_BatchID) AND ((@IsNull_EvalDate = 1 AND [EvalDate] IS NULL) OR ([EvalDate] = @Original_EvalDate)) AND ([Status] = @Original_Status)) + + + + + + + + + + + + INSERT INTO [ItemValidation] ([ItemExtCode], [BatchID], [EvalDate], [Status]) VALUES (@ItemExtCode, @BatchID, @EvalDate, @Status); +SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExtCode = @ItemExtCode) + + + + + + + + + + + select * from ItemValidation + + + + + + UPDATE [ItemValidation] SET [ItemExtCode] = @ItemExtCode, [BatchID] = @BatchID, [EvalDate] = @EvalDate, [Status] = @Status WHERE (([ItemExtCode] = @Original_ItemExtCode) AND ([BatchID] = @Original_BatchID) AND ((@IsNull_EvalDate = 1 AND [EvalDate] IS NULL) OR ([EvalDate] = @Original_EvalDate)) AND ([Status] = @Original_Status)); +SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExtCode = @ItemExtCode) + + + + + + + + + + + + + + + + + + + + + + + + + + dbo.stp_IV_upsertQuery + + + + + + + + + + @@ -2359,6 +2432,22 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( + + + + + + + + + + + + + + + + @@ -2440,6 +2529,10 @@ SELECT ErrID, DtRif, ErrType, ParentUid, Uid, Description FROM ErrorsLog WHERE ( + + + + diff --git a/AppData/DS_App.xss b/AppData/DS_App.xss index 3d5a6d1..90cc80b 100644 --- a/AppData/DS_App.xss +++ b/AppData/DS_App.xss @@ -4,30 +4,31 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - + 352 @@ -39,7 +40,7 @@ - + 1197 @@ -51,7 +52,7 @@ - + 1140 @@ -63,7 +64,7 @@ - + 788 @@ -75,7 +76,7 @@ - + 973 @@ -87,7 +88,7 @@ - + 694 @@ -99,7 +100,7 @@ - + 550 @@ -111,7 +112,7 @@ - + 1129 @@ -123,7 +124,7 @@ - + 1359 @@ -135,7 +136,7 @@ - + 1161 @@ -147,7 +148,7 @@ - + 131 @@ -159,7 +160,7 @@ - + 352 diff --git a/AppData/DataLayer.cs b/AppData/DataLayer.cs index bccc0da..268a49e 100644 --- a/AppData/DataLayer.cs +++ b/AppData/DataLayer.cs @@ -16,6 +16,7 @@ namespace AppData public DS_AppTableAdapters.ErrorsLogTableAdapter taEL; public DS_AppTableAdapters.ItemListTableAdapter taIL; public DS_AppTableAdapters.ImportLogTableAdapter taImpLog; + public DS_AppTableAdapters.ItemValidationTableAdapter taIV; public DS_AppTableAdapters.KitListTableAdapter taKL; public DS_AppTableAdapters.MaterialsTableAdapter taMat; public DS_AppTableAdapters.NestingTableAdapter taNest; @@ -47,6 +48,7 @@ namespace AppData taEL.Connection.ConnectionString = connString; taIL.Connection.ConnectionString = connString; taImpLog.Connection.ConnectionString = connString; + taIV.Connection.ConnectionString = connString; taKL.Connection.ConnectionString = connString; taMat.Connection.ConnectionString = connString; taNest.Connection.ConnectionString = connString; @@ -70,6 +72,7 @@ namespace AppData taEL = new DS_AppTableAdapters.ErrorsLogTableAdapter(); taIL = new DS_AppTableAdapters.ItemListTableAdapter(); taImpLog = new DS_AppTableAdapters.ImportLogTableAdapter(); + taIV = new DS_AppTableAdapters.ItemValidationTableAdapter(); taKL = new DS_AppTableAdapters.KitListTableAdapter(); taMat = new DS_AppTableAdapters.MaterialsTableAdapter(); taNest = new DS_AppTableAdapters.NestingTableAdapter(); diff --git a/NKC_WF/OrderManager.aspx.cs b/NKC_WF/OrderManager.aspx.cs index da5fbdc..667c423 100644 --- a/NKC_WF/OrderManager.aspx.cs +++ b/NKC_WF/OrderManager.aspx.cs @@ -42,12 +42,35 @@ namespace NKC_WF /// private void Cmp_fileUpload_eh_FileUploaded(object sender, WebUserContols.FileUploadEventArgs e) { + + /*-------------------------------------------- + * Note validazione: + * - leggo cSV + * - carico su DB + * - verifico (coem ora x DXF) TTTI i aprticolari + * - cerco su tab ItemValidation + * --> NON TROVATO --> creo record IV + record Batch stato 8, con KitID = OrdID = 0, DA VALUTARE!!! + * - se valutazione tempo <= 1 sec --> NON VALIDO + * - se valutazione tempo > 1 sec --> VALIDO + * + * --> trovato + * - se valido --> check DXF, + * --> dxf ok --> finito + * --> dxf non trovato --> NON VALIDO, segnalo errore su part + * - se NON valido --> segnalo errore su part + * + *--------------------------------------------*/ + + // valutare cambio 9/10 x OK/KO (in modo che 8-9 sono NON ok, 10 è OK... --> su DB e su classe enum... + bool dataValidated = true; DateTime adesso = DateTime.Now; string dirFrom = e.LocalPath; string dirTo = $"{_SqlCopyDir}{adesso.ToString("yyyy-MM")}\\"; string dirImport = $"{_SqlImportDir}{adesso.ToString("yyyy-MM")}\\"; int batchID = 0; + // recupero elenco parti validate... + DS_App.ItemListDataTable ItemValitadion = DataLayer.man.taIL.GetData(); // preporcessing file: leggo e correggo: // - sostituisco "," --> ";" come separatore // - tolgo "" e spazi da stringa @@ -77,6 +100,31 @@ namespace NKC_WF // ricombino! fixLines[numRow] = newLine; numRow++; + // cerco codice ITEM... + string[] rawData = newLine.Split(';'); + if (rawData.Length > 8) + { + string currItemExtCode = rawData[7]; + try + { + //cerco nell'elenco + var rigaIV = ItemValitadion.Select($"ItemExtCode = {currItemExtCode}"); + if (rigaIV == null) + { + // inserisco OfflineOrder + + // inserisco Item + + // inserisco OfflineOrder2Item + + + + + } + } + catch + { } + } } // salvo NUOVO file... System.IO.File.WriteAllLines($"{e.LocalPath}{e.FileName}", fixLines); diff --git a/NKC_WF/WebUserControls/cmp_batchList.ascx b/NKC_WF/WebUserControls/cmp_batchList.ascx index e1564a1..b88c350 100644 --- a/NKC_WF/WebUserControls/cmp_batchList.ascx +++ b/NKC_WF/WebUserControls/cmp_batchList.ascx @@ -15,8 +15,8 @@

Call List

- - PART Validation required + + PART Validation
Filter status diff --git a/NKC_WF/WebUserControls/cmp_batchList.ascx.cs b/NKC_WF/WebUserControls/cmp_batchList.ascx.cs index b4de999..038439e 100644 --- a/NKC_WF/WebUserControls/cmp_batchList.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchList.ascx.cs @@ -71,6 +71,15 @@ namespace NKC_WF.WebUserControls { } } } + // controllo infine SE CI SIANO parti da validare... + if (DataLayer.man.taBL.getByStatus(8).Count > 0) + { + hlPartValidation.CssClass = "btn btn-sm btn-warning btn-block"; + } + else + { + hlPartValidation.CssClass = "btn btn-sm btn-success btn-block"; + } } private void Cmp_numRow_eh_doRefresh(object sender, EventArgs e) @@ -169,6 +178,15 @@ namespace NKC_WF.WebUserControls public void doUpdate() { resetSelezione(); + // controllo infine SE CI SIANO parti da validare... + if (DataLayer.man.taBL.getByStatus(8).Count > 0) + { + hlPartValidation.CssClass = "btn btn-sm btn-warning btn-block"; + } + else + { + hlPartValidation.CssClass = "btn btn-sm btn-success btn-block"; + } }