//------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:2.0.50727.1433 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ #pragma warning disable 1591 namespace Test_App { /// ///Represents a strongly typed in-memory cache of data. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [global::System.Serializable()] [global::System.ComponentModel.DesignerCategoryAttribute("code")] [global::System.ComponentModel.ToolboxItem(true)] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")] [global::System.Xml.Serialization.XmlRootAttribute("AdventureWorksDataSet")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")] public partial class AdventureWorksDataSet : global::System.Data.DataSet { private ProductDataTable tableProduct; private PurchaseOrderDetailDataTable tablePurchaseOrderDetail; private global::System.Data.DataRelation relationFK_PurchaseOrderDetail_Product_ProductID; private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public AdventureWorksDataSet() { this.BeginInit(); this.InitClass(); global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); base.Tables.CollectionChanged += schemaChangedHandler; base.Relations.CollectionChanged += schemaChangedHandler; this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] protected AdventureWorksDataSet(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : base(info, context, false) { if ((this.IsBinarySerialized(info, context) == true)) { this.InitVars(false); global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); this.Tables.CollectionChanged += schemaChangedHandler1; this.Relations.CollectionChanged += schemaChangedHandler1; return; } string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string)))); if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { global::System.Data.DataSet ds = new global::System.Data.DataSet(); ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema))); if ((ds.Tables["Product"] != null)) { base.Tables.Add(new ProductDataTable(ds.Tables["Product"])); } if ((ds.Tables["PurchaseOrderDetail"] != null)) { base.Tables.Add(new PurchaseOrderDetailDataTable(ds.Tables["PurchaseOrderDetail"])); } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; this.Locale = ds.Locale; this.CaseSensitive = ds.CaseSensitive; this.EnforceConstraints = ds.EnforceConstraints; this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add); this.InitVars(); } else { this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema))); } this.GetSerializationData(info, context); global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); base.Tables.CollectionChanged += schemaChangedHandler; this.Relations.CollectionChanged += schemaChangedHandler; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public ProductDataTable Product { get { return this.tableProduct; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public PurchaseOrderDetailDataTable PurchaseOrderDetail { get { return this.tablePurchaseOrderDetail; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.BrowsableAttribute(true)] [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)] public override global::System.Data.SchemaSerializationMode SchemaSerializationMode { get { return this._schemaSerializationMode; } set { this._schemaSerializationMode = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] public new global::System.Data.DataTableCollection Tables { get { return base.Tables; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] public new global::System.Data.DataRelationCollection Relations { get { return base.Relations; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void InitializeDerivedDataSet() { this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public override global::System.Data.DataSet Clone() { AdventureWorksDataSet cln = ((AdventureWorksDataSet)(base.Clone())); cln.InitVars(); cln.SchemaSerializationMode = this.SchemaSerializationMode; return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override bool ShouldSerializeTables() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override bool ShouldSerializeRelations() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) { if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { this.Reset(); global::System.Data.DataSet ds = new global::System.Data.DataSet(); ds.ReadXml(reader); if ((ds.Tables["Product"] != null)) { base.Tables.Add(new ProductDataTable(ds.Tables["Product"])); } if ((ds.Tables["PurchaseOrderDetail"] != null)) { base.Tables.Add(new PurchaseOrderDetailDataTable(ds.Tables["PurchaseOrderDetail"])); } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; this.Locale = ds.Locale; this.CaseSensitive = ds.CaseSensitive; this.EnforceConstraints = ds.EnforceConstraints; this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add); this.InitVars(); } else { this.ReadXml(reader); this.InitVars(); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() { global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream(); this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null)); stream.Position = 0; return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal void InitVars() { this.InitVars(true); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal void InitVars(bool initTable) { this.tableProduct = ((ProductDataTable)(base.Tables["Product"])); if ((initTable == true)) { if ((this.tableProduct != null)) { this.tableProduct.InitVars(); } } this.tablePurchaseOrderDetail = ((PurchaseOrderDetailDataTable)(base.Tables["PurchaseOrderDetail"])); if ((initTable == true)) { if ((this.tablePurchaseOrderDetail != null)) { this.tablePurchaseOrderDetail.InitVars(); } } this.relationFK_PurchaseOrderDetail_Product_ProductID = this.Relations["FK_PurchaseOrderDetail_Product_ProductID"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitClass() { this.DataSetName = "AdventureWorksDataSet"; this.Prefix = ""; this.Namespace = "http://tempuri.org/AdventureWorksDataSet.xsd"; this.EnforceConstraints = true; this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; this.tableProduct = new ProductDataTable(); base.Tables.Add(this.tableProduct); this.tablePurchaseOrderDetail = new PurchaseOrderDetailDataTable(); base.Tables.Add(this.tablePurchaseOrderDetail); this.relationFK_PurchaseOrderDetail_Product_ProductID = new global::System.Data.DataRelation("FK_PurchaseOrderDetail_Product_ProductID", new global::System.Data.DataColumn[] { this.tableProduct.ProductIDColumn}, new global::System.Data.DataColumn[] { this.tablePurchaseOrderDetail.ProductIDColumn}, false); this.Relations.Add(this.relationFK_PurchaseOrderDetail_Product_ProductID); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] private bool ShouldSerializeProduct() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] private bool ShouldSerializePurchaseOrderDetail() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) { this.InitVars(); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { AdventureWorksDataSet ds = new AdventureWorksDataSet(); global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny(); any.Namespace = ds.Namespace; sequence.Items.Add(any); 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; } public delegate void ProductRowChangeEventHandler(object sender, ProductRowChangeEvent e); public delegate void PurchaseOrderDetailRowChangeEventHandler(object sender, PurchaseOrderDetailRowChangeEvent e); /// ///Represents the strongly named DataTable class. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class ProductDataTable : global::System.Data.TypedTableBase { private global::System.Data.DataColumn columnProductID; private global::System.Data.DataColumn columnName; private global::System.Data.DataColumn columnProductNumber; private global::System.Data.DataColumn columnMakeFlag; private global::System.Data.DataColumn columnFinishedGoodsFlag; private global::System.Data.DataColumn columnColor; private global::System.Data.DataColumn columnSafetyStockLevel; private global::System.Data.DataColumn columnReorderPoint; private global::System.Data.DataColumn columnStandardCost; private global::System.Data.DataColumn columnListPrice; private global::System.Data.DataColumn columnSize; private global::System.Data.DataColumn columnSizeUnitMeasureCode; private global::System.Data.DataColumn columnWeightUnitMeasureCode; private global::System.Data.DataColumn columnWeight; private global::System.Data.DataColumn columnDaysToManufacture; private global::System.Data.DataColumn columnProductLine; private global::System.Data.DataColumn columnClass; private global::System.Data.DataColumn columnStyle; private global::System.Data.DataColumn columnProductSubcategoryID; private global::System.Data.DataColumn columnProductModelID; private global::System.Data.DataColumn columnSellStartDate; private global::System.Data.DataColumn columnSellEndDate; private global::System.Data.DataColumn columnDiscontinuedDate; private global::System.Data.DataColumn columnrowguid; private global::System.Data.DataColumn columnModifiedDate; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public ProductDataTable() { this.TableName = "Product"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal ProductDataTable(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()] protected ProductDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn ProductIDColumn { get { return this.columnProductID; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn NameColumn { get { return this.columnName; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn ProductNumberColumn { get { return this.columnProductNumber; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn MakeFlagColumn { get { return this.columnMakeFlag; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn FinishedGoodsFlagColumn { get { return this.columnFinishedGoodsFlag; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn ColorColumn { get { return this.columnColor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn SafetyStockLevelColumn { get { return this.columnSafetyStockLevel; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn ReorderPointColumn { get { return this.columnReorderPoint; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn StandardCostColumn { get { return this.columnStandardCost; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn ListPriceColumn { get { return this.columnListPrice; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn SizeColumn { get { return this.columnSize; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn SizeUnitMeasureCodeColumn { get { return this.columnSizeUnitMeasureCode; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn WeightUnitMeasureCodeColumn { get { return this.columnWeightUnitMeasureCode; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn WeightColumn { get { return this.columnWeight; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn DaysToManufactureColumn { get { return this.columnDaysToManufacture; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn ProductLineColumn { get { return this.columnProductLine; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn ClassColumn { get { return this.columnClass; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn StyleColumn { get { return this.columnStyle; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn ProductSubcategoryIDColumn { get { return this.columnProductSubcategoryID; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn ProductModelIDColumn { get { return this.columnProductModelID; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn SellStartDateColumn { get { return this.columnSellStartDate; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn SellEndDateColumn { get { return this.columnSellEndDate; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn DiscontinuedDateColumn { get { return this.columnDiscontinuedDate; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn rowguidColumn { get { return this.columnrowguid; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn ModifiedDateColumn { get { return this.columnModifiedDate; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Browsable(false)] public int Count { get { return this.Rows.Count; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public ProductRow this[int index] { get { return ((ProductRow)(this.Rows[index])); } } public event ProductRowChangeEventHandler ProductRowChanging; public event ProductRowChangeEventHandler ProductRowChanged; public event ProductRowChangeEventHandler ProductRowDeleting; public event ProductRowChangeEventHandler ProductRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public void AddProductRow(ProductRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public ProductRow AddProductRow( string Name, string ProductNumber, bool MakeFlag, bool FinishedGoodsFlag, string Color, short SafetyStockLevel, short ReorderPoint, decimal StandardCost, decimal ListPrice, string Size, string SizeUnitMeasureCode, string WeightUnitMeasureCode, decimal Weight, int DaysToManufacture, string ProductLine, string Class, string Style, int ProductSubcategoryID, int ProductModelID, System.DateTime SellStartDate, System.DateTime SellEndDate, System.DateTime DiscontinuedDate, System.Guid rowguid, System.DateTime ModifiedDate) { ProductRow rowProductRow = ((ProductRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, Name, ProductNumber, MakeFlag, FinishedGoodsFlag, Color, SafetyStockLevel, ReorderPoint, StandardCost, ListPrice, Size, SizeUnitMeasureCode, WeightUnitMeasureCode, Weight, DaysToManufacture, ProductLine, Class, Style, ProductSubcategoryID, ProductModelID, SellStartDate, SellEndDate, DiscontinuedDate, rowguid, ModifiedDate}; rowProductRow.ItemArray = columnValuesArray; this.Rows.Add(rowProductRow); return rowProductRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public ProductRow FindByProductID(int ProductID) { return ((ProductRow)(this.Rows.Find(new object[] { ProductID}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public override global::System.Data.DataTable Clone() { ProductDataTable cln = ((ProductDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override global::System.Data.DataTable CreateInstance() { return new ProductDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal void InitVars() { this.columnProductID = base.Columns["ProductID"]; this.columnName = base.Columns["Name"]; this.columnProductNumber = base.Columns["ProductNumber"]; this.columnMakeFlag = base.Columns["MakeFlag"]; this.columnFinishedGoodsFlag = base.Columns["FinishedGoodsFlag"]; this.columnColor = base.Columns["Color"]; this.columnSafetyStockLevel = base.Columns["SafetyStockLevel"]; this.columnReorderPoint = base.Columns["ReorderPoint"]; this.columnStandardCost = base.Columns["StandardCost"]; this.columnListPrice = base.Columns["ListPrice"]; this.columnSize = base.Columns["Size"]; this.columnSizeUnitMeasureCode = base.Columns["SizeUnitMeasureCode"]; this.columnWeightUnitMeasureCode = base.Columns["WeightUnitMeasureCode"]; this.columnWeight = base.Columns["Weight"]; this.columnDaysToManufacture = base.Columns["DaysToManufacture"]; this.columnProductLine = base.Columns["ProductLine"]; this.columnClass = base.Columns["Class"]; this.columnStyle = base.Columns["Style"]; this.columnProductSubcategoryID = base.Columns["ProductSubcategoryID"]; this.columnProductModelID = base.Columns["ProductModelID"]; this.columnSellStartDate = base.Columns["SellStartDate"]; this.columnSellEndDate = base.Columns["SellEndDate"]; this.columnDiscontinuedDate = base.Columns["DiscontinuedDate"]; this.columnrowguid = base.Columns["rowguid"]; this.columnModifiedDate = base.Columns["ModifiedDate"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitClass() { this.columnProductID = new global::System.Data.DataColumn("ProductID", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnProductID); this.columnName = new global::System.Data.DataColumn("Name", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnName); this.columnProductNumber = new global::System.Data.DataColumn("ProductNumber", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnProductNumber); this.columnMakeFlag = new global::System.Data.DataColumn("MakeFlag", typeof(bool), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnMakeFlag); this.columnFinishedGoodsFlag = new global::System.Data.DataColumn("FinishedGoodsFlag", typeof(bool), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnFinishedGoodsFlag); this.columnColor = new global::System.Data.DataColumn("Color", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnColor); this.columnSafetyStockLevel = new global::System.Data.DataColumn("SafetyStockLevel", typeof(short), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnSafetyStockLevel); this.columnReorderPoint = new global::System.Data.DataColumn("ReorderPoint", typeof(short), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnReorderPoint); this.columnStandardCost = new global::System.Data.DataColumn("StandardCost", typeof(decimal), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnStandardCost); this.columnListPrice = new global::System.Data.DataColumn("ListPrice", typeof(decimal), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnListPrice); this.columnSize = new global::System.Data.DataColumn("Size", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnSize); this.columnSizeUnitMeasureCode = new global::System.Data.DataColumn("SizeUnitMeasureCode", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnSizeUnitMeasureCode); this.columnWeightUnitMeasureCode = new global::System.Data.DataColumn("WeightUnitMeasureCode", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnWeightUnitMeasureCode); this.columnWeight = new global::System.Data.DataColumn("Weight", typeof(decimal), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnWeight); this.columnDaysToManufacture = new global::System.Data.DataColumn("DaysToManufacture", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnDaysToManufacture); this.columnProductLine = new global::System.Data.DataColumn("ProductLine", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnProductLine); this.columnClass = new global::System.Data.DataColumn("Class", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnClass); this.columnStyle = new global::System.Data.DataColumn("Style", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnStyle); this.columnProductSubcategoryID = new global::System.Data.DataColumn("ProductSubcategoryID", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnProductSubcategoryID); this.columnProductModelID = new global::System.Data.DataColumn("ProductModelID", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnProductModelID); this.columnSellStartDate = new global::System.Data.DataColumn("SellStartDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnSellStartDate); this.columnSellEndDate = new global::System.Data.DataColumn("SellEndDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnSellEndDate); this.columnDiscontinuedDate = new global::System.Data.DataColumn("DiscontinuedDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnDiscontinuedDate); this.columnrowguid = new global::System.Data.DataColumn("rowguid", typeof(global::System.Guid), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnrowguid); this.columnModifiedDate = new global::System.Data.DataColumn("ModifiedDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnModifiedDate); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnProductID}, true)); this.columnProductID.AutoIncrement = true; this.columnProductID.AutoIncrementSeed = -1; this.columnProductID.AutoIncrementStep = -1; this.columnProductID.AllowDBNull = false; this.columnProductID.ReadOnly = true; this.columnProductID.Unique = true; this.columnName.AllowDBNull = false; this.columnName.MaxLength = 50; this.columnProductNumber.AllowDBNull = false; this.columnProductNumber.MaxLength = 25; this.columnMakeFlag.AllowDBNull = false; this.columnFinishedGoodsFlag.AllowDBNull = false; this.columnColor.MaxLength = 15; this.columnSafetyStockLevel.AllowDBNull = false; this.columnReorderPoint.AllowDBNull = false; this.columnStandardCost.AllowDBNull = false; this.columnListPrice.AllowDBNull = false; this.columnSize.MaxLength = 5; this.columnSizeUnitMeasureCode.MaxLength = 3; this.columnWeightUnitMeasureCode.MaxLength = 3; this.columnDaysToManufacture.AllowDBNull = false; this.columnProductLine.MaxLength = 2; this.columnClass.MaxLength = 2; this.columnStyle.MaxLength = 2; this.columnSellStartDate.AllowDBNull = false; this.columnrowguid.AllowDBNull = false; this.columnModifiedDate.AllowDBNull = false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public ProductRow NewProductRow() { return ((ProductRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new ProductRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override global::System.Type GetRowType() { return typeof(ProductRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.ProductRowChanged != null)) { this.ProductRowChanged(this, new ProductRowChangeEvent(((ProductRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.ProductRowChanging != null)) { this.ProductRowChanging(this, new ProductRowChangeEvent(((ProductRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.ProductRowDeleted != null)) { this.ProductRowDeleted(this, new ProductRowChangeEvent(((ProductRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.ProductRowDeleting != null)) { this.ProductRowDeleting(this, new ProductRowChangeEvent(((ProductRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public void RemoveProductRow(ProductRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 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(); AdventureWorksDataSet ds = new AdventureWorksDataSet(); 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 = "ProductDataTable"; 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 the strongly named DataTable class. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class PurchaseOrderDetailDataTable : global::System.Data.TypedTableBase { private global::System.Data.DataColumn columnPurchaseOrderID; private global::System.Data.DataColumn columnPurchaseOrderDetailID; private global::System.Data.DataColumn columnDueDate; private global::System.Data.DataColumn columnOrderQty; private global::System.Data.DataColumn columnProductID; private global::System.Data.DataColumn columnUnitPrice; private global::System.Data.DataColumn columnLineTotal; private global::System.Data.DataColumn columnReceivedQty; private global::System.Data.DataColumn columnRejectedQty; private global::System.Data.DataColumn columnStockedQty; private global::System.Data.DataColumn columnModifiedDate; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public PurchaseOrderDetailDataTable() { this.TableName = "PurchaseOrderDetail"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal PurchaseOrderDetailDataTable(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()] protected PurchaseOrderDetailDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn PurchaseOrderIDColumn { get { return this.columnPurchaseOrderID; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn PurchaseOrderDetailIDColumn { get { return this.columnPurchaseOrderDetailID; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn DueDateColumn { get { return this.columnDueDate; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn OrderQtyColumn { get { return this.columnOrderQty; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn ProductIDColumn { get { return this.columnProductID; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn UnitPriceColumn { get { return this.columnUnitPrice; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn LineTotalColumn { get { return this.columnLineTotal; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn ReceivedQtyColumn { get { return this.columnReceivedQty; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn RejectedQtyColumn { get { return this.columnRejectedQty; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn StockedQtyColumn { get { return this.columnStockedQty; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataColumn ModifiedDateColumn { get { return this.columnModifiedDate; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Browsable(false)] public int Count { get { return this.Rows.Count; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public PurchaseOrderDetailRow this[int index] { get { return ((PurchaseOrderDetailRow)(this.Rows[index])); } } public event PurchaseOrderDetailRowChangeEventHandler PurchaseOrderDetailRowChanging; public event PurchaseOrderDetailRowChangeEventHandler PurchaseOrderDetailRowChanged; public event PurchaseOrderDetailRowChangeEventHandler PurchaseOrderDetailRowDeleting; public event PurchaseOrderDetailRowChangeEventHandler PurchaseOrderDetailRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public void AddPurchaseOrderDetailRow(PurchaseOrderDetailRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public PurchaseOrderDetailRow AddPurchaseOrderDetailRow(int PurchaseOrderID, System.DateTime DueDate, short OrderQty, ProductRow parentProductRowByFK_PurchaseOrderDetail_Product_ProductID, decimal UnitPrice, decimal LineTotal, decimal ReceivedQty, decimal RejectedQty, decimal StockedQty, System.DateTime ModifiedDate) { PurchaseOrderDetailRow rowPurchaseOrderDetailRow = ((PurchaseOrderDetailRow)(this.NewRow())); object[] columnValuesArray = new object[] { PurchaseOrderID, null, DueDate, OrderQty, null, UnitPrice, LineTotal, ReceivedQty, RejectedQty, StockedQty, ModifiedDate}; if ((parentProductRowByFK_PurchaseOrderDetail_Product_ProductID != null)) { columnValuesArray[4] = parentProductRowByFK_PurchaseOrderDetail_Product_ProductID[0]; } rowPurchaseOrderDetailRow.ItemArray = columnValuesArray; this.Rows.Add(rowPurchaseOrderDetailRow); return rowPurchaseOrderDetailRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public PurchaseOrderDetailRow FindByPurchaseOrderIDPurchaseOrderDetailID(int PurchaseOrderID, int PurchaseOrderDetailID) { return ((PurchaseOrderDetailRow)(this.Rows.Find(new object[] { PurchaseOrderID, PurchaseOrderDetailID}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public override global::System.Data.DataTable Clone() { PurchaseOrderDetailDataTable cln = ((PurchaseOrderDetailDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override global::System.Data.DataTable CreateInstance() { return new PurchaseOrderDetailDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal void InitVars() { this.columnPurchaseOrderID = base.Columns["PurchaseOrderID"]; this.columnPurchaseOrderDetailID = base.Columns["PurchaseOrderDetailID"]; this.columnDueDate = base.Columns["DueDate"]; this.columnOrderQty = base.Columns["OrderQty"]; this.columnProductID = base.Columns["ProductID"]; this.columnUnitPrice = base.Columns["UnitPrice"]; this.columnLineTotal = base.Columns["LineTotal"]; this.columnReceivedQty = base.Columns["ReceivedQty"]; this.columnRejectedQty = base.Columns["RejectedQty"]; this.columnStockedQty = base.Columns["StockedQty"]; this.columnModifiedDate = base.Columns["ModifiedDate"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitClass() { this.columnPurchaseOrderID = new global::System.Data.DataColumn("PurchaseOrderID", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnPurchaseOrderID); this.columnPurchaseOrderDetailID = new global::System.Data.DataColumn("PurchaseOrderDetailID", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnPurchaseOrderDetailID); this.columnDueDate = new global::System.Data.DataColumn("DueDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnDueDate); this.columnOrderQty = new global::System.Data.DataColumn("OrderQty", typeof(short), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnOrderQty); this.columnProductID = new global::System.Data.DataColumn("ProductID", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnProductID); this.columnUnitPrice = new global::System.Data.DataColumn("UnitPrice", typeof(decimal), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnUnitPrice); this.columnLineTotal = new global::System.Data.DataColumn("LineTotal", typeof(decimal), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnLineTotal); this.columnReceivedQty = new global::System.Data.DataColumn("ReceivedQty", typeof(decimal), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnReceivedQty); this.columnRejectedQty = new global::System.Data.DataColumn("RejectedQty", typeof(decimal), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnRejectedQty); this.columnStockedQty = new global::System.Data.DataColumn("StockedQty", typeof(decimal), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnStockedQty); this.columnModifiedDate = new global::System.Data.DataColumn("ModifiedDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnModifiedDate); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnPurchaseOrderID, this.columnPurchaseOrderDetailID}, true)); this.columnPurchaseOrderID.AllowDBNull = false; this.columnPurchaseOrderDetailID.AutoIncrement = true; this.columnPurchaseOrderDetailID.AutoIncrementSeed = -1; this.columnPurchaseOrderDetailID.AutoIncrementStep = -1; this.columnPurchaseOrderDetailID.AllowDBNull = false; this.columnPurchaseOrderDetailID.ReadOnly = true; this.columnDueDate.AllowDBNull = false; this.columnOrderQty.AllowDBNull = false; this.columnProductID.AllowDBNull = false; this.columnUnitPrice.AllowDBNull = false; this.columnLineTotal.ReadOnly = true; this.columnReceivedQty.AllowDBNull = false; this.columnRejectedQty.AllowDBNull = false; this.columnStockedQty.ReadOnly = true; this.columnModifiedDate.AllowDBNull = false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public PurchaseOrderDetailRow NewPurchaseOrderDetailRow() { return ((PurchaseOrderDetailRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new PurchaseOrderDetailRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override global::System.Type GetRowType() { return typeof(PurchaseOrderDetailRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.PurchaseOrderDetailRowChanged != null)) { this.PurchaseOrderDetailRowChanged(this, new PurchaseOrderDetailRowChangeEvent(((PurchaseOrderDetailRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.PurchaseOrderDetailRowChanging != null)) { this.PurchaseOrderDetailRowChanging(this, new PurchaseOrderDetailRowChangeEvent(((PurchaseOrderDetailRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.PurchaseOrderDetailRowDeleted != null)) { this.PurchaseOrderDetailRowDeleted(this, new PurchaseOrderDetailRowChangeEvent(((PurchaseOrderDetailRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.PurchaseOrderDetailRowDeleting != null)) { this.PurchaseOrderDetailRowDeleting(this, new PurchaseOrderDetailRowChangeEvent(((PurchaseOrderDetailRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public void RemovePurchaseOrderDetailRow(PurchaseOrderDetailRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 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(); AdventureWorksDataSet ds = new AdventureWorksDataSet(); 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 = "PurchaseOrderDetailDataTable"; 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. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public partial class ProductRow : global::System.Data.DataRow { private ProductDataTable tableProduct; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal ProductRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tableProduct = ((ProductDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public int ProductID { get { return ((int)(this[this.tableProduct.ProductIDColumn])); } set { this[this.tableProduct.ProductIDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public string Name { get { return ((string)(this[this.tableProduct.NameColumn])); } set { this[this.tableProduct.NameColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public string ProductNumber { get { return ((string)(this[this.tableProduct.ProductNumberColumn])); } set { this[this.tableProduct.ProductNumberColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool MakeFlag { get { return ((bool)(this[this.tableProduct.MakeFlagColumn])); } set { this[this.tableProduct.MakeFlagColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool FinishedGoodsFlag { get { return ((bool)(this[this.tableProduct.FinishedGoodsFlagColumn])); } set { this[this.tableProduct.FinishedGoodsFlagColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public string Color { get { try { return ((string)(this[this.tableProduct.ColorColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("The value for column \'Color\' in table \'Product\' is DBNull.", e); } } set { this[this.tableProduct.ColorColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public short SafetyStockLevel { get { return ((short)(this[this.tableProduct.SafetyStockLevelColumn])); } set { this[this.tableProduct.SafetyStockLevelColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public short ReorderPoint { get { return ((short)(this[this.tableProduct.ReorderPointColumn])); } set { this[this.tableProduct.ReorderPointColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public decimal StandardCost { get { return ((decimal)(this[this.tableProduct.StandardCostColumn])); } set { this[this.tableProduct.StandardCostColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public decimal ListPrice { get { return ((decimal)(this[this.tableProduct.ListPriceColumn])); } set { this[this.tableProduct.ListPriceColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public string Size { get { try { return ((string)(this[this.tableProduct.SizeColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("The value for column \'Size\' in table \'Product\' is DBNull.", e); } } set { this[this.tableProduct.SizeColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public string SizeUnitMeasureCode { get { try { return ((string)(this[this.tableProduct.SizeUnitMeasureCodeColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("The value for column \'SizeUnitMeasureCode\' in table \'Product\' is DBNull.", e); } } set { this[this.tableProduct.SizeUnitMeasureCodeColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public string WeightUnitMeasureCode { get { try { return ((string)(this[this.tableProduct.WeightUnitMeasureCodeColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("The value for column \'WeightUnitMeasureCode\' in table \'Product\' is DBNull.", e); } } set { this[this.tableProduct.WeightUnitMeasureCodeColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public decimal Weight { get { try { return ((decimal)(this[this.tableProduct.WeightColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("The value for column \'Weight\' in table \'Product\' is DBNull.", e); } } set { this[this.tableProduct.WeightColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public int DaysToManufacture { get { return ((int)(this[this.tableProduct.DaysToManufactureColumn])); } set { this[this.tableProduct.DaysToManufactureColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public string ProductLine { get { try { return ((string)(this[this.tableProduct.ProductLineColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("The value for column \'ProductLine\' in table \'Product\' is DBNull.", e); } } set { this[this.tableProduct.ProductLineColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public string Class { get { try { return ((string)(this[this.tableProduct.ClassColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("The value for column \'Class\' in table \'Product\' is DBNull.", e); } } set { this[this.tableProduct.ClassColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public string Style { get { try { return ((string)(this[this.tableProduct.StyleColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("The value for column \'Style\' in table \'Product\' is DBNull.", e); } } set { this[this.tableProduct.StyleColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public int ProductSubcategoryID { get { try { return ((int)(this[this.tableProduct.ProductSubcategoryIDColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("The value for column \'ProductSubcategoryID\' in table \'Product\' is DBNull.", e); } } set { this[this.tableProduct.ProductSubcategoryIDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public int ProductModelID { get { try { return ((int)(this[this.tableProduct.ProductModelIDColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("The value for column \'ProductModelID\' in table \'Product\' is DBNull.", e); } } set { this[this.tableProduct.ProductModelIDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.DateTime SellStartDate { get { return ((global::System.DateTime)(this[this.tableProduct.SellStartDateColumn])); } set { this[this.tableProduct.SellStartDateColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.DateTime SellEndDate { get { try { return ((global::System.DateTime)(this[this.tableProduct.SellEndDateColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("The value for column \'SellEndDate\' in table \'Product\' is DBNull.", e); } } set { this[this.tableProduct.SellEndDateColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.DateTime DiscontinuedDate { get { try { return ((global::System.DateTime)(this[this.tableProduct.DiscontinuedDateColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("The value for column \'DiscontinuedDate\' in table \'Product\' is DBNull.", e); } } set { this[this.tableProduct.DiscontinuedDateColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Guid rowguid { get { return ((global::System.Guid)(this[this.tableProduct.rowguidColumn])); } set { this[this.tableProduct.rowguidColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.DateTime ModifiedDate { get { return ((global::System.DateTime)(this[this.tableProduct.ModifiedDateColumn])); } set { this[this.tableProduct.ModifiedDateColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsColorNull() { return this.IsNull(this.tableProduct.ColorColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetColorNull() { this[this.tableProduct.ColorColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsSizeNull() { return this.IsNull(this.tableProduct.SizeColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetSizeNull() { this[this.tableProduct.SizeColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsSizeUnitMeasureCodeNull() { return this.IsNull(this.tableProduct.SizeUnitMeasureCodeColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetSizeUnitMeasureCodeNull() { this[this.tableProduct.SizeUnitMeasureCodeColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsWeightUnitMeasureCodeNull() { return this.IsNull(this.tableProduct.WeightUnitMeasureCodeColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetWeightUnitMeasureCodeNull() { this[this.tableProduct.WeightUnitMeasureCodeColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsWeightNull() { return this.IsNull(this.tableProduct.WeightColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetWeightNull() { this[this.tableProduct.WeightColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsProductLineNull() { return this.IsNull(this.tableProduct.ProductLineColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetProductLineNull() { this[this.tableProduct.ProductLineColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsClassNull() { return this.IsNull(this.tableProduct.ClassColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetClassNull() { this[this.tableProduct.ClassColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsStyleNull() { return this.IsNull(this.tableProduct.StyleColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetStyleNull() { this[this.tableProduct.StyleColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsProductSubcategoryIDNull() { return this.IsNull(this.tableProduct.ProductSubcategoryIDColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetProductSubcategoryIDNull() { this[this.tableProduct.ProductSubcategoryIDColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsProductModelIDNull() { return this.IsNull(this.tableProduct.ProductModelIDColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetProductModelIDNull() { this[this.tableProduct.ProductModelIDColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsSellEndDateNull() { return this.IsNull(this.tableProduct.SellEndDateColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetSellEndDateNull() { this[this.tableProduct.SellEndDateColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsDiscontinuedDateNull() { return this.IsNull(this.tableProduct.DiscontinuedDateColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetDiscontinuedDateNull() { this[this.tableProduct.DiscontinuedDateColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public PurchaseOrderDetailRow[] GetPurchaseOrderDetailRows() { if ((this.Table.ChildRelations["FK_PurchaseOrderDetail_Product_ProductID"] == null)) { return new PurchaseOrderDetailRow[0]; } else { return ((PurchaseOrderDetailRow[])(base.GetChildRows(this.Table.ChildRelations["FK_PurchaseOrderDetail_Product_ProductID"]))); } } } /// ///Represents strongly named DataRow class. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public partial class PurchaseOrderDetailRow : global::System.Data.DataRow { private PurchaseOrderDetailDataTable tablePurchaseOrderDetail; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal PurchaseOrderDetailRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tablePurchaseOrderDetail = ((PurchaseOrderDetailDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public int PurchaseOrderID { get { return ((int)(this[this.tablePurchaseOrderDetail.PurchaseOrderIDColumn])); } set { this[this.tablePurchaseOrderDetail.PurchaseOrderIDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public int PurchaseOrderDetailID { get { return ((int)(this[this.tablePurchaseOrderDetail.PurchaseOrderDetailIDColumn])); } set { this[this.tablePurchaseOrderDetail.PurchaseOrderDetailIDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.DateTime DueDate { get { return ((global::System.DateTime)(this[this.tablePurchaseOrderDetail.DueDateColumn])); } set { this[this.tablePurchaseOrderDetail.DueDateColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public short OrderQty { get { return ((short)(this[this.tablePurchaseOrderDetail.OrderQtyColumn])); } set { this[this.tablePurchaseOrderDetail.OrderQtyColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public int ProductID { get { return ((int)(this[this.tablePurchaseOrderDetail.ProductIDColumn])); } set { this[this.tablePurchaseOrderDetail.ProductIDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public decimal UnitPrice { get { return ((decimal)(this[this.tablePurchaseOrderDetail.UnitPriceColumn])); } set { this[this.tablePurchaseOrderDetail.UnitPriceColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public decimal LineTotal { get { try { return ((decimal)(this[this.tablePurchaseOrderDetail.LineTotalColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("The value for column \'LineTotal\' in table \'PurchaseOrderDetail\' is DBNull.", e); } } set { this[this.tablePurchaseOrderDetail.LineTotalColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public decimal ReceivedQty { get { return ((decimal)(this[this.tablePurchaseOrderDetail.ReceivedQtyColumn])); } set { this[this.tablePurchaseOrderDetail.ReceivedQtyColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public decimal RejectedQty { get { return ((decimal)(this[this.tablePurchaseOrderDetail.RejectedQtyColumn])); } set { this[this.tablePurchaseOrderDetail.RejectedQtyColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public decimal StockedQty { get { try { return ((decimal)(this[this.tablePurchaseOrderDetail.StockedQtyColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("The value for column \'StockedQty\' in table \'PurchaseOrderDetail\' is DBNull.", e); } } set { this[this.tablePurchaseOrderDetail.StockedQtyColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.DateTime ModifiedDate { get { return ((global::System.DateTime)(this[this.tablePurchaseOrderDetail.ModifiedDateColumn])); } set { this[this.tablePurchaseOrderDetail.ModifiedDateColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public ProductRow ProductRow { get { return ((ProductRow)(this.GetParentRow(this.Table.ParentRelations["FK_PurchaseOrderDetail_Product_ProductID"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_PurchaseOrderDetail_Product_ProductID"]); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsLineTotalNull() { return this.IsNull(this.tablePurchaseOrderDetail.LineTotalColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetLineTotalNull() { this[this.tablePurchaseOrderDetail.LineTotalColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsStockedQtyNull() { return this.IsNull(this.tablePurchaseOrderDetail.StockedQtyColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetStockedQtyNull() { this[this.tablePurchaseOrderDetail.StockedQtyColumn] = global::System.Convert.DBNull; } } /// ///Row event argument class /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public class ProductRowChangeEvent : global::System.EventArgs { private ProductRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public ProductRowChangeEvent(ProductRow row, global::System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public ProductRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// ///Row event argument class /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public class PurchaseOrderDetailRowChangeEvent : global::System.EventArgs { private PurchaseOrderDetailRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public PurchaseOrderDetailRowChangeEvent(PurchaseOrderDetailRow row, global::System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public PurchaseOrderDetailRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } } } namespace Test_App.AdventureWorksDataSetTableAdapters { /// ///Represents the connection and commands used to retrieve and save data. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [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=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public partial class ProductTableAdapter : 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()] public ProductTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { get { if ((this._adapter == null)) { this.InitAdapter(); } return this._adapter; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 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()] 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()] protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool ClearBeforeFill { get { return this._clearBeforeFill; } set { this._clearBeforeFill = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 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 = "Product"; tableMapping.ColumnMappings.Add("ProductID", "ProductID"); tableMapping.ColumnMappings.Add("Name", "Name"); tableMapping.ColumnMappings.Add("ProductNumber", "ProductNumber"); tableMapping.ColumnMappings.Add("MakeFlag", "MakeFlag"); tableMapping.ColumnMappings.Add("FinishedGoodsFlag", "FinishedGoodsFlag"); tableMapping.ColumnMappings.Add("Color", "Color"); tableMapping.ColumnMappings.Add("SafetyStockLevel", "SafetyStockLevel"); tableMapping.ColumnMappings.Add("ReorderPoint", "ReorderPoint"); tableMapping.ColumnMappings.Add("StandardCost", "StandardCost"); tableMapping.ColumnMappings.Add("ListPrice", "ListPrice"); tableMapping.ColumnMappings.Add("Size", "Size"); tableMapping.ColumnMappings.Add("SizeUnitMeasureCode", "SizeUnitMeasureCode"); tableMapping.ColumnMappings.Add("WeightUnitMeasureCode", "WeightUnitMeasureCode"); tableMapping.ColumnMappings.Add("Weight", "Weight"); tableMapping.ColumnMappings.Add("DaysToManufacture", "DaysToManufacture"); tableMapping.ColumnMappings.Add("ProductLine", "ProductLine"); tableMapping.ColumnMappings.Add("Class", "Class"); tableMapping.ColumnMappings.Add("Style", "Style"); tableMapping.ColumnMappings.Add("ProductSubcategoryID", "ProductSubcategoryID"); tableMapping.ColumnMappings.Add("ProductModelID", "ProductModelID"); tableMapping.ColumnMappings.Add("SellStartDate", "SellStartDate"); tableMapping.ColumnMappings.Add("SellEndDate", "SellEndDate"); tableMapping.ColumnMappings.Add("DiscontinuedDate", "DiscontinuedDate"); tableMapping.ColumnMappings.Add("rowguid", "rowguid"); tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate"); 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 [Production].[Product] WHERE (([ProductID] = @Original_ProductID) AND" + " ([Name] = @Original_Name) AND ([ProductNumber] = @Original_ProductNumber) AND (" + "[MakeFlag] = @Original_MakeFlag) AND ([FinishedGoodsFlag] = @Original_FinishedGo" + "odsFlag) AND ((@IsNull_Color = 1 AND [Color] IS NULL) OR ([Color] = @Original_Co" + "lor)) AND ([SafetyStockLevel] = @Original_SafetyStockLevel) AND ([ReorderPoint] " + "= @Original_ReorderPoint) AND ([StandardCost] = @Original_StandardCost) AND ([Li" + "stPrice] = @Original_ListPrice) AND ((@IsNull_Size = 1 AND [Size] IS NULL) OR ([" + "Size] = @Original_Size)) AND ((@IsNull_SizeUnitMeasureCode = 1 AND [SizeUnitMeas" + "ureCode] IS NULL) OR ([SizeUnitMeasureCode] = @Original_SizeUnitMeasureCode)) AN" + "D ((@IsNull_WeightUnitMeasureCode = 1 AND [WeightUnitMeasureCode] IS NULL) OR ([" + "WeightUnitMeasureCode] = @Original_WeightUnitMeasureCode)) AND ((@IsNull_Weight " + "= 1 AND [Weight] IS NULL) OR ([Weight] = @Original_Weight)) AND ([DaysToManufact" + "ure] = @Original_DaysToManufacture) AND ((@IsNull_ProductLine = 1 AND [ProductLi" + "ne] IS NULL) OR ([ProductLine] = @Original_ProductLine)) AND ((@IsNull_Class = 1" + " AND [Class] IS NULL) OR ([Class] = @Original_Class)) AND ((@IsNull_Style = 1 AN" + "D [Style] IS NULL) OR ([Style] = @Original_Style)) AND ((@IsNull_ProductSubcateg" + "oryID = 1 AND [ProductSubcategoryID] IS NULL) OR ([ProductSubcategoryID] = @Orig" + "inal_ProductSubcategoryID)) AND ((@IsNull_ProductModelID = 1 AND [ProductModelID" + "] IS NULL) OR ([ProductModelID] = @Original_ProductModelID)) AND ([SellStartDate" + "] = @Original_SellStartDate) AND ((@IsNull_SellEndDate = 1 AND [SellEndDate] IS " + "NULL) OR ([SellEndDate] = @Original_SellEndDate)) AND ((@IsNull_DiscontinuedDate" + " = 1 AND [DiscontinuedDate] IS NULL) OR ([DiscontinuedDate] = @Original_Disconti" + "nuedDate)) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_M" + "odifiedDate))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductNumber", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductNumber", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MakeFlag", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MakeFlag", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_FinishedGoodsFlag", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "FinishedGoodsFlag", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Color", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Color", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Color", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Color", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SafetyStockLevel", global::System.Data.SqlDbType.SmallInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SafetyStockLevel", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ReorderPoint", global::System.Data.SqlDbType.SmallInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ReorderPoint", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_StandardCost", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "StandardCost", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ListPrice", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ListPrice", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Size", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Size", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Size", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Size", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SizeUnitMeasureCode", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SizeUnitMeasureCode", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SizeUnitMeasureCode", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SizeUnitMeasureCode", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_WeightUnitMeasureCode", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "WeightUnitMeasureCode", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_WeightUnitMeasureCode", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "WeightUnitMeasureCode", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Weight", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Weight", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Weight", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 8, 2, "Weight", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DaysToManufacture", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DaysToManufacture", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ProductLine", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductLine", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductLine", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductLine", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Class", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Class", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Class", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Class", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Style", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Style", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Style", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Style", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ProductSubcategoryID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductSubcategoryID", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductSubcategoryID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductSubcategoryID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ProductModelID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductModelID", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductModelID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductModelID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SellStartDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SellStartDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SellEndDate", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SellEndDate", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SellEndDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SellEndDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DiscontinuedDate", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiscontinuedDate", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DiscontinuedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiscontinuedDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_rowguid", global::System.Data.SqlDbType.UniqueIdentifier, 0, global::System.Data.ParameterDirection.Input, 0, 0, "rowguid", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", 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 [Production].[Product] ([Name], [ProductNumber], [MakeFlag], [FinishedGoodsFlag], [Color], [SafetyStockLevel], [ReorderPoint], [StandardCost], [ListPrice], [Size], [SizeUnitMeasureCode], [WeightUnitMeasureCode], [Weight], [DaysToManufacture], [ProductLine], [Class], [Style], [ProductSubcategoryID], [ProductModelID], [SellStartDate], [SellEndDate], [DiscontinuedDate], [rowguid], [ModifiedDate]) VALUES (@Name, @ProductNumber, @MakeFlag, @FinishedGoodsFlag, @Color, @SafetyStockLevel, @ReorderPoint, @StandardCost, @ListPrice, @Size, @SizeUnitMeasureCode, @WeightUnitMeasureCode, @Weight, @DaysToManufacture, @ProductLine, @Class, @Style, @ProductSubcategoryID, @ProductModelID, @SellStartDate, @SellEndDate, @DiscontinuedDate, @rowguid, @ModifiedDate); SELECT ProductID, Name, ProductNumber, MakeFlag, FinishedGoodsFlag, Color, SafetyStockLevel, ReorderPoint, StandardCost, ListPrice, Size, SizeUnitMeasureCode, WeightUnitMeasureCode, Weight, DaysToManufacture, ProductLine, Class, Style, ProductSubcategoryID, ProductModelID, SellStartDate, SellEndDate, DiscontinuedDate, rowguid, ModifiedDate FROM Production.Product WHERE (ProductID = SCOPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductNumber", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductNumber", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MakeFlag", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MakeFlag", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@FinishedGoodsFlag", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "FinishedGoodsFlag", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Color", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Color", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SafetyStockLevel", global::System.Data.SqlDbType.SmallInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SafetyStockLevel", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ReorderPoint", global::System.Data.SqlDbType.SmallInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ReorderPoint", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StandardCost", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "StandardCost", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ListPrice", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ListPrice", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Size", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Size", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SizeUnitMeasureCode", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SizeUnitMeasureCode", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@WeightUnitMeasureCode", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "WeightUnitMeasureCode", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Weight", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 8, 2, "Weight", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DaysToManufacture", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DaysToManufacture", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductLine", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductLine", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Class", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Class", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Style", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Style", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductSubcategoryID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductSubcategoryID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductModelID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductModelID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SellStartDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SellStartDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SellEndDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SellEndDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DiscontinuedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiscontinuedDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@rowguid", global::System.Data.SqlDbType.UniqueIdentifier, 0, global::System.Data.ParameterDirection.Input, 0, 0, "rowguid", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ModifiedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", 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 [Production].[Product] SET [Name] = @Name, [ProductNumber] = @ProductNumbe" + "r, [MakeFlag] = @MakeFlag, [FinishedGoodsFlag] = @FinishedGoodsFlag, [Color] = @" + "Color, [SafetyStockLevel] = @SafetyStockLevel, [ReorderPoint] = @ReorderPoint, [" + "StandardCost] = @StandardCost, [ListPrice] = @ListPrice, [Size] = @Size, [SizeUn" + "itMeasureCode] = @SizeUnitMeasureCode, [WeightUnitMeasureCode] = @WeightUnitMeas" + "ureCode, [Weight] = @Weight, [DaysToManufacture] = @DaysToManufacture, [ProductL" + "ine] = @ProductLine, [Class] = @Class, [Style] = @Style, [ProductSubcategoryID] " + "= @ProductSubcategoryID, [ProductModelID] = @ProductModelID, [SellStartDate] = @" + "SellStartDate, [SellEndDate] = @SellEndDate, [DiscontinuedDate] = @DiscontinuedD" + "ate, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([ProductID] = " + "@Original_ProductID) AND ([Name] = @Original_Name) AND ([ProductNumber] = @Origi" + "nal_ProductNumber) AND ([MakeFlag] = @Original_MakeFlag) AND ([FinishedGoodsFlag" + "] = @Original_FinishedGoodsFlag) AND ((@IsNull_Color = 1 AND [Color] IS NULL) OR" + " ([Color] = @Original_Color)) AND ([SafetyStockLevel] = @Original_SafetyStockLev" + "el) AND ([ReorderPoint] = @Original_ReorderPoint) AND ([StandardCost] = @Origina" + "l_StandardCost) AND ([ListPrice] = @Original_ListPrice) AND ((@IsNull_Size = 1 A" + "ND [Size] IS NULL) OR ([Size] = @Original_Size)) AND ((@IsNull_SizeUnitMeasureCo" + "de = 1 AND [SizeUnitMeasureCode] IS NULL) OR ([SizeUnitMeasureCode] = @Original_" + "SizeUnitMeasureCode)) AND ((@IsNull_WeightUnitMeasureCode = 1 AND [WeightUnitMea" + "sureCode] IS NULL) OR ([WeightUnitMeasureCode] = @Original_WeightUnitMeasureCode" + ")) AND ((@IsNull_Weight = 1 AND [Weight] IS NULL) OR ([Weight] = @Original_Weigh" + "t)) AND ([DaysToManufacture] = @Original_DaysToManufacture) AND ((@IsNull_Produc" + "tLine = 1 AND [ProductLine] IS NULL) OR ([ProductLine] = @Original_ProductLine))" + " AND ((@IsNull_Class = 1 AND [Class] IS NULL) OR ([Class] = @Original_Class)) AN" + "D ((@IsNull_Style = 1 AND [Style] IS NULL) OR ([Style] = @Original_Style)) AND (" + "(@IsNull_ProductSubcategoryID = 1 AND [ProductSubcategoryID] IS NULL) OR ([Produ" + "ctSubcategoryID] = @Original_ProductSubcategoryID)) AND ((@IsNull_ProductModelID" + " = 1 AND [ProductModelID] IS NULL) OR ([ProductModelID] = @Original_ProductModel" + "ID)) AND ([SellStartDate] = @Original_SellStartDate) AND ((@IsNull_SellEndDate =" + " 1 AND [SellEndDate] IS NULL) OR ([SellEndDate] = @Original_SellEndDate)) AND ((" + "@IsNull_DiscontinuedDate = 1 AND [DiscontinuedDate] IS NULL) OR ([DiscontinuedDa" + "te] = @Original_DiscontinuedDate)) AND ([rowguid] = @Original_rowguid) AND ([Mod" + "ifiedDate] = @Original_ModifiedDate));\r\nSELECT ProductID, Name, ProductNumber, M" + "akeFlag, FinishedGoodsFlag, Color, SafetyStockLevel, ReorderPoint, StandardCost," + " ListPrice, Size, SizeUnitMeasureCode, WeightUnitMeasureCode, Weight, DaysToManu" + "facture, ProductLine, Class, Style, ProductSubcategoryID, ProductModelID, SellSt" + "artDate, SellEndDate, DiscontinuedDate, rowguid, ModifiedDate FROM Production.Pr" + "oduct WHERE (ProductID = @ProductID)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductNumber", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductNumber", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MakeFlag", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MakeFlag", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@FinishedGoodsFlag", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "FinishedGoodsFlag", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Color", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Color", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SafetyStockLevel", global::System.Data.SqlDbType.SmallInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SafetyStockLevel", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ReorderPoint", global::System.Data.SqlDbType.SmallInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ReorderPoint", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StandardCost", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "StandardCost", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ListPrice", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ListPrice", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Size", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Size", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SizeUnitMeasureCode", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SizeUnitMeasureCode", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@WeightUnitMeasureCode", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "WeightUnitMeasureCode", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Weight", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 8, 2, "Weight", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DaysToManufacture", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DaysToManufacture", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductLine", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductLine", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Class", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Class", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Style", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Style", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductSubcategoryID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductSubcategoryID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductModelID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductModelID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SellStartDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SellStartDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SellEndDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SellEndDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DiscontinuedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiscontinuedDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@rowguid", global::System.Data.SqlDbType.UniqueIdentifier, 0, global::System.Data.ParameterDirection.Input, 0, 0, "rowguid", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ModifiedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductNumber", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductNumber", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MakeFlag", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MakeFlag", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_FinishedGoodsFlag", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "FinishedGoodsFlag", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Color", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Color", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Color", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Color", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SafetyStockLevel", global::System.Data.SqlDbType.SmallInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SafetyStockLevel", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ReorderPoint", global::System.Data.SqlDbType.SmallInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ReorderPoint", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_StandardCost", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "StandardCost", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ListPrice", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ListPrice", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Size", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Size", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Size", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Size", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SizeUnitMeasureCode", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SizeUnitMeasureCode", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SizeUnitMeasureCode", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SizeUnitMeasureCode", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_WeightUnitMeasureCode", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "WeightUnitMeasureCode", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_WeightUnitMeasureCode", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "WeightUnitMeasureCode", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Weight", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Weight", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Weight", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 8, 2, "Weight", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DaysToManufacture", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DaysToManufacture", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ProductLine", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductLine", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductLine", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductLine", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Class", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Class", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Class", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Class", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Style", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Style", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Style", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Style", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ProductSubcategoryID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductSubcategoryID", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductSubcategoryID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductSubcategoryID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ProductModelID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductModelID", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductModelID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductModelID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SellStartDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SellStartDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SellEndDate", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SellEndDate", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SellEndDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SellEndDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DiscontinuedDate", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiscontinuedDate", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DiscontinuedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DiscontinuedDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_rowguid", global::System.Data.SqlDbType.UniqueIdentifier, 0, global::System.Data.ParameterDirection.Input, 0, 0, "rowguid", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "ProductID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::Test_App.Properties.Settings.Default.AdventureWorksConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitCommandCollection() { this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = @"SELECT ProductID, Name, ProductNumber, MakeFlag, FinishedGoodsFlag, Color, SafetyStockLevel, ReorderPoint, StandardCost, ListPrice, Size, SizeUnitMeasureCode, WeightUnitMeasureCode, Weight, DaysToManufacture, ProductLine, Class, Style, ProductSubcategoryID, ProductModelID, SellStartDate, SellEndDate, DiscontinuedDate, rowguid, ModifiedDate FROM Production.Product"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] public virtual int Fill(AdventureWorksDataSet.ProductDataTable 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.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual AdventureWorksDataSet.ProductDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; AdventureWorksDataSet.ProductDataTable dataTable = new AdventureWorksDataSet.ProductDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(AdventureWorksDataSet.ProductDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(AdventureWorksDataSet dataSet) { return this.Adapter.Update(dataSet, "Product"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [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.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(global::System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] public virtual int Delete( int Original_ProductID, string Original_Name, string Original_ProductNumber, bool Original_MakeFlag, bool Original_FinishedGoodsFlag, string Original_Color, short Original_SafetyStockLevel, short Original_ReorderPoint, decimal Original_StandardCost, decimal Original_ListPrice, string Original_Size, string Original_SizeUnitMeasureCode, string Original_WeightUnitMeasureCode, global::System.Nullable Original_Weight, int Original_DaysToManufacture, string Original_ProductLine, string Original_Class, string Original_Style, global::System.Nullable Original_ProductSubcategoryID, global::System.Nullable Original_ProductModelID, System.DateTime Original_SellStartDate, global::System.Nullable Original_SellEndDate, global::System.Nullable Original_DiscontinuedDate, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ProductID)); if ((Original_Name == null)) { throw new global::System.ArgumentNullException("Original_Name"); } else { this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name)); } if ((Original_ProductNumber == null)) { throw new global::System.ArgumentNullException("Original_ProductNumber"); } else { this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_ProductNumber)); } this.Adapter.DeleteCommand.Parameters[3].Value = ((bool)(Original_MakeFlag)); this.Adapter.DeleteCommand.Parameters[4].Value = ((bool)(Original_FinishedGoodsFlag)); if ((Original_Color == null)) { this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_Color)); } this.Adapter.DeleteCommand.Parameters[7].Value = ((short)(Original_SafetyStockLevel)); this.Adapter.DeleteCommand.Parameters[8].Value = ((short)(Original_ReorderPoint)); this.Adapter.DeleteCommand.Parameters[9].Value = ((decimal)(Original_StandardCost)); this.Adapter.DeleteCommand.Parameters[10].Value = ((decimal)(Original_ListPrice)); if ((Original_Size == null)) { this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[12].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[12].Value = ((string)(Original_Size)); } if ((Original_SizeUnitMeasureCode == null)) { this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[14].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[14].Value = ((string)(Original_SizeUnitMeasureCode)); } if ((Original_WeightUnitMeasureCode == null)) { this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[16].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[16].Value = ((string)(Original_WeightUnitMeasureCode)); } if ((Original_Weight.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[17].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[18].Value = ((decimal)(Original_Weight.Value)); } else { this.Adapter.DeleteCommand.Parameters[17].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[18].Value = global::System.DBNull.Value; } this.Adapter.DeleteCommand.Parameters[19].Value = ((int)(Original_DaysToManufacture)); if ((Original_ProductLine == null)) { this.Adapter.DeleteCommand.Parameters[20].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[21].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[20].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[21].Value = ((string)(Original_ProductLine)); } if ((Original_Class == null)) { this.Adapter.DeleteCommand.Parameters[22].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[23].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[22].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[23].Value = ((string)(Original_Class)); } if ((Original_Style == null)) { this.Adapter.DeleteCommand.Parameters[24].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[25].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[24].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[25].Value = ((string)(Original_Style)); } if ((Original_ProductSubcategoryID.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[26].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[27].Value = ((int)(Original_ProductSubcategoryID.Value)); } else { this.Adapter.DeleteCommand.Parameters[26].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[27].Value = global::System.DBNull.Value; } if ((Original_ProductModelID.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[28].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[29].Value = ((int)(Original_ProductModelID.Value)); } else { this.Adapter.DeleteCommand.Parameters[28].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[29].Value = global::System.DBNull.Value; } this.Adapter.DeleteCommand.Parameters[30].Value = ((System.DateTime)(Original_SellStartDate)); if ((Original_SellEndDate.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[31].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[32].Value = ((System.DateTime)(Original_SellEndDate.Value)); } else { this.Adapter.DeleteCommand.Parameters[31].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[32].Value = global::System.DBNull.Value; } if ((Original_DiscontinuedDate.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[33].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[34].Value = ((System.DateTime)(Original_DiscontinuedDate.Value)); } else { this.Adapter.DeleteCommand.Parameters[33].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[34].Value = global::System.DBNull.Value; } this.Adapter.DeleteCommand.Parameters[35].Value = ((System.Guid)(Original_rowguid)); this.Adapter.DeleteCommand.Parameters[36].Value = ((System.DateTime)(Original_ModifiedDate)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.DeleteCommand.Connection.Open(); } try { int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.DeleteCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] public virtual int Insert( string Name, string ProductNumber, bool MakeFlag, bool FinishedGoodsFlag, string Color, short SafetyStockLevel, short ReorderPoint, decimal StandardCost, decimal ListPrice, string Size, string SizeUnitMeasureCode, string WeightUnitMeasureCode, global::System.Nullable Weight, int DaysToManufacture, string ProductLine, string Class, string Style, global::System.Nullable ProductSubcategoryID, global::System.Nullable ProductModelID, System.DateTime SellStartDate, global::System.Nullable SellEndDate, global::System.Nullable DiscontinuedDate, System.Guid rowguid, System.DateTime ModifiedDate) { if ((Name == null)) { throw new global::System.ArgumentNullException("Name"); } else { this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name)); } if ((ProductNumber == null)) { throw new global::System.ArgumentNullException("ProductNumber"); } else { this.Adapter.InsertCommand.Parameters[1].Value = ((string)(ProductNumber)); } this.Adapter.InsertCommand.Parameters[2].Value = ((bool)(MakeFlag)); this.Adapter.InsertCommand.Parameters[3].Value = ((bool)(FinishedGoodsFlag)); if ((Color == null)) { this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[4].Value = ((string)(Color)); } this.Adapter.InsertCommand.Parameters[5].Value = ((short)(SafetyStockLevel)); this.Adapter.InsertCommand.Parameters[6].Value = ((short)(ReorderPoint)); this.Adapter.InsertCommand.Parameters[7].Value = ((decimal)(StandardCost)); this.Adapter.InsertCommand.Parameters[8].Value = ((decimal)(ListPrice)); if ((Size == null)) { this.Adapter.InsertCommand.Parameters[9].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[9].Value = ((string)(Size)); } if ((SizeUnitMeasureCode == null)) { this.Adapter.InsertCommand.Parameters[10].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[10].Value = ((string)(SizeUnitMeasureCode)); } if ((WeightUnitMeasureCode == null)) { this.Adapter.InsertCommand.Parameters[11].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[11].Value = ((string)(WeightUnitMeasureCode)); } if ((Weight.HasValue == true)) { this.Adapter.InsertCommand.Parameters[12].Value = ((decimal)(Weight.Value)); } else { this.Adapter.InsertCommand.Parameters[12].Value = global::System.DBNull.Value; } this.Adapter.InsertCommand.Parameters[13].Value = ((int)(DaysToManufacture)); if ((ProductLine == null)) { this.Adapter.InsertCommand.Parameters[14].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[14].Value = ((string)(ProductLine)); } if ((Class == null)) { this.Adapter.InsertCommand.Parameters[15].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[15].Value = ((string)(Class)); } if ((Style == null)) { this.Adapter.InsertCommand.Parameters[16].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[16].Value = ((string)(Style)); } if ((ProductSubcategoryID.HasValue == true)) { this.Adapter.InsertCommand.Parameters[17].Value = ((int)(ProductSubcategoryID.Value)); } else { this.Adapter.InsertCommand.Parameters[17].Value = global::System.DBNull.Value; } if ((ProductModelID.HasValue == true)) { this.Adapter.InsertCommand.Parameters[18].Value = ((int)(ProductModelID.Value)); } else { this.Adapter.InsertCommand.Parameters[18].Value = global::System.DBNull.Value; } this.Adapter.InsertCommand.Parameters[19].Value = ((System.DateTime)(SellStartDate)); if ((SellEndDate.HasValue == true)) { this.Adapter.InsertCommand.Parameters[20].Value = ((System.DateTime)(SellEndDate.Value)); } else { this.Adapter.InsertCommand.Parameters[20].Value = global::System.DBNull.Value; } if ((DiscontinuedDate.HasValue == true)) { this.Adapter.InsertCommand.Parameters[21].Value = ((System.DateTime)(DiscontinuedDate.Value)); } else { this.Adapter.InsertCommand.Parameters[21].Value = global::System.DBNull.Value; } this.Adapter.InsertCommand.Parameters[22].Value = ((System.Guid)(rowguid)); this.Adapter.InsertCommand.Parameters[23].Value = ((System.DateTime)(ModifiedDate)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.InsertCommand.Connection.Open(); } try { int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.InsertCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update( string Name, string ProductNumber, bool MakeFlag, bool FinishedGoodsFlag, string Color, short SafetyStockLevel, short ReorderPoint, decimal StandardCost, decimal ListPrice, string Size, string SizeUnitMeasureCode, string WeightUnitMeasureCode, global::System.Nullable Weight, int DaysToManufacture, string ProductLine, string Class, string Style, global::System.Nullable ProductSubcategoryID, global::System.Nullable ProductModelID, System.DateTime SellStartDate, global::System.Nullable SellEndDate, global::System.Nullable DiscontinuedDate, System.Guid rowguid, System.DateTime ModifiedDate, int Original_ProductID, string Original_Name, string Original_ProductNumber, bool Original_MakeFlag, bool Original_FinishedGoodsFlag, string Original_Color, short Original_SafetyStockLevel, short Original_ReorderPoint, decimal Original_StandardCost, decimal Original_ListPrice, string Original_Size, string Original_SizeUnitMeasureCode, string Original_WeightUnitMeasureCode, global::System.Nullable Original_Weight, int Original_DaysToManufacture, string Original_ProductLine, string Original_Class, string Original_Style, global::System.Nullable Original_ProductSubcategoryID, global::System.Nullable Original_ProductModelID, System.DateTime Original_SellStartDate, global::System.Nullable Original_SellEndDate, global::System.Nullable Original_DiscontinuedDate, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate, int ProductID) { if ((Name == null)) { throw new global::System.ArgumentNullException("Name"); } else { this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name)); } if ((ProductNumber == null)) { throw new global::System.ArgumentNullException("ProductNumber"); } else { this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(ProductNumber)); } this.Adapter.UpdateCommand.Parameters[2].Value = ((bool)(MakeFlag)); this.Adapter.UpdateCommand.Parameters[3].Value = ((bool)(FinishedGoodsFlag)); if ((Color == null)) { this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Color)); } this.Adapter.UpdateCommand.Parameters[5].Value = ((short)(SafetyStockLevel)); this.Adapter.UpdateCommand.Parameters[6].Value = ((short)(ReorderPoint)); this.Adapter.UpdateCommand.Parameters[7].Value = ((decimal)(StandardCost)); this.Adapter.UpdateCommand.Parameters[8].Value = ((decimal)(ListPrice)); if ((Size == null)) { this.Adapter.UpdateCommand.Parameters[9].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Size)); } if ((SizeUnitMeasureCode == null)) { this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(SizeUnitMeasureCode)); } if ((WeightUnitMeasureCode == null)) { this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(WeightUnitMeasureCode)); } if ((Weight.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[12].Value = ((decimal)(Weight.Value)); } else { this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value; } this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(DaysToManufacture)); if ((ProductLine == null)) { this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(ProductLine)); } if ((Class == null)) { this.Adapter.UpdateCommand.Parameters[15].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[15].Value = ((string)(Class)); } if ((Style == null)) { this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(Style)); } if ((ProductSubcategoryID.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[17].Value = ((int)(ProductSubcategoryID.Value)); } else { this.Adapter.UpdateCommand.Parameters[17].Value = global::System.DBNull.Value; } if ((ProductModelID.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[18].Value = ((int)(ProductModelID.Value)); } else { this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value; } this.Adapter.UpdateCommand.Parameters[19].Value = ((System.DateTime)(SellStartDate)); if ((SellEndDate.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[20].Value = ((System.DateTime)(SellEndDate.Value)); } else { this.Adapter.UpdateCommand.Parameters[20].Value = global::System.DBNull.Value; } if ((DiscontinuedDate.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[21].Value = ((System.DateTime)(DiscontinuedDate.Value)); } else { this.Adapter.UpdateCommand.Parameters[21].Value = global::System.DBNull.Value; } this.Adapter.UpdateCommand.Parameters[22].Value = ((System.Guid)(rowguid)); this.Adapter.UpdateCommand.Parameters[23].Value = ((System.DateTime)(ModifiedDate)); this.Adapter.UpdateCommand.Parameters[24].Value = ((int)(Original_ProductID)); if ((Original_Name == null)) { throw new global::System.ArgumentNullException("Original_Name"); } else { this.Adapter.UpdateCommand.Parameters[25].Value = ((string)(Original_Name)); } if ((Original_ProductNumber == null)) { throw new global::System.ArgumentNullException("Original_ProductNumber"); } else { this.Adapter.UpdateCommand.Parameters[26].Value = ((string)(Original_ProductNumber)); } this.Adapter.UpdateCommand.Parameters[27].Value = ((bool)(Original_MakeFlag)); this.Adapter.UpdateCommand.Parameters[28].Value = ((bool)(Original_FinishedGoodsFlag)); if ((Original_Color == null)) { this.Adapter.UpdateCommand.Parameters[29].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[30].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[29].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[30].Value = ((string)(Original_Color)); } this.Adapter.UpdateCommand.Parameters[31].Value = ((short)(Original_SafetyStockLevel)); this.Adapter.UpdateCommand.Parameters[32].Value = ((short)(Original_ReorderPoint)); this.Adapter.UpdateCommand.Parameters[33].Value = ((decimal)(Original_StandardCost)); this.Adapter.UpdateCommand.Parameters[34].Value = ((decimal)(Original_ListPrice)); if ((Original_Size == null)) { this.Adapter.UpdateCommand.Parameters[35].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[36].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[35].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[36].Value = ((string)(Original_Size)); } if ((Original_SizeUnitMeasureCode == null)) { this.Adapter.UpdateCommand.Parameters[37].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[38].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[37].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[38].Value = ((string)(Original_SizeUnitMeasureCode)); } if ((Original_WeightUnitMeasureCode == null)) { this.Adapter.UpdateCommand.Parameters[39].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[40].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[39].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[40].Value = ((string)(Original_WeightUnitMeasureCode)); } if ((Original_Weight.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[41].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[42].Value = ((decimal)(Original_Weight.Value)); } else { this.Adapter.UpdateCommand.Parameters[41].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[42].Value = global::System.DBNull.Value; } this.Adapter.UpdateCommand.Parameters[43].Value = ((int)(Original_DaysToManufacture)); if ((Original_ProductLine == null)) { this.Adapter.UpdateCommand.Parameters[44].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[45].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[44].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[45].Value = ((string)(Original_ProductLine)); } if ((Original_Class == null)) { this.Adapter.UpdateCommand.Parameters[46].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[47].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[46].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[47].Value = ((string)(Original_Class)); } if ((Original_Style == null)) { this.Adapter.UpdateCommand.Parameters[48].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[49].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[48].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[49].Value = ((string)(Original_Style)); } if ((Original_ProductSubcategoryID.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[50].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[51].Value = ((int)(Original_ProductSubcategoryID.Value)); } else { this.Adapter.UpdateCommand.Parameters[50].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[51].Value = global::System.DBNull.Value; } if ((Original_ProductModelID.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[52].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[53].Value = ((int)(Original_ProductModelID.Value)); } else { this.Adapter.UpdateCommand.Parameters[52].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[53].Value = global::System.DBNull.Value; } this.Adapter.UpdateCommand.Parameters[54].Value = ((System.DateTime)(Original_SellStartDate)); if ((Original_SellEndDate.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[55].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[56].Value = ((System.DateTime)(Original_SellEndDate.Value)); } else { this.Adapter.UpdateCommand.Parameters[55].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[56].Value = global::System.DBNull.Value; } if ((Original_DiscontinuedDate.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[57].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[58].Value = ((System.DateTime)(Original_DiscontinuedDate.Value)); } else { this.Adapter.UpdateCommand.Parameters[57].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[58].Value = global::System.DBNull.Value; } this.Adapter.UpdateCommand.Parameters[59].Value = ((System.Guid)(Original_rowguid)); this.Adapter.UpdateCommand.Parameters[60].Value = ((System.DateTime)(Original_ModifiedDate)); this.Adapter.UpdateCommand.Parameters[61].Value = ((int)(ProductID)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.UpdateCommand.Connection.Open(); } try { int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.UpdateCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update( string Name, string ProductNumber, bool MakeFlag, bool FinishedGoodsFlag, string Color, short SafetyStockLevel, short ReorderPoint, decimal StandardCost, decimal ListPrice, string Size, string SizeUnitMeasureCode, string WeightUnitMeasureCode, global::System.Nullable Weight, int DaysToManufacture, string ProductLine, string Class, string Style, global::System.Nullable ProductSubcategoryID, global::System.Nullable ProductModelID, System.DateTime SellStartDate, global::System.Nullable SellEndDate, global::System.Nullable DiscontinuedDate, System.Guid rowguid, System.DateTime ModifiedDate, int Original_ProductID, string Original_Name, string Original_ProductNumber, bool Original_MakeFlag, bool Original_FinishedGoodsFlag, string Original_Color, short Original_SafetyStockLevel, short Original_ReorderPoint, decimal Original_StandardCost, decimal Original_ListPrice, string Original_Size, string Original_SizeUnitMeasureCode, string Original_WeightUnitMeasureCode, global::System.Nullable Original_Weight, int Original_DaysToManufacture, string Original_ProductLine, string Original_Class, string Original_Style, global::System.Nullable Original_ProductSubcategoryID, global::System.Nullable Original_ProductModelID, System.DateTime Original_SellStartDate, global::System.Nullable Original_SellEndDate, global::System.Nullable Original_DiscontinuedDate, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) { return this.Update(Name, ProductNumber, MakeFlag, FinishedGoodsFlag, Color, SafetyStockLevel, ReorderPoint, StandardCost, ListPrice, Size, SizeUnitMeasureCode, WeightUnitMeasureCode, Weight, DaysToManufacture, ProductLine, Class, Style, ProductSubcategoryID, ProductModelID, SellStartDate, SellEndDate, DiscontinuedDate, rowguid, ModifiedDate, Original_ProductID, Original_Name, Original_ProductNumber, Original_MakeFlag, Original_FinishedGoodsFlag, Original_Color, Original_SafetyStockLevel, Original_ReorderPoint, Original_StandardCost, Original_ListPrice, Original_Size, Original_SizeUnitMeasureCode, Original_WeightUnitMeasureCode, Original_Weight, Original_DaysToManufacture, Original_ProductLine, Original_Class, Original_Style, Original_ProductSubcategoryID, Original_ProductModelID, Original_SellStartDate, Original_SellEndDate, Original_DiscontinuedDate, Original_rowguid, Original_ModifiedDate, Original_ProductID); } } /// ///Represents the connection and commands used to retrieve and save data. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [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=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public partial class PurchaseOrderDetailTableAdapter : 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()] public PurchaseOrderDetailTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { get { if ((this._adapter == null)) { this.InitAdapter(); } return this._adapter; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 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()] 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()] protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool ClearBeforeFill { get { return this._clearBeforeFill; } set { this._clearBeforeFill = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 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 = "PurchaseOrderDetail"; tableMapping.ColumnMappings.Add("PurchaseOrderID", "PurchaseOrderID"); tableMapping.ColumnMappings.Add("PurchaseOrderDetailID", "PurchaseOrderDetailID"); tableMapping.ColumnMappings.Add("DueDate", "DueDate"); tableMapping.ColumnMappings.Add("OrderQty", "OrderQty"); tableMapping.ColumnMappings.Add("ProductID", "ProductID"); tableMapping.ColumnMappings.Add("UnitPrice", "UnitPrice"); tableMapping.ColumnMappings.Add("LineTotal", "LineTotal"); tableMapping.ColumnMappings.Add("ReceivedQty", "ReceivedQty"); tableMapping.ColumnMappings.Add("RejectedQty", "RejectedQty"); tableMapping.ColumnMappings.Add("StockedQty", "StockedQty"); tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate"); 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 [Purchasing].[PurchaseOrderDetail] WHERE (([PurchaseOrderID] = @Original_PurchaseOrderID) AND ([PurchaseOrderDetailID] = @Original_PurchaseOrderDetailID) AND ([DueDate] = @Original_DueDate) AND ([OrderQty] = @Original_OrderQty) AND ([ProductID] = @Original_ProductID) AND ([UnitPrice] = @Original_UnitPrice) AND ([LineTotal] = @Original_LineTotal) AND ([ReceivedQty] = @Original_ReceivedQty) AND ([RejectedQty] = @Original_RejectedQty) AND ([StockedQty] = @Original_StockedQty) AND ([ModifiedDate] = @Original_ModifiedDate))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PurchaseOrderID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PurchaseOrderDetailID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderDetailID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DueDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DueDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OrderQty", global::System.Data.SqlDbType.SmallInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrderQty", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_UnitPrice", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UnitPrice", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_LineTotal", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "LineTotal", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ReceivedQty", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 8, 2, "ReceivedQty", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_RejectedQty", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 8, 2, "RejectedQty", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_StockedQty", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 9, 2, "StockedQty", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", 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 [Purchasing].[PurchaseOrderDetail] ([PurchaseOrderID], [DueDate], [OrderQty], [ProductID], [UnitPrice], [LineTotal], [ReceivedQty], [RejectedQty], [StockedQty], [ModifiedDate]) VALUES (@PurchaseOrderID, @DueDate, @OrderQty, @ProductID, @UnitPrice, @LineTotal, @ReceivedQty, @RejectedQty, @StockedQty, @ModifiedDate); SELECT PurchaseOrderID, PurchaseOrderDetailID, DueDate, OrderQty, ProductID, UnitPrice, LineTotal, ReceivedQty, RejectedQty, StockedQty, ModifiedDate FROM Purchasing.PurchaseOrderDetail WHERE (PurchaseOrderDetailID = SCOPE_IDENTITY()) AND (PurchaseOrderID = @PurchaseOrderID)"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PurchaseOrderID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DueDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DueDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OrderQty", global::System.Data.SqlDbType.SmallInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrderQty", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UnitPrice", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UnitPrice", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@LineTotal", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "LineTotal", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ReceivedQty", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 8, 2, "ReceivedQty", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RejectedQty", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 8, 2, "RejectedQty", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StockedQty", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 9, 2, "StockedQty", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ModifiedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", 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 [Purchasing].[PurchaseOrderDetail] SET [PurchaseOrderID] = @PurchaseOrderID, [DueDate] = @DueDate, [OrderQty] = @OrderQty, [ProductID] = @ProductID, [UnitPrice] = @UnitPrice, [LineTotal] = @LineTotal, [ReceivedQty] = @ReceivedQty, [RejectedQty] = @RejectedQty, [StockedQty] = @StockedQty, [ModifiedDate] = @ModifiedDate WHERE (([PurchaseOrderID] = @Original_PurchaseOrderID) AND ([PurchaseOrderDetailID] = @Original_PurchaseOrderDetailID) AND ([DueDate] = @Original_DueDate) AND ([OrderQty] = @Original_OrderQty) AND ([ProductID] = @Original_ProductID) AND ([UnitPrice] = @Original_UnitPrice) AND ([LineTotal] = @Original_LineTotal) AND ([ReceivedQty] = @Original_ReceivedQty) AND ([RejectedQty] = @Original_RejectedQty) AND ([StockedQty] = @Original_StockedQty) AND ([ModifiedDate] = @Original_ModifiedDate)); SELECT PurchaseOrderID, PurchaseOrderDetailID, DueDate, OrderQty, ProductID, UnitPrice, LineTotal, ReceivedQty, RejectedQty, StockedQty, ModifiedDate FROM Purchasing.PurchaseOrderDetail WHERE (PurchaseOrderDetailID = @PurchaseOrderDetailID) AND (PurchaseOrderID = @PurchaseOrderID)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PurchaseOrderID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DueDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DueDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OrderQty", global::System.Data.SqlDbType.SmallInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrderQty", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UnitPrice", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UnitPrice", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@LineTotal", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "LineTotal", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ReceivedQty", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 8, 2, "ReceivedQty", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RejectedQty", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 8, 2, "RejectedQty", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StockedQty", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 9, 2, "StockedQty", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ModifiedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PurchaseOrderID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PurchaseOrderDetailID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderDetailID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DueDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DueDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OrderQty", global::System.Data.SqlDbType.SmallInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrderQty", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_UnitPrice", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UnitPrice", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_LineTotal", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "LineTotal", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ReceivedQty", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 8, 2, "ReceivedQty", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_RejectedQty", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 8, 2, "RejectedQty", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_StockedQty", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 9, 2, "StockedQty", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PurchaseOrderDetailID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderDetailID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::Test_App.Properties.Settings.Default.AdventureWorksConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitCommandCollection() { this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT PurchaseOrderID, PurchaseOrderDetailID, DueDate, OrderQty, ProductID, Unit" + "Price, LineTotal, ReceivedQty, RejectedQty, StockedQty, ModifiedDate FROM Purcha" + "sing.PurchaseOrderDetail"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] public virtual int Fill(AdventureWorksDataSet.PurchaseOrderDetailDataTable 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.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual AdventureWorksDataSet.PurchaseOrderDetailDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; AdventureWorksDataSet.PurchaseOrderDetailDataTable dataTable = new AdventureWorksDataSet.PurchaseOrderDetailDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(AdventureWorksDataSet.PurchaseOrderDetailDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(AdventureWorksDataSet dataSet) { return this.Adapter.Update(dataSet, "PurchaseOrderDetail"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [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.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(global::System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] public virtual int Delete(int Original_PurchaseOrderID, int Original_PurchaseOrderDetailID, System.DateTime Original_DueDate, short Original_OrderQty, int Original_ProductID, decimal Original_UnitPrice, decimal Original_LineTotal, decimal Original_ReceivedQty, decimal Original_RejectedQty, decimal Original_StockedQty, System.DateTime Original_ModifiedDate) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_PurchaseOrderID)); this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_PurchaseOrderDetailID)); this.Adapter.DeleteCommand.Parameters[2].Value = ((System.DateTime)(Original_DueDate)); this.Adapter.DeleteCommand.Parameters[3].Value = ((short)(Original_OrderQty)); this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_ProductID)); this.Adapter.DeleteCommand.Parameters[5].Value = ((decimal)(Original_UnitPrice)); this.Adapter.DeleteCommand.Parameters[6].Value = ((decimal)(Original_LineTotal)); this.Adapter.DeleteCommand.Parameters[7].Value = ((decimal)(Original_ReceivedQty)); this.Adapter.DeleteCommand.Parameters[8].Value = ((decimal)(Original_RejectedQty)); this.Adapter.DeleteCommand.Parameters[9].Value = ((decimal)(Original_StockedQty)); this.Adapter.DeleteCommand.Parameters[10].Value = ((System.DateTime)(Original_ModifiedDate)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.DeleteCommand.Connection.Open(); } try { int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.DeleteCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] public virtual int Insert(int PurchaseOrderID, System.DateTime DueDate, short OrderQty, int ProductID, decimal UnitPrice, decimal LineTotal, decimal ReceivedQty, decimal RejectedQty, decimal StockedQty, System.DateTime ModifiedDate) { this.Adapter.InsertCommand.Parameters[0].Value = ((int)(PurchaseOrderID)); this.Adapter.InsertCommand.Parameters[1].Value = ((System.DateTime)(DueDate)); this.Adapter.InsertCommand.Parameters[2].Value = ((short)(OrderQty)); this.Adapter.InsertCommand.Parameters[3].Value = ((int)(ProductID)); this.Adapter.InsertCommand.Parameters[4].Value = ((decimal)(UnitPrice)); this.Adapter.InsertCommand.Parameters[5].Value = ((decimal)(LineTotal)); this.Adapter.InsertCommand.Parameters[6].Value = ((decimal)(ReceivedQty)); this.Adapter.InsertCommand.Parameters[7].Value = ((decimal)(RejectedQty)); this.Adapter.InsertCommand.Parameters[8].Value = ((decimal)(StockedQty)); this.Adapter.InsertCommand.Parameters[9].Value = ((System.DateTime)(ModifiedDate)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.InsertCommand.Connection.Open(); } try { int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.InsertCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update( int PurchaseOrderID, System.DateTime DueDate, short OrderQty, int ProductID, decimal UnitPrice, decimal LineTotal, decimal ReceivedQty, decimal RejectedQty, decimal StockedQty, System.DateTime ModifiedDate, int Original_PurchaseOrderID, int Original_PurchaseOrderDetailID, System.DateTime Original_DueDate, short Original_OrderQty, int Original_ProductID, decimal Original_UnitPrice, decimal Original_LineTotal, decimal Original_ReceivedQty, decimal Original_RejectedQty, decimal Original_StockedQty, System.DateTime Original_ModifiedDate, int PurchaseOrderDetailID) { this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(PurchaseOrderID)); this.Adapter.UpdateCommand.Parameters[1].Value = ((System.DateTime)(DueDate)); this.Adapter.UpdateCommand.Parameters[2].Value = ((short)(OrderQty)); this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(ProductID)); this.Adapter.UpdateCommand.Parameters[4].Value = ((decimal)(UnitPrice)); this.Adapter.UpdateCommand.Parameters[5].Value = ((decimal)(LineTotal)); this.Adapter.UpdateCommand.Parameters[6].Value = ((decimal)(ReceivedQty)); this.Adapter.UpdateCommand.Parameters[7].Value = ((decimal)(RejectedQty)); this.Adapter.UpdateCommand.Parameters[8].Value = ((decimal)(StockedQty)); this.Adapter.UpdateCommand.Parameters[9].Value = ((System.DateTime)(ModifiedDate)); this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_PurchaseOrderID)); this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Original_PurchaseOrderDetailID)); this.Adapter.UpdateCommand.Parameters[12].Value = ((System.DateTime)(Original_DueDate)); this.Adapter.UpdateCommand.Parameters[13].Value = ((short)(Original_OrderQty)); this.Adapter.UpdateCommand.Parameters[14].Value = ((int)(Original_ProductID)); this.Adapter.UpdateCommand.Parameters[15].Value = ((decimal)(Original_UnitPrice)); this.Adapter.UpdateCommand.Parameters[16].Value = ((decimal)(Original_LineTotal)); this.Adapter.UpdateCommand.Parameters[17].Value = ((decimal)(Original_ReceivedQty)); this.Adapter.UpdateCommand.Parameters[18].Value = ((decimal)(Original_RejectedQty)); this.Adapter.UpdateCommand.Parameters[19].Value = ((decimal)(Original_StockedQty)); this.Adapter.UpdateCommand.Parameters[20].Value = ((System.DateTime)(Original_ModifiedDate)); this.Adapter.UpdateCommand.Parameters[21].Value = ((int)(PurchaseOrderDetailID)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.UpdateCommand.Connection.Open(); } try { int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.UpdateCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update( System.DateTime DueDate, short OrderQty, int ProductID, decimal UnitPrice, decimal LineTotal, decimal ReceivedQty, decimal RejectedQty, decimal StockedQty, System.DateTime ModifiedDate, int Original_PurchaseOrderID, int Original_PurchaseOrderDetailID, System.DateTime Original_DueDate, short Original_OrderQty, int Original_ProductID, decimal Original_UnitPrice, decimal Original_LineTotal, decimal Original_ReceivedQty, decimal Original_RejectedQty, decimal Original_StockedQty, System.DateTime Original_ModifiedDate) { return this.Update(Original_PurchaseOrderID, DueDate, OrderQty, ProductID, UnitPrice, LineTotal, ReceivedQty, RejectedQty, StockedQty, ModifiedDate, Original_PurchaseOrderID, Original_PurchaseOrderDetailID, Original_DueDate, Original_OrderQty, Original_ProductID, Original_UnitPrice, Original_LineTotal, Original_ReceivedQty, Original_RejectedQty, Original_StockedQty, Original_ModifiedDate, Original_PurchaseOrderDetailID); } } /// ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [global::System.ComponentModel.DesignerCategoryAttribute("code")] [global::System.ComponentModel.ToolboxItem(true)] [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" + "esigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")] public partial class TableAdapterManager : global::System.ComponentModel.Component { private UpdateOrderOption _updateOrder; private ProductTableAdapter _productTableAdapter; private PurchaseOrderDetailTableAdapter _purchaseOrderDetailTableAdapter; private bool _backupDataSetBeforeUpdate; private global::System.Data.IDbConnection _connection; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public UpdateOrderOption UpdateOrder { get { return this._updateOrder; } set { this._updateOrder = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" + "", "System.Drawing.Design.UITypeEditor")] public ProductTableAdapter ProductTableAdapter { get { return this._productTableAdapter; } set { if (((this._productTableAdapter != null) && (this.TableAdapterInstanceCount == 1))) { this._productTableAdapter = value; return; } if (((value != null) && (this.MatchTableAdapterConnection(value.Connection) == false))) { throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + "tring."); } this._productTableAdapter = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" + "", "System.Drawing.Design.UITypeEditor")] public PurchaseOrderDetailTableAdapter PurchaseOrderDetailTableAdapter { get { return this._purchaseOrderDetailTableAdapter; } set { if (((this._purchaseOrderDetailTableAdapter != null) && (this.TableAdapterInstanceCount == 1))) { this._purchaseOrderDetailTableAdapter = value; return; } if (((value != null) && (this.MatchTableAdapterConnection(value.Connection) == false))) { throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + "tring."); } this._purchaseOrderDetailTableAdapter = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool BackupDataSetBeforeUpdate { get { return this._backupDataSetBeforeUpdate; } set { this._backupDataSetBeforeUpdate = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Browsable(false)] public global::System.Data.IDbConnection Connection { get { if ((this._connection != null)) { return this._connection; } if (((this._productTableAdapter != null) && (this._productTableAdapter.Connection != null))) { return this._productTableAdapter.Connection; } if (((this._purchaseOrderDetailTableAdapter != null) && (this._purchaseOrderDetailTableAdapter.Connection != null))) { return this._purchaseOrderDetailTableAdapter.Connection; } return null; } set { this._connection = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Browsable(false)] public int TableAdapterInstanceCount { get { int count = 0; if ((this._productTableAdapter != null)) { count = (count + 1); } if ((this._purchaseOrderDetailTableAdapter != null)) { count = (count + 1); } return count; } } /// ///Update rows in top-down order. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] private int UpdateUpdatedRows(AdventureWorksDataSet dataSet, global::System.Collections.Generic.List allChangedRows, global::System.Collections.Generic.List allAddedRows) { int result = 0; if ((this._productTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.Product.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { result = (result + this._productTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } if ((this._purchaseOrderDetailTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.PurchaseOrderDetail.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { result = (result + this._purchaseOrderDetailTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } return result; } /// ///Insert rows in top-down order. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] private int UpdateInsertedRows(AdventureWorksDataSet dataSet, global::System.Collections.Generic.List allAddedRows) { int result = 0; if ((this._productTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.Product.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { result = (result + this._productTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } if ((this._purchaseOrderDetailTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.PurchaseOrderDetail.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { result = (result + this._purchaseOrderDetailTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } return result; } /// ///Delete rows in bottom-up order. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] private int UpdateDeletedRows(AdventureWorksDataSet dataSet, global::System.Collections.Generic.List allChangedRows) { int result = 0; if ((this._purchaseOrderDetailTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.PurchaseOrderDetail.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { result = (result + this._purchaseOrderDetailTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } if ((this._productTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.Product.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { result = (result + this._productTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } return result; } /// ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List allAddedRows) { if (((updatedRows == null) || (updatedRows.Length < 1))) { return updatedRows; } if (((allAddedRows == null) || (allAddedRows.Count < 1))) { return updatedRows; } global::System.Collections.Generic.List realUpdatedRows = new global::System.Collections.Generic.List(); for (int i = 0; (i < updatedRows.Length); i = (i + 1)) { global::System.Data.DataRow row = updatedRows[i]; if ((allAddedRows.Contains(row) == false)) { realUpdatedRows.Add(row); } } return realUpdatedRows.ToArray(); } /// ///Update all changes to the dataset. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public virtual int UpdateAll(AdventureWorksDataSet dataSet) { if ((dataSet == null)) { throw new global::System.ArgumentNullException("dataSet"); } if ((dataSet.HasChanges() == false)) { return 0; } global::System.Data.IDbConnection workConnection = this.Connection; if ((workConnection == null)) { throw new global::System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana" + "ger TableAdapter property to a valid TableAdapter instance."); } bool workConnOpened = false; if (((workConnection.State & global::System.Data.ConnectionState.Closed) == global::System.Data.ConnectionState.Closed)) { workConnection.Open(); workConnOpened = true; } global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction(); if ((workTransaction == null)) { throw new global::System.ApplicationException("The transaction cannot begin. The current data connection does not support transa" + "ctions or the current state is not allowing the transaction to begin."); } global::System.Collections.Generic.List allChangedRows = new global::System.Collections.Generic.List(); global::System.Collections.Generic.List allAddedRows = new global::System.Collections.Generic.List(); global::System.Collections.Generic.List adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List(); global::System.Collections.Generic.Dictionary revertConnections = new global::System.Collections.Generic.Dictionary(); int result = 0; global::System.Data.DataSet backupDataSet = null; if (this.BackupDataSetBeforeUpdate) { backupDataSet = new global::System.Data.DataSet(); backupDataSet.Merge(dataSet); } try { // ---- Prepare for update ----------- // if ((this._productTableAdapter != null)) { revertConnections.Add(this._productTableAdapter, this._productTableAdapter.Connection); this._productTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); this._productTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); if (this._productTableAdapter.Adapter.AcceptChangesDuringUpdate) { this._productTableAdapter.Adapter.AcceptChangesDuringUpdate = false; adaptersWithAcceptChangesDuringUpdate.Add(this._productTableAdapter.Adapter); } } if ((this._purchaseOrderDetailTableAdapter != null)) { revertConnections.Add(this._purchaseOrderDetailTableAdapter, this._purchaseOrderDetailTableAdapter.Connection); this._purchaseOrderDetailTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); this._purchaseOrderDetailTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); if (this._purchaseOrderDetailTableAdapter.Adapter.AcceptChangesDuringUpdate) { this._purchaseOrderDetailTableAdapter.Adapter.AcceptChangesDuringUpdate = false; adaptersWithAcceptChangesDuringUpdate.Add(this._purchaseOrderDetailTableAdapter.Adapter); } } // //---- Perform updates ----------- // if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) { result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows)); result = (result + this.UpdateInsertedRows(dataSet, allAddedRows)); } else { result = (result + this.UpdateInsertedRows(dataSet, allAddedRows)); result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows)); } result = (result + this.UpdateDeletedRows(dataSet, allChangedRows)); // //---- Commit updates ----------- // workTransaction.Commit(); if ((0 < allAddedRows.Count)) { global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count]; allAddedRows.CopyTo(rows); for (int i = 0; (i < rows.Length); i = (i + 1)) { global::System.Data.DataRow row = rows[i]; row.AcceptChanges(); } } if ((0 < allChangedRows.Count)) { global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count]; allChangedRows.CopyTo(rows); for (int i = 0; (i < rows.Length); i = (i + 1)) { global::System.Data.DataRow row = rows[i]; row.AcceptChanges(); } } } catch (global::System.Exception ex) { workTransaction.Rollback(); // ---- Restore the dataset ----------- if (this.BackupDataSetBeforeUpdate) { global::System.Diagnostics.Debug.Assert((backupDataSet != null)); dataSet.Clear(); dataSet.Merge(backupDataSet); } else { if ((0 < allAddedRows.Count)) { global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count]; allAddedRows.CopyTo(rows); for (int i = 0; (i < rows.Length); i = (i + 1)) { global::System.Data.DataRow row = rows[i]; row.AcceptChanges(); row.SetAdded(); } } } throw ex; } finally { if (workConnOpened) { workConnection.Close(); } if ((this._productTableAdapter != null)) { this._productTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._productTableAdapter])); this._productTableAdapter.Transaction = null; } if ((this._purchaseOrderDetailTableAdapter != null)) { this._purchaseOrderDetailTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._purchaseOrderDetailTableAdapter])); this._purchaseOrderDetailTableAdapter.Transaction = null; } if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) { global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count]; adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters); for (int i = 0; (i < adapters.Length); i = (i + 1)) { global::System.Data.Common.DataAdapter adapter = adapters[i]; adapter.AcceptChangesDuringUpdate = true; } } } return result; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) { global::System.Array.Sort(rows, new SelfReferenceComparer(relation, childFirst)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) { if ((this._connection != null)) { return true; } if (((this.Connection == null) || (inputConnection == null))) { return true; } if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) { return true; } return false; } /// ///Update Order Option /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public enum UpdateOrderOption { InsertUpdateDelete = 0, UpdateInsertDelete = 1, } /// ///Used to sort self-referenced table's rows /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer { private global::System.Data.DataRelation _relation; private int _childFirst; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) { this._relation = relation; if (childFirst) { this._childFirst = -1; } else { this._childFirst = 1; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] private bool IsChildAndParent(global::System.Data.DataRow child, global::System.Data.DataRow parent) { global::System.Diagnostics.Debug.Assert((child != null)); global::System.Diagnostics.Debug.Assert((parent != null)); global::System.Data.DataRow newParent = child.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default); for ( ; ((newParent != null) && ((object.ReferenceEquals(newParent, child) == false) && (object.ReferenceEquals(newParent, parent) == false))); ) { newParent = newParent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default); } if ((newParent == null)) { for (newParent = child.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original); ((newParent != null) && ((object.ReferenceEquals(newParent, child) == false) && (object.ReferenceEquals(newParent, parent) == false))); ) { newParent = newParent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original); } } if (object.ReferenceEquals(newParent, parent)) { return true; } return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) { if (object.ReferenceEquals(row1, row2)) { return 0; } if ((row1 == null)) { return -1; } if ((row2 == null)) { return 1; } // Is row1 the child or grandchild of row2 if (this.IsChildAndParent(row1, row2)) { return this._childFirst; } // Is row2 the child or grandchild of row1 if (this.IsChildAndParent(row2, row1)) { return (-1 * this._childFirst); } return 0; } } } } #pragma warning restore 1591