//------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:2.0.50727.42 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ #pragma warning disable 1591 namespace AppliedDataBindingSample { using System; [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [Serializable()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.ToolboxItem(true)] [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")] [System.Xml.Serialization.XmlRootAttribute("NorthwindDataSet")] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")] public partial class NorthwindDataSet : System.Data.DataSet { private CategoriesDataTable tableCategories; private TerritoriesDataTable tableTerritories; private CustomerDemographicsDataTable tableCustomerDemographics; private CustomersDataTable tableCustomers; private EmployeesDataTable tableEmployees; private EmployeeTerritoriesDataTable tableEmployeeTerritories; private Order_DetailsDataTable tableOrder_Details; private OrdersDataTable tableOrders; private ProductsDataTable tableProducts; private RegionDataTable tableRegion; private ShippersDataTable tableShippers; private SuppliersDataTable tableSuppliers; private StatesDataTable tableStates; private System.Data.DataRelation relationFK_Territories_Region; private System.Data.DataRelation relationFK_Employees_Employees; private System.Data.DataRelation relationFK_EmployeeTerritories_Employees; private System.Data.DataRelation relationFK_EmployeeTerritories_Territories; private System.Data.DataRelation relationFK_OrderDetails_Orders; private System.Data.DataRelation relationFK_Order_Details_Products; private System.Data.DataRelation relationFK_Orders_Customers; private System.Data.DataRelation relationFK_Orders_Employees; private System.Data.DataRelation relationFK_Orders_Shippers; private System.Data.DataRelation relationFK_Products_Categories; private System.Data.DataRelation relationFK_Products_Suppliers; private System.Data.SchemaSerializationMode _schemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public NorthwindDataSet() { this.BeginInit(); this.InitClass(); System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); base.Tables.CollectionChanged += schemaChangedHandler; base.Relations.CollectionChanged += schemaChangedHandler; this.EndInit(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected NorthwindDataSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context, false) { if ((this.IsBinarySerialized(info, context) == true)) { this.InitVars(false); System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new 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) == System.Data.SchemaSerializationMode.IncludeSchema)) { System.Data.DataSet ds = new System.Data.DataSet(); ds.ReadXmlSchema(new System.Xml.XmlTextReader(new System.IO.StringReader(strSchema))); if ((ds.Tables["Categories"] != null)) { base.Tables.Add(new CategoriesDataTable(ds.Tables["Categories"])); } if ((ds.Tables["Territories"] != null)) { base.Tables.Add(new TerritoriesDataTable(ds.Tables["Territories"])); } if ((ds.Tables["CustomerDemographics"] != null)) { base.Tables.Add(new CustomerDemographicsDataTable(ds.Tables["CustomerDemographics"])); } if ((ds.Tables["Customers"] != null)) { base.Tables.Add(new CustomersDataTable(ds.Tables["Customers"])); } if ((ds.Tables["Employees"] != null)) { base.Tables.Add(new EmployeesDataTable(ds.Tables["Employees"])); } if ((ds.Tables["EmployeeTerritories"] != null)) { base.Tables.Add(new EmployeeTerritoriesDataTable(ds.Tables["EmployeeTerritories"])); } if ((ds.Tables["Order Details"] != null)) { base.Tables.Add(new Order_DetailsDataTable(ds.Tables["Order Details"])); } if ((ds.Tables["Orders"] != null)) { base.Tables.Add(new OrdersDataTable(ds.Tables["Orders"])); } if ((ds.Tables["Products"] != null)) { base.Tables.Add(new ProductsDataTable(ds.Tables["Products"])); } if ((ds.Tables["Region"] != null)) { base.Tables.Add(new RegionDataTable(ds.Tables["Region"])); } if ((ds.Tables["Shippers"] != null)) { base.Tables.Add(new ShippersDataTable(ds.Tables["Shippers"])); } if ((ds.Tables["Suppliers"] != null)) { base.Tables.Add(new SuppliersDataTable(ds.Tables["Suppliers"])); } if ((ds.Tables["States"] != null)) { base.Tables.Add(new StatesDataTable(ds.Tables["States"])); } 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, System.Data.MissingSchemaAction.Add); this.InitVars(); } else { this.ReadXmlSchema(new System.Xml.XmlTextReader(new System.IO.StringReader(strSchema))); } this.GetSerializationData(info, context); System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); base.Tables.CollectionChanged += schemaChangedHandler; this.Relations.CollectionChanged += schemaChangedHandler; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)] public CategoriesDataTable Categories { get { return this.tableCategories; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)] public TerritoriesDataTable Territories { get { return this.tableTerritories; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)] public CustomerDemographicsDataTable CustomerDemographics { get { return this.tableCustomerDemographics; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)] public CustomersDataTable Customers { get { return this.tableCustomers; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)] public EmployeesDataTable Employees { get { return this.tableEmployees; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)] public EmployeeTerritoriesDataTable EmployeeTerritories { get { return this.tableEmployeeTerritories; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)] public Order_DetailsDataTable Order_Details { get { return this.tableOrder_Details; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)] public OrdersDataTable Orders { get { return this.tableOrders; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)] public ProductsDataTable Products { get { return this.tableProducts; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)] public RegionDataTable Region { get { return this.tableRegion; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)] public ShippersDataTable Shippers { get { return this.tableShippers; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)] public SuppliersDataTable Suppliers { get { return this.tableSuppliers; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)] public StatesDataTable States { get { return this.tableStates; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.BrowsableAttribute(true)] [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)] public override System.Data.SchemaSerializationMode SchemaSerializationMode { get { return this._schemaSerializationMode; } set { this._schemaSerializationMode = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)] public new System.Data.DataTableCollection Tables { get { return base.Tables; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)] public new System.Data.DataRelationCollection Relations { get { return base.Relations; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void InitializeDerivedDataSet() { this.BeginInit(); this.InitClass(); this.EndInit(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public override System.Data.DataSet Clone() { NorthwindDataSet cln = ((NorthwindDataSet)(base.Clone())); cln.InitVars(); cln.SchemaSerializationMode = this.SchemaSerializationMode; return cln; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override bool ShouldSerializeTables() { return false; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override bool ShouldSerializeRelations() { return false; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void ReadXmlSerializable(System.Xml.XmlReader reader) { if ((this.DetermineSchemaSerializationMode(reader) == System.Data.SchemaSerializationMode.IncludeSchema)) { this.Reset(); System.Data.DataSet ds = new System.Data.DataSet(); ds.ReadXml(reader); if ((ds.Tables["Categories"] != null)) { base.Tables.Add(new CategoriesDataTable(ds.Tables["Categories"])); } if ((ds.Tables["Territories"] != null)) { base.Tables.Add(new TerritoriesDataTable(ds.Tables["Territories"])); } if ((ds.Tables["CustomerDemographics"] != null)) { base.Tables.Add(new CustomerDemographicsDataTable(ds.Tables["CustomerDemographics"])); } if ((ds.Tables["Customers"] != null)) { base.Tables.Add(new CustomersDataTable(ds.Tables["Customers"])); } if ((ds.Tables["Employees"] != null)) { base.Tables.Add(new EmployeesDataTable(ds.Tables["Employees"])); } if ((ds.Tables["EmployeeTerritories"] != null)) { base.Tables.Add(new EmployeeTerritoriesDataTable(ds.Tables["EmployeeTerritories"])); } if ((ds.Tables["Order Details"] != null)) { base.Tables.Add(new Order_DetailsDataTable(ds.Tables["Order Details"])); } if ((ds.Tables["Orders"] != null)) { base.Tables.Add(new OrdersDataTable(ds.Tables["Orders"])); } if ((ds.Tables["Products"] != null)) { base.Tables.Add(new ProductsDataTable(ds.Tables["Products"])); } if ((ds.Tables["Region"] != null)) { base.Tables.Add(new RegionDataTable(ds.Tables["Region"])); } if ((ds.Tables["Shippers"] != null)) { base.Tables.Add(new ShippersDataTable(ds.Tables["Shippers"])); } if ((ds.Tables["Suppliers"] != null)) { base.Tables.Add(new SuppliersDataTable(ds.Tables["Suppliers"])); } if ((ds.Tables["States"] != null)) { base.Tables.Add(new StatesDataTable(ds.Tables["States"])); } 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, System.Data.MissingSchemaAction.Add); this.InitVars(); } else { this.ReadXml(reader); this.InitVars(); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Xml.Schema.XmlSchema GetSchemaSerializable() { System.IO.MemoryStream stream = new System.IO.MemoryStream(); this.WriteXmlSchema(new System.Xml.XmlTextWriter(stream, null)); stream.Position = 0; return System.Xml.Schema.XmlSchema.Read(new System.Xml.XmlTextReader(stream), null); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal void InitVars() { this.InitVars(true); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal void InitVars(bool initTable) { this.tableCategories = ((CategoriesDataTable)(base.Tables["Categories"])); if ((initTable == true)) { if ((this.tableCategories != null)) { this.tableCategories.InitVars(); } } this.tableTerritories = ((TerritoriesDataTable)(base.Tables["Territories"])); if ((initTable == true)) { if ((this.tableTerritories != null)) { this.tableTerritories.InitVars(); } } this.tableCustomerDemographics = ((CustomerDemographicsDataTable)(base.Tables["CustomerDemographics"])); if ((initTable == true)) { if ((this.tableCustomerDemographics != null)) { this.tableCustomerDemographics.InitVars(); } } this.tableCustomers = ((CustomersDataTable)(base.Tables["Customers"])); if ((initTable == true)) { if ((this.tableCustomers != null)) { this.tableCustomers.InitVars(); } } this.tableEmployees = ((EmployeesDataTable)(base.Tables["Employees"])); if ((initTable == true)) { if ((this.tableEmployees != null)) { this.tableEmployees.InitVars(); } } this.tableEmployeeTerritories = ((EmployeeTerritoriesDataTable)(base.Tables["EmployeeTerritories"])); if ((initTable == true)) { if ((this.tableEmployeeTerritories != null)) { this.tableEmployeeTerritories.InitVars(); } } this.tableOrder_Details = ((Order_DetailsDataTable)(base.Tables["Order Details"])); if ((initTable == true)) { if ((this.tableOrder_Details != null)) { this.tableOrder_Details.InitVars(); } } this.tableOrders = ((OrdersDataTable)(base.Tables["Orders"])); if ((initTable == true)) { if ((this.tableOrders != null)) { this.tableOrders.InitVars(); } } this.tableProducts = ((ProductsDataTable)(base.Tables["Products"])); if ((initTable == true)) { if ((this.tableProducts != null)) { this.tableProducts.InitVars(); } } this.tableRegion = ((RegionDataTable)(base.Tables["Region"])); if ((initTable == true)) { if ((this.tableRegion != null)) { this.tableRegion.InitVars(); } } this.tableShippers = ((ShippersDataTable)(base.Tables["Shippers"])); if ((initTable == true)) { if ((this.tableShippers != null)) { this.tableShippers.InitVars(); } } this.tableSuppliers = ((SuppliersDataTable)(base.Tables["Suppliers"])); if ((initTable == true)) { if ((this.tableSuppliers != null)) { this.tableSuppliers.InitVars(); } } this.tableStates = ((StatesDataTable)(base.Tables["States"])); if ((initTable == true)) { if ((this.tableStates != null)) { this.tableStates.InitVars(); } } this.relationFK_Territories_Region = this.Relations["FK_Territories_Region"]; this.relationFK_Employees_Employees = this.Relations["FK_Employees_Employees"]; this.relationFK_EmployeeTerritories_Employees = this.Relations["FK_EmployeeTerritories_Employees"]; this.relationFK_EmployeeTerritories_Territories = this.Relations["FK_EmployeeTerritories_Territories"]; this.relationFK_OrderDetails_Orders = this.Relations["FK_OrderDetails_Orders"]; this.relationFK_Order_Details_Products = this.Relations["FK_Order_Details_Products"]; this.relationFK_Orders_Customers = this.Relations["FK_Orders_Customers"]; this.relationFK_Orders_Employees = this.Relations["FK_Orders_Employees"]; this.relationFK_Orders_Shippers = this.Relations["FK_Orders_Shippers"]; this.relationFK_Products_Categories = this.Relations["FK_Products_Categories"]; this.relationFK_Products_Suppliers = this.Relations["FK_Products_Suppliers"]; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitClass() { this.DataSetName = "NorthwindDataSet"; this.Prefix = ""; this.Namespace = "http://tempuri.org/NorthwindDataSet.xsd"; this.EnforceConstraints = true; this.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; this.tableCategories = new CategoriesDataTable(); base.Tables.Add(this.tableCategories); this.tableTerritories = new TerritoriesDataTable(); base.Tables.Add(this.tableTerritories); this.tableCustomerDemographics = new CustomerDemographicsDataTable(); base.Tables.Add(this.tableCustomerDemographics); this.tableCustomers = new CustomersDataTable(); base.Tables.Add(this.tableCustomers); this.tableEmployees = new EmployeesDataTable(); base.Tables.Add(this.tableEmployees); this.tableEmployeeTerritories = new EmployeeTerritoriesDataTable(); base.Tables.Add(this.tableEmployeeTerritories); this.tableOrder_Details = new Order_DetailsDataTable(); base.Tables.Add(this.tableOrder_Details); this.tableOrders = new OrdersDataTable(); base.Tables.Add(this.tableOrders); this.tableProducts = new ProductsDataTable(); base.Tables.Add(this.tableProducts); this.tableRegion = new RegionDataTable(); base.Tables.Add(this.tableRegion); this.tableShippers = new ShippersDataTable(); base.Tables.Add(this.tableShippers); this.tableSuppliers = new SuppliersDataTable(); base.Tables.Add(this.tableSuppliers); this.tableStates = new StatesDataTable(); base.Tables.Add(this.tableStates); this.relationFK_Territories_Region = new System.Data.DataRelation("FK_Territories_Region", new System.Data.DataColumn[] { this.tableRegion.RegionIDColumn}, new System.Data.DataColumn[] { this.tableTerritories.RegionIDColumn}, false); this.Relations.Add(this.relationFK_Territories_Region); this.relationFK_Employees_Employees = new System.Data.DataRelation("FK_Employees_Employees", new System.Data.DataColumn[] { this.tableEmployees.EmployeeIDColumn}, new System.Data.DataColumn[] { this.tableEmployees.ReportsToColumn}, false); this.Relations.Add(this.relationFK_Employees_Employees); this.relationFK_EmployeeTerritories_Employees = new System.Data.DataRelation("FK_EmployeeTerritories_Employees", new System.Data.DataColumn[] { this.tableEmployees.EmployeeIDColumn}, new System.Data.DataColumn[] { this.tableEmployeeTerritories.EmployeeIDColumn}, false); this.Relations.Add(this.relationFK_EmployeeTerritories_Employees); this.relationFK_EmployeeTerritories_Territories = new System.Data.DataRelation("FK_EmployeeTerritories_Territories", new System.Data.DataColumn[] { this.tableTerritories.TerritoryIDColumn}, new System.Data.DataColumn[] { this.tableEmployeeTerritories.TerritoryIDColumn}, false); this.Relations.Add(this.relationFK_EmployeeTerritories_Territories); this.relationFK_OrderDetails_Orders = new System.Data.DataRelation("FK_OrderDetails_Orders", new System.Data.DataColumn[] { this.tableOrders.OrderIDColumn}, new System.Data.DataColumn[] { this.tableOrder_Details.OrderIDColumn}, false); this.Relations.Add(this.relationFK_OrderDetails_Orders); this.relationFK_Order_Details_Products = new System.Data.DataRelation("FK_Order_Details_Products", new System.Data.DataColumn[] { this.tableProducts.ProductIDColumn}, new System.Data.DataColumn[] { this.tableOrder_Details.ProductIDColumn}, false); this.Relations.Add(this.relationFK_Order_Details_Products); this.relationFK_Orders_Customers = new System.Data.DataRelation("FK_Orders_Customers", new System.Data.DataColumn[] { this.tableCustomers.CustomerIDColumn}, new System.Data.DataColumn[] { this.tableOrders.CustomerIDColumn}, false); this.Relations.Add(this.relationFK_Orders_Customers); this.relationFK_Orders_Employees = new System.Data.DataRelation("FK_Orders_Employees", new System.Data.DataColumn[] { this.tableEmployees.EmployeeIDColumn}, new System.Data.DataColumn[] { this.tableOrders.EmployeeIDColumn}, false); this.Relations.Add(this.relationFK_Orders_Employees); this.relationFK_Orders_Shippers = new System.Data.DataRelation("FK_Orders_Shippers", new System.Data.DataColumn[] { this.tableShippers.ShipperIDColumn}, new System.Data.DataColumn[] { this.tableOrders.ShipViaColumn}, false); this.Relations.Add(this.relationFK_Orders_Shippers); this.relationFK_Products_Categories = new System.Data.DataRelation("FK_Products_Categories", new System.Data.DataColumn[] { this.tableCategories.CategoryIDColumn}, new System.Data.DataColumn[] { this.tableProducts.CategoryIDColumn}, false); this.Relations.Add(this.relationFK_Products_Categories); this.relationFK_Products_Suppliers = new System.Data.DataRelation("FK_Products_Suppliers", new System.Data.DataColumn[] { this.tableSuppliers.SupplierIDColumn}, new System.Data.DataColumn[] { this.tableProducts.SupplierIDColumn}, false); this.Relations.Add(this.relationFK_Products_Suppliers); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private bool ShouldSerializeCategories() { return false; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private bool ShouldSerializeTerritories() { return false; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private bool ShouldSerializeCustomerDemographics() { return false; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private bool ShouldSerializeCustomers() { return false; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private bool ShouldSerializeEmployees() { return false; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private bool ShouldSerializeEmployeeTerritories() { return false; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private bool ShouldSerializeOrder_Details() { return false; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private bool ShouldSerializeOrders() { return false; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private bool ShouldSerializeProducts() { return false; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private bool ShouldSerializeRegion() { return false; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private bool ShouldSerializeShippers() { return false; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private bool ShouldSerializeSuppliers() { return false; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private bool ShouldSerializeStates() { return false; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) { if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) { this.InitVars(); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public static System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(System.Xml.Schema.XmlSchemaSet xs) { NorthwindDataSet ds = new NorthwindDataSet(); System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType(); System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence(); xs.Add(ds.GetSchemaSerializable()); System.Xml.Schema.XmlSchemaAny any = new System.Xml.Schema.XmlSchemaAny(); any.Namespace = ds.Namespace; sequence.Items.Add(any); type.Particle = sequence; return type; } public delegate void CategoriesRowChangeEventHandler(object sender, CategoriesRowChangeEvent e); public delegate void TerritoriesRowChangeEventHandler(object sender, TerritoriesRowChangeEvent e); public delegate void CustomerDemographicsRowChangeEventHandler(object sender, CustomerDemographicsRowChangeEvent e); public delegate void CustomersRowChangeEventHandler(object sender, CustomersRowChangeEvent e); public delegate void EmployeesRowChangeEventHandler(object sender, EmployeesRowChangeEvent e); public delegate void EmployeeTerritoriesRowChangeEventHandler(object sender, EmployeeTerritoriesRowChangeEvent e); public delegate void Order_DetailsRowChangeEventHandler(object sender, Order_DetailsRowChangeEvent e); public delegate void OrdersRowChangeEventHandler(object sender, OrdersRowChangeEvent e); public delegate void ProductsRowChangeEventHandler(object sender, ProductsRowChangeEvent e); public delegate void RegionRowChangeEventHandler(object sender, RegionRowChangeEvent e); public delegate void ShippersRowChangeEventHandler(object sender, ShippersRowChangeEvent e); public delegate void SuppliersRowChangeEventHandler(object sender, SuppliersRowChangeEvent e); public delegate void StatesRowChangeEventHandler(object sender, StatesRowChangeEvent e); [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.Serializable()] [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class CategoriesDataTable : System.Data.DataTable, System.Collections.IEnumerable { private System.Data.DataColumn columnCategoryID; private System.Data.DataColumn columnCategoryName; private System.Data.DataColumn columnDescription; private System.Data.DataColumn columnPicture; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CategoriesDataTable() { this.TableName = "Categories"; this.BeginInit(); this.InitClass(); this.EndInit(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal CategoriesDataTable(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; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected CategoriesDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn CategoryIDColumn { get { return this.columnCategoryID; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn CategoryNameColumn { get { return this.columnCategoryName; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn DescriptionColumn { get { return this.columnDescription; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn PictureColumn { get { return this.columnPicture; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] public int Count { get { return this.Rows.Count; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CategoriesRow this[int index] { get { return ((CategoriesRow)(this.Rows[index])); } } public event CategoriesRowChangeEventHandler CategoriesRowChanging; public event CategoriesRowChangeEventHandler CategoriesRowChanged; public event CategoriesRowChangeEventHandler CategoriesRowDeleting; public event CategoriesRowChangeEventHandler CategoriesRowDeleted; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void AddCategoriesRow(CategoriesRow row) { this.Rows.Add(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CategoriesRow AddCategoriesRow(string CategoryName, string Description, byte[] Picture) { CategoriesRow rowCategoriesRow = ((CategoriesRow)(this.NewRow())); rowCategoriesRow.ItemArray = new object[] { null, CategoryName, Description, Picture}; this.Rows.Add(rowCategoriesRow); return rowCategoriesRow; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CategoriesRow FindByCategoryID(int CategoryID) { return ((CategoriesRow)(this.Rows.Find(new object[] { CategoryID}))); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public virtual System.Collections.IEnumerator GetEnumerator() { return this.Rows.GetEnumerator(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public override System.Data.DataTable Clone() { CategoriesDataTable cln = ((CategoriesDataTable)(base.Clone())); cln.InitVars(); return cln; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataTable CreateInstance() { return new CategoriesDataTable(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal void InitVars() { this.columnCategoryID = base.Columns["CategoryID"]; this.columnCategoryName = base.Columns["CategoryName"]; this.columnDescription = base.Columns["Description"]; this.columnPicture = base.Columns["Picture"]; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitClass() { this.columnCategoryID = new System.Data.DataColumn("CategoryID", typeof(int), null, System.Data.MappingType.Element); base.Columns.Add(this.columnCategoryID); this.columnCategoryName = new System.Data.DataColumn("CategoryName", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnCategoryName); this.columnDescription = new System.Data.DataColumn("Description", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnDescription); this.columnPicture = new System.Data.DataColumn("Picture", typeof(byte[]), null, System.Data.MappingType.Element); base.Columns.Add(this.columnPicture); this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] { this.columnCategoryID}, true)); this.columnCategoryID.AutoIncrement = true; this.columnCategoryID.AllowDBNull = false; this.columnCategoryID.ReadOnly = true; this.columnCategoryID.Unique = true; this.columnCategoryName.AllowDBNull = false; this.columnCategoryName.MaxLength = 15; this.columnDescription.MaxLength = 1073741823; this.Locale = new System.Globalization.CultureInfo("en-US"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CategoriesRow NewCategoriesRow() { return ((CategoriesRow)(this.NewRow())); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) { return new CategoriesRow(builder); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Type GetRowType() { return typeof(CategoriesRow); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.CategoriesRowChanged != null)) { this.CategoriesRowChanged(this, new CategoriesRowChangeEvent(((CategoriesRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.CategoriesRowChanging != null)) { this.CategoriesRowChanging(this, new CategoriesRowChangeEvent(((CategoriesRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.CategoriesRowDeleted != null)) { this.CategoriesRowDeleted(this, new CategoriesRowChangeEvent(((CategoriesRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.CategoriesRowDeleting != null)) { this.CategoriesRowDeleting(this, new CategoriesRowChangeEvent(((CategoriesRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void RemoveCategoriesRow(CategoriesRow row) { this.Rows.Remove(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) { System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType(); System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence(); NorthwindDataSet ds = new NorthwindDataSet(); xs.Add(ds.GetSchemaSerializable()); System.Xml.Schema.XmlSchemaAny any1 = new System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); System.Xml.Schema.XmlSchemaAny any2 = new System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); System.Xml.Schema.XmlSchemaAttribute attribute1 = new System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); System.Xml.Schema.XmlSchemaAttribute attribute2 = new System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "CategoriesDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; return type; } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.Serializable()] [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class TerritoriesDataTable : System.Data.DataTable, System.Collections.IEnumerable { private System.Data.DataColumn columnTerritoryID; private System.Data.DataColumn columnTerritoryDescription; private System.Data.DataColumn columnRegionID; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public TerritoriesDataTable() { this.TableName = "Territories"; this.BeginInit(); this.InitClass(); this.EndInit(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal TerritoriesDataTable(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; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected TerritoriesDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn TerritoryIDColumn { get { return this.columnTerritoryID; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn TerritoryDescriptionColumn { get { return this.columnTerritoryDescription; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn RegionIDColumn { get { return this.columnRegionID; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] public int Count { get { return this.Rows.Count; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public TerritoriesRow this[int index] { get { return ((TerritoriesRow)(this.Rows[index])); } } public event TerritoriesRowChangeEventHandler TerritoriesRowChanging; public event TerritoriesRowChangeEventHandler TerritoriesRowChanged; public event TerritoriesRowChangeEventHandler TerritoriesRowDeleting; public event TerritoriesRowChangeEventHandler TerritoriesRowDeleted; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void AddTerritoriesRow(TerritoriesRow row) { this.Rows.Add(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public TerritoriesRow AddTerritoriesRow(string TerritoryID, string TerritoryDescription, RegionRow parentRegionRowByFK_Territories_Region) { TerritoriesRow rowTerritoriesRow = ((TerritoriesRow)(this.NewRow())); rowTerritoriesRow.ItemArray = new object[] { TerritoryID, TerritoryDescription, parentRegionRowByFK_Territories_Region[0]}; this.Rows.Add(rowTerritoriesRow); return rowTerritoriesRow; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public TerritoriesRow FindByTerritoryID(string TerritoryID) { return ((TerritoriesRow)(this.Rows.Find(new object[] { TerritoryID}))); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public virtual System.Collections.IEnumerator GetEnumerator() { return this.Rows.GetEnumerator(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public override System.Data.DataTable Clone() { TerritoriesDataTable cln = ((TerritoriesDataTable)(base.Clone())); cln.InitVars(); return cln; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataTable CreateInstance() { return new TerritoriesDataTable(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal void InitVars() { this.columnTerritoryID = base.Columns["TerritoryID"]; this.columnTerritoryDescription = base.Columns["TerritoryDescription"]; this.columnRegionID = base.Columns["RegionID"]; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitClass() { this.columnTerritoryID = new System.Data.DataColumn("TerritoryID", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnTerritoryID); this.columnTerritoryDescription = new System.Data.DataColumn("TerritoryDescription", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnTerritoryDescription); this.columnRegionID = new System.Data.DataColumn("RegionID", typeof(int), null, System.Data.MappingType.Element); base.Columns.Add(this.columnRegionID); this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] { this.columnTerritoryID}, true)); this.columnTerritoryID.AllowDBNull = false; this.columnTerritoryID.Unique = true; this.columnTerritoryID.MaxLength = 20; this.columnTerritoryDescription.AllowDBNull = false; this.columnTerritoryDescription.MaxLength = 50; this.columnRegionID.AllowDBNull = false; this.Locale = new System.Globalization.CultureInfo("en-US"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public TerritoriesRow NewTerritoriesRow() { return ((TerritoriesRow)(this.NewRow())); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) { return new TerritoriesRow(builder); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Type GetRowType() { return typeof(TerritoriesRow); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.TerritoriesRowChanged != null)) { this.TerritoriesRowChanged(this, new TerritoriesRowChangeEvent(((TerritoriesRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.TerritoriesRowChanging != null)) { this.TerritoriesRowChanging(this, new TerritoriesRowChangeEvent(((TerritoriesRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.TerritoriesRowDeleted != null)) { this.TerritoriesRowDeleted(this, new TerritoriesRowChangeEvent(((TerritoriesRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.TerritoriesRowDeleting != null)) { this.TerritoriesRowDeleting(this, new TerritoriesRowChangeEvent(((TerritoriesRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void RemoveTerritoriesRow(TerritoriesRow row) { this.Rows.Remove(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) { System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType(); System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence(); NorthwindDataSet ds = new NorthwindDataSet(); xs.Add(ds.GetSchemaSerializable()); System.Xml.Schema.XmlSchemaAny any1 = new System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); System.Xml.Schema.XmlSchemaAny any2 = new System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); System.Xml.Schema.XmlSchemaAttribute attribute1 = new System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); System.Xml.Schema.XmlSchemaAttribute attribute2 = new System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "TerritoriesDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; return type; } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.Serializable()] [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class CustomerDemographicsDataTable : System.Data.DataTable, System.Collections.IEnumerable { private System.Data.DataColumn columnCustomerTypeID; private System.Data.DataColumn columnCustomerDesc; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CustomerDemographicsDataTable() { this.TableName = "CustomerDemographics"; this.BeginInit(); this.InitClass(); this.EndInit(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal CustomerDemographicsDataTable(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; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected CustomerDemographicsDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn CustomerTypeIDColumn { get { return this.columnCustomerTypeID; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn CustomerDescColumn { get { return this.columnCustomerDesc; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] public int Count { get { return this.Rows.Count; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CustomerDemographicsRow this[int index] { get { return ((CustomerDemographicsRow)(this.Rows[index])); } } public event CustomerDemographicsRowChangeEventHandler CustomerDemographicsRowChanging; public event CustomerDemographicsRowChangeEventHandler CustomerDemographicsRowChanged; public event CustomerDemographicsRowChangeEventHandler CustomerDemographicsRowDeleting; public event CustomerDemographicsRowChangeEventHandler CustomerDemographicsRowDeleted; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void AddCustomerDemographicsRow(CustomerDemographicsRow row) { this.Rows.Add(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CustomerDemographicsRow AddCustomerDemographicsRow(string CustomerTypeID, string CustomerDesc) { CustomerDemographicsRow rowCustomerDemographicsRow = ((CustomerDemographicsRow)(this.NewRow())); rowCustomerDemographicsRow.ItemArray = new object[] { CustomerTypeID, CustomerDesc}; this.Rows.Add(rowCustomerDemographicsRow); return rowCustomerDemographicsRow; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CustomerDemographicsRow FindByCustomerTypeID(string CustomerTypeID) { return ((CustomerDemographicsRow)(this.Rows.Find(new object[] { CustomerTypeID}))); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public virtual System.Collections.IEnumerator GetEnumerator() { return this.Rows.GetEnumerator(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public override System.Data.DataTable Clone() { CustomerDemographicsDataTable cln = ((CustomerDemographicsDataTable)(base.Clone())); cln.InitVars(); return cln; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataTable CreateInstance() { return new CustomerDemographicsDataTable(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal void InitVars() { this.columnCustomerTypeID = base.Columns["CustomerTypeID"]; this.columnCustomerDesc = base.Columns["CustomerDesc"]; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitClass() { this.columnCustomerTypeID = new System.Data.DataColumn("CustomerTypeID", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnCustomerTypeID); this.columnCustomerDesc = new System.Data.DataColumn("CustomerDesc", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnCustomerDesc); this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] { this.columnCustomerTypeID}, true)); this.columnCustomerTypeID.AllowDBNull = false; this.columnCustomerTypeID.Unique = true; this.columnCustomerTypeID.MaxLength = 10; this.columnCustomerDesc.MaxLength = 1073741823; this.Locale = new System.Globalization.CultureInfo("en-US"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CustomerDemographicsRow NewCustomerDemographicsRow() { return ((CustomerDemographicsRow)(this.NewRow())); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) { return new CustomerDemographicsRow(builder); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Type GetRowType() { return typeof(CustomerDemographicsRow); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.CustomerDemographicsRowChanged != null)) { this.CustomerDemographicsRowChanged(this, new CustomerDemographicsRowChangeEvent(((CustomerDemographicsRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.CustomerDemographicsRowChanging != null)) { this.CustomerDemographicsRowChanging(this, new CustomerDemographicsRowChangeEvent(((CustomerDemographicsRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.CustomerDemographicsRowDeleted != null)) { this.CustomerDemographicsRowDeleted(this, new CustomerDemographicsRowChangeEvent(((CustomerDemographicsRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.CustomerDemographicsRowDeleting != null)) { this.CustomerDemographicsRowDeleting(this, new CustomerDemographicsRowChangeEvent(((CustomerDemographicsRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void RemoveCustomerDemographicsRow(CustomerDemographicsRow row) { this.Rows.Remove(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) { System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType(); System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence(); NorthwindDataSet ds = new NorthwindDataSet(); xs.Add(ds.GetSchemaSerializable()); System.Xml.Schema.XmlSchemaAny any1 = new System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); System.Xml.Schema.XmlSchemaAny any2 = new System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); System.Xml.Schema.XmlSchemaAttribute attribute1 = new System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); System.Xml.Schema.XmlSchemaAttribute attribute2 = new System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "CustomerDemographicsDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; return type; } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.Serializable()] [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class CustomersDataTable : System.Data.DataTable, System.Collections.IEnumerable { private System.Data.DataColumn columnCustomerID; private System.Data.DataColumn columnCompanyName; private System.Data.DataColumn columnContactName; private System.Data.DataColumn columnContactTitle; private System.Data.DataColumn columnAddress; private System.Data.DataColumn columnCity; private System.Data.DataColumn columnRegion; private System.Data.DataColumn columnPostalCode; private System.Data.DataColumn columnCountry; private System.Data.DataColumn columnPhone; private System.Data.DataColumn columnFax; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CustomersDataTable() { this.TableName = "Customers"; this.BeginInit(); this.InitClass(); this.EndInit(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal CustomersDataTable(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; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected CustomersDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn CustomerIDColumn { get { return this.columnCustomerID; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn CompanyNameColumn { get { return this.columnCompanyName; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn ContactNameColumn { get { return this.columnContactName; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn ContactTitleColumn { get { return this.columnContactTitle; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn AddressColumn { get { return this.columnAddress; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn CityColumn { get { return this.columnCity; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn RegionColumn { get { return this.columnRegion; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn PostalCodeColumn { get { return this.columnPostalCode; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn CountryColumn { get { return this.columnCountry; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn PhoneColumn { get { return this.columnPhone; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn FaxColumn { get { return this.columnFax; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] public int Count { get { return this.Rows.Count; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CustomersRow this[int index] { get { return ((CustomersRow)(this.Rows[index])); } } public event CustomersRowChangeEventHandler CustomersRowChanging; public event CustomersRowChangeEventHandler CustomersRowChanged; public event CustomersRowChangeEventHandler CustomersRowDeleting; public event CustomersRowChangeEventHandler CustomersRowDeleted; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void AddCustomersRow(CustomersRow row) { this.Rows.Add(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CustomersRow AddCustomersRow(string CustomerID, string CompanyName, string ContactName, string ContactTitle, string Address, string City, string Region, string PostalCode, string Country, string Phone, string Fax) { CustomersRow rowCustomersRow = ((CustomersRow)(this.NewRow())); rowCustomersRow.ItemArray = new object[] { CustomerID, CompanyName, ContactName, ContactTitle, Address, City, Region, PostalCode, Country, Phone, Fax}; this.Rows.Add(rowCustomersRow); return rowCustomersRow; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CustomersRow FindByCustomerID(string CustomerID) { return ((CustomersRow)(this.Rows.Find(new object[] { CustomerID}))); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public virtual System.Collections.IEnumerator GetEnumerator() { return this.Rows.GetEnumerator(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public override System.Data.DataTable Clone() { CustomersDataTable cln = ((CustomersDataTable)(base.Clone())); cln.InitVars(); return cln; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataTable CreateInstance() { return new CustomersDataTable(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal void InitVars() { this.columnCustomerID = base.Columns["CustomerID"]; this.columnCompanyName = base.Columns["CompanyName"]; this.columnContactName = base.Columns["ContactName"]; this.columnContactTitle = base.Columns["ContactTitle"]; this.columnAddress = base.Columns["Address"]; this.columnCity = base.Columns["City"]; this.columnRegion = base.Columns["Region"]; this.columnPostalCode = base.Columns["PostalCode"]; this.columnCountry = base.Columns["Country"]; this.columnPhone = base.Columns["Phone"]; this.columnFax = base.Columns["Fax"]; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitClass() { this.columnCustomerID = new System.Data.DataColumn("CustomerID", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnCustomerID); this.columnCompanyName = new System.Data.DataColumn("CompanyName", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnCompanyName); this.columnContactName = new System.Data.DataColumn("ContactName", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnContactName); this.columnContactTitle = new System.Data.DataColumn("ContactTitle", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnContactTitle); this.columnAddress = new System.Data.DataColumn("Address", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnAddress); this.columnCity = new System.Data.DataColumn("City", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnCity); this.columnRegion = new System.Data.DataColumn("Region", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnRegion); this.columnPostalCode = new System.Data.DataColumn("PostalCode", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnPostalCode); this.columnCountry = new System.Data.DataColumn("Country", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnCountry); this.columnPhone = new System.Data.DataColumn("Phone", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnPhone); this.columnFax = new System.Data.DataColumn("Fax", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnFax); this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] { this.columnCustomerID}, true)); this.columnCustomerID.AllowDBNull = false; this.columnCustomerID.Unique = true; this.columnCustomerID.MaxLength = 5; this.columnCompanyName.AllowDBNull = false; this.columnCompanyName.MaxLength = 40; this.columnContactName.MaxLength = 30; this.columnContactTitle.MaxLength = 30; this.columnAddress.MaxLength = 60; this.columnCity.MaxLength = 15; this.columnRegion.MaxLength = 15; this.columnPostalCode.MaxLength = 10; this.columnCountry.MaxLength = 15; this.columnPhone.MaxLength = 24; this.columnFax.MaxLength = 24; this.Locale = new System.Globalization.CultureInfo("en-US"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CustomersRow NewCustomersRow() { return ((CustomersRow)(this.NewRow())); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) { return new CustomersRow(builder); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Type GetRowType() { return typeof(CustomersRow); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.CustomersRowChanged != null)) { this.CustomersRowChanged(this, new CustomersRowChangeEvent(((CustomersRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.CustomersRowChanging != null)) { this.CustomersRowChanging(this, new CustomersRowChangeEvent(((CustomersRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.CustomersRowDeleted != null)) { this.CustomersRowDeleted(this, new CustomersRowChangeEvent(((CustomersRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.CustomersRowDeleting != null)) { this.CustomersRowDeleting(this, new CustomersRowChangeEvent(((CustomersRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void RemoveCustomersRow(CustomersRow row) { this.Rows.Remove(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) { System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType(); System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence(); NorthwindDataSet ds = new NorthwindDataSet(); xs.Add(ds.GetSchemaSerializable()); System.Xml.Schema.XmlSchemaAny any1 = new System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); System.Xml.Schema.XmlSchemaAny any2 = new System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); System.Xml.Schema.XmlSchemaAttribute attribute1 = new System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); System.Xml.Schema.XmlSchemaAttribute attribute2 = new System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "CustomersDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; return type; } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.Serializable()] [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class EmployeesDataTable : System.Data.DataTable, System.Collections.IEnumerable { private System.Data.DataColumn columnEmployeeID; private System.Data.DataColumn columnLastName; private System.Data.DataColumn columnFirstName; private System.Data.DataColumn columnTitle; private System.Data.DataColumn columnTitleOfCourtesy; private System.Data.DataColumn columnBirthDate; private System.Data.DataColumn columnHireDate; private System.Data.DataColumn columnAddress; private System.Data.DataColumn columnCity; private System.Data.DataColumn columnRegion; private System.Data.DataColumn columnPostalCode; private System.Data.DataColumn columnCountry; private System.Data.DataColumn columnHomePhone; private System.Data.DataColumn columnExtension; private System.Data.DataColumn columnPhoto; private System.Data.DataColumn columnNotes; private System.Data.DataColumn columnReportsTo; private System.Data.DataColumn columnPhotoPath; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public EmployeesDataTable() { this.TableName = "Employees"; this.BeginInit(); this.InitClass(); this.EndInit(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal EmployeesDataTable(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; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected EmployeesDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn EmployeeIDColumn { get { return this.columnEmployeeID; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn LastNameColumn { get { return this.columnLastName; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn FirstNameColumn { get { return this.columnFirstName; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn TitleColumn { get { return this.columnTitle; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn TitleOfCourtesyColumn { get { return this.columnTitleOfCourtesy; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn BirthDateColumn { get { return this.columnBirthDate; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn HireDateColumn { get { return this.columnHireDate; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn AddressColumn { get { return this.columnAddress; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn CityColumn { get { return this.columnCity; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn RegionColumn { get { return this.columnRegion; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn PostalCodeColumn { get { return this.columnPostalCode; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn CountryColumn { get { return this.columnCountry; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn HomePhoneColumn { get { return this.columnHomePhone; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn ExtensionColumn { get { return this.columnExtension; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn PhotoColumn { get { return this.columnPhoto; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn NotesColumn { get { return this.columnNotes; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn ReportsToColumn { get { return this.columnReportsTo; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn PhotoPathColumn { get { return this.columnPhotoPath; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] public int Count { get { return this.Rows.Count; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public EmployeesRow this[int index] { get { return ((EmployeesRow)(this.Rows[index])); } } public event EmployeesRowChangeEventHandler EmployeesRowChanging; public event EmployeesRowChangeEventHandler EmployeesRowChanged; public event EmployeesRowChangeEventHandler EmployeesRowDeleting; public event EmployeesRowChangeEventHandler EmployeesRowDeleted; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void AddEmployeesRow(EmployeesRow row) { this.Rows.Add(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public EmployeesRow AddEmployeesRow( string LastName, string FirstName, string Title, string TitleOfCourtesy, System.DateTime BirthDate, System.DateTime HireDate, string Address, string City, string Region, string PostalCode, string Country, string HomePhone, string Extension, byte[] Photo, string Notes, EmployeesRow parentEmployeesRowByFK_Employees_Employees, string PhotoPath) { EmployeesRow rowEmployeesRow = ((EmployeesRow)(this.NewRow())); rowEmployeesRow.ItemArray = new object[] { null, LastName, FirstName, Title, TitleOfCourtesy, BirthDate, HireDate, Address, City, Region, PostalCode, Country, HomePhone, Extension, Photo, Notes, parentEmployeesRowByFK_Employees_Employees[0], PhotoPath}; this.Rows.Add(rowEmployeesRow); return rowEmployeesRow; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public EmployeesRow FindByEmployeeID(int EmployeeID) { return ((EmployeesRow)(this.Rows.Find(new object[] { EmployeeID}))); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public virtual System.Collections.IEnumerator GetEnumerator() { return this.Rows.GetEnumerator(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public override System.Data.DataTable Clone() { EmployeesDataTable cln = ((EmployeesDataTable)(base.Clone())); cln.InitVars(); return cln; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataTable CreateInstance() { return new EmployeesDataTable(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal void InitVars() { this.columnEmployeeID = base.Columns["EmployeeID"]; this.columnLastName = base.Columns["LastName"]; this.columnFirstName = base.Columns["FirstName"]; this.columnTitle = base.Columns["Title"]; this.columnTitleOfCourtesy = base.Columns["TitleOfCourtesy"]; this.columnBirthDate = base.Columns["BirthDate"]; this.columnHireDate = base.Columns["HireDate"]; this.columnAddress = base.Columns["Address"]; this.columnCity = base.Columns["City"]; this.columnRegion = base.Columns["Region"]; this.columnPostalCode = base.Columns["PostalCode"]; this.columnCountry = base.Columns["Country"]; this.columnHomePhone = base.Columns["HomePhone"]; this.columnExtension = base.Columns["Extension"]; this.columnPhoto = base.Columns["Photo"]; this.columnNotes = base.Columns["Notes"]; this.columnReportsTo = base.Columns["ReportsTo"]; this.columnPhotoPath = base.Columns["PhotoPath"]; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitClass() { this.columnEmployeeID = new System.Data.DataColumn("EmployeeID", typeof(int), null, System.Data.MappingType.Element); base.Columns.Add(this.columnEmployeeID); this.columnLastName = new System.Data.DataColumn("LastName", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnLastName); this.columnFirstName = new System.Data.DataColumn("FirstName", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnFirstName); this.columnTitle = new System.Data.DataColumn("Title", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnTitle); this.columnTitleOfCourtesy = new System.Data.DataColumn("TitleOfCourtesy", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnTitleOfCourtesy); this.columnBirthDate = new System.Data.DataColumn("BirthDate", typeof(System.DateTime), null, System.Data.MappingType.Element); base.Columns.Add(this.columnBirthDate); this.columnHireDate = new System.Data.DataColumn("HireDate", typeof(System.DateTime), null, System.Data.MappingType.Element); base.Columns.Add(this.columnHireDate); this.columnAddress = new System.Data.DataColumn("Address", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnAddress); this.columnCity = new System.Data.DataColumn("City", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnCity); this.columnRegion = new System.Data.DataColumn("Region", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnRegion); this.columnPostalCode = new System.Data.DataColumn("PostalCode", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnPostalCode); this.columnCountry = new System.Data.DataColumn("Country", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnCountry); this.columnHomePhone = new System.Data.DataColumn("HomePhone", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnHomePhone); this.columnExtension = new System.Data.DataColumn("Extension", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnExtension); this.columnPhoto = new System.Data.DataColumn("Photo", typeof(byte[]), null, System.Data.MappingType.Element); base.Columns.Add(this.columnPhoto); this.columnNotes = new System.Data.DataColumn("Notes", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnNotes); this.columnReportsTo = new System.Data.DataColumn("ReportsTo", typeof(int), null, System.Data.MappingType.Element); base.Columns.Add(this.columnReportsTo); this.columnPhotoPath = new System.Data.DataColumn("PhotoPath", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnPhotoPath); this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] { this.columnEmployeeID}, true)); this.columnEmployeeID.AutoIncrement = true; this.columnEmployeeID.AllowDBNull = false; this.columnEmployeeID.ReadOnly = true; this.columnEmployeeID.Unique = true; this.columnLastName.AllowDBNull = false; this.columnLastName.MaxLength = 20; this.columnFirstName.AllowDBNull = false; this.columnFirstName.MaxLength = 10; this.columnTitle.MaxLength = 30; this.columnTitleOfCourtesy.MaxLength = 25; this.columnAddress.MaxLength = 60; this.columnCity.MaxLength = 15; this.columnRegion.MaxLength = 15; this.columnPostalCode.MaxLength = 10; this.columnCountry.MaxLength = 15; this.columnHomePhone.MaxLength = 24; this.columnExtension.MaxLength = 4; this.columnNotes.MaxLength = 1073741823; this.columnPhotoPath.MaxLength = 255; this.Locale = new System.Globalization.CultureInfo("en-US"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public EmployeesRow NewEmployeesRow() { return ((EmployeesRow)(this.NewRow())); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) { return new EmployeesRow(builder); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Type GetRowType() { return typeof(EmployeesRow); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.EmployeesRowChanged != null)) { this.EmployeesRowChanged(this, new EmployeesRowChangeEvent(((EmployeesRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.EmployeesRowChanging != null)) { this.EmployeesRowChanging(this, new EmployeesRowChangeEvent(((EmployeesRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.EmployeesRowDeleted != null)) { this.EmployeesRowDeleted(this, new EmployeesRowChangeEvent(((EmployeesRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.EmployeesRowDeleting != null)) { this.EmployeesRowDeleting(this, new EmployeesRowChangeEvent(((EmployeesRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void RemoveEmployeesRow(EmployeesRow row) { this.Rows.Remove(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) { System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType(); System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence(); NorthwindDataSet ds = new NorthwindDataSet(); xs.Add(ds.GetSchemaSerializable()); System.Xml.Schema.XmlSchemaAny any1 = new System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); System.Xml.Schema.XmlSchemaAny any2 = new System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); System.Xml.Schema.XmlSchemaAttribute attribute1 = new System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); System.Xml.Schema.XmlSchemaAttribute attribute2 = new System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "EmployeesDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; return type; } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.Serializable()] [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class EmployeeTerritoriesDataTable : System.Data.DataTable, System.Collections.IEnumerable { private System.Data.DataColumn columnEmployeeID; private System.Data.DataColumn columnTerritoryID; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public EmployeeTerritoriesDataTable() { this.TableName = "EmployeeTerritories"; this.BeginInit(); this.InitClass(); this.EndInit(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal EmployeeTerritoriesDataTable(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; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected EmployeeTerritoriesDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn EmployeeIDColumn { get { return this.columnEmployeeID; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn TerritoryIDColumn { get { return this.columnTerritoryID; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] public int Count { get { return this.Rows.Count; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public EmployeeTerritoriesRow this[int index] { get { return ((EmployeeTerritoriesRow)(this.Rows[index])); } } public event EmployeeTerritoriesRowChangeEventHandler EmployeeTerritoriesRowChanging; public event EmployeeTerritoriesRowChangeEventHandler EmployeeTerritoriesRowChanged; public event EmployeeTerritoriesRowChangeEventHandler EmployeeTerritoriesRowDeleting; public event EmployeeTerritoriesRowChangeEventHandler EmployeeTerritoriesRowDeleted; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void AddEmployeeTerritoriesRow(EmployeeTerritoriesRow row) { this.Rows.Add(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public EmployeeTerritoriesRow AddEmployeeTerritoriesRow(EmployeesRow parentEmployeesRowByFK_EmployeeTerritories_Employees, TerritoriesRow parentTerritoriesRowByFK_EmployeeTerritories_Territories) { EmployeeTerritoriesRow rowEmployeeTerritoriesRow = ((EmployeeTerritoriesRow)(this.NewRow())); rowEmployeeTerritoriesRow.ItemArray = new object[] { parentEmployeesRowByFK_EmployeeTerritories_Employees[0], parentTerritoriesRowByFK_EmployeeTerritories_Territories[0]}; this.Rows.Add(rowEmployeeTerritoriesRow); return rowEmployeeTerritoriesRow; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public EmployeeTerritoriesRow FindByEmployeeIDTerritoryID(int EmployeeID, string TerritoryID) { return ((EmployeeTerritoriesRow)(this.Rows.Find(new object[] { EmployeeID, TerritoryID}))); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public virtual System.Collections.IEnumerator GetEnumerator() { return this.Rows.GetEnumerator(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public override System.Data.DataTable Clone() { EmployeeTerritoriesDataTable cln = ((EmployeeTerritoriesDataTable)(base.Clone())); cln.InitVars(); return cln; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataTable CreateInstance() { return new EmployeeTerritoriesDataTable(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal void InitVars() { this.columnEmployeeID = base.Columns["EmployeeID"]; this.columnTerritoryID = base.Columns["TerritoryID"]; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitClass() { this.columnEmployeeID = new System.Data.DataColumn("EmployeeID", typeof(int), null, System.Data.MappingType.Element); base.Columns.Add(this.columnEmployeeID); this.columnTerritoryID = new System.Data.DataColumn("TerritoryID", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnTerritoryID); this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] { this.columnEmployeeID, this.columnTerritoryID}, true)); this.columnEmployeeID.AllowDBNull = false; this.columnTerritoryID.AllowDBNull = false; this.columnTerritoryID.MaxLength = 20; this.Locale = new System.Globalization.CultureInfo("en-US"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public EmployeeTerritoriesRow NewEmployeeTerritoriesRow() { return ((EmployeeTerritoriesRow)(this.NewRow())); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) { return new EmployeeTerritoriesRow(builder); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Type GetRowType() { return typeof(EmployeeTerritoriesRow); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.EmployeeTerritoriesRowChanged != null)) { this.EmployeeTerritoriesRowChanged(this, new EmployeeTerritoriesRowChangeEvent(((EmployeeTerritoriesRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.EmployeeTerritoriesRowChanging != null)) { this.EmployeeTerritoriesRowChanging(this, new EmployeeTerritoriesRowChangeEvent(((EmployeeTerritoriesRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.EmployeeTerritoriesRowDeleted != null)) { this.EmployeeTerritoriesRowDeleted(this, new EmployeeTerritoriesRowChangeEvent(((EmployeeTerritoriesRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.EmployeeTerritoriesRowDeleting != null)) { this.EmployeeTerritoriesRowDeleting(this, new EmployeeTerritoriesRowChangeEvent(((EmployeeTerritoriesRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void RemoveEmployeeTerritoriesRow(EmployeeTerritoriesRow row) { this.Rows.Remove(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) { System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType(); System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence(); NorthwindDataSet ds = new NorthwindDataSet(); xs.Add(ds.GetSchemaSerializable()); System.Xml.Schema.XmlSchemaAny any1 = new System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); System.Xml.Schema.XmlSchemaAny any2 = new System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); System.Xml.Schema.XmlSchemaAttribute attribute1 = new System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); System.Xml.Schema.XmlSchemaAttribute attribute2 = new System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "EmployeeTerritoriesDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; return type; } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.Serializable()] [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class Order_DetailsDataTable : System.Data.DataTable, System.Collections.IEnumerable { private System.Data.DataColumn columnOrderID; private System.Data.DataColumn columnProductID; private System.Data.DataColumn columnUnitPrice; private System.Data.DataColumn columnQuantity; private System.Data.DataColumn columnDiscount; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public Order_DetailsDataTable() { this.TableName = "Order Details"; this.BeginInit(); this.InitClass(); this.EndInit(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal Order_DetailsDataTable(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; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected Order_DetailsDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn OrderIDColumn { get { return this.columnOrderID; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn ProductIDColumn { get { return this.columnProductID; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn UnitPriceColumn { get { return this.columnUnitPrice; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn QuantityColumn { get { return this.columnQuantity; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn DiscountColumn { get { return this.columnDiscount; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] public int Count { get { return this.Rows.Count; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public Order_DetailsRow this[int index] { get { return ((Order_DetailsRow)(this.Rows[index])); } } public event Order_DetailsRowChangeEventHandler Order_DetailsRowChanging; public event Order_DetailsRowChangeEventHandler Order_DetailsRowChanged; public event Order_DetailsRowChangeEventHandler Order_DetailsRowDeleting; public event Order_DetailsRowChangeEventHandler Order_DetailsRowDeleted; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void AddOrder_DetailsRow(Order_DetailsRow row) { this.Rows.Add(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public Order_DetailsRow AddOrder_DetailsRow(OrdersRow parentOrdersRowByFK_OrderDetails_Orders, ProductsRow parentProductsRowByFK_Order_Details_Products, decimal UnitPrice, short Quantity, float Discount) { Order_DetailsRow rowOrder_DetailsRow = ((Order_DetailsRow)(this.NewRow())); rowOrder_DetailsRow.ItemArray = new object[] { parentOrdersRowByFK_OrderDetails_Orders[0], parentProductsRowByFK_Order_Details_Products[0], UnitPrice, Quantity, Discount}; this.Rows.Add(rowOrder_DetailsRow); return rowOrder_DetailsRow; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public Order_DetailsRow FindByOrderIDProductID(int OrderID, int ProductID) { return ((Order_DetailsRow)(this.Rows.Find(new object[] { OrderID, ProductID}))); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public virtual System.Collections.IEnumerator GetEnumerator() { return this.Rows.GetEnumerator(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public override System.Data.DataTable Clone() { Order_DetailsDataTable cln = ((Order_DetailsDataTable)(base.Clone())); cln.InitVars(); return cln; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataTable CreateInstance() { return new Order_DetailsDataTable(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal void InitVars() { this.columnOrderID = base.Columns["OrderID"]; this.columnProductID = base.Columns["ProductID"]; this.columnUnitPrice = base.Columns["UnitPrice"]; this.columnQuantity = base.Columns["Quantity"]; this.columnDiscount = base.Columns["Discount"]; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitClass() { this.columnOrderID = new System.Data.DataColumn("OrderID", typeof(int), null, System.Data.MappingType.Element); base.Columns.Add(this.columnOrderID); this.columnProductID = new System.Data.DataColumn("ProductID", typeof(int), null, System.Data.MappingType.Element); base.Columns.Add(this.columnProductID); this.columnUnitPrice = new System.Data.DataColumn("UnitPrice", typeof(decimal), null, System.Data.MappingType.Element); base.Columns.Add(this.columnUnitPrice); this.columnQuantity = new System.Data.DataColumn("Quantity", typeof(short), null, System.Data.MappingType.Element); base.Columns.Add(this.columnQuantity); this.columnDiscount = new System.Data.DataColumn("Discount", typeof(float), null, System.Data.MappingType.Element); base.Columns.Add(this.columnDiscount); this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] { this.columnOrderID, this.columnProductID}, true)); this.columnOrderID.AllowDBNull = false; this.columnProductID.AllowDBNull = false; this.columnUnitPrice.AllowDBNull = false; this.columnQuantity.AllowDBNull = false; this.columnDiscount.AllowDBNull = false; this.Locale = new System.Globalization.CultureInfo("en-US"); this.ExtendedProperties.Add("Generator_RowClassName", "Order_DetailsRow"); this.ExtendedProperties.Add("Generator_RowEvArgName", "Order_DetailsRowChangeEvent"); this.ExtendedProperties.Add("Generator_RowEvHandlerName", "Order_DetailsRowChangeEventHandler"); this.ExtendedProperties.Add("Generator_TableClassName", "Order_DetailsDataTable"); this.ExtendedProperties.Add("Generator_TablePropName", "Order_Details"); this.ExtendedProperties.Add("Generator_TableVarName", "tableOrder_Details"); this.ExtendedProperties.Add("Generator_UserTableName", "Order Details"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public Order_DetailsRow NewOrder_DetailsRow() { return ((Order_DetailsRow)(this.NewRow())); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) { return new Order_DetailsRow(builder); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Type GetRowType() { return typeof(Order_DetailsRow); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.Order_DetailsRowChanged != null)) { this.Order_DetailsRowChanged(this, new Order_DetailsRowChangeEvent(((Order_DetailsRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.Order_DetailsRowChanging != null)) { this.Order_DetailsRowChanging(this, new Order_DetailsRowChangeEvent(((Order_DetailsRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.Order_DetailsRowDeleted != null)) { this.Order_DetailsRowDeleted(this, new Order_DetailsRowChangeEvent(((Order_DetailsRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.Order_DetailsRowDeleting != null)) { this.Order_DetailsRowDeleting(this, new Order_DetailsRowChangeEvent(((Order_DetailsRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void RemoveOrder_DetailsRow(Order_DetailsRow row) { this.Rows.Remove(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) { System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType(); System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence(); NorthwindDataSet ds = new NorthwindDataSet(); xs.Add(ds.GetSchemaSerializable()); System.Xml.Schema.XmlSchemaAny any1 = new System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); System.Xml.Schema.XmlSchemaAny any2 = new System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); System.Xml.Schema.XmlSchemaAttribute attribute1 = new System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); System.Xml.Schema.XmlSchemaAttribute attribute2 = new System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "Order_DetailsDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; return type; } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.Serializable()] [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class OrdersDataTable : System.Data.DataTable, System.Collections.IEnumerable { private System.Data.DataColumn columnOrderID; private System.Data.DataColumn columnCustomerID; private System.Data.DataColumn columnEmployeeID; private System.Data.DataColumn columnOrderDate; private System.Data.DataColumn columnRequiredDate; private System.Data.DataColumn columnShippedDate; private System.Data.DataColumn columnShipVia; private System.Data.DataColumn columnFreight; private System.Data.DataColumn columnShipName; private System.Data.DataColumn columnShipAddress; private System.Data.DataColumn columnShipCity; private System.Data.DataColumn columnShipRegion; private System.Data.DataColumn columnShipPostalCode; private System.Data.DataColumn columnShipCountry; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public OrdersDataTable() { this.TableName = "Orders"; this.BeginInit(); this.InitClass(); this.EndInit(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal OrdersDataTable(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; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected OrdersDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn OrderIDColumn { get { return this.columnOrderID; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn CustomerIDColumn { get { return this.columnCustomerID; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn EmployeeIDColumn { get { return this.columnEmployeeID; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn OrderDateColumn { get { return this.columnOrderDate; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn RequiredDateColumn { get { return this.columnRequiredDate; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn ShippedDateColumn { get { return this.columnShippedDate; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn ShipViaColumn { get { return this.columnShipVia; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn FreightColumn { get { return this.columnFreight; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn ShipNameColumn { get { return this.columnShipName; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn ShipAddressColumn { get { return this.columnShipAddress; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn ShipCityColumn { get { return this.columnShipCity; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn ShipRegionColumn { get { return this.columnShipRegion; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn ShipPostalCodeColumn { get { return this.columnShipPostalCode; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn ShipCountryColumn { get { return this.columnShipCountry; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] public int Count { get { return this.Rows.Count; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public OrdersRow this[int index] { get { return ((OrdersRow)(this.Rows[index])); } } public event OrdersRowChangeEventHandler OrdersRowChanging; public event OrdersRowChangeEventHandler OrdersRowChanged; public event OrdersRowChangeEventHandler OrdersRowDeleting; public event OrdersRowChangeEventHandler OrdersRowDeleted; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void AddOrdersRow(OrdersRow row) { this.Rows.Add(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public OrdersRow AddOrdersRow(CustomersRow parentCustomersRowByFK_Orders_Customers, EmployeesRow parentEmployeesRowByFK_Orders_Employees, System.DateTime OrderDate, System.DateTime RequiredDate, System.DateTime ShippedDate, ShippersRow parentShippersRowByFK_Orders_Shippers, decimal Freight, string ShipName, string ShipAddress, string ShipCity, string ShipRegion, string ShipPostalCode, string ShipCountry) { OrdersRow rowOrdersRow = ((OrdersRow)(this.NewRow())); rowOrdersRow.ItemArray = new object[] { null, parentCustomersRowByFK_Orders_Customers[0], parentEmployeesRowByFK_Orders_Employees[0], OrderDate, RequiredDate, ShippedDate, parentShippersRowByFK_Orders_Shippers[0], Freight, ShipName, ShipAddress, ShipCity, ShipRegion, ShipPostalCode, ShipCountry}; this.Rows.Add(rowOrdersRow); return rowOrdersRow; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public OrdersRow FindByOrderID(int OrderID) { return ((OrdersRow)(this.Rows.Find(new object[] { OrderID}))); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public virtual System.Collections.IEnumerator GetEnumerator() { return this.Rows.GetEnumerator(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public override System.Data.DataTable Clone() { OrdersDataTable cln = ((OrdersDataTable)(base.Clone())); cln.InitVars(); return cln; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataTable CreateInstance() { return new OrdersDataTable(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal void InitVars() { this.columnOrderID = base.Columns["OrderID"]; this.columnCustomerID = base.Columns["CustomerID"]; this.columnEmployeeID = base.Columns["EmployeeID"]; this.columnOrderDate = base.Columns["OrderDate"]; this.columnRequiredDate = base.Columns["RequiredDate"]; this.columnShippedDate = base.Columns["ShippedDate"]; this.columnShipVia = base.Columns["ShipVia"]; this.columnFreight = base.Columns["Freight"]; this.columnShipName = base.Columns["ShipName"]; this.columnShipAddress = base.Columns["ShipAddress"]; this.columnShipCity = base.Columns["ShipCity"]; this.columnShipRegion = base.Columns["ShipRegion"]; this.columnShipPostalCode = base.Columns["ShipPostalCode"]; this.columnShipCountry = base.Columns["ShipCountry"]; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitClass() { this.columnOrderID = new System.Data.DataColumn("OrderID", typeof(int), null, System.Data.MappingType.Element); base.Columns.Add(this.columnOrderID); this.columnCustomerID = new System.Data.DataColumn("CustomerID", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnCustomerID); this.columnEmployeeID = new System.Data.DataColumn("EmployeeID", typeof(int), null, System.Data.MappingType.Element); base.Columns.Add(this.columnEmployeeID); this.columnOrderDate = new System.Data.DataColumn("OrderDate", typeof(System.DateTime), null, System.Data.MappingType.Element); base.Columns.Add(this.columnOrderDate); this.columnRequiredDate = new System.Data.DataColumn("RequiredDate", typeof(System.DateTime), null, System.Data.MappingType.Element); base.Columns.Add(this.columnRequiredDate); this.columnShippedDate = new System.Data.DataColumn("ShippedDate", typeof(System.DateTime), null, System.Data.MappingType.Element); base.Columns.Add(this.columnShippedDate); this.columnShipVia = new System.Data.DataColumn("ShipVia", typeof(int), null, System.Data.MappingType.Element); base.Columns.Add(this.columnShipVia); this.columnFreight = new System.Data.DataColumn("Freight", typeof(decimal), null, System.Data.MappingType.Element); base.Columns.Add(this.columnFreight); this.columnShipName = new System.Data.DataColumn("ShipName", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnShipName); this.columnShipAddress = new System.Data.DataColumn("ShipAddress", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnShipAddress); this.columnShipCity = new System.Data.DataColumn("ShipCity", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnShipCity); this.columnShipRegion = new System.Data.DataColumn("ShipRegion", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnShipRegion); this.columnShipPostalCode = new System.Data.DataColumn("ShipPostalCode", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnShipPostalCode); this.columnShipCountry = new System.Data.DataColumn("ShipCountry", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnShipCountry); this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] { this.columnOrderID}, true)); this.columnOrderID.AutoIncrement = true; this.columnOrderID.AllowDBNull = false; this.columnOrderID.ReadOnly = true; this.columnOrderID.Unique = true; this.columnCustomerID.MaxLength = 5; this.columnShipName.MaxLength = 40; this.columnShipAddress.MaxLength = 60; this.columnShipCity.MaxLength = 15; this.columnShipRegion.MaxLength = 15; this.columnShipPostalCode.MaxLength = 10; this.columnShipCountry.MaxLength = 15; this.Locale = new System.Globalization.CultureInfo("en-US"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public OrdersRow NewOrdersRow() { return ((OrdersRow)(this.NewRow())); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) { return new OrdersRow(builder); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Type GetRowType() { return typeof(OrdersRow); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.OrdersRowChanged != null)) { this.OrdersRowChanged(this, new OrdersRowChangeEvent(((OrdersRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.OrdersRowChanging != null)) { this.OrdersRowChanging(this, new OrdersRowChangeEvent(((OrdersRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.OrdersRowDeleted != null)) { this.OrdersRowDeleted(this, new OrdersRowChangeEvent(((OrdersRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.OrdersRowDeleting != null)) { this.OrdersRowDeleting(this, new OrdersRowChangeEvent(((OrdersRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void RemoveOrdersRow(OrdersRow row) { this.Rows.Remove(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) { System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType(); System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence(); NorthwindDataSet ds = new NorthwindDataSet(); xs.Add(ds.GetSchemaSerializable()); System.Xml.Schema.XmlSchemaAny any1 = new System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); System.Xml.Schema.XmlSchemaAny any2 = new System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); System.Xml.Schema.XmlSchemaAttribute attribute1 = new System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); System.Xml.Schema.XmlSchemaAttribute attribute2 = new System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "OrdersDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; return type; } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.Serializable()] [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class ProductsDataTable : System.Data.DataTable, System.Collections.IEnumerable { private System.Data.DataColumn columnProductID; private System.Data.DataColumn columnProductName; private System.Data.DataColumn columnSupplierID; private System.Data.DataColumn columnCategoryID; private System.Data.DataColumn columnQuantityPerUnit; private System.Data.DataColumn columnUnitPrice; private System.Data.DataColumn columnUnitsInStock; private System.Data.DataColumn columnUnitsOnOrder; private System.Data.DataColumn columnReorderLevel; private System.Data.DataColumn columnDiscontinued; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public ProductsDataTable() { this.TableName = "Products"; this.BeginInit(); this.InitClass(); this.EndInit(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal ProductsDataTable(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; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected ProductsDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn ProductIDColumn { get { return this.columnProductID; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn ProductNameColumn { get { return this.columnProductName; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn SupplierIDColumn { get { return this.columnSupplierID; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn CategoryIDColumn { get { return this.columnCategoryID; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn QuantityPerUnitColumn { get { return this.columnQuantityPerUnit; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn UnitPriceColumn { get { return this.columnUnitPrice; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn UnitsInStockColumn { get { return this.columnUnitsInStock; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn UnitsOnOrderColumn { get { return this.columnUnitsOnOrder; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn ReorderLevelColumn { get { return this.columnReorderLevel; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn DiscontinuedColumn { get { return this.columnDiscontinued; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] public int Count { get { return this.Rows.Count; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public ProductsRow this[int index] { get { return ((ProductsRow)(this.Rows[index])); } } public event ProductsRowChangeEventHandler ProductsRowChanging; public event ProductsRowChangeEventHandler ProductsRowChanged; public event ProductsRowChangeEventHandler ProductsRowDeleting; public event ProductsRowChangeEventHandler ProductsRowDeleted; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void AddProductsRow(ProductsRow row) { this.Rows.Add(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public ProductsRow AddProductsRow(string ProductName, SuppliersRow parentSuppliersRowByFK_Products_Suppliers, CategoriesRow parentCategoriesRowByFK_Products_Categories, string QuantityPerUnit, decimal UnitPrice, short UnitsInStock, short UnitsOnOrder, short ReorderLevel, bool Discontinued) { ProductsRow rowProductsRow = ((ProductsRow)(this.NewRow())); rowProductsRow.ItemArray = new object[] { null, ProductName, parentSuppliersRowByFK_Products_Suppliers[0], parentCategoriesRowByFK_Products_Categories[0], QuantityPerUnit, UnitPrice, UnitsInStock, UnitsOnOrder, ReorderLevel, Discontinued}; this.Rows.Add(rowProductsRow); return rowProductsRow; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public ProductsRow FindByProductID(int ProductID) { return ((ProductsRow)(this.Rows.Find(new object[] { ProductID}))); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public virtual System.Collections.IEnumerator GetEnumerator() { return this.Rows.GetEnumerator(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public override System.Data.DataTable Clone() { ProductsDataTable cln = ((ProductsDataTable)(base.Clone())); cln.InitVars(); return cln; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataTable CreateInstance() { return new ProductsDataTable(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal void InitVars() { this.columnProductID = base.Columns["ProductID"]; this.columnProductName = base.Columns["ProductName"]; this.columnSupplierID = base.Columns["SupplierID"]; this.columnCategoryID = base.Columns["CategoryID"]; this.columnQuantityPerUnit = base.Columns["QuantityPerUnit"]; this.columnUnitPrice = base.Columns["UnitPrice"]; this.columnUnitsInStock = base.Columns["UnitsInStock"]; this.columnUnitsOnOrder = base.Columns["UnitsOnOrder"]; this.columnReorderLevel = base.Columns["ReorderLevel"]; this.columnDiscontinued = base.Columns["Discontinued"]; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitClass() { this.columnProductID = new System.Data.DataColumn("ProductID", typeof(int), null, System.Data.MappingType.Element); base.Columns.Add(this.columnProductID); this.columnProductName = new System.Data.DataColumn("ProductName", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnProductName); this.columnSupplierID = new System.Data.DataColumn("SupplierID", typeof(int), null, System.Data.MappingType.Element); base.Columns.Add(this.columnSupplierID); this.columnCategoryID = new System.Data.DataColumn("CategoryID", typeof(int), null, System.Data.MappingType.Element); base.Columns.Add(this.columnCategoryID); this.columnQuantityPerUnit = new System.Data.DataColumn("QuantityPerUnit", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnQuantityPerUnit); this.columnUnitPrice = new System.Data.DataColumn("UnitPrice", typeof(decimal), null, System.Data.MappingType.Element); base.Columns.Add(this.columnUnitPrice); this.columnUnitsInStock = new System.Data.DataColumn("UnitsInStock", typeof(short), null, System.Data.MappingType.Element); base.Columns.Add(this.columnUnitsInStock); this.columnUnitsOnOrder = new System.Data.DataColumn("UnitsOnOrder", typeof(short), null, System.Data.MappingType.Element); base.Columns.Add(this.columnUnitsOnOrder); this.columnReorderLevel = new System.Data.DataColumn("ReorderLevel", typeof(short), null, System.Data.MappingType.Element); base.Columns.Add(this.columnReorderLevel); this.columnDiscontinued = new System.Data.DataColumn("Discontinued", typeof(bool), null, System.Data.MappingType.Element); base.Columns.Add(this.columnDiscontinued); this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] { this.columnProductID}, true)); this.columnProductID.AutoIncrement = true; this.columnProductID.AllowDBNull = false; this.columnProductID.ReadOnly = true; this.columnProductID.Unique = true; this.columnProductName.AllowDBNull = false; this.columnProductName.MaxLength = 40; this.columnQuantityPerUnit.MaxLength = 20; this.columnDiscontinued.AllowDBNull = false; this.Locale = new System.Globalization.CultureInfo("en-US"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public ProductsRow NewProductsRow() { return ((ProductsRow)(this.NewRow())); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) { return new ProductsRow(builder); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Type GetRowType() { return typeof(ProductsRow); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.ProductsRowChanged != null)) { this.ProductsRowChanged(this, new ProductsRowChangeEvent(((ProductsRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.ProductsRowChanging != null)) { this.ProductsRowChanging(this, new ProductsRowChangeEvent(((ProductsRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.ProductsRowDeleted != null)) { this.ProductsRowDeleted(this, new ProductsRowChangeEvent(((ProductsRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.ProductsRowDeleting != null)) { this.ProductsRowDeleting(this, new ProductsRowChangeEvent(((ProductsRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void RemoveProductsRow(ProductsRow row) { this.Rows.Remove(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) { System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType(); System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence(); NorthwindDataSet ds = new NorthwindDataSet(); xs.Add(ds.GetSchemaSerializable()); System.Xml.Schema.XmlSchemaAny any1 = new System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); System.Xml.Schema.XmlSchemaAny any2 = new System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); System.Xml.Schema.XmlSchemaAttribute attribute1 = new System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); System.Xml.Schema.XmlSchemaAttribute attribute2 = new System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "ProductsDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; return type; } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.Serializable()] [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class RegionDataTable : System.Data.DataTable, System.Collections.IEnumerable { private System.Data.DataColumn columnRegionID; private System.Data.DataColumn columnRegionDescription; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public RegionDataTable() { this.TableName = "Region"; this.BeginInit(); this.InitClass(); this.EndInit(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal RegionDataTable(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; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected RegionDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn RegionIDColumn { get { return this.columnRegionID; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn RegionDescriptionColumn { get { return this.columnRegionDescription; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] public int Count { get { return this.Rows.Count; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public RegionRow this[int index] { get { return ((RegionRow)(this.Rows[index])); } } public event RegionRowChangeEventHandler RegionRowChanging; public event RegionRowChangeEventHandler RegionRowChanged; public event RegionRowChangeEventHandler RegionRowDeleting; public event RegionRowChangeEventHandler RegionRowDeleted; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void AddRegionRow(RegionRow row) { this.Rows.Add(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public RegionRow AddRegionRow(int RegionID, string RegionDescription) { RegionRow rowRegionRow = ((RegionRow)(this.NewRow())); rowRegionRow.ItemArray = new object[] { RegionID, RegionDescription}; this.Rows.Add(rowRegionRow); return rowRegionRow; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public RegionRow FindByRegionID(int RegionID) { return ((RegionRow)(this.Rows.Find(new object[] { RegionID}))); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public virtual System.Collections.IEnumerator GetEnumerator() { return this.Rows.GetEnumerator(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public override System.Data.DataTable Clone() { RegionDataTable cln = ((RegionDataTable)(base.Clone())); cln.InitVars(); return cln; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataTable CreateInstance() { return new RegionDataTable(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal void InitVars() { this.columnRegionID = base.Columns["RegionID"]; this.columnRegionDescription = base.Columns["RegionDescription"]; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitClass() { this.columnRegionID = new System.Data.DataColumn("RegionID", typeof(int), null, System.Data.MappingType.Element); base.Columns.Add(this.columnRegionID); this.columnRegionDescription = new System.Data.DataColumn("RegionDescription", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnRegionDescription); this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] { this.columnRegionID}, true)); this.columnRegionID.AllowDBNull = false; this.columnRegionID.Unique = true; this.columnRegionDescription.AllowDBNull = false; this.columnRegionDescription.MaxLength = 50; this.Locale = new System.Globalization.CultureInfo("en-US"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public RegionRow NewRegionRow() { return ((RegionRow)(this.NewRow())); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) { return new RegionRow(builder); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Type GetRowType() { return typeof(RegionRow); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.RegionRowChanged != null)) { this.RegionRowChanged(this, new RegionRowChangeEvent(((RegionRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.RegionRowChanging != null)) { this.RegionRowChanging(this, new RegionRowChangeEvent(((RegionRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.RegionRowDeleted != null)) { this.RegionRowDeleted(this, new RegionRowChangeEvent(((RegionRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.RegionRowDeleting != null)) { this.RegionRowDeleting(this, new RegionRowChangeEvent(((RegionRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void RemoveRegionRow(RegionRow row) { this.Rows.Remove(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) { System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType(); System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence(); NorthwindDataSet ds = new NorthwindDataSet(); xs.Add(ds.GetSchemaSerializable()); System.Xml.Schema.XmlSchemaAny any1 = new System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); System.Xml.Schema.XmlSchemaAny any2 = new System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); System.Xml.Schema.XmlSchemaAttribute attribute1 = new System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); System.Xml.Schema.XmlSchemaAttribute attribute2 = new System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "RegionDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; return type; } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.Serializable()] [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class ShippersDataTable : System.Data.DataTable, System.Collections.IEnumerable { private System.Data.DataColumn columnShipperID; private System.Data.DataColumn columnCompanyName; private System.Data.DataColumn columnPhone; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public ShippersDataTable() { this.TableName = "Shippers"; this.BeginInit(); this.InitClass(); this.EndInit(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal ShippersDataTable(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; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected ShippersDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn ShipperIDColumn { get { return this.columnShipperID; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn CompanyNameColumn { get { return this.columnCompanyName; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn PhoneColumn { get { return this.columnPhone; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] public int Count { get { return this.Rows.Count; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public ShippersRow this[int index] { get { return ((ShippersRow)(this.Rows[index])); } } public event ShippersRowChangeEventHandler ShippersRowChanging; public event ShippersRowChangeEventHandler ShippersRowChanged; public event ShippersRowChangeEventHandler ShippersRowDeleting; public event ShippersRowChangeEventHandler ShippersRowDeleted; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void AddShippersRow(ShippersRow row) { this.Rows.Add(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public ShippersRow AddShippersRow(string CompanyName, string Phone) { ShippersRow rowShippersRow = ((ShippersRow)(this.NewRow())); rowShippersRow.ItemArray = new object[] { null, CompanyName, Phone}; this.Rows.Add(rowShippersRow); return rowShippersRow; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public ShippersRow FindByShipperID(int ShipperID) { return ((ShippersRow)(this.Rows.Find(new object[] { ShipperID}))); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public virtual System.Collections.IEnumerator GetEnumerator() { return this.Rows.GetEnumerator(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public override System.Data.DataTable Clone() { ShippersDataTable cln = ((ShippersDataTable)(base.Clone())); cln.InitVars(); return cln; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataTable CreateInstance() { return new ShippersDataTable(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal void InitVars() { this.columnShipperID = base.Columns["ShipperID"]; this.columnCompanyName = base.Columns["CompanyName"]; this.columnPhone = base.Columns["Phone"]; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitClass() { this.columnShipperID = new System.Data.DataColumn("ShipperID", typeof(int), null, System.Data.MappingType.Element); base.Columns.Add(this.columnShipperID); this.columnCompanyName = new System.Data.DataColumn("CompanyName", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnCompanyName); this.columnPhone = new System.Data.DataColumn("Phone", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnPhone); this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] { this.columnShipperID}, true)); this.columnShipperID.AutoIncrement = true; this.columnShipperID.AllowDBNull = false; this.columnShipperID.ReadOnly = true; this.columnShipperID.Unique = true; this.columnCompanyName.AllowDBNull = false; this.columnCompanyName.MaxLength = 40; this.columnPhone.MaxLength = 24; this.Locale = new System.Globalization.CultureInfo("en-US"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public ShippersRow NewShippersRow() { return ((ShippersRow)(this.NewRow())); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) { return new ShippersRow(builder); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Type GetRowType() { return typeof(ShippersRow); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.ShippersRowChanged != null)) { this.ShippersRowChanged(this, new ShippersRowChangeEvent(((ShippersRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.ShippersRowChanging != null)) { this.ShippersRowChanging(this, new ShippersRowChangeEvent(((ShippersRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.ShippersRowDeleted != null)) { this.ShippersRowDeleted(this, new ShippersRowChangeEvent(((ShippersRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.ShippersRowDeleting != null)) { this.ShippersRowDeleting(this, new ShippersRowChangeEvent(((ShippersRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void RemoveShippersRow(ShippersRow row) { this.Rows.Remove(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) { System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType(); System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence(); NorthwindDataSet ds = new NorthwindDataSet(); xs.Add(ds.GetSchemaSerializable()); System.Xml.Schema.XmlSchemaAny any1 = new System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); System.Xml.Schema.XmlSchemaAny any2 = new System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); System.Xml.Schema.XmlSchemaAttribute attribute1 = new System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); System.Xml.Schema.XmlSchemaAttribute attribute2 = new System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "ShippersDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; return type; } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.Serializable()] [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class SuppliersDataTable : System.Data.DataTable, System.Collections.IEnumerable { private System.Data.DataColumn columnSupplierID; private System.Data.DataColumn columnCompanyName; private System.Data.DataColumn columnContactName; private System.Data.DataColumn columnContactTitle; private System.Data.DataColumn columnAddress; private System.Data.DataColumn columnCity; private System.Data.DataColumn columnRegion; private System.Data.DataColumn columnPostalCode; private System.Data.DataColumn columnCountry; private System.Data.DataColumn columnPhone; private System.Data.DataColumn columnFax; private System.Data.DataColumn columnHomePage; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public SuppliersDataTable() { this.TableName = "Suppliers"; this.BeginInit(); this.InitClass(); this.EndInit(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal SuppliersDataTable(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; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected SuppliersDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn SupplierIDColumn { get { return this.columnSupplierID; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn CompanyNameColumn { get { return this.columnCompanyName; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn ContactNameColumn { get { return this.columnContactName; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn ContactTitleColumn { get { return this.columnContactTitle; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn AddressColumn { get { return this.columnAddress; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn CityColumn { get { return this.columnCity; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn RegionColumn { get { return this.columnRegion; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn PostalCodeColumn { get { return this.columnPostalCode; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn CountryColumn { get { return this.columnCountry; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn PhoneColumn { get { return this.columnPhone; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn FaxColumn { get { return this.columnFax; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn HomePageColumn { get { return this.columnHomePage; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] public int Count { get { return this.Rows.Count; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public SuppliersRow this[int index] { get { return ((SuppliersRow)(this.Rows[index])); } } public event SuppliersRowChangeEventHandler SuppliersRowChanging; public event SuppliersRowChangeEventHandler SuppliersRowChanged; public event SuppliersRowChangeEventHandler SuppliersRowDeleting; public event SuppliersRowChangeEventHandler SuppliersRowDeleted; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void AddSuppliersRow(SuppliersRow row) { this.Rows.Add(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public SuppliersRow AddSuppliersRow(string CompanyName, string ContactName, string ContactTitle, string Address, string City, string Region, string PostalCode, string Country, string Phone, string Fax, string HomePage) { SuppliersRow rowSuppliersRow = ((SuppliersRow)(this.NewRow())); rowSuppliersRow.ItemArray = new object[] { null, CompanyName, ContactName, ContactTitle, Address, City, Region, PostalCode, Country, Phone, Fax, HomePage}; this.Rows.Add(rowSuppliersRow); return rowSuppliersRow; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public SuppliersRow FindBySupplierID(int SupplierID) { return ((SuppliersRow)(this.Rows.Find(new object[] { SupplierID}))); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public virtual System.Collections.IEnumerator GetEnumerator() { return this.Rows.GetEnumerator(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public override System.Data.DataTable Clone() { SuppliersDataTable cln = ((SuppliersDataTable)(base.Clone())); cln.InitVars(); return cln; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataTable CreateInstance() { return new SuppliersDataTable(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal void InitVars() { this.columnSupplierID = base.Columns["SupplierID"]; this.columnCompanyName = base.Columns["CompanyName"]; this.columnContactName = base.Columns["ContactName"]; this.columnContactTitle = base.Columns["ContactTitle"]; this.columnAddress = base.Columns["Address"]; this.columnCity = base.Columns["City"]; this.columnRegion = base.Columns["Region"]; this.columnPostalCode = base.Columns["PostalCode"]; this.columnCountry = base.Columns["Country"]; this.columnPhone = base.Columns["Phone"]; this.columnFax = base.Columns["Fax"]; this.columnHomePage = base.Columns["HomePage"]; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitClass() { this.columnSupplierID = new System.Data.DataColumn("SupplierID", typeof(int), null, System.Data.MappingType.Element); base.Columns.Add(this.columnSupplierID); this.columnCompanyName = new System.Data.DataColumn("CompanyName", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnCompanyName); this.columnContactName = new System.Data.DataColumn("ContactName", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnContactName); this.columnContactTitle = new System.Data.DataColumn("ContactTitle", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnContactTitle); this.columnAddress = new System.Data.DataColumn("Address", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnAddress); this.columnCity = new System.Data.DataColumn("City", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnCity); this.columnRegion = new System.Data.DataColumn("Region", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnRegion); this.columnPostalCode = new System.Data.DataColumn("PostalCode", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnPostalCode); this.columnCountry = new System.Data.DataColumn("Country", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnCountry); this.columnPhone = new System.Data.DataColumn("Phone", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnPhone); this.columnFax = new System.Data.DataColumn("Fax", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnFax); this.columnHomePage = new System.Data.DataColumn("HomePage", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnHomePage); this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] { this.columnSupplierID}, true)); this.columnSupplierID.AutoIncrement = true; this.columnSupplierID.AllowDBNull = false; this.columnSupplierID.ReadOnly = true; this.columnSupplierID.Unique = true; this.columnCompanyName.AllowDBNull = false; this.columnCompanyName.MaxLength = 40; this.columnContactName.MaxLength = 30; this.columnContactTitle.MaxLength = 30; this.columnAddress.MaxLength = 60; this.columnCity.MaxLength = 15; this.columnRegion.MaxLength = 15; this.columnPostalCode.MaxLength = 10; this.columnCountry.MaxLength = 15; this.columnPhone.MaxLength = 24; this.columnFax.MaxLength = 24; this.columnHomePage.MaxLength = 1073741823; this.Locale = new System.Globalization.CultureInfo("en-US"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public SuppliersRow NewSuppliersRow() { return ((SuppliersRow)(this.NewRow())); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) { return new SuppliersRow(builder); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Type GetRowType() { return typeof(SuppliersRow); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.SuppliersRowChanged != null)) { this.SuppliersRowChanged(this, new SuppliersRowChangeEvent(((SuppliersRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.SuppliersRowChanging != null)) { this.SuppliersRowChanging(this, new SuppliersRowChangeEvent(((SuppliersRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.SuppliersRowDeleted != null)) { this.SuppliersRowDeleted(this, new SuppliersRowChangeEvent(((SuppliersRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.SuppliersRowDeleting != null)) { this.SuppliersRowDeleting(this, new SuppliersRowChangeEvent(((SuppliersRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void RemoveSuppliersRow(SuppliersRow row) { this.Rows.Remove(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) { System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType(); System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence(); NorthwindDataSet ds = new NorthwindDataSet(); xs.Add(ds.GetSchemaSerializable()); System.Xml.Schema.XmlSchemaAny any1 = new System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); System.Xml.Schema.XmlSchemaAny any2 = new System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); System.Xml.Schema.XmlSchemaAttribute attribute1 = new System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); System.Xml.Schema.XmlSchemaAttribute attribute2 = new System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "SuppliersDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; return type; } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.Serializable()] [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class StatesDataTable : System.Data.DataTable, System.Collections.IEnumerable { private System.Data.DataColumn columnId; private System.Data.DataColumn columnName; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public StatesDataTable() { this.TableName = "States"; this.BeginInit(); this.InitClass(); this.EndInit(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal StatesDataTable(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; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected StatesDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn IdColumn { get { return this.columnId; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataColumn NameColumn { get { return this.columnName; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Browsable(false)] public int Count { get { return this.Rows.Count; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public StatesRow this[int index] { get { return ((StatesRow)(this.Rows[index])); } } public event StatesRowChangeEventHandler StatesRowChanging; public event StatesRowChangeEventHandler StatesRowChanged; public event StatesRowChangeEventHandler StatesRowDeleting; public event StatesRowChangeEventHandler StatesRowDeleted; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void AddStatesRow(StatesRow row) { this.Rows.Add(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public StatesRow AddStatesRow(string Name) { StatesRow rowStatesRow = ((StatesRow)(this.NewRow())); rowStatesRow.ItemArray = new object[] { null, Name}; this.Rows.Add(rowStatesRow); return rowStatesRow; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public StatesRow FindById(int Id) { return ((StatesRow)(this.Rows.Find(new object[] { Id}))); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public virtual System.Collections.IEnumerator GetEnumerator() { return this.Rows.GetEnumerator(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public override System.Data.DataTable Clone() { StatesDataTable cln = ((StatesDataTable)(base.Clone())); cln.InitVars(); return cln; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataTable CreateInstance() { return new StatesDataTable(); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal void InitVars() { this.columnId = base.Columns["Id"]; this.columnName = base.Columns["Name"]; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitClass() { this.columnId = new System.Data.DataColumn("Id", typeof(int), null, System.Data.MappingType.Element); base.Columns.Add(this.columnId); this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element); base.Columns.Add(this.columnName); this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] { this.columnId}, true)); this.columnId.AutoIncrement = true; this.columnId.AllowDBNull = false; this.columnId.ReadOnly = true; this.columnId.Unique = true; this.columnName.AllowDBNull = false; this.columnName.MaxLength = 3; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public StatesRow NewStatesRow() { return ((StatesRow)(this.NewRow())); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) { return new StatesRow(builder); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override System.Type GetRowType() { return typeof(StatesRow); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.StatesRowChanged != null)) { this.StatesRowChanged(this, new StatesRowChangeEvent(((StatesRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.StatesRowChanging != null)) { this.StatesRowChanging(this, new StatesRowChangeEvent(((StatesRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.StatesRowDeleted != null)) { this.StatesRowDeleted(this, new StatesRowChangeEvent(((StatesRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.StatesRowDeleting != null)) { this.StatesRowDeleting(this, new StatesRowChangeEvent(((StatesRow)(e.Row)), e.Action)); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void RemoveStatesRow(StatesRow row) { this.Rows.Remove(row); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) { System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType(); System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence(); NorthwindDataSet ds = new NorthwindDataSet(); xs.Add(ds.GetSchemaSerializable()); System.Xml.Schema.XmlSchemaAny any1 = new System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); System.Xml.Schema.XmlSchemaAny any2 = new System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); System.Xml.Schema.XmlSchemaAttribute attribute1 = new System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); System.Xml.Schema.XmlSchemaAttribute attribute2 = new System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "StatesDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; return type; } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public partial class CategoriesRow : System.Data.DataRow { private CategoriesDataTable tableCategories; [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal CategoriesRow(System.Data.DataRowBuilder rb) : base(rb) { this.tableCategories = ((CategoriesDataTable)(this.Table)); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public int CategoryID { get { return ((int)(this[this.tableCategories.CategoryIDColumn])); } set { this[this.tableCategories.CategoryIDColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string CategoryName { get { return ((string)(this[this.tableCategories.CategoryNameColumn])); } set { this[this.tableCategories.CategoryNameColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string Description { get { try { return ((string)(this[this.tableCategories.DescriptionColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'Description\' in table \'Categories\' is DBNull.", e); } } set { this[this.tableCategories.DescriptionColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public byte[] Picture { get { try { return ((byte[])(this[this.tableCategories.PictureColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'Picture\' in table \'Categories\' is DBNull.", e); } } set { this[this.tableCategories.PictureColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsDescriptionNull() { return this.IsNull(this.tableCategories.DescriptionColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetDescriptionNull() { this[this.tableCategories.DescriptionColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsPictureNull() { return this.IsNull(this.tableCategories.PictureColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetPictureNull() { this[this.tableCategories.PictureColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public ProductsRow[] GetProductsRows() { return ((ProductsRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Products_Categories"]))); } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public partial class TerritoriesRow : System.Data.DataRow { private TerritoriesDataTable tableTerritories; [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal TerritoriesRow(System.Data.DataRowBuilder rb) : base(rb) { this.tableTerritories = ((TerritoriesDataTable)(this.Table)); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string TerritoryID { get { return ((string)(this[this.tableTerritories.TerritoryIDColumn])); } set { this[this.tableTerritories.TerritoryIDColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string TerritoryDescription { get { return ((string)(this[this.tableTerritories.TerritoryDescriptionColumn])); } set { this[this.tableTerritories.TerritoryDescriptionColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public int RegionID { get { return ((int)(this[this.tableTerritories.RegionIDColumn])); } set { this[this.tableTerritories.RegionIDColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public RegionRow RegionRow { get { return ((RegionRow)(this.GetParentRow(this.Table.ParentRelations["FK_Territories_Region"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_Territories_Region"]); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public EmployeeTerritoriesRow[] GetEmployeeTerritoriesRows() { return ((EmployeeTerritoriesRow[])(base.GetChildRows(this.Table.ChildRelations["FK_EmployeeTerritories_Territories"]))); } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public partial class CustomerDemographicsRow : System.Data.DataRow { private CustomerDemographicsDataTable tableCustomerDemographics; [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal CustomerDemographicsRow(System.Data.DataRowBuilder rb) : base(rb) { this.tableCustomerDemographics = ((CustomerDemographicsDataTable)(this.Table)); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string CustomerTypeID { get { return ((string)(this[this.tableCustomerDemographics.CustomerTypeIDColumn])); } set { this[this.tableCustomerDemographics.CustomerTypeIDColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string CustomerDesc { get { try { return ((string)(this[this.tableCustomerDemographics.CustomerDescColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'CustomerDesc\' in table \'CustomerDemographics\' is DBNull.", e); } } set { this[this.tableCustomerDemographics.CustomerDescColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsCustomerDescNull() { return this.IsNull(this.tableCustomerDemographics.CustomerDescColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetCustomerDescNull() { this[this.tableCustomerDemographics.CustomerDescColumn] = System.Convert.DBNull; } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public partial class CustomersRow : System.Data.DataRow { private CustomersDataTable tableCustomers; [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal CustomersRow(System.Data.DataRowBuilder rb) : base(rb) { this.tableCustomers = ((CustomersDataTable)(this.Table)); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string CustomerID { get { return ((string)(this[this.tableCustomers.CustomerIDColumn])); } set { this[this.tableCustomers.CustomerIDColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string CompanyName { get { return ((string)(this[this.tableCustomers.CompanyNameColumn])); } set { this[this.tableCustomers.CompanyNameColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string ContactName { get { try { return ((string)(this[this.tableCustomers.ContactNameColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'ContactName\' in table \'Customers\' is DBNull.", e); } } set { this[this.tableCustomers.ContactNameColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string ContactTitle { get { try { return ((string)(this[this.tableCustomers.ContactTitleColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'ContactTitle\' in table \'Customers\' is DBNull.", e); } } set { this[this.tableCustomers.ContactTitleColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string Address { get { try { return ((string)(this[this.tableCustomers.AddressColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'Address\' in table \'Customers\' is DBNull.", e); } } set { this[this.tableCustomers.AddressColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string City { get { try { return ((string)(this[this.tableCustomers.CityColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'City\' in table \'Customers\' is DBNull.", e); } } set { this[this.tableCustomers.CityColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string Region { get { try { return ((string)(this[this.tableCustomers.RegionColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'Region\' in table \'Customers\' is DBNull.", e); } } set { this[this.tableCustomers.RegionColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string PostalCode { get { try { return ((string)(this[this.tableCustomers.PostalCodeColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'PostalCode\' in table \'Customers\' is DBNull.", e); } } set { this[this.tableCustomers.PostalCodeColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string Country { get { try { return ((string)(this[this.tableCustomers.CountryColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'Country\' in table \'Customers\' is DBNull.", e); } } set { this[this.tableCustomers.CountryColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string Phone { get { try { return ((string)(this[this.tableCustomers.PhoneColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'Phone\' in table \'Customers\' is DBNull.", e); } } set { this[this.tableCustomers.PhoneColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string Fax { get { try { return ((string)(this[this.tableCustomers.FaxColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'Fax\' in table \'Customers\' is DBNull.", e); } } set { this[this.tableCustomers.FaxColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsContactNameNull() { return this.IsNull(this.tableCustomers.ContactNameColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetContactNameNull() { this[this.tableCustomers.ContactNameColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsContactTitleNull() { return this.IsNull(this.tableCustomers.ContactTitleColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetContactTitleNull() { this[this.tableCustomers.ContactTitleColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsAddressNull() { return this.IsNull(this.tableCustomers.AddressColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetAddressNull() { this[this.tableCustomers.AddressColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsCityNull() { return this.IsNull(this.tableCustomers.CityColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetCityNull() { this[this.tableCustomers.CityColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsRegionNull() { return this.IsNull(this.tableCustomers.RegionColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetRegionNull() { this[this.tableCustomers.RegionColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsPostalCodeNull() { return this.IsNull(this.tableCustomers.PostalCodeColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetPostalCodeNull() { this[this.tableCustomers.PostalCodeColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsCountryNull() { return this.IsNull(this.tableCustomers.CountryColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetCountryNull() { this[this.tableCustomers.CountryColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsPhoneNull() { return this.IsNull(this.tableCustomers.PhoneColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetPhoneNull() { this[this.tableCustomers.PhoneColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsFaxNull() { return this.IsNull(this.tableCustomers.FaxColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetFaxNull() { this[this.tableCustomers.FaxColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public OrdersRow[] GetOrdersRows() { return ((OrdersRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Orders_Customers"]))); } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public partial class EmployeesRow : System.Data.DataRow { private EmployeesDataTable tableEmployees; [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal EmployeesRow(System.Data.DataRowBuilder rb) : base(rb) { this.tableEmployees = ((EmployeesDataTable)(this.Table)); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public int EmployeeID { get { return ((int)(this[this.tableEmployees.EmployeeIDColumn])); } set { this[this.tableEmployees.EmployeeIDColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string LastName { get { return ((string)(this[this.tableEmployees.LastNameColumn])); } set { this[this.tableEmployees.LastNameColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string FirstName { get { return ((string)(this[this.tableEmployees.FirstNameColumn])); } set { this[this.tableEmployees.FirstNameColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string Title { get { try { return ((string)(this[this.tableEmployees.TitleColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'Title\' in table \'Employees\' is DBNull.", e); } } set { this[this.tableEmployees.TitleColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string TitleOfCourtesy { get { try { return ((string)(this[this.tableEmployees.TitleOfCourtesyColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'TitleOfCourtesy\' in table \'Employees\' is DBNull.", e); } } set { this[this.tableEmployees.TitleOfCourtesyColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.DateTime BirthDate { get { try { return ((System.DateTime)(this[this.tableEmployees.BirthDateColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'BirthDate\' in table \'Employees\' is DBNull.", e); } } set { this[this.tableEmployees.BirthDateColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.DateTime HireDate { get { try { return ((System.DateTime)(this[this.tableEmployees.HireDateColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'HireDate\' in table \'Employees\' is DBNull.", e); } } set { this[this.tableEmployees.HireDateColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string Address { get { try { return ((string)(this[this.tableEmployees.AddressColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'Address\' in table \'Employees\' is DBNull.", e); } } set { this[this.tableEmployees.AddressColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string City { get { try { return ((string)(this[this.tableEmployees.CityColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'City\' in table \'Employees\' is DBNull.", e); } } set { this[this.tableEmployees.CityColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string Region { get { try { return ((string)(this[this.tableEmployees.RegionColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'Region\' in table \'Employees\' is DBNull.", e); } } set { this[this.tableEmployees.RegionColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string PostalCode { get { try { return ((string)(this[this.tableEmployees.PostalCodeColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'PostalCode\' in table \'Employees\' is DBNull.", e); } } set { this[this.tableEmployees.PostalCodeColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string Country { get { try { return ((string)(this[this.tableEmployees.CountryColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'Country\' in table \'Employees\' is DBNull.", e); } } set { this[this.tableEmployees.CountryColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string HomePhone { get { try { return ((string)(this[this.tableEmployees.HomePhoneColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'HomePhone\' in table \'Employees\' is DBNull.", e); } } set { this[this.tableEmployees.HomePhoneColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string Extension { get { try { return ((string)(this[this.tableEmployees.ExtensionColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'Extension\' in table \'Employees\' is DBNull.", e); } } set { this[this.tableEmployees.ExtensionColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public byte[] Photo { get { try { return ((byte[])(this[this.tableEmployees.PhotoColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'Photo\' in table \'Employees\' is DBNull.", e); } } set { this[this.tableEmployees.PhotoColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string Notes { get { try { return ((string)(this[this.tableEmployees.NotesColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'Notes\' in table \'Employees\' is DBNull.", e); } } set { this[this.tableEmployees.NotesColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public int ReportsTo { get { try { return ((int)(this[this.tableEmployees.ReportsToColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'ReportsTo\' in table \'Employees\' is DBNull.", e); } } set { this[this.tableEmployees.ReportsToColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string PhotoPath { get { try { return ((string)(this[this.tableEmployees.PhotoPathColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'PhotoPath\' in table \'Employees\' is DBNull.", e); } } set { this[this.tableEmployees.PhotoPathColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public EmployeesRow EmployeesRowParent { get { return ((EmployeesRow)(this.GetParentRow(this.Table.ParentRelations["FK_Employees_Employees"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_Employees_Employees"]); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsTitleNull() { return this.IsNull(this.tableEmployees.TitleColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetTitleNull() { this[this.tableEmployees.TitleColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsTitleOfCourtesyNull() { return this.IsNull(this.tableEmployees.TitleOfCourtesyColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetTitleOfCourtesyNull() { this[this.tableEmployees.TitleOfCourtesyColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsBirthDateNull() { return this.IsNull(this.tableEmployees.BirthDateColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetBirthDateNull() { this[this.tableEmployees.BirthDateColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsHireDateNull() { return this.IsNull(this.tableEmployees.HireDateColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetHireDateNull() { this[this.tableEmployees.HireDateColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsAddressNull() { return this.IsNull(this.tableEmployees.AddressColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetAddressNull() { this[this.tableEmployees.AddressColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsCityNull() { return this.IsNull(this.tableEmployees.CityColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetCityNull() { this[this.tableEmployees.CityColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsRegionNull() { return this.IsNull(this.tableEmployees.RegionColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetRegionNull() { this[this.tableEmployees.RegionColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsPostalCodeNull() { return this.IsNull(this.tableEmployees.PostalCodeColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetPostalCodeNull() { this[this.tableEmployees.PostalCodeColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsCountryNull() { return this.IsNull(this.tableEmployees.CountryColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetCountryNull() { this[this.tableEmployees.CountryColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsHomePhoneNull() { return this.IsNull(this.tableEmployees.HomePhoneColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetHomePhoneNull() { this[this.tableEmployees.HomePhoneColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsExtensionNull() { return this.IsNull(this.tableEmployees.ExtensionColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetExtensionNull() { this[this.tableEmployees.ExtensionColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsPhotoNull() { return this.IsNull(this.tableEmployees.PhotoColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetPhotoNull() { this[this.tableEmployees.PhotoColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsNotesNull() { return this.IsNull(this.tableEmployees.NotesColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetNotesNull() { this[this.tableEmployees.NotesColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsReportsToNull() { return this.IsNull(this.tableEmployees.ReportsToColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetReportsToNull() { this[this.tableEmployees.ReportsToColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsPhotoPathNull() { return this.IsNull(this.tableEmployees.PhotoPathColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetPhotoPathNull() { this[this.tableEmployees.PhotoPathColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public EmployeesRow[] GetEmployeesRows() { return ((EmployeesRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Employees_Employees"]))); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public EmployeeTerritoriesRow[] GetEmployeeTerritoriesRows() { return ((EmployeeTerritoriesRow[])(base.GetChildRows(this.Table.ChildRelations["FK_EmployeeTerritories_Employees"]))); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public OrdersRow[] GetOrdersRows() { return ((OrdersRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Orders_Employees"]))); } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public partial class EmployeeTerritoriesRow : System.Data.DataRow { private EmployeeTerritoriesDataTable tableEmployeeTerritories; [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal EmployeeTerritoriesRow(System.Data.DataRowBuilder rb) : base(rb) { this.tableEmployeeTerritories = ((EmployeeTerritoriesDataTable)(this.Table)); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public int EmployeeID { get { return ((int)(this[this.tableEmployeeTerritories.EmployeeIDColumn])); } set { this[this.tableEmployeeTerritories.EmployeeIDColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string TerritoryID { get { return ((string)(this[this.tableEmployeeTerritories.TerritoryIDColumn])); } set { this[this.tableEmployeeTerritories.TerritoryIDColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public EmployeesRow EmployeesRow { get { return ((EmployeesRow)(this.GetParentRow(this.Table.ParentRelations["FK_EmployeeTerritories_Employees"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_EmployeeTerritories_Employees"]); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public TerritoriesRow TerritoriesRow { get { return ((TerritoriesRow)(this.GetParentRow(this.Table.ParentRelations["FK_EmployeeTerritories_Territories"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_EmployeeTerritories_Territories"]); } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public partial class Order_DetailsRow : System.Data.DataRow { private Order_DetailsDataTable tableOrder_Details; [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal Order_DetailsRow(System.Data.DataRowBuilder rb) : base(rb) { this.tableOrder_Details = ((Order_DetailsDataTable)(this.Table)); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public int OrderID { get { return ((int)(this[this.tableOrder_Details.OrderIDColumn])); } set { this[this.tableOrder_Details.OrderIDColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public int ProductID { get { return ((int)(this[this.tableOrder_Details.ProductIDColumn])); } set { this[this.tableOrder_Details.ProductIDColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public decimal UnitPrice { get { return ((decimal)(this[this.tableOrder_Details.UnitPriceColumn])); } set { this[this.tableOrder_Details.UnitPriceColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public short Quantity { get { return ((short)(this[this.tableOrder_Details.QuantityColumn])); } set { this[this.tableOrder_Details.QuantityColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public float Discount { get { return ((float)(this[this.tableOrder_Details.DiscountColumn])); } set { this[this.tableOrder_Details.DiscountColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public OrdersRow OrdersRow { get { return ((OrdersRow)(this.GetParentRow(this.Table.ParentRelations["FK_OrderDetails_Orders"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_OrderDetails_Orders"]); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public ProductsRow ProductsRow { get { return ((ProductsRow)(this.GetParentRow(this.Table.ParentRelations["FK_Order_Details_Products"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_Order_Details_Products"]); } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public partial class OrdersRow : System.Data.DataRow { private OrdersDataTable tableOrders; [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal OrdersRow(System.Data.DataRowBuilder rb) : base(rb) { this.tableOrders = ((OrdersDataTable)(this.Table)); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public int OrderID { get { return ((int)(this[this.tableOrders.OrderIDColumn])); } set { this[this.tableOrders.OrderIDColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string CustomerID { get { try { return ((string)(this[this.tableOrders.CustomerIDColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'CustomerID\' in table \'Orders\' is DBNull.", e); } } set { this[this.tableOrders.CustomerIDColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public int EmployeeID { get { try { return ((int)(this[this.tableOrders.EmployeeIDColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'EmployeeID\' in table \'Orders\' is DBNull.", e); } } set { this[this.tableOrders.EmployeeIDColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.DateTime OrderDate { get { try { return ((System.DateTime)(this[this.tableOrders.OrderDateColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'OrderDate\' in table \'Orders\' is DBNull.", e); } } set { this[this.tableOrders.OrderDateColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.DateTime RequiredDate { get { try { return ((System.DateTime)(this[this.tableOrders.RequiredDateColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'RequiredDate\' in table \'Orders\' is DBNull.", e); } } set { this[this.tableOrders.RequiredDateColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.DateTime ShippedDate { get { try { return ((System.DateTime)(this[this.tableOrders.ShippedDateColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'ShippedDate\' in table \'Orders\' is DBNull.", e); } } set { this[this.tableOrders.ShippedDateColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public int ShipVia { get { try { return ((int)(this[this.tableOrders.ShipViaColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'ShipVia\' in table \'Orders\' is DBNull.", e); } } set { this[this.tableOrders.ShipViaColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public decimal Freight { get { try { return ((decimal)(this[this.tableOrders.FreightColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'Freight\' in table \'Orders\' is DBNull.", e); } } set { this[this.tableOrders.FreightColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string ShipName { get { try { return ((string)(this[this.tableOrders.ShipNameColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'ShipName\' in table \'Orders\' is DBNull.", e); } } set { this[this.tableOrders.ShipNameColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string ShipAddress { get { try { return ((string)(this[this.tableOrders.ShipAddressColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'ShipAddress\' in table \'Orders\' is DBNull.", e); } } set { this[this.tableOrders.ShipAddressColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string ShipCity { get { try { return ((string)(this[this.tableOrders.ShipCityColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'ShipCity\' in table \'Orders\' is DBNull.", e); } } set { this[this.tableOrders.ShipCityColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string ShipRegion { get { try { return ((string)(this[this.tableOrders.ShipRegionColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'ShipRegion\' in table \'Orders\' is DBNull.", e); } } set { this[this.tableOrders.ShipRegionColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string ShipPostalCode { get { try { return ((string)(this[this.tableOrders.ShipPostalCodeColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'ShipPostalCode\' in table \'Orders\' is DBNull.", e); } } set { this[this.tableOrders.ShipPostalCodeColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string ShipCountry { get { try { return ((string)(this[this.tableOrders.ShipCountryColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'ShipCountry\' in table \'Orders\' is DBNull.", e); } } set { this[this.tableOrders.ShipCountryColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CustomersRow CustomersRow { get { return ((CustomersRow)(this.GetParentRow(this.Table.ParentRelations["FK_Orders_Customers"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_Orders_Customers"]); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public EmployeesRow EmployeesRow { get { return ((EmployeesRow)(this.GetParentRow(this.Table.ParentRelations["FK_Orders_Employees"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_Orders_Employees"]); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public ShippersRow ShippersRow { get { return ((ShippersRow)(this.GetParentRow(this.Table.ParentRelations["FK_Orders_Shippers"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_Orders_Shippers"]); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsCustomerIDNull() { return this.IsNull(this.tableOrders.CustomerIDColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetCustomerIDNull() { this[this.tableOrders.CustomerIDColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsEmployeeIDNull() { return this.IsNull(this.tableOrders.EmployeeIDColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetEmployeeIDNull() { this[this.tableOrders.EmployeeIDColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsOrderDateNull() { return this.IsNull(this.tableOrders.OrderDateColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetOrderDateNull() { this[this.tableOrders.OrderDateColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsRequiredDateNull() { return this.IsNull(this.tableOrders.RequiredDateColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetRequiredDateNull() { this[this.tableOrders.RequiredDateColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsShippedDateNull() { return this.IsNull(this.tableOrders.ShippedDateColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetShippedDateNull() { this[this.tableOrders.ShippedDateColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsShipViaNull() { return this.IsNull(this.tableOrders.ShipViaColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetShipViaNull() { this[this.tableOrders.ShipViaColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsFreightNull() { return this.IsNull(this.tableOrders.FreightColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetFreightNull() { this[this.tableOrders.FreightColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsShipNameNull() { return this.IsNull(this.tableOrders.ShipNameColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetShipNameNull() { this[this.tableOrders.ShipNameColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsShipAddressNull() { return this.IsNull(this.tableOrders.ShipAddressColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetShipAddressNull() { this[this.tableOrders.ShipAddressColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsShipCityNull() { return this.IsNull(this.tableOrders.ShipCityColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetShipCityNull() { this[this.tableOrders.ShipCityColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsShipRegionNull() { return this.IsNull(this.tableOrders.ShipRegionColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetShipRegionNull() { this[this.tableOrders.ShipRegionColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsShipPostalCodeNull() { return this.IsNull(this.tableOrders.ShipPostalCodeColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetShipPostalCodeNull() { this[this.tableOrders.ShipPostalCodeColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsShipCountryNull() { return this.IsNull(this.tableOrders.ShipCountryColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetShipCountryNull() { this[this.tableOrders.ShipCountryColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public Order_DetailsRow[] GetOrder_DetailsRows() { return ((Order_DetailsRow[])(base.GetChildRows(this.Table.ChildRelations["FK_OrderDetails_Orders"]))); } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public partial class ProductsRow : System.Data.DataRow { private ProductsDataTable tableProducts; [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal ProductsRow(System.Data.DataRowBuilder rb) : base(rb) { this.tableProducts = ((ProductsDataTable)(this.Table)); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public int ProductID { get { return ((int)(this[this.tableProducts.ProductIDColumn])); } set { this[this.tableProducts.ProductIDColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string ProductName { get { return ((string)(this[this.tableProducts.ProductNameColumn])); } set { this[this.tableProducts.ProductNameColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public int SupplierID { get { try { return ((int)(this[this.tableProducts.SupplierIDColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'SupplierID\' in table \'Products\' is DBNull.", e); } } set { this[this.tableProducts.SupplierIDColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public int CategoryID { get { try { return ((int)(this[this.tableProducts.CategoryIDColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'CategoryID\' in table \'Products\' is DBNull.", e); } } set { this[this.tableProducts.CategoryIDColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string QuantityPerUnit { get { try { return ((string)(this[this.tableProducts.QuantityPerUnitColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'QuantityPerUnit\' in table \'Products\' is DBNull.", e); } } set { this[this.tableProducts.QuantityPerUnitColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public decimal UnitPrice { get { try { return ((decimal)(this[this.tableProducts.UnitPriceColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'UnitPrice\' in table \'Products\' is DBNull.", e); } } set { this[this.tableProducts.UnitPriceColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public short UnitsInStock { get { try { return ((short)(this[this.tableProducts.UnitsInStockColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'UnitsInStock\' in table \'Products\' is DBNull.", e); } } set { this[this.tableProducts.UnitsInStockColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public short UnitsOnOrder { get { try { return ((short)(this[this.tableProducts.UnitsOnOrderColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'UnitsOnOrder\' in table \'Products\' is DBNull.", e); } } set { this[this.tableProducts.UnitsOnOrderColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public short ReorderLevel { get { try { return ((short)(this[this.tableProducts.ReorderLevelColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'ReorderLevel\' in table \'Products\' is DBNull.", e); } } set { this[this.tableProducts.ReorderLevelColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool Discontinued { get { return ((bool)(this[this.tableProducts.DiscontinuedColumn])); } set { this[this.tableProducts.DiscontinuedColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CategoriesRow CategoriesRow { get { return ((CategoriesRow)(this.GetParentRow(this.Table.ParentRelations["FK_Products_Categories"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_Products_Categories"]); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public SuppliersRow SuppliersRow { get { return ((SuppliersRow)(this.GetParentRow(this.Table.ParentRelations["FK_Products_Suppliers"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_Products_Suppliers"]); } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsSupplierIDNull() { return this.IsNull(this.tableProducts.SupplierIDColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetSupplierIDNull() { this[this.tableProducts.SupplierIDColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsCategoryIDNull() { return this.IsNull(this.tableProducts.CategoryIDColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetCategoryIDNull() { this[this.tableProducts.CategoryIDColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsQuantityPerUnitNull() { return this.IsNull(this.tableProducts.QuantityPerUnitColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetQuantityPerUnitNull() { this[this.tableProducts.QuantityPerUnitColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsUnitPriceNull() { return this.IsNull(this.tableProducts.UnitPriceColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetUnitPriceNull() { this[this.tableProducts.UnitPriceColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsUnitsInStockNull() { return this.IsNull(this.tableProducts.UnitsInStockColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetUnitsInStockNull() { this[this.tableProducts.UnitsInStockColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsUnitsOnOrderNull() { return this.IsNull(this.tableProducts.UnitsOnOrderColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetUnitsOnOrderNull() { this[this.tableProducts.UnitsOnOrderColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsReorderLevelNull() { return this.IsNull(this.tableProducts.ReorderLevelColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetReorderLevelNull() { this[this.tableProducts.ReorderLevelColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public Order_DetailsRow[] GetOrder_DetailsRows() { return ((Order_DetailsRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Order_Details_Products"]))); } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public partial class RegionRow : System.Data.DataRow { private RegionDataTable tableRegion; [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal RegionRow(System.Data.DataRowBuilder rb) : base(rb) { this.tableRegion = ((RegionDataTable)(this.Table)); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public int RegionID { get { return ((int)(this[this.tableRegion.RegionIDColumn])); } set { this[this.tableRegion.RegionIDColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string RegionDescription { get { return ((string)(this[this.tableRegion.RegionDescriptionColumn])); } set { this[this.tableRegion.RegionDescriptionColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public TerritoriesRow[] GetTerritoriesRows() { return ((TerritoriesRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Territories_Region"]))); } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public partial class ShippersRow : System.Data.DataRow { private ShippersDataTable tableShippers; [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal ShippersRow(System.Data.DataRowBuilder rb) : base(rb) { this.tableShippers = ((ShippersDataTable)(this.Table)); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public int ShipperID { get { return ((int)(this[this.tableShippers.ShipperIDColumn])); } set { this[this.tableShippers.ShipperIDColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string CompanyName { get { return ((string)(this[this.tableShippers.CompanyNameColumn])); } set { this[this.tableShippers.CompanyNameColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string Phone { get { try { return ((string)(this[this.tableShippers.PhoneColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'Phone\' in table \'Shippers\' is DBNull.", e); } } set { this[this.tableShippers.PhoneColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsPhoneNull() { return this.IsNull(this.tableShippers.PhoneColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetPhoneNull() { this[this.tableShippers.PhoneColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public OrdersRow[] GetOrdersRows() { return ((OrdersRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Orders_Shippers"]))); } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public partial class SuppliersRow : System.Data.DataRow { private SuppliersDataTable tableSuppliers; [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal SuppliersRow(System.Data.DataRowBuilder rb) : base(rb) { this.tableSuppliers = ((SuppliersDataTable)(this.Table)); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public int SupplierID { get { return ((int)(this[this.tableSuppliers.SupplierIDColumn])); } set { this[this.tableSuppliers.SupplierIDColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string CompanyName { get { return ((string)(this[this.tableSuppliers.CompanyNameColumn])); } set { this[this.tableSuppliers.CompanyNameColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string ContactName { get { try { return ((string)(this[this.tableSuppliers.ContactNameColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'ContactName\' in table \'Suppliers\' is DBNull.", e); } } set { this[this.tableSuppliers.ContactNameColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string ContactTitle { get { try { return ((string)(this[this.tableSuppliers.ContactTitleColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'ContactTitle\' in table \'Suppliers\' is DBNull.", e); } } set { this[this.tableSuppliers.ContactTitleColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string Address { get { try { return ((string)(this[this.tableSuppliers.AddressColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'Address\' in table \'Suppliers\' is DBNull.", e); } } set { this[this.tableSuppliers.AddressColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string City { get { try { return ((string)(this[this.tableSuppliers.CityColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'City\' in table \'Suppliers\' is DBNull.", e); } } set { this[this.tableSuppliers.CityColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string Region { get { try { return ((string)(this[this.tableSuppliers.RegionColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'Region\' in table \'Suppliers\' is DBNull.", e); } } set { this[this.tableSuppliers.RegionColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string PostalCode { get { try { return ((string)(this[this.tableSuppliers.PostalCodeColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'PostalCode\' in table \'Suppliers\' is DBNull.", e); } } set { this[this.tableSuppliers.PostalCodeColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string Country { get { try { return ((string)(this[this.tableSuppliers.CountryColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'Country\' in table \'Suppliers\' is DBNull.", e); } } set { this[this.tableSuppliers.CountryColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string Phone { get { try { return ((string)(this[this.tableSuppliers.PhoneColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'Phone\' in table \'Suppliers\' is DBNull.", e); } } set { this[this.tableSuppliers.PhoneColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string Fax { get { try { return ((string)(this[this.tableSuppliers.FaxColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'Fax\' in table \'Suppliers\' is DBNull.", e); } } set { this[this.tableSuppliers.FaxColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string HomePage { get { try { return ((string)(this[this.tableSuppliers.HomePageColumn])); } catch (System.InvalidCastException e) { throw new System.Data.StrongTypingException("The value for column \'HomePage\' in table \'Suppliers\' is DBNull.", e); } } set { this[this.tableSuppliers.HomePageColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsContactNameNull() { return this.IsNull(this.tableSuppliers.ContactNameColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetContactNameNull() { this[this.tableSuppliers.ContactNameColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsContactTitleNull() { return this.IsNull(this.tableSuppliers.ContactTitleColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetContactTitleNull() { this[this.tableSuppliers.ContactTitleColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsAddressNull() { return this.IsNull(this.tableSuppliers.AddressColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetAddressNull() { this[this.tableSuppliers.AddressColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsCityNull() { return this.IsNull(this.tableSuppliers.CityColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetCityNull() { this[this.tableSuppliers.CityColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsRegionNull() { return this.IsNull(this.tableSuppliers.RegionColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetRegionNull() { this[this.tableSuppliers.RegionColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsPostalCodeNull() { return this.IsNull(this.tableSuppliers.PostalCodeColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetPostalCodeNull() { this[this.tableSuppliers.PostalCodeColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsCountryNull() { return this.IsNull(this.tableSuppliers.CountryColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetCountryNull() { this[this.tableSuppliers.CountryColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsPhoneNull() { return this.IsNull(this.tableSuppliers.PhoneColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetPhoneNull() { this[this.tableSuppliers.PhoneColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsFaxNull() { return this.IsNull(this.tableSuppliers.FaxColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetFaxNull() { this[this.tableSuppliers.FaxColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsHomePageNull() { return this.IsNull(this.tableSuppliers.HomePageColumn); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void SetHomePageNull() { this[this.tableSuppliers.HomePageColumn] = System.Convert.DBNull; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public ProductsRow[] GetProductsRows() { return ((ProductsRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Products_Suppliers"]))); } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public partial class StatesRow : System.Data.DataRow { private StatesDataTable tableStates; [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal StatesRow(System.Data.DataRowBuilder rb) : base(rb) { this.tableStates = ((StatesDataTable)(this.Table)); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public int Id { get { return ((int)(this[this.tableStates.IdColumn])); } set { this[this.tableStates.IdColumn] = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public string Name { get { return ((string)(this[this.tableStates.NameColumn])); } set { this[this.tableStates.NameColumn] = value; } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public class CategoriesRowChangeEvent : System.EventArgs { private CategoriesRow eventRow; private System.Data.DataRowAction eventAction; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CategoriesRowChangeEvent(CategoriesRow row, System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CategoriesRow Row { get { return this.eventRow; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataRowAction Action { get { return this.eventAction; } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public class TerritoriesRowChangeEvent : System.EventArgs { private TerritoriesRow eventRow; private System.Data.DataRowAction eventAction; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public TerritoriesRowChangeEvent(TerritoriesRow row, System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public TerritoriesRow Row { get { return this.eventRow; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataRowAction Action { get { return this.eventAction; } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public class CustomerDemographicsRowChangeEvent : System.EventArgs { private CustomerDemographicsRow eventRow; private System.Data.DataRowAction eventAction; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CustomerDemographicsRowChangeEvent(CustomerDemographicsRow row, System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CustomerDemographicsRow Row { get { return this.eventRow; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataRowAction Action { get { return this.eventAction; } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public class CustomersRowChangeEvent : System.EventArgs { private CustomersRow eventRow; private System.Data.DataRowAction eventAction; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CustomersRowChangeEvent(CustomersRow row, System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CustomersRow Row { get { return this.eventRow; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataRowAction Action { get { return this.eventAction; } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public class EmployeesRowChangeEvent : System.EventArgs { private EmployeesRow eventRow; private System.Data.DataRowAction eventAction; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public EmployeesRowChangeEvent(EmployeesRow row, System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public EmployeesRow Row { get { return this.eventRow; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataRowAction Action { get { return this.eventAction; } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public class EmployeeTerritoriesRowChangeEvent : System.EventArgs { private EmployeeTerritoriesRow eventRow; private System.Data.DataRowAction eventAction; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public EmployeeTerritoriesRowChangeEvent(EmployeeTerritoriesRow row, System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public EmployeeTerritoriesRow Row { get { return this.eventRow; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataRowAction Action { get { return this.eventAction; } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public class Order_DetailsRowChangeEvent : System.EventArgs { private Order_DetailsRow eventRow; private System.Data.DataRowAction eventAction; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public Order_DetailsRowChangeEvent(Order_DetailsRow row, System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public Order_DetailsRow Row { get { return this.eventRow; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataRowAction Action { get { return this.eventAction; } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public class OrdersRowChangeEvent : System.EventArgs { private OrdersRow eventRow; private System.Data.DataRowAction eventAction; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public OrdersRowChangeEvent(OrdersRow row, System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public OrdersRow Row { get { return this.eventRow; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataRowAction Action { get { return this.eventAction; } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public class ProductsRowChangeEvent : System.EventArgs { private ProductsRow eventRow; private System.Data.DataRowAction eventAction; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public ProductsRowChangeEvent(ProductsRow row, System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public ProductsRow Row { get { return this.eventRow; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataRowAction Action { get { return this.eventAction; } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public class RegionRowChangeEvent : System.EventArgs { private RegionRow eventRow; private System.Data.DataRowAction eventAction; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public RegionRowChangeEvent(RegionRow row, System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public RegionRow Row { get { return this.eventRow; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataRowAction Action { get { return this.eventAction; } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public class ShippersRowChangeEvent : System.EventArgs { private ShippersRow eventRow; private System.Data.DataRowAction eventAction; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public ShippersRowChangeEvent(ShippersRow row, System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public ShippersRow Row { get { return this.eventRow; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataRowAction Action { get { return this.eventAction; } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public class SuppliersRowChangeEvent : System.EventArgs { private SuppliersRow eventRow; private System.Data.DataRowAction eventAction; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public SuppliersRowChangeEvent(SuppliersRow row, System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public SuppliersRow Row { get { return this.eventRow; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataRowAction Action { get { return this.eventAction; } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] public class StatesRowChangeEvent : System.EventArgs { private StatesRow eventRow; private System.Data.DataRowAction eventAction; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public StatesRowChangeEvent(StatesRow row, System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public StatesRow Row { get { return this.eventRow; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public System.Data.DataRowAction Action { get { return this.eventAction; } } } } } namespace AppliedDataBindingSample.NorthwindDataSetTableAdapters { [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.ToolboxItem(true)] [System.ComponentModel.DataObjectAttribute(true)] [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public partial class CategoriesTableAdapter : System.ComponentModel.Component { private System.Data.SqlClient.SqlDataAdapter _adapter; private System.Data.SqlClient.SqlConnection _connection; private System.Data.SqlClient.SqlCommand[] _commandCollection; private bool _clearBeforeFill; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CategoriesTableAdapter() { this.ClearBeforeFill = true; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private System.Data.SqlClient.SqlDataAdapter Adapter { get { if ((this._adapter == null)) { this.InitAdapter(); } return this._adapter; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal 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)) { ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; } } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool ClearBeforeFill { get { return this._clearBeforeFill; } set { this._clearBeforeFill = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "Categories"; tableMapping.ColumnMappings.Add("CategoryID", "CategoryID"); tableMapping.ColumnMappings.Add("CategoryName", "CategoryName"); tableMapping.ColumnMappings.Add("Description", "Description"); tableMapping.ColumnMappings.Add("Picture", "Picture"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Categories] WHERE (([CategoryID] = @Original_CategoryID) AND (" + "[CategoryName] = @Original_CategoryName))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CategoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CategoryID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CategoryName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CategoryName", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Categories] ([CategoryName], [Description], [Picture]) VALUES " + "(@CategoryName, @Description, @Picture);\r\nSELECT CategoryID, CategoryName, Descr" + "iption, Picture FROM Categories WHERE (CategoryID = @@IDENTITY)"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CategoryName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CategoryName", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Description", System.Data.SqlDbType.NText, 0, System.Data.ParameterDirection.Input, 0, 0, "Description", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Picture", System.Data.SqlDbType.Image, 0, System.Data.ParameterDirection.Input, 0, 0, "Picture", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Categories] SET [CategoryName] = @CategoryName, [Description] = @Description, [Picture] = @Picture WHERE (([CategoryID] = @Original_CategoryID) AND ([CategoryName] = @Original_CategoryName)); SELECT CategoryID, CategoryName, Description, Picture FROM Categories WHERE (CategoryID = @CategoryID)"; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CategoryName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CategoryName", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Description", System.Data.SqlDbType.NText, 0, System.Data.ParameterDirection.Input, 0, 0, "Description", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Picture", System.Data.SqlDbType.Image, 0, System.Data.ParameterDirection.Input, 0, 0, "Picture", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CategoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CategoryID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CategoryName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CategoryName", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CategoryID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "CategoryID", System.Data.DataRowVersion.Current, false, null, "", "", "")); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitConnection() { this._connection = new System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = AppliedDataBindingSample.Properties.Settings.Default.NorthwindConnectionString1; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitCommandCollection() { this._commandCollection = new System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT CategoryID, CategoryName, Description, Picture FROM dbo.Categories"; this._commandCollection[0].CommandType = System.Data.CommandType.Text; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)] public virtual int Fill(NorthwindDataSet.CategoriesDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)] public virtual NorthwindDataSet.CategoriesDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; NorthwindDataSet.CategoriesDataTable dataTable = new NorthwindDataSet.CategoriesDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet.CategoriesDataTable dataTable) { return this.Adapter.Update(dataTable); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet dataSet) { return this.Adapter.Update(dataSet, "Categories"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow dataRow) { return this.Adapter.Update(new System.Data.DataRow[] { dataRow}); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)] public virtual int Delete(int Original_CategoryID, string Original_CategoryName) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_CategoryID)); if ((Original_CategoryName == null)) { throw new System.ArgumentNullException("Original_CategoryName"); } else { this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_CategoryName)); } System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.DeleteCommand.Connection.Open(); } try { int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.DeleteCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)] public virtual int Insert(string CategoryName, string Description, byte[] Picture) { if ((CategoryName == null)) { throw new System.ArgumentNullException("CategoryName"); } else { this.Adapter.InsertCommand.Parameters[0].Value = ((string)(CategoryName)); } if ((Description == null)) { this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Description)); } if ((Picture == null)) { this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[2].Value = ((byte[])(Picture)); } System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.InsertCommand.Connection.Open(); } try { int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.InsertCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update(string CategoryName, string Description, byte[] Picture, int Original_CategoryID, string Original_CategoryName, int CategoryID) { if ((CategoryName == null)) { throw new System.ArgumentNullException("CategoryName"); } else { this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(CategoryName)); } if ((Description == null)) { this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Description)); } if ((Picture == null)) { this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[2].Value = ((byte[])(Picture)); } this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_CategoryID)); if ((Original_CategoryName == null)) { throw new System.ArgumentNullException("Original_CategoryName"); } else { this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_CategoryName)); } this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(CategoryID)); System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.UpdateCommand.Connection.Open(); } try { int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.UpdateCommand.Connection.Close(); } } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.ToolboxItem(true)] [System.ComponentModel.DataObjectAttribute(true)] [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public partial class TerritoriesTableAdapter : System.ComponentModel.Component { private System.Data.SqlClient.SqlDataAdapter _adapter; private System.Data.SqlClient.SqlConnection _connection; private System.Data.SqlClient.SqlCommand[] _commandCollection; private bool _clearBeforeFill; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public TerritoriesTableAdapter() { this.ClearBeforeFill = true; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private System.Data.SqlClient.SqlDataAdapter Adapter { get { if ((this._adapter == null)) { this.InitAdapter(); } return this._adapter; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal 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)) { ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; } } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool ClearBeforeFill { get { return this._clearBeforeFill; } set { this._clearBeforeFill = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "Territories"; tableMapping.ColumnMappings.Add("TerritoryID", "TerritoryID"); tableMapping.ColumnMappings.Add("TerritoryDescription", "TerritoryDescription"); tableMapping.ColumnMappings.Add("RegionID", "RegionID"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Territories] WHERE (([TerritoryID] = @Original_TerritoryID) AN" + "D ([TerritoryDescription] = @Original_TerritoryDescription) AND ([RegionID] = @O" + "riginal_RegionID))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TerritoryID", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TerritoryDescription", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryDescription", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_RegionID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "RegionID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Territories] ([TerritoryID], [TerritoryDescription], [RegionID" + "]) VALUES (@TerritoryID, @TerritoryDescription, @RegionID);\r\nSELECT TerritoryID," + " TerritoryDescription, RegionID FROM Territories WHERE (TerritoryID = @Territory" + "ID)"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TerritoryID", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TerritoryDescription", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryDescription", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RegionID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "RegionID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Territories] SET [TerritoryID] = @TerritoryID, [TerritoryDescription] = @TerritoryDescription, [RegionID] = @RegionID WHERE (([TerritoryID] = @Original_TerritoryID) AND ([TerritoryDescription] = @Original_TerritoryDescription) AND ([RegionID] = @Original_RegionID)); SELECT TerritoryID, TerritoryDescription, RegionID FROM Territories WHERE (TerritoryID = @TerritoryID)"; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TerritoryID", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TerritoryDescription", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryDescription", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RegionID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "RegionID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TerritoryID", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TerritoryDescription", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryDescription", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_RegionID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "RegionID", System.Data.DataRowVersion.Original, false, null, "", "", "")); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitConnection() { this._connection = new System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = AppliedDataBindingSample.Properties.Settings.Default.NorthwindConnectionString1; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitCommandCollection() { this._commandCollection = new System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT TerritoryID, TerritoryDescription, RegionID FROM dbo.Territories"; this._commandCollection[0].CommandType = System.Data.CommandType.Text; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)] public virtual int Fill(NorthwindDataSet.TerritoriesDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)] public virtual NorthwindDataSet.TerritoriesDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; NorthwindDataSet.TerritoriesDataTable dataTable = new NorthwindDataSet.TerritoriesDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet.TerritoriesDataTable dataTable) { return this.Adapter.Update(dataTable); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet dataSet) { return this.Adapter.Update(dataSet, "Territories"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow dataRow) { return this.Adapter.Update(new System.Data.DataRow[] { dataRow}); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)] public virtual int Delete(string Original_TerritoryID, string Original_TerritoryDescription, int Original_RegionID) { if ((Original_TerritoryID == null)) { throw new System.ArgumentNullException("Original_TerritoryID"); } else { this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_TerritoryID)); } if ((Original_TerritoryDescription == null)) { throw new System.ArgumentNullException("Original_TerritoryDescription"); } else { this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_TerritoryDescription)); } this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_RegionID)); System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.DeleteCommand.Connection.Open(); } try { int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.DeleteCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)] public virtual int Insert(string TerritoryID, string TerritoryDescription, int RegionID) { if ((TerritoryID == null)) { throw new System.ArgumentNullException("TerritoryID"); } else { this.Adapter.InsertCommand.Parameters[0].Value = ((string)(TerritoryID)); } if ((TerritoryDescription == null)) { throw new System.ArgumentNullException("TerritoryDescription"); } else { this.Adapter.InsertCommand.Parameters[1].Value = ((string)(TerritoryDescription)); } this.Adapter.InsertCommand.Parameters[2].Value = ((int)(RegionID)); System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.InsertCommand.Connection.Open(); } try { int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.InsertCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update(string TerritoryID, string TerritoryDescription, int RegionID, string Original_TerritoryID, string Original_TerritoryDescription, int Original_RegionID) { if ((TerritoryID == null)) { throw new System.ArgumentNullException("TerritoryID"); } else { this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(TerritoryID)); } if ((TerritoryDescription == null)) { throw new System.ArgumentNullException("TerritoryDescription"); } else { this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(TerritoryDescription)); } this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(RegionID)); if ((Original_TerritoryID == null)) { throw new System.ArgumentNullException("Original_TerritoryID"); } else { this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_TerritoryID)); } if ((Original_TerritoryDescription == null)) { throw new System.ArgumentNullException("Original_TerritoryDescription"); } else { this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_TerritoryDescription)); } this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_RegionID)); System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.UpdateCommand.Connection.Open(); } try { int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.UpdateCommand.Connection.Close(); } } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.ToolboxItem(true)] [System.ComponentModel.DataObjectAttribute(true)] [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public partial class CustomerDemographicsTableAdapter : System.ComponentModel.Component { private System.Data.SqlClient.SqlDataAdapter _adapter; private System.Data.SqlClient.SqlConnection _connection; private System.Data.SqlClient.SqlCommand[] _commandCollection; private bool _clearBeforeFill; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CustomerDemographicsTableAdapter() { this.ClearBeforeFill = true; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private System.Data.SqlClient.SqlDataAdapter Adapter { get { if ((this._adapter == null)) { this.InitAdapter(); } return this._adapter; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal 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)) { ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; } } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool ClearBeforeFill { get { return this._clearBeforeFill; } set { this._clearBeforeFill = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "CustomerDemographics"; tableMapping.ColumnMappings.Add("CustomerTypeID", "CustomerTypeID"); tableMapping.ColumnMappings.Add("CustomerDesc", "CustomerDesc"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[CustomerDemographics] WHERE (([CustomerTypeID] = @Original_Cus" + "tomerTypeID))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CustomerTypeID", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerTypeID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[CustomerDemographics] ([CustomerTypeID], [CustomerDesc]) VALUE" + "S (@CustomerTypeID, @CustomerDesc);\r\nSELECT CustomerTypeID, CustomerDesc FROM Cu" + "stomerDemographics WHERE (CustomerTypeID = @CustomerTypeID)"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CustomerTypeID", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerTypeID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CustomerDesc", System.Data.SqlDbType.NText, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerDesc", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[CustomerDemographics] SET [CustomerTypeID] = @CustomerTypeID, [CustomerDesc] = @CustomerDesc WHERE (([CustomerTypeID] = @Original_CustomerTypeID)); SELECT CustomerTypeID, CustomerDesc FROM CustomerDemographics WHERE (CustomerTypeID = @CustomerTypeID)"; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CustomerTypeID", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerTypeID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CustomerDesc", System.Data.SqlDbType.NText, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerDesc", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CustomerTypeID", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerTypeID", System.Data.DataRowVersion.Original, false, null, "", "", "")); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitConnection() { this._connection = new System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = AppliedDataBindingSample.Properties.Settings.Default.NorthwindConnectionString1; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitCommandCollection() { this._commandCollection = new System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT CustomerTypeID, CustomerDesc FROM dbo.CustomerDemographics"; this._commandCollection[0].CommandType = System.Data.CommandType.Text; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)] public virtual int Fill(NorthwindDataSet.CustomerDemographicsDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)] public virtual NorthwindDataSet.CustomerDemographicsDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; NorthwindDataSet.CustomerDemographicsDataTable dataTable = new NorthwindDataSet.CustomerDemographicsDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet.CustomerDemographicsDataTable dataTable) { return this.Adapter.Update(dataTable); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet dataSet) { return this.Adapter.Update(dataSet, "CustomerDemographics"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow dataRow) { return this.Adapter.Update(new System.Data.DataRow[] { dataRow}); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)] public virtual int Delete(string Original_CustomerTypeID) { if ((Original_CustomerTypeID == null)) { throw new System.ArgumentNullException("Original_CustomerTypeID"); } else { this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_CustomerTypeID)); } System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.DeleteCommand.Connection.Open(); } try { int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.DeleteCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)] public virtual int Insert(string CustomerTypeID, string CustomerDesc) { if ((CustomerTypeID == null)) { throw new System.ArgumentNullException("CustomerTypeID"); } else { this.Adapter.InsertCommand.Parameters[0].Value = ((string)(CustomerTypeID)); } if ((CustomerDesc == null)) { this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[1].Value = ((string)(CustomerDesc)); } System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.InsertCommand.Connection.Open(); } try { int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.InsertCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update(string CustomerTypeID, string CustomerDesc, string Original_CustomerTypeID) { if ((CustomerTypeID == null)) { throw new System.ArgumentNullException("CustomerTypeID"); } else { this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(CustomerTypeID)); } if ((CustomerDesc == null)) { this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(CustomerDesc)); } if ((Original_CustomerTypeID == null)) { throw new System.ArgumentNullException("Original_CustomerTypeID"); } else { this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Original_CustomerTypeID)); } System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.UpdateCommand.Connection.Open(); } try { int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.UpdateCommand.Connection.Close(); } } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.ToolboxItem(true)] [System.ComponentModel.DataObjectAttribute(true)] [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public partial class CustomersTableAdapter : System.ComponentModel.Component { private System.Data.SqlClient.SqlDataAdapter _adapter; private System.Data.SqlClient.SqlConnection _connection; private System.Data.SqlClient.SqlCommand[] _commandCollection; private bool _clearBeforeFill; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public CustomersTableAdapter() { this.ClearBeforeFill = true; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private System.Data.SqlClient.SqlDataAdapter Adapter { get { if ((this._adapter == null)) { this.InitAdapter(); } return this._adapter; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal 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)) { ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; } } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool ClearBeforeFill { get { return this._clearBeforeFill; } set { this._clearBeforeFill = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "Customers"; tableMapping.ColumnMappings.Add("CustomerID", "CustomerID"); tableMapping.ColumnMappings.Add("CompanyName", "CompanyName"); tableMapping.ColumnMappings.Add("ContactName", "ContactName"); tableMapping.ColumnMappings.Add("ContactTitle", "ContactTitle"); tableMapping.ColumnMappings.Add("Address", "Address"); tableMapping.ColumnMappings.Add("City", "City"); tableMapping.ColumnMappings.Add("Region", "Region"); tableMapping.ColumnMappings.Add("PostalCode", "PostalCode"); tableMapping.ColumnMappings.Add("Country", "Country"); tableMapping.ColumnMappings.Add("Phone", "Phone"); tableMapping.ColumnMappings.Add("Fax", "Fax"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Customers] WHERE (([CustomerID] = @Original_CustomerID) AND ([CompanyName] = @Original_CompanyName) AND ((@IsNull_ContactName = 1 AND [ContactName] IS NULL) OR ([ContactName] = @Original_ContactName)) AND ((@IsNull_ContactTitle = 1 AND [ContactTitle] IS NULL) OR ([ContactTitle] = @Original_ContactTitle)) AND ((@IsNull_Address = 1 AND [Address] IS NULL) OR ([Address] = @Original_Address)) AND ((@IsNull_City = 1 AND [City] IS NULL) OR ([City] = @Original_City)) AND ((@IsNull_Region = 1 AND [Region] IS NULL) OR ([Region] = @Original_Region)) AND ((@IsNull_PostalCode = 1 AND [PostalCode] IS NULL) OR ([PostalCode] = @Original_PostalCode)) AND ((@IsNull_Country = 1 AND [Country] IS NULL) OR ([Country] = @Original_Country)) AND ((@IsNull_Phone = 1 AND [Phone] IS NULL) OR ([Phone] = @Original_Phone)) AND ((@IsNull_Fax = 1 AND [Fax] IS NULL) OR ([Fax] = @Original_Fax)))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CustomerID", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CompanyName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CompanyName", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ContactName", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactName", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactName", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ContactTitle", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactTitle", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactTitle", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactTitle", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Address", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Address", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Address", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Address", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_City", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "City", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_City", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "City", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Region", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Region", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Region", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Region", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_PostalCode", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "PostalCode", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PostalCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PostalCode", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Country", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Country", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Country", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Country", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Phone", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Phone", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Phone", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Phone", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Fax", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Fax", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Fax", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Fax", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[Customers] ([CustomerID], [CompanyName], [ContactName], [ContactTitle], [Address], [City], [Region], [PostalCode], [Country], [Phone], [Fax]) VALUES (@CustomerID, @CompanyName, @ContactName, @ContactTitle, @Address, @City, @Region, @PostalCode, @Country, @Phone, @Fax); SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, City, Region, PostalCode, Country, Phone, Fax FROM Customers WHERE (CustomerID = @CustomerID)"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CustomerID", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CompanyName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CompanyName", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactName", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactTitle", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactTitle", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Address", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Address", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@City", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "City", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Region", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Region", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PostalCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PostalCode", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Country", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Country", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Phone", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Phone", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Fax", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Fax", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Customers] SET [CustomerID] = @CustomerID, [CompanyName] = @CompanyName, [ContactName] = @ContactName, [ContactTitle] = @ContactTitle, [Address] = @Address, [City] = @City, [Region] = @Region, [PostalCode] = @PostalCode, [Country] = @Country, [Phone] = @Phone, [Fax] = @Fax WHERE (([CustomerID] = @Original_CustomerID) AND ([CompanyName] = @Original_CompanyName) AND ((@IsNull_ContactName = 1 AND [ContactName] IS NULL) OR ([ContactName] = @Original_ContactName)) AND ((@IsNull_ContactTitle = 1 AND [ContactTitle] IS NULL) OR ([ContactTitle] = @Original_ContactTitle)) AND ((@IsNull_Address = 1 AND [Address] IS NULL) OR ([Address] = @Original_Address)) AND ((@IsNull_City = 1 AND [City] IS NULL) OR ([City] = @Original_City)) AND ((@IsNull_Region = 1 AND [Region] IS NULL) OR ([Region] = @Original_Region)) AND ((@IsNull_PostalCode = 1 AND [PostalCode] IS NULL) OR ([PostalCode] = @Original_PostalCode)) AND ((@IsNull_Country = 1 AND [Country] IS NULL) OR ([Country] = @Original_Country)) AND ((@IsNull_Phone = 1 AND [Phone] IS NULL) OR ([Phone] = @Original_Phone)) AND ((@IsNull_Fax = 1 AND [Fax] IS NULL) OR ([Fax] = @Original_Fax))); SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, City, Region, PostalCode, Country, Phone, Fax FROM Customers WHERE (CustomerID = @CustomerID)"; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CustomerID", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CompanyName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CompanyName", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactName", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactTitle", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactTitle", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Address", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Address", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@City", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "City", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Region", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Region", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PostalCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PostalCode", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Country", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Country", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Phone", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Phone", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Fax", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Fax", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CustomerID", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CompanyName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CompanyName", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ContactName", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactName", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactName", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ContactTitle", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactTitle", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactTitle", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactTitle", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Address", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Address", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Address", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Address", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_City", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "City", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_City", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "City", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Region", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Region", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Region", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Region", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_PostalCode", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "PostalCode", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PostalCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PostalCode", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Country", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Country", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Country", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Country", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Phone", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Phone", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Phone", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Phone", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Fax", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Fax", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Fax", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Fax", System.Data.DataRowVersion.Original, false, null, "", "", "")); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitConnection() { this._connection = new System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = AppliedDataBindingSample.Properties.Settings.Default.NorthwindConnectionString1; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitCommandCollection() { this._commandCollection = new System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, City, Region," + " PostalCode, Country, Phone, Fax FROM dbo.Customers"; this._commandCollection[0].CommandType = System.Data.CommandType.Text; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)] public virtual int Fill(NorthwindDataSet.CustomersDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)] public virtual NorthwindDataSet.CustomersDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; NorthwindDataSet.CustomersDataTable dataTable = new NorthwindDataSet.CustomersDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet.CustomersDataTable dataTable) { return this.Adapter.Update(dataTable); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet dataSet) { return this.Adapter.Update(dataSet, "Customers"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow dataRow) { return this.Adapter.Update(new System.Data.DataRow[] { dataRow}); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)] public virtual int Delete(string Original_CustomerID, string Original_CompanyName, string Original_ContactName, string Original_ContactTitle, string Original_Address, string Original_City, string Original_Region, string Original_PostalCode, string Original_Country, string Original_Phone, string Original_Fax) { if ((Original_CustomerID == null)) { throw new System.ArgumentNullException("Original_CustomerID"); } else { this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_CustomerID)); } if ((Original_CompanyName == null)) { throw new System.ArgumentNullException("Original_CompanyName"); } else { this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_CompanyName)); } if ((Original_ContactName == null)) { this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[3].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_ContactName)); } if ((Original_ContactTitle == null)) { this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[5].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[5].Value = ((string)(Original_ContactTitle)); } if ((Original_Address == null)) { this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[7].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[7].Value = ((string)(Original_Address)); } if ((Original_City == null)) { this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[9].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[9].Value = ((string)(Original_City)); } if ((Original_Region == null)) { this.Adapter.DeleteCommand.Parameters[10].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[11].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[10].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[11].Value = ((string)(Original_Region)); } if ((Original_PostalCode == null)) { this.Adapter.DeleteCommand.Parameters[12].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[13].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[12].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[13].Value = ((string)(Original_PostalCode)); } if ((Original_Country == null)) { this.Adapter.DeleteCommand.Parameters[14].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[15].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[14].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[15].Value = ((string)(Original_Country)); } if ((Original_Phone == null)) { this.Adapter.DeleteCommand.Parameters[16].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[17].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[16].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[17].Value = ((string)(Original_Phone)); } if ((Original_Fax == null)) { this.Adapter.DeleteCommand.Parameters[18].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[19].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[18].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[19].Value = ((string)(Original_Fax)); } System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.DeleteCommand.Connection.Open(); } try { int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.DeleteCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)] public virtual int Insert(string CustomerID, string CompanyName, string ContactName, string ContactTitle, string Address, string City, string Region, string PostalCode, string Country, string Phone, string Fax) { if ((CustomerID == null)) { throw new System.ArgumentNullException("CustomerID"); } else { this.Adapter.InsertCommand.Parameters[0].Value = ((string)(CustomerID)); } if ((CompanyName == null)) { throw new System.ArgumentNullException("CompanyName"); } else { this.Adapter.InsertCommand.Parameters[1].Value = ((string)(CompanyName)); } if ((ContactName == null)) { this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[2].Value = ((string)(ContactName)); } if ((ContactTitle == null)) { this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[3].Value = ((string)(ContactTitle)); } if ((Address == null)) { this.Adapter.InsertCommand.Parameters[4].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[4].Value = ((string)(Address)); } if ((City == null)) { this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[5].Value = ((string)(City)); } if ((Region == null)) { this.Adapter.InsertCommand.Parameters[6].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[6].Value = ((string)(Region)); } if ((PostalCode == null)) { this.Adapter.InsertCommand.Parameters[7].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[7].Value = ((string)(PostalCode)); } if ((Country == null)) { this.Adapter.InsertCommand.Parameters[8].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[8].Value = ((string)(Country)); } if ((Phone == null)) { this.Adapter.InsertCommand.Parameters[9].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[9].Value = ((string)(Phone)); } if ((Fax == null)) { this.Adapter.InsertCommand.Parameters[10].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[10].Value = ((string)(Fax)); } System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.InsertCommand.Connection.Open(); } try { int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.InsertCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update( string CustomerID, string CompanyName, string ContactName, string ContactTitle, string Address, string City, string Region, string PostalCode, string Country, string Phone, string Fax, string Original_CustomerID, string Original_CompanyName, string Original_ContactName, string Original_ContactTitle, string Original_Address, string Original_City, string Original_Region, string Original_PostalCode, string Original_Country, string Original_Phone, string Original_Fax) { if ((CustomerID == null)) { throw new System.ArgumentNullException("CustomerID"); } else { this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(CustomerID)); } if ((CompanyName == null)) { throw new System.ArgumentNullException("CompanyName"); } else { this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(CompanyName)); } if ((ContactName == null)) { this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(ContactName)); } if ((ContactTitle == null)) { this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(ContactTitle)); } if ((Address == null)) { this.Adapter.UpdateCommand.Parameters[4].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Address)); } if ((City == null)) { this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(City)); } if ((Region == null)) { this.Adapter.UpdateCommand.Parameters[6].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Region)); } if ((PostalCode == null)) { this.Adapter.UpdateCommand.Parameters[7].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(PostalCode)); } if ((Country == null)) { this.Adapter.UpdateCommand.Parameters[8].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Country)); } if ((Phone == null)) { this.Adapter.UpdateCommand.Parameters[9].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Phone)); } if ((Fax == null)) { this.Adapter.UpdateCommand.Parameters[10].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Fax)); } if ((Original_CustomerID == null)) { throw new System.ArgumentNullException("Original_CustomerID"); } else { this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_CustomerID)); } if ((Original_CompanyName == null)) { throw new System.ArgumentNullException("Original_CompanyName"); } else { this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Original_CompanyName)); } if ((Original_ContactName == null)) { this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[14].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_ContactName)); } if ((Original_ContactTitle == null)) { this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[16].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(Original_ContactTitle)); } if ((Original_Address == null)) { this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[18].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[18].Value = ((string)(Original_Address)); } if ((Original_City == null)) { this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[20].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[20].Value = ((string)(Original_City)); } if ((Original_Region == null)) { this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[22].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[22].Value = ((string)(Original_Region)); } if ((Original_PostalCode == null)) { this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[24].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[24].Value = ((string)(Original_PostalCode)); } if ((Original_Country == null)) { this.Adapter.UpdateCommand.Parameters[25].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[26].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[25].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[26].Value = ((string)(Original_Country)); } if ((Original_Phone == null)) { this.Adapter.UpdateCommand.Parameters[27].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[28].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[27].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[28].Value = ((string)(Original_Phone)); } if ((Original_Fax == null)) { this.Adapter.UpdateCommand.Parameters[29].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[30].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[29].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[30].Value = ((string)(Original_Fax)); } System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.UpdateCommand.Connection.Open(); } try { int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.UpdateCommand.Connection.Close(); } } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.ToolboxItem(true)] [System.ComponentModel.DataObjectAttribute(true)] [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public partial class EmployeesTableAdapter : System.ComponentModel.Component { private System.Data.SqlClient.SqlDataAdapter _adapter; private System.Data.SqlClient.SqlConnection _connection; private System.Data.SqlClient.SqlCommand[] _commandCollection; private bool _clearBeforeFill; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public EmployeesTableAdapter() { this.ClearBeforeFill = true; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private System.Data.SqlClient.SqlDataAdapter Adapter { get { if ((this._adapter == null)) { this.InitAdapter(); } return this._adapter; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal 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)) { ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; } } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool ClearBeforeFill { get { return this._clearBeforeFill; } set { this._clearBeforeFill = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "Employees"; tableMapping.ColumnMappings.Add("EmployeeID", "EmployeeID"); tableMapping.ColumnMappings.Add("LastName", "LastName"); tableMapping.ColumnMappings.Add("FirstName", "FirstName"); tableMapping.ColumnMappings.Add("Title", "Title"); tableMapping.ColumnMappings.Add("TitleOfCourtesy", "TitleOfCourtesy"); tableMapping.ColumnMappings.Add("BirthDate", "BirthDate"); tableMapping.ColumnMappings.Add("HireDate", "HireDate"); tableMapping.ColumnMappings.Add("Address", "Address"); tableMapping.ColumnMappings.Add("City", "City"); tableMapping.ColumnMappings.Add("Region", "Region"); tableMapping.ColumnMappings.Add("PostalCode", "PostalCode"); tableMapping.ColumnMappings.Add("Country", "Country"); tableMapping.ColumnMappings.Add("HomePhone", "HomePhone"); tableMapping.ColumnMappings.Add("Extension", "Extension"); tableMapping.ColumnMappings.Add("Photo", "Photo"); tableMapping.ColumnMappings.Add("Notes", "Notes"); tableMapping.ColumnMappings.Add("ReportsTo", "ReportsTo"); tableMapping.ColumnMappings.Add("PhotoPath", "PhotoPath"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Employees] WHERE (([EmployeeID] = @Original_EmployeeID) AND ([LastName] = @Original_LastName) AND ([FirstName] = @Original_FirstName) AND ((@IsNull_Title = 1 AND [Title] IS NULL) OR ([Title] = @Original_Title)) AND ((@IsNull_TitleOfCourtesy = 1 AND [TitleOfCourtesy] IS NULL) OR ([TitleOfCourtesy] = @Original_TitleOfCourtesy)) AND ((@IsNull_BirthDate = 1 AND [BirthDate] IS NULL) OR ([BirthDate] = @Original_BirthDate)) AND ((@IsNull_HireDate = 1 AND [HireDate] IS NULL) OR ([HireDate] = @Original_HireDate)) AND ((@IsNull_Address = 1 AND [Address] IS NULL) OR ([Address] = @Original_Address)) AND ((@IsNull_City = 1 AND [City] IS NULL) OR ([City] = @Original_City)) AND ((@IsNull_Region = 1 AND [Region] IS NULL) OR ([Region] = @Original_Region)) AND ((@IsNull_PostalCode = 1 AND [PostalCode] IS NULL) OR ([PostalCode] = @Original_PostalCode)) AND ((@IsNull_Country = 1 AND [Country] IS NULL) OR ([Country] = @Original_Country)) AND ((@IsNull_HomePhone = 1 AND [HomePhone] IS NULL) OR ([HomePhone] = @Original_HomePhone)) AND ((@IsNull_Extension = 1 AND [Extension] IS NULL) OR ([Extension] = @Original_Extension)) AND ((@IsNull_ReportsTo = 1 AND [ReportsTo] IS NULL) OR ([ReportsTo] = @Original_ReportsTo)) AND ((@IsNull_PhotoPath = 1 AND [PhotoPath] IS NULL) OR ([PhotoPath] = @Original_PhotoPath)))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EmployeeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EmployeeID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_LastName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "LastName", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_FirstName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "FirstName", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Title", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Title", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Title", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Title", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_TitleOfCourtesy", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TitleOfCourtesy", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TitleOfCourtesy", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TitleOfCourtesy", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_BirthDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "BirthDate", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_BirthDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "BirthDate", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_HireDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "HireDate", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_HireDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "HireDate", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Address", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Address", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Address", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Address", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_City", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "City", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_City", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "City", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Region", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Region", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Region", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Region", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_PostalCode", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "PostalCode", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PostalCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PostalCode", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Country", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Country", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Country", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Country", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_HomePhone", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "HomePhone", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_HomePhone", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "HomePhone", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Extension", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Extension", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Extension", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Extension", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ReportsTo", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ReportsTo", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ReportsTo", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ReportsTo", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_PhotoPath", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "PhotoPath", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PhotoPath", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PhotoPath", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[Employees] ([LastName], [FirstName], [Title], [TitleOfCourtesy], [BirthDate], [HireDate], [Address], [City], [Region], [PostalCode], [Country], [HomePhone], [Extension], [Photo], [Notes], [ReportsTo], [PhotoPath]) VALUES (@LastName, @FirstName, @Title, @TitleOfCourtesy, @BirthDate, @HireDate, @Address, @City, @Region, @PostalCode, @Country, @HomePhone, @Extension, @Photo, @Notes, @ReportsTo, @PhotoPath); SELECT EmployeeID, LastName, FirstName, Title, TitleOfCourtesy, BirthDate, HireDate, Address, City, Region, PostalCode, Country, HomePhone, Extension, Photo, Notes, ReportsTo, PhotoPath FROM Employees WHERE (EmployeeID = @@IDENTITY)"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@LastName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "LastName", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@FirstName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "FirstName", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Title", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Title", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TitleOfCourtesy", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TitleOfCourtesy", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@BirthDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "BirthDate", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@HireDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "HireDate", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Address", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Address", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@City", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "City", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Region", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Region", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PostalCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PostalCode", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Country", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Country", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@HomePhone", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "HomePhone", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Extension", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Extension", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Photo", System.Data.SqlDbType.Image, 0, System.Data.ParameterDirection.Input, 0, 0, "Photo", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Notes", System.Data.SqlDbType.NText, 0, System.Data.ParameterDirection.Input, 0, 0, "Notes", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ReportsTo", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ReportsTo", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PhotoPath", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PhotoPath", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[Employees] SET [LastName] = @LastName, [FirstName] = @FirstName, [T" + "itle] = @Title, [TitleOfCourtesy] = @TitleOfCourtesy, [BirthDate] = @BirthDate, " + "[HireDate] = @HireDate, [Address] = @Address, [City] = @City, [Region] = @Region" + ", [PostalCode] = @PostalCode, [Country] = @Country, [HomePhone] = @HomePhone, [E" + "xtension] = @Extension, [Photo] = @Photo, [Notes] = @Notes, [ReportsTo] = @Repor" + "tsTo, [PhotoPath] = @PhotoPath WHERE (([EmployeeID] = @Original_EmployeeID) AND " + "([LastName] = @Original_LastName) AND ([FirstName] = @Original_FirstName) AND ((" + "@IsNull_Title = 1 AND [Title] IS NULL) OR ([Title] = @Original_Title)) AND ((@Is" + "Null_TitleOfCourtesy = 1 AND [TitleOfCourtesy] IS NULL) OR ([TitleOfCourtesy] = " + "@Original_TitleOfCourtesy)) AND ((@IsNull_BirthDate = 1 AND [BirthDate] IS NULL)" + " OR ([BirthDate] = @Original_BirthDate)) AND ((@IsNull_HireDate = 1 AND [HireDat" + "e] IS NULL) OR ([HireDate] = @Original_HireDate)) AND ((@IsNull_Address = 1 AND " + "[Address] IS NULL) OR ([Address] = @Original_Address)) AND ((@IsNull_City = 1 AN" + "D [City] IS NULL) OR ([City] = @Original_City)) AND ((@IsNull_Region = 1 AND [Re" + "gion] IS NULL) OR ([Region] = @Original_Region)) AND ((@IsNull_PostalCode = 1 AN" + "D [PostalCode] IS NULL) OR ([PostalCode] = @Original_PostalCode)) AND ((@IsNull_" + "Country = 1 AND [Country] IS NULL) OR ([Country] = @Original_Country)) AND ((@Is" + "Null_HomePhone = 1 AND [HomePhone] IS NULL) OR ([HomePhone] = @Original_HomePhon" + "e)) AND ((@IsNull_Extension = 1 AND [Extension] IS NULL) OR ([Extension] = @Orig" + "inal_Extension)) AND ((@IsNull_ReportsTo = 1 AND [ReportsTo] IS NULL) OR ([Repor" + "tsTo] = @Original_ReportsTo)) AND ((@IsNull_PhotoPath = 1 AND [PhotoPath] IS NUL" + "L) OR ([PhotoPath] = @Original_PhotoPath)));\r\nSELECT EmployeeID, LastName, First" + "Name, Title, TitleOfCourtesy, BirthDate, HireDate, Address, City, Region, Postal" + "Code, Country, HomePhone, Extension, Photo, Notes, ReportsTo, PhotoPath FROM Emp" + "loyees WHERE (EmployeeID = @EmployeeID)"; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@LastName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "LastName", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@FirstName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "FirstName", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Title", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Title", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TitleOfCourtesy", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TitleOfCourtesy", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@BirthDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "BirthDate", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@HireDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "HireDate", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Address", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Address", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@City", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "City", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Region", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Region", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PostalCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PostalCode", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Country", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Country", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@HomePhone", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "HomePhone", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Extension", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Extension", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Photo", System.Data.SqlDbType.Image, 0, System.Data.ParameterDirection.Input, 0, 0, "Photo", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Notes", System.Data.SqlDbType.NText, 0, System.Data.ParameterDirection.Input, 0, 0, "Notes", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ReportsTo", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ReportsTo", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PhotoPath", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PhotoPath", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EmployeeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EmployeeID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_LastName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "LastName", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_FirstName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "FirstName", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Title", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Title", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Title", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Title", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_TitleOfCourtesy", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TitleOfCourtesy", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TitleOfCourtesy", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TitleOfCourtesy", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_BirthDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "BirthDate", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_BirthDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "BirthDate", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_HireDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "HireDate", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_HireDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "HireDate", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Address", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Address", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Address", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Address", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_City", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "City", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_City", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "City", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Region", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Region", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Region", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Region", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_PostalCode", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "PostalCode", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PostalCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PostalCode", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Country", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Country", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Country", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Country", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_HomePhone", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "HomePhone", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_HomePhone", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "HomePhone", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Extension", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Extension", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Extension", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Extension", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ReportsTo", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ReportsTo", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ReportsTo", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ReportsTo", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_PhotoPath", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "PhotoPath", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PhotoPath", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PhotoPath", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EmployeeID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "EmployeeID", System.Data.DataRowVersion.Current, false, null, "", "", "")); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitConnection() { this._connection = new System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = AppliedDataBindingSample.Properties.Settings.Default.NorthwindConnectionString1; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitCommandCollection() { this._commandCollection = new System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT EmployeeID, LastName, FirstName, Title, TitleOfCourtesy, BirthDate, HireDa" + "te, Address, City, Region, PostalCode, Country, HomePhone, Extension, Photo, Not" + "es, ReportsTo, PhotoPath FROM dbo.Employees"; this._commandCollection[0].CommandType = System.Data.CommandType.Text; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)] public virtual int Fill(NorthwindDataSet.EmployeesDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)] public virtual NorthwindDataSet.EmployeesDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; NorthwindDataSet.EmployeesDataTable dataTable = new NorthwindDataSet.EmployeesDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet.EmployeesDataTable dataTable) { return this.Adapter.Update(dataTable); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet dataSet) { return this.Adapter.Update(dataSet, "Employees"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow dataRow) { return this.Adapter.Update(new System.Data.DataRow[] { dataRow}); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)] public virtual int Delete( int Original_EmployeeID, string Original_LastName, string Original_FirstName, string Original_Title, string Original_TitleOfCourtesy, System.Nullable Original_BirthDate, System.Nullable Original_HireDate, string Original_Address, string Original_City, string Original_Region, string Original_PostalCode, string Original_Country, string Original_HomePhone, string Original_Extension, System.Nullable Original_ReportsTo, string Original_PhotoPath) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_EmployeeID)); if ((Original_LastName == null)) { throw new System.ArgumentNullException("Original_LastName"); } else { this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_LastName)); } if ((Original_FirstName == null)) { throw new System.ArgumentNullException("Original_FirstName"); } else { this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_FirstName)); } if ((Original_Title == null)) { this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[4].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_Title)); } if ((Original_TitleOfCourtesy == null)) { this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[6].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_TitleOfCourtesy)); } if ((Original_BirthDate.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[8].Value = ((System.DateTime)(Original_BirthDate.Value)); } else { this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[8].Value = System.DBNull.Value; } if ((Original_HireDate.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[10].Value = ((System.DateTime)(Original_HireDate.Value)); } else { this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[10].Value = System.DBNull.Value; } if ((Original_Address == null)) { this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[12].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[12].Value = ((string)(Original_Address)); } if ((Original_City == null)) { this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[14].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[14].Value = ((string)(Original_City)); } if ((Original_Region == null)) { this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[16].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[16].Value = ((string)(Original_Region)); } if ((Original_PostalCode == null)) { this.Adapter.DeleteCommand.Parameters[17].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[18].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[17].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[18].Value = ((string)(Original_PostalCode)); } if ((Original_Country == null)) { this.Adapter.DeleteCommand.Parameters[19].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[20].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[19].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[20].Value = ((string)(Original_Country)); } if ((Original_HomePhone == null)) { this.Adapter.DeleteCommand.Parameters[21].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[22].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[21].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[22].Value = ((string)(Original_HomePhone)); } if ((Original_Extension == null)) { this.Adapter.DeleteCommand.Parameters[23].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[24].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[23].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[24].Value = ((string)(Original_Extension)); } if ((Original_ReportsTo.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[25].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[26].Value = ((int)(Original_ReportsTo.Value)); } else { this.Adapter.DeleteCommand.Parameters[25].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[26].Value = System.DBNull.Value; } if ((Original_PhotoPath == null)) { this.Adapter.DeleteCommand.Parameters[27].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[28].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[27].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[28].Value = ((string)(Original_PhotoPath)); } System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.DeleteCommand.Connection.Open(); } try { int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.DeleteCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)] public virtual int Insert( string LastName, string FirstName, string Title, string TitleOfCourtesy, System.Nullable BirthDate, System.Nullable HireDate, string Address, string City, string Region, string PostalCode, string Country, string HomePhone, string Extension, byte[] Photo, string Notes, System.Nullable ReportsTo, string PhotoPath) { if ((LastName == null)) { throw new System.ArgumentNullException("LastName"); } else { this.Adapter.InsertCommand.Parameters[0].Value = ((string)(LastName)); } if ((FirstName == null)) { throw new System.ArgumentNullException("FirstName"); } else { this.Adapter.InsertCommand.Parameters[1].Value = ((string)(FirstName)); } if ((Title == null)) { this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Title)); } if ((TitleOfCourtesy == null)) { this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[3].Value = ((string)(TitleOfCourtesy)); } if ((BirthDate.HasValue == true)) { this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(BirthDate.Value)); } else { this.Adapter.InsertCommand.Parameters[4].Value = System.DBNull.Value; } if ((HireDate.HasValue == true)) { this.Adapter.InsertCommand.Parameters[5].Value = ((System.DateTime)(HireDate.Value)); } else { this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value; } if ((Address == null)) { this.Adapter.InsertCommand.Parameters[6].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[6].Value = ((string)(Address)); } if ((City == null)) { this.Adapter.InsertCommand.Parameters[7].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[7].Value = ((string)(City)); } if ((Region == null)) { this.Adapter.InsertCommand.Parameters[8].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[8].Value = ((string)(Region)); } if ((PostalCode == null)) { this.Adapter.InsertCommand.Parameters[9].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[9].Value = ((string)(PostalCode)); } if ((Country == null)) { this.Adapter.InsertCommand.Parameters[10].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[10].Value = ((string)(Country)); } if ((HomePhone == null)) { this.Adapter.InsertCommand.Parameters[11].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[11].Value = ((string)(HomePhone)); } if ((Extension == null)) { this.Adapter.InsertCommand.Parameters[12].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[12].Value = ((string)(Extension)); } if ((Photo == null)) { this.Adapter.InsertCommand.Parameters[13].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[13].Value = ((byte[])(Photo)); } if ((Notes == null)) { this.Adapter.InsertCommand.Parameters[14].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[14].Value = ((string)(Notes)); } if ((ReportsTo.HasValue == true)) { this.Adapter.InsertCommand.Parameters[15].Value = ((int)(ReportsTo.Value)); } else { this.Adapter.InsertCommand.Parameters[15].Value = System.DBNull.Value; } if ((PhotoPath == null)) { this.Adapter.InsertCommand.Parameters[16].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[16].Value = ((string)(PhotoPath)); } System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.InsertCommand.Connection.Open(); } try { int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.InsertCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update( string LastName, string FirstName, string Title, string TitleOfCourtesy, System.Nullable BirthDate, System.Nullable HireDate, string Address, string City, string Region, string PostalCode, string Country, string HomePhone, string Extension, byte[] Photo, string Notes, System.Nullable ReportsTo, string PhotoPath, int Original_EmployeeID, string Original_LastName, string Original_FirstName, string Original_Title, string Original_TitleOfCourtesy, System.Nullable Original_BirthDate, System.Nullable Original_HireDate, string Original_Address, string Original_City, string Original_Region, string Original_PostalCode, string Original_Country, string Original_HomePhone, string Original_Extension, System.Nullable Original_ReportsTo, string Original_PhotoPath, int EmployeeID) { if ((LastName == null)) { throw new System.ArgumentNullException("LastName"); } else { this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(LastName)); } if ((FirstName == null)) { throw new System.ArgumentNullException("FirstName"); } else { this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(FirstName)); } if ((Title == null)) { this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Title)); } if ((TitleOfCourtesy == null)) { this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(TitleOfCourtesy)); } if ((BirthDate.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(BirthDate.Value)); } else { this.Adapter.UpdateCommand.Parameters[4].Value = System.DBNull.Value; } if ((HireDate.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(HireDate.Value)); } else { this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value; } if ((Address == null)) { this.Adapter.UpdateCommand.Parameters[6].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Address)); } if ((City == null)) { this.Adapter.UpdateCommand.Parameters[7].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(City)); } if ((Region == null)) { this.Adapter.UpdateCommand.Parameters[8].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Region)); } if ((PostalCode == null)) { this.Adapter.UpdateCommand.Parameters[9].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(PostalCode)); } if ((Country == null)) { this.Adapter.UpdateCommand.Parameters[10].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Country)); } if ((HomePhone == null)) { this.Adapter.UpdateCommand.Parameters[11].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(HomePhone)); } if ((Extension == null)) { this.Adapter.UpdateCommand.Parameters[12].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Extension)); } if ((Photo == null)) { this.Adapter.UpdateCommand.Parameters[13].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[13].Value = ((byte[])(Photo)); } if ((Notes == null)) { this.Adapter.UpdateCommand.Parameters[14].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Notes)); } if ((ReportsTo.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(ReportsTo.Value)); } else { this.Adapter.UpdateCommand.Parameters[15].Value = System.DBNull.Value; } if ((PhotoPath == null)) { this.Adapter.UpdateCommand.Parameters[16].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(PhotoPath)); } this.Adapter.UpdateCommand.Parameters[17].Value = ((int)(Original_EmployeeID)); if ((Original_LastName == null)) { throw new System.ArgumentNullException("Original_LastName"); } else { this.Adapter.UpdateCommand.Parameters[18].Value = ((string)(Original_LastName)); } if ((Original_FirstName == null)) { throw new System.ArgumentNullException("Original_FirstName"); } else { this.Adapter.UpdateCommand.Parameters[19].Value = ((string)(Original_FirstName)); } if ((Original_Title == null)) { this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[21].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[21].Value = ((string)(Original_Title)); } if ((Original_TitleOfCourtesy == null)) { this.Adapter.UpdateCommand.Parameters[22].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[23].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[22].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[23].Value = ((string)(Original_TitleOfCourtesy)); } if ((Original_BirthDate.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[24].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[25].Value = ((System.DateTime)(Original_BirthDate.Value)); } else { this.Adapter.UpdateCommand.Parameters[24].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[25].Value = System.DBNull.Value; } if ((Original_HireDate.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[26].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[27].Value = ((System.DateTime)(Original_HireDate.Value)); } else { this.Adapter.UpdateCommand.Parameters[26].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[27].Value = System.DBNull.Value; } if ((Original_Address == null)) { this.Adapter.UpdateCommand.Parameters[28].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[29].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[28].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[29].Value = ((string)(Original_Address)); } if ((Original_City == null)) { this.Adapter.UpdateCommand.Parameters[30].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[31].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[30].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[31].Value = ((string)(Original_City)); } if ((Original_Region == null)) { this.Adapter.UpdateCommand.Parameters[32].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[33].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[32].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[33].Value = ((string)(Original_Region)); } if ((Original_PostalCode == null)) { this.Adapter.UpdateCommand.Parameters[34].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[35].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[34].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[35].Value = ((string)(Original_PostalCode)); } if ((Original_Country == null)) { this.Adapter.UpdateCommand.Parameters[36].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[37].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[36].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[37].Value = ((string)(Original_Country)); } if ((Original_HomePhone == null)) { this.Adapter.UpdateCommand.Parameters[38].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[39].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[38].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[39].Value = ((string)(Original_HomePhone)); } if ((Original_Extension == null)) { this.Adapter.UpdateCommand.Parameters[40].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[41].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[40].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[41].Value = ((string)(Original_Extension)); } if ((Original_ReportsTo.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[42].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[43].Value = ((int)(Original_ReportsTo.Value)); } else { this.Adapter.UpdateCommand.Parameters[42].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[43].Value = System.DBNull.Value; } if ((Original_PhotoPath == null)) { this.Adapter.UpdateCommand.Parameters[44].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[45].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[44].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[45].Value = ((string)(Original_PhotoPath)); } this.Adapter.UpdateCommand.Parameters[46].Value = ((int)(EmployeeID)); System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.UpdateCommand.Connection.Open(); } try { int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.UpdateCommand.Connection.Close(); } } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.ToolboxItem(true)] [System.ComponentModel.DataObjectAttribute(true)] [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public partial class EmployeeTerritoriesTableAdapter : System.ComponentModel.Component { private System.Data.SqlClient.SqlDataAdapter _adapter; private System.Data.SqlClient.SqlConnection _connection; private System.Data.SqlClient.SqlCommand[] _commandCollection; private bool _clearBeforeFill; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public EmployeeTerritoriesTableAdapter() { this.ClearBeforeFill = true; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private System.Data.SqlClient.SqlDataAdapter Adapter { get { if ((this._adapter == null)) { this.InitAdapter(); } return this._adapter; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal 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)) { ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; } } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool ClearBeforeFill { get { return this._clearBeforeFill; } set { this._clearBeforeFill = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "EmployeeTerritories"; tableMapping.ColumnMappings.Add("EmployeeID", "EmployeeID"); tableMapping.ColumnMappings.Add("TerritoryID", "TerritoryID"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[EmployeeTerritories] WHERE (([EmployeeID] = @Original_Employee" + "ID) AND ([TerritoryID] = @Original_TerritoryID))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EmployeeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EmployeeID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TerritoryID", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[EmployeeTerritories] ([EmployeeID], [TerritoryID]) VALUES (@Em" + "ployeeID, @TerritoryID);\r\nSELECT EmployeeID, TerritoryID FROM EmployeeTerritorie" + "s WHERE (EmployeeID = @EmployeeID) AND (TerritoryID = @TerritoryID)"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EmployeeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EmployeeID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TerritoryID", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[EmployeeTerritories] SET [EmployeeID] = @EmployeeID, [TerritoryID] = @TerritoryID WHERE (([EmployeeID] = @Original_EmployeeID) AND ([TerritoryID] = @Original_TerritoryID)); SELECT EmployeeID, TerritoryID FROM EmployeeTerritories WHERE (EmployeeID = @EmployeeID) AND (TerritoryID = @TerritoryID)"; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EmployeeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EmployeeID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TerritoryID", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EmployeeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EmployeeID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TerritoryID", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Original, false, null, "", "", "")); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitConnection() { this._connection = new System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = AppliedDataBindingSample.Properties.Settings.Default.NorthwindConnectionString1; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitCommandCollection() { this._commandCollection = new System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT EmployeeID, TerritoryID FROM dbo.EmployeeTerritories"; this._commandCollection[0].CommandType = System.Data.CommandType.Text; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)] public virtual int Fill(NorthwindDataSet.EmployeeTerritoriesDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)] public virtual NorthwindDataSet.EmployeeTerritoriesDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; NorthwindDataSet.EmployeeTerritoriesDataTable dataTable = new NorthwindDataSet.EmployeeTerritoriesDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet.EmployeeTerritoriesDataTable dataTable) { return this.Adapter.Update(dataTable); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet dataSet) { return this.Adapter.Update(dataSet, "EmployeeTerritories"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow dataRow) { return this.Adapter.Update(new System.Data.DataRow[] { dataRow}); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)] public virtual int Delete(int Original_EmployeeID, string Original_TerritoryID) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_EmployeeID)); if ((Original_TerritoryID == null)) { throw new System.ArgumentNullException("Original_TerritoryID"); } else { this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_TerritoryID)); } System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.DeleteCommand.Connection.Open(); } try { int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.DeleteCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)] public virtual int Insert(int EmployeeID, string TerritoryID) { this.Adapter.InsertCommand.Parameters[0].Value = ((int)(EmployeeID)); if ((TerritoryID == null)) { throw new System.ArgumentNullException("TerritoryID"); } else { this.Adapter.InsertCommand.Parameters[1].Value = ((string)(TerritoryID)); } System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.InsertCommand.Connection.Open(); } try { int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.InsertCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update(int EmployeeID, string TerritoryID, int Original_EmployeeID, string Original_TerritoryID) { this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(EmployeeID)); if ((TerritoryID == null)) { throw new System.ArgumentNullException("TerritoryID"); } else { this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(TerritoryID)); } this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_EmployeeID)); if ((Original_TerritoryID == null)) { throw new System.ArgumentNullException("Original_TerritoryID"); } else { this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_TerritoryID)); } System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.UpdateCommand.Connection.Open(); } try { int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.UpdateCommand.Connection.Close(); } } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.ToolboxItem(true)] [System.ComponentModel.DataObjectAttribute(true)] [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public partial class Order_DetailsTableAdapter : System.ComponentModel.Component { private System.Data.SqlClient.SqlDataAdapter _adapter; private System.Data.SqlClient.SqlConnection _connection; private System.Data.SqlClient.SqlCommand[] _commandCollection; private bool _clearBeforeFill; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public Order_DetailsTableAdapter() { this.ClearBeforeFill = true; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private System.Data.SqlClient.SqlDataAdapter Adapter { get { if ((this._adapter == null)) { this.InitAdapter(); } return this._adapter; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal 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)) { ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; } } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool ClearBeforeFill { get { return this._clearBeforeFill; } set { this._clearBeforeFill = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "Order Details"; tableMapping.ColumnMappings.Add("OrderID", "OrderID"); tableMapping.ColumnMappings.Add("ProductID", "ProductID"); tableMapping.ColumnMappings.Add("UnitPrice", "UnitPrice"); tableMapping.ColumnMappings.Add("Quantity", "Quantity"); tableMapping.ColumnMappings.Add("Discount", "Discount"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Order Details] WHERE (([OrderID] = @Original_OrderID) AND ([Pr" + "oductID] = @Original_ProductID) AND ([UnitPrice] = @Original_UnitPrice) AND ([Qu" + "antity] = @Original_Quantity) AND ([Discount] = @Original_Discount))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_OrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "OrderID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_UnitPrice", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitPrice", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Quantity", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "Quantity", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Discount", System.Data.SqlDbType.Real, 0, System.Data.ParameterDirection.Input, 0, 0, "Discount", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[Order Details] ([OrderID], [ProductID], [UnitPrice], [Quantity], [Discount]) VALUES (@OrderID, @ProductID, @UnitPrice, @Quantity, @Discount); SELECT OrderID, ProductID, UnitPrice, Quantity, Discount FROM [Order Details] WHERE (OrderID = @OrderID) AND (ProductID = @ProductID)"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "OrderID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@UnitPrice", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitPrice", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Quantity", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "Quantity", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Discount", System.Data.SqlDbType.Real, 0, System.Data.ParameterDirection.Input, 0, 0, "Discount", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Order Details] SET [OrderID] = @OrderID, [ProductID] = @ProductID, [UnitPrice] = @UnitPrice, [Quantity] = @Quantity, [Discount] = @Discount WHERE (([OrderID] = @Original_OrderID) AND ([ProductID] = @Original_ProductID) AND ([UnitPrice] = @Original_UnitPrice) AND ([Quantity] = @Original_Quantity) AND ([Discount] = @Original_Discount)); SELECT OrderID, ProductID, UnitPrice, Quantity, Discount FROM [Order Details] WHERE (OrderID = @OrderID) AND (ProductID = @ProductID)"; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "OrderID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@UnitPrice", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitPrice", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Quantity", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "Quantity", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Discount", System.Data.SqlDbType.Real, 0, System.Data.ParameterDirection.Input, 0, 0, "Discount", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_OrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "OrderID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_UnitPrice", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitPrice", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Quantity", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "Quantity", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Discount", System.Data.SqlDbType.Real, 0, System.Data.ParameterDirection.Input, 0, 0, "Discount", System.Data.DataRowVersion.Original, false, null, "", "", "")); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitConnection() { this._connection = new System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = AppliedDataBindingSample.Properties.Settings.Default.NorthwindConnectionString1; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitCommandCollection() { this._commandCollection = new System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT OrderID, ProductID, UnitPrice, Quantity, Discount FROM dbo.[Order Details]" + ""; this._commandCollection[0].CommandType = System.Data.CommandType.Text; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)] public virtual int Fill(NorthwindDataSet.Order_DetailsDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)] public virtual NorthwindDataSet.Order_DetailsDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; NorthwindDataSet.Order_DetailsDataTable dataTable = new NorthwindDataSet.Order_DetailsDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet.Order_DetailsDataTable dataTable) { return this.Adapter.Update(dataTable); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet dataSet) { return this.Adapter.Update(dataSet, "Order Details"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow dataRow) { return this.Adapter.Update(new System.Data.DataRow[] { dataRow}); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)] public virtual int Delete(int Original_OrderID, int Original_ProductID, decimal Original_UnitPrice, short Original_Quantity, float Original_Discount) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_OrderID)); this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_ProductID)); this.Adapter.DeleteCommand.Parameters[2].Value = ((decimal)(Original_UnitPrice)); this.Adapter.DeleteCommand.Parameters[3].Value = ((short)(Original_Quantity)); this.Adapter.DeleteCommand.Parameters[4].Value = ((float)(Original_Discount)); System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.DeleteCommand.Connection.Open(); } try { int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.DeleteCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)] public virtual int Insert(int OrderID, int ProductID, decimal UnitPrice, short Quantity, float Discount) { this.Adapter.InsertCommand.Parameters[0].Value = ((int)(OrderID)); this.Adapter.InsertCommand.Parameters[1].Value = ((int)(ProductID)); this.Adapter.InsertCommand.Parameters[2].Value = ((decimal)(UnitPrice)); this.Adapter.InsertCommand.Parameters[3].Value = ((short)(Quantity)); this.Adapter.InsertCommand.Parameters[4].Value = ((float)(Discount)); System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.InsertCommand.Connection.Open(); } try { int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.InsertCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update(int OrderID, int ProductID, decimal UnitPrice, short Quantity, float Discount, int Original_OrderID, int Original_ProductID, decimal Original_UnitPrice, short Original_Quantity, float Original_Discount) { this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(OrderID)); this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(ProductID)); this.Adapter.UpdateCommand.Parameters[2].Value = ((decimal)(UnitPrice)); this.Adapter.UpdateCommand.Parameters[3].Value = ((short)(Quantity)); this.Adapter.UpdateCommand.Parameters[4].Value = ((float)(Discount)); this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_OrderID)); this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_ProductID)); this.Adapter.UpdateCommand.Parameters[7].Value = ((decimal)(Original_UnitPrice)); this.Adapter.UpdateCommand.Parameters[8].Value = ((short)(Original_Quantity)); this.Adapter.UpdateCommand.Parameters[9].Value = ((float)(Original_Discount)); System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.UpdateCommand.Connection.Open(); } try { int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.UpdateCommand.Connection.Close(); } } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.ToolboxItem(true)] [System.ComponentModel.DataObjectAttribute(true)] [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public partial class OrdersTableAdapter : System.ComponentModel.Component { private System.Data.SqlClient.SqlDataAdapter _adapter; private System.Data.SqlClient.SqlConnection _connection; private System.Data.SqlClient.SqlCommand[] _commandCollection; private bool _clearBeforeFill; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public OrdersTableAdapter() { this.ClearBeforeFill = true; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private System.Data.SqlClient.SqlDataAdapter Adapter { get { if ((this._adapter == null)) { this.InitAdapter(); } return this._adapter; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal 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)) { ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; } } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool ClearBeforeFill { get { return this._clearBeforeFill; } set { this._clearBeforeFill = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "Orders"; tableMapping.ColumnMappings.Add("OrderID", "OrderID"); tableMapping.ColumnMappings.Add("CustomerID", "CustomerID"); tableMapping.ColumnMappings.Add("EmployeeID", "EmployeeID"); tableMapping.ColumnMappings.Add("OrderDate", "OrderDate"); tableMapping.ColumnMappings.Add("RequiredDate", "RequiredDate"); tableMapping.ColumnMappings.Add("ShippedDate", "ShippedDate"); tableMapping.ColumnMappings.Add("ShipVia", "ShipVia"); tableMapping.ColumnMappings.Add("Freight", "Freight"); tableMapping.ColumnMappings.Add("ShipName", "ShipName"); tableMapping.ColumnMappings.Add("ShipAddress", "ShipAddress"); tableMapping.ColumnMappings.Add("ShipCity", "ShipCity"); tableMapping.ColumnMappings.Add("ShipRegion", "ShipRegion"); tableMapping.ColumnMappings.Add("ShipPostalCode", "ShipPostalCode"); tableMapping.ColumnMappings.Add("ShipCountry", "ShipCountry"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Orders] WHERE (([OrderID] = @Original_OrderID) AND ((@IsNull_CustomerID = 1 AND [CustomerID] IS NULL) OR ([CustomerID] = @Original_CustomerID)) AND ((@IsNull_EmployeeID = 1 AND [EmployeeID] IS NULL) OR ([EmployeeID] = @Original_EmployeeID)) AND ((@IsNull_OrderDate = 1 AND [OrderDate] IS NULL) OR ([OrderDate] = @Original_OrderDate)) AND ((@IsNull_RequiredDate = 1 AND [RequiredDate] IS NULL) OR ([RequiredDate] = @Original_RequiredDate)) AND ((@IsNull_ShippedDate = 1 AND [ShippedDate] IS NULL) OR ([ShippedDate] = @Original_ShippedDate)) AND ((@IsNull_ShipVia = 1 AND [ShipVia] IS NULL) OR ([ShipVia] = @Original_ShipVia)) AND ((@IsNull_Freight = 1 AND [Freight] IS NULL) OR ([Freight] = @Original_Freight)) AND ((@IsNull_ShipName = 1 AND [ShipName] IS NULL) OR ([ShipName] = @Original_ShipName)) AND ((@IsNull_ShipAddress = 1 AND [ShipAddress] IS NULL) OR ([ShipAddress] = @Original_ShipAddress)) AND ((@IsNull_ShipCity = 1 AND [ShipCity] IS NULL) OR ([ShipCity] = @Original_ShipCity)) AND ((@IsNull_ShipRegion = 1 AND [ShipRegion] IS NULL) OR ([ShipRegion] = @Original_ShipRegion)) AND ((@IsNull_ShipPostalCode = 1 AND [ShipPostalCode] IS NULL) OR ([ShipPostalCode] = @Original_ShipPostalCode)) AND ((@IsNull_ShipCountry = 1 AND [ShipCountry] IS NULL) OR ([ShipCountry] = @Original_ShipCountry)))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_OrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "OrderID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CustomerID", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_EmployeeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EmployeeID", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EmployeeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EmployeeID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_OrderDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "OrderDate", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_OrderDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "OrderDate", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_RequiredDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "RequiredDate", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_RequiredDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "RequiredDate", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ShippedDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShippedDate", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShippedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ShippedDate", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ShipVia", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipVia", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipVia", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipVia", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Freight", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Freight", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Freight", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "Freight", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ShipName", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipName", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipName", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ShipAddress", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipAddress", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipAddress", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipAddress", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ShipCity", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipCity", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipCity", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipCity", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ShipRegion", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipRegion", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipRegion", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipRegion", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ShipPostalCode", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipPostalCode", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipPostalCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipPostalCode", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ShipCountry", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipCountry", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipCountry", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipCountry", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[Orders] ([CustomerID], [EmployeeID], [OrderDate], [RequiredDate], [ShippedDate], [ShipVia], [Freight], [ShipName], [ShipAddress], [ShipCity], [ShipRegion], [ShipPostalCode], [ShipCountry]) VALUES (@CustomerID, @EmployeeID, @OrderDate, @RequiredDate, @ShippedDate, @ShipVia, @Freight, @ShipName, @ShipAddress, @ShipCity, @ShipRegion, @ShipPostalCode, @ShipCountry); SELECT OrderID, CustomerID, EmployeeID, OrderDate, RequiredDate, ShippedDate, ShipVia, Freight, ShipName, ShipAddress, ShipCity, ShipRegion, ShipPostalCode, ShipCountry FROM Orders WHERE (OrderID = @@IDENTITY)"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CustomerID", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EmployeeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EmployeeID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OrderDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "OrderDate", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RequiredDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "RequiredDate", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShippedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ShippedDate", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipVia", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipVia", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Freight", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "Freight", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipName", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipAddress", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipAddress", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipCity", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipCity", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipRegion", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipRegion", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipPostalCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipPostalCode", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipCountry", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipCountry", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[Orders] SET [CustomerID] = @CustomerID, [EmployeeID] = @EmployeeID," + " [OrderDate] = @OrderDate, [RequiredDate] = @RequiredDate, [ShippedDate] = @Ship" + "pedDate, [ShipVia] = @ShipVia, [Freight] = @Freight, [ShipName] = @ShipName, [Sh" + "ipAddress] = @ShipAddress, [ShipCity] = @ShipCity, [ShipRegion] = @ShipRegion, [" + "ShipPostalCode] = @ShipPostalCode, [ShipCountry] = @ShipCountry WHERE (([OrderID" + "] = @Original_OrderID) AND ((@IsNull_CustomerID = 1 AND [CustomerID] IS NULL) OR" + " ([CustomerID] = @Original_CustomerID)) AND ((@IsNull_EmployeeID = 1 AND [Employ" + "eeID] IS NULL) OR ([EmployeeID] = @Original_EmployeeID)) AND ((@IsNull_OrderDate" + " = 1 AND [OrderDate] IS NULL) OR ([OrderDate] = @Original_OrderDate)) AND ((@IsN" + "ull_RequiredDate = 1 AND [RequiredDate] IS NULL) OR ([RequiredDate] = @Original_" + "RequiredDate)) AND ((@IsNull_ShippedDate = 1 AND [ShippedDate] IS NULL) OR ([Shi" + "ppedDate] = @Original_ShippedDate)) AND ((@IsNull_ShipVia = 1 AND [ShipVia] IS N" + "ULL) OR ([ShipVia] = @Original_ShipVia)) AND ((@IsNull_Freight = 1 AND [Freight]" + " IS NULL) OR ([Freight] = @Original_Freight)) AND ((@IsNull_ShipName = 1 AND [Sh" + "ipName] IS NULL) OR ([ShipName] = @Original_ShipName)) AND ((@IsNull_ShipAddress" + " = 1 AND [ShipAddress] IS NULL) OR ([ShipAddress] = @Original_ShipAddress)) AND " + "((@IsNull_ShipCity = 1 AND [ShipCity] IS NULL) OR ([ShipCity] = @Original_ShipCi" + "ty)) AND ((@IsNull_ShipRegion = 1 AND [ShipRegion] IS NULL) OR ([ShipRegion] = @" + "Original_ShipRegion)) AND ((@IsNull_ShipPostalCode = 1 AND [ShipPostalCode] IS N" + "ULL) OR ([ShipPostalCode] = @Original_ShipPostalCode)) AND ((@IsNull_ShipCountry" + " = 1 AND [ShipCountry] IS NULL) OR ([ShipCountry] = @Original_ShipCountry)));\r\nS" + "ELECT OrderID, CustomerID, EmployeeID, OrderDate, RequiredDate, ShippedDate, Shi" + "pVia, Freight, ShipName, ShipAddress, ShipCity, ShipRegion, ShipPostalCode, Ship" + "Country FROM Orders WHERE (OrderID = @OrderID)"; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CustomerID", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EmployeeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EmployeeID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OrderDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "OrderDate", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RequiredDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "RequiredDate", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShippedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ShippedDate", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipVia", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipVia", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Freight", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "Freight", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipName", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipAddress", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipAddress", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipCity", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipCity", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipRegion", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipRegion", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipPostalCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipPostalCode", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipCountry", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipCountry", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_OrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "OrderID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CustomerID", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_EmployeeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EmployeeID", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EmployeeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EmployeeID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_OrderDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "OrderDate", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_OrderDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "OrderDate", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_RequiredDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "RequiredDate", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_RequiredDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "RequiredDate", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ShippedDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShippedDate", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShippedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ShippedDate", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ShipVia", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipVia", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipVia", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipVia", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Freight", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Freight", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Freight", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "Freight", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ShipName", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipName", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipName", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ShipAddress", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipAddress", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipAddress", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipAddress", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ShipCity", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipCity", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipCity", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipCity", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ShipRegion", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipRegion", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipRegion", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipRegion", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ShipPostalCode", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipPostalCode", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipPostalCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipPostalCode", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ShipCountry", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipCountry", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipCountry", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipCountry", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OrderID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "OrderID", System.Data.DataRowVersion.Current, false, null, "", "", "")); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitConnection() { this._connection = new System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = AppliedDataBindingSample.Properties.Settings.Default.NorthwindConnectionString1; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitCommandCollection() { this._commandCollection = new System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT OrderID, CustomerID, EmployeeID, OrderDate, RequiredDate, ShippedDate, Shi" + "pVia, Freight, ShipName, ShipAddress, ShipCity, ShipRegion, ShipPostalCode, Ship" + "Country FROM dbo.Orders"; this._commandCollection[0].CommandType = System.Data.CommandType.Text; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)] public virtual int Fill(NorthwindDataSet.OrdersDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)] public virtual NorthwindDataSet.OrdersDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; NorthwindDataSet.OrdersDataTable dataTable = new NorthwindDataSet.OrdersDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet.OrdersDataTable dataTable) { return this.Adapter.Update(dataTable); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet dataSet) { return this.Adapter.Update(dataSet, "Orders"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow dataRow) { return this.Adapter.Update(new System.Data.DataRow[] { dataRow}); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)] public virtual int Delete(int Original_OrderID, string Original_CustomerID, System.Nullable Original_EmployeeID, System.Nullable Original_OrderDate, System.Nullable Original_RequiredDate, System.Nullable Original_ShippedDate, System.Nullable Original_ShipVia, System.Nullable Original_Freight, string Original_ShipName, string Original_ShipAddress, string Original_ShipCity, string Original_ShipRegion, string Original_ShipPostalCode, string Original_ShipCountry) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_OrderID)); if ((Original_CustomerID == null)) { this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[2].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_CustomerID)); } if ((Original_EmployeeID.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_EmployeeID.Value)); } else { this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[4].Value = System.DBNull.Value; } if ((Original_OrderDate.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[6].Value = ((System.DateTime)(Original_OrderDate.Value)); } else { this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[6].Value = System.DBNull.Value; } if ((Original_RequiredDate.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[8].Value = ((System.DateTime)(Original_RequiredDate.Value)); } else { this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[8].Value = System.DBNull.Value; } if ((Original_ShippedDate.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[10].Value = ((System.DateTime)(Original_ShippedDate.Value)); } else { this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[10].Value = System.DBNull.Value; } if ((Original_ShipVia.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[12].Value = ((int)(Original_ShipVia.Value)); } else { this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[12].Value = System.DBNull.Value; } if ((Original_Freight.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[14].Value = ((decimal)(Original_Freight.Value)); } else { this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[14].Value = System.DBNull.Value; } if ((Original_ShipName == null)) { this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[16].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[16].Value = ((string)(Original_ShipName)); } if ((Original_ShipAddress == null)) { this.Adapter.DeleteCommand.Parameters[17].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[18].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[17].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[18].Value = ((string)(Original_ShipAddress)); } if ((Original_ShipCity == null)) { this.Adapter.DeleteCommand.Parameters[19].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[20].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[19].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[20].Value = ((string)(Original_ShipCity)); } if ((Original_ShipRegion == null)) { this.Adapter.DeleteCommand.Parameters[21].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[22].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[21].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[22].Value = ((string)(Original_ShipRegion)); } if ((Original_ShipPostalCode == null)) { this.Adapter.DeleteCommand.Parameters[23].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[24].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[23].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[24].Value = ((string)(Original_ShipPostalCode)); } if ((Original_ShipCountry == null)) { this.Adapter.DeleteCommand.Parameters[25].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[26].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[25].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[26].Value = ((string)(Original_ShipCountry)); } System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.DeleteCommand.Connection.Open(); } try { int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.DeleteCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)] public virtual int Insert(string CustomerID, System.Nullable EmployeeID, System.Nullable OrderDate, System.Nullable RequiredDate, System.Nullable ShippedDate, System.Nullable ShipVia, System.Nullable Freight, string ShipName, string ShipAddress, string ShipCity, string ShipRegion, string ShipPostalCode, string ShipCountry) { if ((CustomerID == null)) { this.Adapter.InsertCommand.Parameters[0].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[0].Value = ((string)(CustomerID)); } if ((EmployeeID.HasValue == true)) { this.Adapter.InsertCommand.Parameters[1].Value = ((int)(EmployeeID.Value)); } else { this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value; } if ((OrderDate.HasValue == true)) { this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(OrderDate.Value)); } else { this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value; } if ((RequiredDate.HasValue == true)) { this.Adapter.InsertCommand.Parameters[3].Value = ((System.DateTime)(RequiredDate.Value)); } else { this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value; } if ((ShippedDate.HasValue == true)) { this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(ShippedDate.Value)); } else { this.Adapter.InsertCommand.Parameters[4].Value = System.DBNull.Value; } if ((ShipVia.HasValue == true)) { this.Adapter.InsertCommand.Parameters[5].Value = ((int)(ShipVia.Value)); } else { this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value; } if ((Freight.HasValue == true)) { this.Adapter.InsertCommand.Parameters[6].Value = ((decimal)(Freight.Value)); } else { this.Adapter.InsertCommand.Parameters[6].Value = System.DBNull.Value; } if ((ShipName == null)) { this.Adapter.InsertCommand.Parameters[7].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[7].Value = ((string)(ShipName)); } if ((ShipAddress == null)) { this.Adapter.InsertCommand.Parameters[8].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[8].Value = ((string)(ShipAddress)); } if ((ShipCity == null)) { this.Adapter.InsertCommand.Parameters[9].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[9].Value = ((string)(ShipCity)); } if ((ShipRegion == null)) { this.Adapter.InsertCommand.Parameters[10].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[10].Value = ((string)(ShipRegion)); } if ((ShipPostalCode == null)) { this.Adapter.InsertCommand.Parameters[11].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[11].Value = ((string)(ShipPostalCode)); } if ((ShipCountry == null)) { this.Adapter.InsertCommand.Parameters[12].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[12].Value = ((string)(ShipCountry)); } System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.InsertCommand.Connection.Open(); } try { int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.InsertCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update( string CustomerID, System.Nullable EmployeeID, System.Nullable OrderDate, System.Nullable RequiredDate, System.Nullable ShippedDate, System.Nullable ShipVia, System.Nullable Freight, string ShipName, string ShipAddress, string ShipCity, string ShipRegion, string ShipPostalCode, string ShipCountry, int Original_OrderID, string Original_CustomerID, System.Nullable Original_EmployeeID, System.Nullable Original_OrderDate, System.Nullable Original_RequiredDate, System.Nullable Original_ShippedDate, System.Nullable Original_ShipVia, System.Nullable Original_Freight, string Original_ShipName, string Original_ShipAddress, string Original_ShipCity, string Original_ShipRegion, string Original_ShipPostalCode, string Original_ShipCountry, int OrderID) { if ((CustomerID == null)) { this.Adapter.UpdateCommand.Parameters[0].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(CustomerID)); } if ((EmployeeID.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(EmployeeID.Value)); } else { this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value; } if ((OrderDate.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(OrderDate.Value)); } else { this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value; } if ((RequiredDate.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(RequiredDate.Value)); } else { this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value; } if ((ShippedDate.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(ShippedDate.Value)); } else { this.Adapter.UpdateCommand.Parameters[4].Value = System.DBNull.Value; } if ((ShipVia.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(ShipVia.Value)); } else { this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value; } if ((Freight.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[6].Value = ((decimal)(Freight.Value)); } else { this.Adapter.UpdateCommand.Parameters[6].Value = System.DBNull.Value; } if ((ShipName == null)) { this.Adapter.UpdateCommand.Parameters[7].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(ShipName)); } if ((ShipAddress == null)) { this.Adapter.UpdateCommand.Parameters[8].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(ShipAddress)); } if ((ShipCity == null)) { this.Adapter.UpdateCommand.Parameters[9].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(ShipCity)); } if ((ShipRegion == null)) { this.Adapter.UpdateCommand.Parameters[10].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(ShipRegion)); } if ((ShipPostalCode == null)) { this.Adapter.UpdateCommand.Parameters[11].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(ShipPostalCode)); } if ((ShipCountry == null)) { this.Adapter.UpdateCommand.Parameters[12].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(ShipCountry)); } this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(Original_OrderID)); if ((Original_CustomerID == null)) { this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[15].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[15].Value = ((string)(Original_CustomerID)); } if ((Original_EmployeeID.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[17].Value = ((int)(Original_EmployeeID.Value)); } else { this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[17].Value = System.DBNull.Value; } if ((Original_OrderDate.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[19].Value = ((System.DateTime)(Original_OrderDate.Value)); } else { this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[19].Value = System.DBNull.Value; } if ((Original_RequiredDate.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[21].Value = ((System.DateTime)(Original_RequiredDate.Value)); } else { this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[21].Value = System.DBNull.Value; } if ((Original_ShippedDate.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[22].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[23].Value = ((System.DateTime)(Original_ShippedDate.Value)); } else { this.Adapter.UpdateCommand.Parameters[22].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[23].Value = System.DBNull.Value; } if ((Original_ShipVia.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[24].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[25].Value = ((int)(Original_ShipVia.Value)); } else { this.Adapter.UpdateCommand.Parameters[24].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[25].Value = System.DBNull.Value; } if ((Original_Freight.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[26].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[27].Value = ((decimal)(Original_Freight.Value)); } else { this.Adapter.UpdateCommand.Parameters[26].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[27].Value = System.DBNull.Value; } if ((Original_ShipName == null)) { this.Adapter.UpdateCommand.Parameters[28].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[29].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[28].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[29].Value = ((string)(Original_ShipName)); } if ((Original_ShipAddress == null)) { this.Adapter.UpdateCommand.Parameters[30].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[31].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[30].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[31].Value = ((string)(Original_ShipAddress)); } if ((Original_ShipCity == null)) { this.Adapter.UpdateCommand.Parameters[32].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[33].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[32].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[33].Value = ((string)(Original_ShipCity)); } if ((Original_ShipRegion == null)) { this.Adapter.UpdateCommand.Parameters[34].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[35].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[34].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[35].Value = ((string)(Original_ShipRegion)); } if ((Original_ShipPostalCode == null)) { this.Adapter.UpdateCommand.Parameters[36].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[37].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[36].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[37].Value = ((string)(Original_ShipPostalCode)); } if ((Original_ShipCountry == null)) { this.Adapter.UpdateCommand.Parameters[38].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[39].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[38].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[39].Value = ((string)(Original_ShipCountry)); } this.Adapter.UpdateCommand.Parameters[40].Value = ((int)(OrderID)); System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.UpdateCommand.Connection.Open(); } try { int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.UpdateCommand.Connection.Close(); } } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.ToolboxItem(true)] [System.ComponentModel.DataObjectAttribute(true)] [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public partial class ProductsTableAdapter : System.ComponentModel.Component { private System.Data.SqlClient.SqlDataAdapter _adapter; private System.Data.SqlClient.SqlConnection _connection; private System.Data.SqlClient.SqlCommand[] _commandCollection; private bool _clearBeforeFill; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public ProductsTableAdapter() { this.ClearBeforeFill = true; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private System.Data.SqlClient.SqlDataAdapter Adapter { get { if ((this._adapter == null)) { this.InitAdapter(); } return this._adapter; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal 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)) { ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; } } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool ClearBeforeFill { get { return this._clearBeforeFill; } set { this._clearBeforeFill = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "Products"; tableMapping.ColumnMappings.Add("ProductID", "ProductID"); tableMapping.ColumnMappings.Add("ProductName", "ProductName"); tableMapping.ColumnMappings.Add("SupplierID", "SupplierID"); tableMapping.ColumnMappings.Add("CategoryID", "CategoryID"); tableMapping.ColumnMappings.Add("QuantityPerUnit", "QuantityPerUnit"); tableMapping.ColumnMappings.Add("UnitPrice", "UnitPrice"); tableMapping.ColumnMappings.Add("UnitsInStock", "UnitsInStock"); tableMapping.ColumnMappings.Add("UnitsOnOrder", "UnitsOnOrder"); tableMapping.ColumnMappings.Add("ReorderLevel", "ReorderLevel"); tableMapping.ColumnMappings.Add("Discontinued", "Discontinued"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Products] WHERE (([ProductID] = @Original_ProductID) AND ([ProductName] = @Original_ProductName) AND ((@IsNull_SupplierID = 1 AND [SupplierID] IS NULL) OR ([SupplierID] = @Original_SupplierID)) AND ((@IsNull_CategoryID = 1 AND [CategoryID] IS NULL) OR ([CategoryID] = @Original_CategoryID)) AND ((@IsNull_QuantityPerUnit = 1 AND [QuantityPerUnit] IS NULL) OR ([QuantityPerUnit] = @Original_QuantityPerUnit)) AND ((@IsNull_UnitPrice = 1 AND [UnitPrice] IS NULL) OR ([UnitPrice] = @Original_UnitPrice)) AND ((@IsNull_UnitsInStock = 1 AND [UnitsInStock] IS NULL) OR ([UnitsInStock] = @Original_UnitsInStock)) AND ((@IsNull_UnitsOnOrder = 1 AND [UnitsOnOrder] IS NULL) OR ([UnitsOnOrder] = @Original_UnitsOnOrder)) AND ((@IsNull_ReorderLevel = 1 AND [ReorderLevel] IS NULL) OR ([ReorderLevel] = @Original_ReorderLevel)) AND ([Discontinued] = @Original_Discontinued))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductName", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_SupplierID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SupplierID", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SupplierID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SupplierID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_CategoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CategoryID", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CategoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CategoryID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_QuantityPerUnit", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "QuantityPerUnit", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_QuantityPerUnit", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "QuantityPerUnit", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_UnitPrice", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitPrice", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_UnitPrice", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitPrice", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_UnitsInStock", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitsInStock", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_UnitsInStock", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitsInStock", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_UnitsOnOrder", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitsOnOrder", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_UnitsOnOrder", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitsOnOrder", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ReorderLevel", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ReorderLevel", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ReorderLevel", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ReorderLevel", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Discontinued", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "Discontinued", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[Products] ([ProductName], [SupplierID], [CategoryID], [QuantityPerUnit], [UnitPrice], [UnitsInStock], [UnitsOnOrder], [ReorderLevel], [Discontinued]) VALUES (@ProductName, @SupplierID, @CategoryID, @QuantityPerUnit, @UnitPrice, @UnitsInStock, @UnitsOnOrder, @ReorderLevel, @Discontinued); SELECT ProductID, ProductName, SupplierID, CategoryID, QuantityPerUnit, UnitPrice, UnitsInStock, UnitsOnOrder, ReorderLevel, Discontinued FROM Products WHERE (ProductID = @@IDENTITY)"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductName", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SupplierID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SupplierID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CategoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CategoryID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@QuantityPerUnit", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "QuantityPerUnit", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@UnitPrice", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitPrice", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@UnitsInStock", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitsInStock", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@UnitsOnOrder", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitsOnOrder", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ReorderLevel", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ReorderLevel", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Discontinued", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "Discontinued", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Products] SET [ProductName] = @ProductName, [SupplierID] = @SupplierID, [CategoryID] = @CategoryID, [QuantityPerUnit] = @QuantityPerUnit, [UnitPrice] = @UnitPrice, [UnitsInStock] = @UnitsInStock, [UnitsOnOrder] = @UnitsOnOrder, [ReorderLevel] = @ReorderLevel, [Discontinued] = @Discontinued WHERE (([ProductID] = @Original_ProductID) AND ([ProductName] = @Original_ProductName) AND ((@IsNull_SupplierID = 1 AND [SupplierID] IS NULL) OR ([SupplierID] = @Original_SupplierID)) AND ((@IsNull_CategoryID = 1 AND [CategoryID] IS NULL) OR ([CategoryID] = @Original_CategoryID)) AND ((@IsNull_QuantityPerUnit = 1 AND [QuantityPerUnit] IS NULL) OR ([QuantityPerUnit] = @Original_QuantityPerUnit)) AND ((@IsNull_UnitPrice = 1 AND [UnitPrice] IS NULL) OR ([UnitPrice] = @Original_UnitPrice)) AND ((@IsNull_UnitsInStock = 1 AND [UnitsInStock] IS NULL) OR ([UnitsInStock] = @Original_UnitsInStock)) AND ((@IsNull_UnitsOnOrder = 1 AND [UnitsOnOrder] IS NULL) OR ([UnitsOnOrder] = @Original_UnitsOnOrder)) AND ((@IsNull_ReorderLevel = 1 AND [ReorderLevel] IS NULL) OR ([ReorderLevel] = @Original_ReorderLevel)) AND ([Discontinued] = @Original_Discontinued)); SELECT ProductID, ProductName, SupplierID, CategoryID, QuantityPerUnit, UnitPrice, UnitsInStock, UnitsOnOrder, ReorderLevel, Discontinued FROM Products WHERE (ProductID = @ProductID)"; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductName", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SupplierID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SupplierID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CategoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CategoryID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@QuantityPerUnit", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "QuantityPerUnit", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@UnitPrice", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitPrice", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@UnitsInStock", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitsInStock", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@UnitsOnOrder", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitsOnOrder", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ReorderLevel", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ReorderLevel", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Discontinued", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "Discontinued", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductName", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_SupplierID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SupplierID", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SupplierID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SupplierID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_CategoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CategoryID", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CategoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CategoryID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_QuantityPerUnit", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "QuantityPerUnit", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_QuantityPerUnit", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "QuantityPerUnit", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_UnitPrice", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitPrice", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_UnitPrice", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitPrice", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_UnitsInStock", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitsInStock", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_UnitsInStock", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitsInStock", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_UnitsOnOrder", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitsOnOrder", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_UnitsOnOrder", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitsOnOrder", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ReorderLevel", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ReorderLevel", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ReorderLevel", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ReorderLevel", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Discontinued", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "Discontinued", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "ProductID", System.Data.DataRowVersion.Current, false, null, "", "", "")); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitConnection() { this._connection = new System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = AppliedDataBindingSample.Properties.Settings.Default.NorthwindConnectionString1; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitCommandCollection() { this._commandCollection = new System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT ProductID, ProductName, SupplierID, CategoryID, QuantityPerUnit, UnitPrice" + ", UnitsInStock, UnitsOnOrder, ReorderLevel, Discontinued FROM dbo.Products"; this._commandCollection[0].CommandType = System.Data.CommandType.Text; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)] public virtual int Fill(NorthwindDataSet.ProductsDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)] public virtual NorthwindDataSet.ProductsDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; NorthwindDataSet.ProductsDataTable dataTable = new NorthwindDataSet.ProductsDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet.ProductsDataTable dataTable) { return this.Adapter.Update(dataTable); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet dataSet) { return this.Adapter.Update(dataSet, "Products"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow dataRow) { return this.Adapter.Update(new System.Data.DataRow[] { dataRow}); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)] public virtual int Delete(int Original_ProductID, string Original_ProductName, System.Nullable Original_SupplierID, System.Nullable Original_CategoryID, string Original_QuantityPerUnit, System.Nullable Original_UnitPrice, System.Nullable Original_UnitsInStock, System.Nullable Original_UnitsOnOrder, System.Nullable Original_ReorderLevel, bool Original_Discontinued) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ProductID)); if ((Original_ProductName == null)) { throw new System.ArgumentNullException("Original_ProductName"); } else { this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_ProductName)); } if ((Original_SupplierID.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(Original_SupplierID.Value)); } else { this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[3].Value = System.DBNull.Value; } if ((Original_CategoryID.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(Original_CategoryID.Value)); } else { this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[5].Value = System.DBNull.Value; } if ((Original_QuantityPerUnit == null)) { this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[7].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[7].Value = ((string)(Original_QuantityPerUnit)); } if ((Original_UnitPrice.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[9].Value = ((decimal)(Original_UnitPrice.Value)); } else { this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[9].Value = System.DBNull.Value; } if ((Original_UnitsInStock.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[10].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[11].Value = ((short)(Original_UnitsInStock.Value)); } else { this.Adapter.DeleteCommand.Parameters[10].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[11].Value = System.DBNull.Value; } if ((Original_UnitsOnOrder.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[12].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[13].Value = ((short)(Original_UnitsOnOrder.Value)); } else { this.Adapter.DeleteCommand.Parameters[12].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[13].Value = System.DBNull.Value; } if ((Original_ReorderLevel.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[14].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[15].Value = ((short)(Original_ReorderLevel.Value)); } else { this.Adapter.DeleteCommand.Parameters[14].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[15].Value = System.DBNull.Value; } this.Adapter.DeleteCommand.Parameters[16].Value = ((bool)(Original_Discontinued)); System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.DeleteCommand.Connection.Open(); } try { int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.DeleteCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)] public virtual int Insert(string ProductName, System.Nullable SupplierID, System.Nullable CategoryID, string QuantityPerUnit, System.Nullable UnitPrice, System.Nullable UnitsInStock, System.Nullable UnitsOnOrder, System.Nullable ReorderLevel, bool Discontinued) { if ((ProductName == null)) { throw new System.ArgumentNullException("ProductName"); } else { this.Adapter.InsertCommand.Parameters[0].Value = ((string)(ProductName)); } if ((SupplierID.HasValue == true)) { this.Adapter.InsertCommand.Parameters[1].Value = ((int)(SupplierID.Value)); } else { this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value; } if ((CategoryID.HasValue == true)) { this.Adapter.InsertCommand.Parameters[2].Value = ((int)(CategoryID.Value)); } else { this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value; } if ((QuantityPerUnit == null)) { this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[3].Value = ((string)(QuantityPerUnit)); } if ((UnitPrice.HasValue == true)) { this.Adapter.InsertCommand.Parameters[4].Value = ((decimal)(UnitPrice.Value)); } else { this.Adapter.InsertCommand.Parameters[4].Value = System.DBNull.Value; } if ((UnitsInStock.HasValue == true)) { this.Adapter.InsertCommand.Parameters[5].Value = ((short)(UnitsInStock.Value)); } else { this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value; } if ((UnitsOnOrder.HasValue == true)) { this.Adapter.InsertCommand.Parameters[6].Value = ((short)(UnitsOnOrder.Value)); } else { this.Adapter.InsertCommand.Parameters[6].Value = System.DBNull.Value; } if ((ReorderLevel.HasValue == true)) { this.Adapter.InsertCommand.Parameters[7].Value = ((short)(ReorderLevel.Value)); } else { this.Adapter.InsertCommand.Parameters[7].Value = System.DBNull.Value; } this.Adapter.InsertCommand.Parameters[8].Value = ((bool)(Discontinued)); System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.InsertCommand.Connection.Open(); } try { int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.InsertCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update( string ProductName, System.Nullable SupplierID, System.Nullable CategoryID, string QuantityPerUnit, System.Nullable UnitPrice, System.Nullable UnitsInStock, System.Nullable UnitsOnOrder, System.Nullable ReorderLevel, bool Discontinued, int Original_ProductID, string Original_ProductName, System.Nullable Original_SupplierID, System.Nullable Original_CategoryID, string Original_QuantityPerUnit, System.Nullable Original_UnitPrice, System.Nullable Original_UnitsInStock, System.Nullable Original_UnitsOnOrder, System.Nullable Original_ReorderLevel, bool Original_Discontinued, int ProductID) { if ((ProductName == null)) { throw new System.ArgumentNullException("ProductName"); } else { this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(ProductName)); } if ((SupplierID.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(SupplierID.Value)); } else { this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value; } if ((CategoryID.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(CategoryID.Value)); } else { this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value; } if ((QuantityPerUnit == null)) { this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(QuantityPerUnit)); } if ((UnitPrice.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[4].Value = ((decimal)(UnitPrice.Value)); } else { this.Adapter.UpdateCommand.Parameters[4].Value = System.DBNull.Value; } if ((UnitsInStock.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[5].Value = ((short)(UnitsInStock.Value)); } else { this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value; } if ((UnitsOnOrder.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[6].Value = ((short)(UnitsOnOrder.Value)); } else { this.Adapter.UpdateCommand.Parameters[6].Value = System.DBNull.Value; } if ((ReorderLevel.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[7].Value = ((short)(ReorderLevel.Value)); } else { this.Adapter.UpdateCommand.Parameters[7].Value = System.DBNull.Value; } this.Adapter.UpdateCommand.Parameters[8].Value = ((bool)(Discontinued)); this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_ProductID)); if ((Original_ProductName == null)) { throw new System.ArgumentNullException("Original_ProductName"); } else { this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_ProductName)); } if ((Original_SupplierID.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(Original_SupplierID.Value)); } else { this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[12].Value = System.DBNull.Value; } if ((Original_CategoryID.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[14].Value = ((int)(Original_CategoryID.Value)); } else { this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[14].Value = System.DBNull.Value; } if ((Original_QuantityPerUnit == null)) { this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[16].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(Original_QuantityPerUnit)); } if ((Original_UnitPrice.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[18].Value = ((decimal)(Original_UnitPrice.Value)); } else { this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[18].Value = System.DBNull.Value; } if ((Original_UnitsInStock.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[20].Value = ((short)(Original_UnitsInStock.Value)); } else { this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[20].Value = System.DBNull.Value; } if ((Original_UnitsOnOrder.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[22].Value = ((short)(Original_UnitsOnOrder.Value)); } else { this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[22].Value = System.DBNull.Value; } if ((Original_ReorderLevel.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[24].Value = ((short)(Original_ReorderLevel.Value)); } else { this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[24].Value = System.DBNull.Value; } this.Adapter.UpdateCommand.Parameters[25].Value = ((bool)(Original_Discontinued)); this.Adapter.UpdateCommand.Parameters[26].Value = ((int)(ProductID)); System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.UpdateCommand.Connection.Open(); } try { int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.UpdateCommand.Connection.Close(); } } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.ToolboxItem(true)] [System.ComponentModel.DataObjectAttribute(true)] [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public partial class RegionTableAdapter : System.ComponentModel.Component { private System.Data.SqlClient.SqlDataAdapter _adapter; private System.Data.SqlClient.SqlConnection _connection; private System.Data.SqlClient.SqlCommand[] _commandCollection; private bool _clearBeforeFill; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public RegionTableAdapter() { this.ClearBeforeFill = true; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private System.Data.SqlClient.SqlDataAdapter Adapter { get { if ((this._adapter == null)) { this.InitAdapter(); } return this._adapter; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal 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)) { ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; } } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool ClearBeforeFill { get { return this._clearBeforeFill; } set { this._clearBeforeFill = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "Region"; tableMapping.ColumnMappings.Add("RegionID", "RegionID"); tableMapping.ColumnMappings.Add("RegionDescription", "RegionDescription"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Region] WHERE (([RegionID] = @Original_RegionID) AND ([RegionD" + "escription] = @Original_RegionDescription))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_RegionID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "RegionID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_RegionDescription", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "RegionDescription", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Region] ([RegionID], [RegionDescription]) VALUES (@RegionID, @" + "RegionDescription);\r\nSELECT RegionID, RegionDescription FROM Region WHERE (Regio" + "nID = @RegionID)"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RegionID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "RegionID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RegionDescription", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "RegionDescription", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Region] SET [RegionID] = @RegionID, [RegionDescription] = @RegionDescription WHERE (([RegionID] = @Original_RegionID) AND ([RegionDescription] = @Original_RegionDescription)); SELECT RegionID, RegionDescription FROM Region WHERE (RegionID = @RegionID)"; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RegionID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "RegionID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RegionDescription", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "RegionDescription", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_RegionID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "RegionID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_RegionDescription", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "RegionDescription", System.Data.DataRowVersion.Original, false, null, "", "", "")); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitConnection() { this._connection = new System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = AppliedDataBindingSample.Properties.Settings.Default.NorthwindConnectionString1; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitCommandCollection() { this._commandCollection = new System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT RegionID, RegionDescription FROM dbo.Region"; this._commandCollection[0].CommandType = System.Data.CommandType.Text; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)] public virtual int Fill(NorthwindDataSet.RegionDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)] public virtual NorthwindDataSet.RegionDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; NorthwindDataSet.RegionDataTable dataTable = new NorthwindDataSet.RegionDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet.RegionDataTable dataTable) { return this.Adapter.Update(dataTable); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet dataSet) { return this.Adapter.Update(dataSet, "Region"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow dataRow) { return this.Adapter.Update(new System.Data.DataRow[] { dataRow}); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)] public virtual int Delete(int Original_RegionID, string Original_RegionDescription) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_RegionID)); if ((Original_RegionDescription == null)) { throw new System.ArgumentNullException("Original_RegionDescription"); } else { this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_RegionDescription)); } System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.DeleteCommand.Connection.Open(); } try { int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.DeleteCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)] public virtual int Insert(int RegionID, string RegionDescription) { this.Adapter.InsertCommand.Parameters[0].Value = ((int)(RegionID)); if ((RegionDescription == null)) { throw new System.ArgumentNullException("RegionDescription"); } else { this.Adapter.InsertCommand.Parameters[1].Value = ((string)(RegionDescription)); } System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.InsertCommand.Connection.Open(); } try { int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.InsertCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update(int RegionID, string RegionDescription, int Original_RegionID, string Original_RegionDescription) { this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(RegionID)); if ((RegionDescription == null)) { throw new System.ArgumentNullException("RegionDescription"); } else { this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(RegionDescription)); } this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_RegionID)); if ((Original_RegionDescription == null)) { throw new System.ArgumentNullException("Original_RegionDescription"); } else { this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_RegionDescription)); } System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.UpdateCommand.Connection.Open(); } try { int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.UpdateCommand.Connection.Close(); } } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.ToolboxItem(true)] [System.ComponentModel.DataObjectAttribute(true)] [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public partial class ShippersTableAdapter : System.ComponentModel.Component { private System.Data.SqlClient.SqlDataAdapter _adapter; private System.Data.SqlClient.SqlConnection _connection; private System.Data.SqlClient.SqlCommand[] _commandCollection; private bool _clearBeforeFill; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public ShippersTableAdapter() { this.ClearBeforeFill = true; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private System.Data.SqlClient.SqlDataAdapter Adapter { get { if ((this._adapter == null)) { this.InitAdapter(); } return this._adapter; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal 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)) { ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; } } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool ClearBeforeFill { get { return this._clearBeforeFill; } set { this._clearBeforeFill = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "Shippers"; tableMapping.ColumnMappings.Add("ShipperID", "ShipperID"); tableMapping.ColumnMappings.Add("CompanyName", "CompanyName"); tableMapping.ColumnMappings.Add("Phone", "Phone"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Shippers] WHERE (([ShipperID] = @Original_ShipperID) AND ([Com" + "panyName] = @Original_CompanyName) AND ((@IsNull_Phone = 1 AND [Phone] IS NULL) " + "OR ([Phone] = @Original_Phone)))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipperID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipperID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CompanyName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CompanyName", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Phone", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Phone", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Phone", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Phone", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Shippers] ([CompanyName], [Phone]) VALUES (@CompanyName, @Phon" + "e);\r\nSELECT ShipperID, CompanyName, Phone FROM Shippers WHERE (ShipperID = @@IDE" + "NTITY)"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CompanyName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CompanyName", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Phone", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Phone", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Shippers] SET [CompanyName] = @CompanyName, [Phone] = @Phone WHERE (([ShipperID] = @Original_ShipperID) AND ([CompanyName] = @Original_CompanyName) AND ((@IsNull_Phone = 1 AND [Phone] IS NULL) OR ([Phone] = @Original_Phone))); SELECT ShipperID, CompanyName, Phone FROM Shippers WHERE (ShipperID = @ShipperID)"; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CompanyName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CompanyName", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Phone", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Phone", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipperID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipperID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CompanyName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CompanyName", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Phone", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Phone", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Phone", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Phone", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipperID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "ShipperID", System.Data.DataRowVersion.Current, false, null, "", "", "")); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitConnection() { this._connection = new System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = AppliedDataBindingSample.Properties.Settings.Default.NorthwindConnectionString1; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitCommandCollection() { this._commandCollection = new System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT ShipperID, CompanyName, Phone FROM dbo.Shippers"; this._commandCollection[0].CommandType = System.Data.CommandType.Text; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)] public virtual int Fill(NorthwindDataSet.ShippersDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)] public virtual NorthwindDataSet.ShippersDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; NorthwindDataSet.ShippersDataTable dataTable = new NorthwindDataSet.ShippersDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet.ShippersDataTable dataTable) { return this.Adapter.Update(dataTable); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet dataSet) { return this.Adapter.Update(dataSet, "Shippers"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow dataRow) { return this.Adapter.Update(new System.Data.DataRow[] { dataRow}); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)] public virtual int Delete(int Original_ShipperID, string Original_CompanyName, string Original_Phone) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ShipperID)); if ((Original_CompanyName == null)) { throw new System.ArgumentNullException("Original_CompanyName"); } else { this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_CompanyName)); } if ((Original_Phone == null)) { this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[3].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_Phone)); } System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.DeleteCommand.Connection.Open(); } try { int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.DeleteCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)] public virtual int Insert(string CompanyName, string Phone) { if ((CompanyName == null)) { throw new System.ArgumentNullException("CompanyName"); } else { this.Adapter.InsertCommand.Parameters[0].Value = ((string)(CompanyName)); } if ((Phone == null)) { this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Phone)); } System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.InsertCommand.Connection.Open(); } try { int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.InsertCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update(string CompanyName, string Phone, int Original_ShipperID, string Original_CompanyName, string Original_Phone, int ShipperID) { if ((CompanyName == null)) { throw new System.ArgumentNullException("CompanyName"); } else { this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(CompanyName)); } if ((Phone == null)) { this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Phone)); } this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_ShipperID)); if ((Original_CompanyName == null)) { throw new System.ArgumentNullException("Original_CompanyName"); } else { this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_CompanyName)); } if ((Original_Phone == null)) { this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Original_Phone)); } this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(ShipperID)); System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.UpdateCommand.Connection.Open(); } try { int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.UpdateCommand.Connection.Close(); } } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.ToolboxItem(true)] [System.ComponentModel.DataObjectAttribute(true)] [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public partial class SuppliersTableAdapter : System.ComponentModel.Component { private System.Data.SqlClient.SqlDataAdapter _adapter; private System.Data.SqlClient.SqlConnection _connection; private System.Data.SqlClient.SqlCommand[] _commandCollection; private bool _clearBeforeFill; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public SuppliersTableAdapter() { this.ClearBeforeFill = true; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private System.Data.SqlClient.SqlDataAdapter Adapter { get { if ((this._adapter == null)) { this.InitAdapter(); } return this._adapter; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal 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)) { ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; } } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool ClearBeforeFill { get { return this._clearBeforeFill; } set { this._clearBeforeFill = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "Suppliers"; tableMapping.ColumnMappings.Add("SupplierID", "SupplierID"); tableMapping.ColumnMappings.Add("CompanyName", "CompanyName"); tableMapping.ColumnMappings.Add("ContactName", "ContactName"); tableMapping.ColumnMappings.Add("ContactTitle", "ContactTitle"); tableMapping.ColumnMappings.Add("Address", "Address"); tableMapping.ColumnMappings.Add("City", "City"); tableMapping.ColumnMappings.Add("Region", "Region"); tableMapping.ColumnMappings.Add("PostalCode", "PostalCode"); tableMapping.ColumnMappings.Add("Country", "Country"); tableMapping.ColumnMappings.Add("Phone", "Phone"); tableMapping.ColumnMappings.Add("Fax", "Fax"); tableMapping.ColumnMappings.Add("HomePage", "HomePage"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Suppliers] WHERE (([SupplierID] = @Original_SupplierID) AND ([CompanyName] = @Original_CompanyName) AND ((@IsNull_ContactName = 1 AND [ContactName] IS NULL) OR ([ContactName] = @Original_ContactName)) AND ((@IsNull_ContactTitle = 1 AND [ContactTitle] IS NULL) OR ([ContactTitle] = @Original_ContactTitle)) AND ((@IsNull_Address = 1 AND [Address] IS NULL) OR ([Address] = @Original_Address)) AND ((@IsNull_City = 1 AND [City] IS NULL) OR ([City] = @Original_City)) AND ((@IsNull_Region = 1 AND [Region] IS NULL) OR ([Region] = @Original_Region)) AND ((@IsNull_PostalCode = 1 AND [PostalCode] IS NULL) OR ([PostalCode] = @Original_PostalCode)) AND ((@IsNull_Country = 1 AND [Country] IS NULL) OR ([Country] = @Original_Country)) AND ((@IsNull_Phone = 1 AND [Phone] IS NULL) OR ([Phone] = @Original_Phone)) AND ((@IsNull_Fax = 1 AND [Fax] IS NULL) OR ([Fax] = @Original_Fax)))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SupplierID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SupplierID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CompanyName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CompanyName", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ContactName", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactName", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactName", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ContactTitle", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactTitle", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactTitle", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactTitle", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Address", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Address", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Address", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Address", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_City", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "City", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_City", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "City", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Region", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Region", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Region", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Region", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_PostalCode", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "PostalCode", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PostalCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PostalCode", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Country", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Country", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Country", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Country", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Phone", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Phone", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Phone", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Phone", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Fax", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Fax", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Fax", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Fax", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[Suppliers] ([CompanyName], [ContactName], [ContactTitle], [Address], [City], [Region], [PostalCode], [Country], [Phone], [Fax], [HomePage]) VALUES (@CompanyName, @ContactName, @ContactTitle, @Address, @City, @Region, @PostalCode, @Country, @Phone, @Fax, @HomePage); SELECT SupplierID, CompanyName, ContactName, ContactTitle, Address, City, Region, PostalCode, Country, Phone, Fax, HomePage FROM Suppliers WHERE (SupplierID = @@IDENTITY)"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CompanyName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CompanyName", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactName", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactTitle", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactTitle", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Address", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Address", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@City", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "City", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Region", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Region", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PostalCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PostalCode", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Country", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Country", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Phone", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Phone", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Fax", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Fax", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@HomePage", System.Data.SqlDbType.NText, 0, System.Data.ParameterDirection.Input, 0, 0, "HomePage", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Suppliers] SET [CompanyName] = @CompanyName, [ContactName] = @ContactName, [ContactTitle] = @ContactTitle, [Address] = @Address, [City] = @City, [Region] = @Region, [PostalCode] = @PostalCode, [Country] = @Country, [Phone] = @Phone, [Fax] = @Fax, [HomePage] = @HomePage WHERE (([SupplierID] = @Original_SupplierID) AND ([CompanyName] = @Original_CompanyName) AND ((@IsNull_ContactName = 1 AND [ContactName] IS NULL) OR ([ContactName] = @Original_ContactName)) AND ((@IsNull_ContactTitle = 1 AND [ContactTitle] IS NULL) OR ([ContactTitle] = @Original_ContactTitle)) AND ((@IsNull_Address = 1 AND [Address] IS NULL) OR ([Address] = @Original_Address)) AND ((@IsNull_City = 1 AND [City] IS NULL) OR ([City] = @Original_City)) AND ((@IsNull_Region = 1 AND [Region] IS NULL) OR ([Region] = @Original_Region)) AND ((@IsNull_PostalCode = 1 AND [PostalCode] IS NULL) OR ([PostalCode] = @Original_PostalCode)) AND ((@IsNull_Country = 1 AND [Country] IS NULL) OR ([Country] = @Original_Country)) AND ((@IsNull_Phone = 1 AND [Phone] IS NULL) OR ([Phone] = @Original_Phone)) AND ((@IsNull_Fax = 1 AND [Fax] IS NULL) OR ([Fax] = @Original_Fax))); SELECT SupplierID, CompanyName, ContactName, ContactTitle, Address, City, Region, PostalCode, Country, Phone, Fax, HomePage FROM Suppliers WHERE (SupplierID = @SupplierID)"; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CompanyName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CompanyName", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactName", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactTitle", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactTitle", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Address", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Address", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@City", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "City", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Region", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Region", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PostalCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PostalCode", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Country", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Country", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Phone", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Phone", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Fax", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Fax", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@HomePage", System.Data.SqlDbType.NText, 0, System.Data.ParameterDirection.Input, 0, 0, "HomePage", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SupplierID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SupplierID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CompanyName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CompanyName", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ContactName", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactName", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactName", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ContactTitle", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactTitle", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactTitle", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactTitle", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Address", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Address", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Address", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Address", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_City", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "City", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_City", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "City", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Region", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Region", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Region", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Region", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_PostalCode", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "PostalCode", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PostalCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PostalCode", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Country", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Country", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Country", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Country", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Phone", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Phone", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Phone", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Phone", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Fax", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Fax", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Fax", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Fax", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SupplierID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "SupplierID", System.Data.DataRowVersion.Current, false, null, "", "", "")); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitConnection() { this._connection = new System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = AppliedDataBindingSample.Properties.Settings.Default.NorthwindConnectionString1; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitCommandCollection() { this._commandCollection = new System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT SupplierID, CompanyName, ContactName, ContactTitle, Address, City, Region," + " PostalCode, Country, Phone, Fax, HomePage FROM dbo.Suppliers"; this._commandCollection[0].CommandType = System.Data.CommandType.Text; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)] public virtual int Fill(NorthwindDataSet.SuppliersDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)] public virtual NorthwindDataSet.SuppliersDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; NorthwindDataSet.SuppliersDataTable dataTable = new NorthwindDataSet.SuppliersDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet.SuppliersDataTable dataTable) { return this.Adapter.Update(dataTable); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet dataSet) { return this.Adapter.Update(dataSet, "Suppliers"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow dataRow) { return this.Adapter.Update(new System.Data.DataRow[] { dataRow}); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)] public virtual int Delete(int Original_SupplierID, string Original_CompanyName, string Original_ContactName, string Original_ContactTitle, string Original_Address, string Original_City, string Original_Region, string Original_PostalCode, string Original_Country, string Original_Phone, string Original_Fax) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_SupplierID)); if ((Original_CompanyName == null)) { throw new System.ArgumentNullException("Original_CompanyName"); } else { this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_CompanyName)); } if ((Original_ContactName == null)) { this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[3].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_ContactName)); } if ((Original_ContactTitle == null)) { this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[5].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[5].Value = ((string)(Original_ContactTitle)); } if ((Original_Address == null)) { this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[7].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[7].Value = ((string)(Original_Address)); } if ((Original_City == null)) { this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[9].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[9].Value = ((string)(Original_City)); } if ((Original_Region == null)) { this.Adapter.DeleteCommand.Parameters[10].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[11].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[10].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[11].Value = ((string)(Original_Region)); } if ((Original_PostalCode == null)) { this.Adapter.DeleteCommand.Parameters[12].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[13].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[12].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[13].Value = ((string)(Original_PostalCode)); } if ((Original_Country == null)) { this.Adapter.DeleteCommand.Parameters[14].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[15].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[14].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[15].Value = ((string)(Original_Country)); } if ((Original_Phone == null)) { this.Adapter.DeleteCommand.Parameters[16].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[17].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[16].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[17].Value = ((string)(Original_Phone)); } if ((Original_Fax == null)) { this.Adapter.DeleteCommand.Parameters[18].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[19].Value = System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[18].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[19].Value = ((string)(Original_Fax)); } System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.DeleteCommand.Connection.Open(); } try { int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.DeleteCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)] public virtual int Insert(string CompanyName, string ContactName, string ContactTitle, string Address, string City, string Region, string PostalCode, string Country, string Phone, string Fax, string HomePage) { if ((CompanyName == null)) { throw new System.ArgumentNullException("CompanyName"); } else { this.Adapter.InsertCommand.Parameters[0].Value = ((string)(CompanyName)); } if ((ContactName == null)) { this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[1].Value = ((string)(ContactName)); } if ((ContactTitle == null)) { this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[2].Value = ((string)(ContactTitle)); } if ((Address == null)) { this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Address)); } if ((City == null)) { this.Adapter.InsertCommand.Parameters[4].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[4].Value = ((string)(City)); } if ((Region == null)) { this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[5].Value = ((string)(Region)); } if ((PostalCode == null)) { this.Adapter.InsertCommand.Parameters[6].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[6].Value = ((string)(PostalCode)); } if ((Country == null)) { this.Adapter.InsertCommand.Parameters[7].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[7].Value = ((string)(Country)); } if ((Phone == null)) { this.Adapter.InsertCommand.Parameters[8].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[8].Value = ((string)(Phone)); } if ((Fax == null)) { this.Adapter.InsertCommand.Parameters[9].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[9].Value = ((string)(Fax)); } if ((HomePage == null)) { this.Adapter.InsertCommand.Parameters[10].Value = System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[10].Value = ((string)(HomePage)); } System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.InsertCommand.Connection.Open(); } try { int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.InsertCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update( string CompanyName, string ContactName, string ContactTitle, string Address, string City, string Region, string PostalCode, string Country, string Phone, string Fax, string HomePage, int Original_SupplierID, string Original_CompanyName, string Original_ContactName, string Original_ContactTitle, string Original_Address, string Original_City, string Original_Region, string Original_PostalCode, string Original_Country, string Original_Phone, string Original_Fax, int SupplierID) { if ((CompanyName == null)) { throw new System.ArgumentNullException("CompanyName"); } else { this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(CompanyName)); } if ((ContactName == null)) { this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(ContactName)); } if ((ContactTitle == null)) { this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(ContactTitle)); } if ((Address == null)) { this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Address)); } if ((City == null)) { this.Adapter.UpdateCommand.Parameters[4].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(City)); } if ((Region == null)) { this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Region)); } if ((PostalCode == null)) { this.Adapter.UpdateCommand.Parameters[6].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(PostalCode)); } if ((Country == null)) { this.Adapter.UpdateCommand.Parameters[7].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Country)); } if ((Phone == null)) { this.Adapter.UpdateCommand.Parameters[8].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Phone)); } if ((Fax == null)) { this.Adapter.UpdateCommand.Parameters[9].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Fax)); } if ((HomePage == null)) { this.Adapter.UpdateCommand.Parameters[10].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(HomePage)); } this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Original_SupplierID)); if ((Original_CompanyName == null)) { throw new System.ArgumentNullException("Original_CompanyName"); } else { this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Original_CompanyName)); } if ((Original_ContactName == null)) { this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[14].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_ContactName)); } if ((Original_ContactTitle == null)) { this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[16].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(Original_ContactTitle)); } if ((Original_Address == null)) { this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[18].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[18].Value = ((string)(Original_Address)); } if ((Original_City == null)) { this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[20].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[20].Value = ((string)(Original_City)); } if ((Original_Region == null)) { this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[22].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[22].Value = ((string)(Original_Region)); } if ((Original_PostalCode == null)) { this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[24].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[24].Value = ((string)(Original_PostalCode)); } if ((Original_Country == null)) { this.Adapter.UpdateCommand.Parameters[25].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[26].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[25].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[26].Value = ((string)(Original_Country)); } if ((Original_Phone == null)) { this.Adapter.UpdateCommand.Parameters[27].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[28].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[27].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[28].Value = ((string)(Original_Phone)); } if ((Original_Fax == null)) { this.Adapter.UpdateCommand.Parameters[29].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[30].Value = System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[29].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[30].Value = ((string)(Original_Fax)); } this.Adapter.UpdateCommand.Parameters[31].Value = ((int)(SupplierID)); System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.UpdateCommand.Connection.Open(); } try { int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.UpdateCommand.Connection.Close(); } } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.ToolboxItem(true)] [System.ComponentModel.DataObjectAttribute(true)] [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public partial class StatesTableAdapter : System.ComponentModel.Component { private System.Data.SqlClient.SqlDataAdapter _adapter; private System.Data.SqlClient.SqlConnection _connection; private System.Data.SqlClient.SqlCommand[] _commandCollection; private bool _clearBeforeFill; [System.Diagnostics.DebuggerNonUserCodeAttribute()] public StatesTableAdapter() { this.ClearBeforeFill = true; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private System.Data.SqlClient.SqlDataAdapter Adapter { get { if ((this._adapter == null)) { this.InitAdapter(); } return this._adapter; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] internal 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)) { ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; } } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] protected System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool ClearBeforeFill { get { return this._clearBeforeFill; } set { this._clearBeforeFill = value; } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "States"; tableMapping.ColumnMappings.Add("Id", "Id"); tableMapping.ColumnMappings.Add("Name", "Name"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [States] WHERE (([Id] = @Original_Id) AND ([Name] = @Original_Name))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Id", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Id", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [States] ([Name]) VALUES (@Name);\r\nSELECT Id, Name FROM States WHERE " + "(Id = SCOPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = "UPDATE [States] SET [Name] = @Name WHERE (([Id] = @Original_Id) AND ([Name] = @Or" + "iginal_Name));\r\nSELECT Id, Name FROM States WHERE (Id = @Id)"; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Id", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Id", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Id", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "Id", System.Data.DataRowVersion.Current, false, null, "", "", "")); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitConnection() { this._connection = new System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = AppliedDataBindingSample.Properties.Settings.Default.NorthwindConnectionString1; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitCommandCollection() { this._commandCollection = new System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT Id, Name FROM States"; this._commandCollection[0].CommandType = System.Data.CommandType.Text; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)] public virtual int Fill(NorthwindDataSet.StatesDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)] public virtual NorthwindDataSet.StatesDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; NorthwindDataSet.StatesDataTable dataTable = new NorthwindDataSet.StatesDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet.StatesDataTable dataTable) { return this.Adapter.Update(dataTable); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(NorthwindDataSet dataSet) { return this.Adapter.Update(dataSet, "States"); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow dataRow) { return this.Adapter.Update(new System.Data.DataRow[] { dataRow}); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)] public virtual int Delete(int Original_Id, string Original_Name) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_Id)); if ((Original_Name == null)) { throw new System.ArgumentNullException("Original_Name"); } else { this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name)); } System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.DeleteCommand.Connection.Open(); } try { int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.DeleteCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)] public virtual int Insert(string Name) { if ((Name == null)) { throw new System.ArgumentNullException("Name"); } else { this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name)); } System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.InsertCommand.Connection.Open(); } try { int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.InsertCommand.Connection.Close(); } } } [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update(string Name, int Original_Id, string Original_Name, int Id) { if ((Name == null)) { throw new System.ArgumentNullException("Name"); } else { this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name)); } this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Original_Id)); if ((Original_Name == null)) { throw new System.ArgumentNullException("Original_Name"); } else { this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Original_Name)); } this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Id)); System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { this.Adapter.UpdateCommand.Connection.Open(); } try { int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == System.Data.ConnectionState.Closed)) { this.Adapter.UpdateCommand.Connection.Close(); } } } } } #pragma warning restore 1591