//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50215.44
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace DataGridApplication {
    using System;
    
    
    [Serializable()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.ComponentModel.ToolboxItem(true)]
    [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")]
    [System.Xml.Serialization.XmlRootAttribute("AdventureWorksDataSet")]
    [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Usage", "CA2240:ImplementISerializableCorrectly")]
    public partial class AdventureWorksDataSet : System.Data.DataSet {
        
        private AWBuildVersionDataTable tableAWBuildVersion;
        
        private DatabaseLogDataTable tableDatabaseLog;
        
        private DepartmentDataTable tableDepartment;
        
        private EmployeeDataTable tableEmployee;
        
        private EmployeeAddressDataTable tableEmployeeAddress;
        
        private EmployeeDepartmentHistoryDataTable tableEmployeeDepartmentHistory;
        
        private EmployeePayHistoryDataTable tableEmployeePayHistory;
        
        private JobCandidateDataTable tableJobCandidate;
        
        private ShiftDataTable tableShift;
        
        private AddressDataTable tableAddress;
        
        private AddressTypeDataTable tableAddressType;
        
        private ContactDataTable tableContact;
        
        private ContactTypeDataTable tableContactType;
        
        private CountryRegionDataTable tableCountryRegion;
        
        private StateProvinceDataTable tableStateProvince;
        
        private BillOfMaterialsDataTable tableBillOfMaterials;
        
        private CultureDataTable tableCulture;
        
        private DocumentDataTable tableDocument;
        
        private IllustrationDataTable tableIllustration;
        
        private LocationDataTable tableLocation;
        
        private ProductDataTable tableProduct;
        
        private ProductCategoryDataTable tableProductCategory;
        
        private ProductCostHistoryDataTable tableProductCostHistory;
        
        private ProductDescriptionDataTable tableProductDescription;
        
        private ProductDocumentDataTable tableProductDocument;
        
        private ProductInventoryDataTable tableProductInventory;
        
        private ProductListPriceHistoryDataTable tableProductListPriceHistory;
        
        private ProductModelDataTable tableProductModel;
        
        private ProductModelIllustrationDataTable tableProductModelIllustration;
        
        private ProductModelProductDescriptionCultureDataTable tableProductModelProductDescriptionCulture;
        
        private ProductPhotoDataTable tableProductPhoto;
        
        private ProductProductPhotoDataTable tableProductProductPhoto;
        
        private ProductReviewDataTable tableProductReview;
        
        private ProductSubcategoryDataTable tableProductSubcategory;
        
        private ScrapReasonDataTable tableScrapReason;
        
        private TransactionHistoryDataTable tableTransactionHistory;
        
        private TransactionHistoryArchiveDataTable tableTransactionHistoryArchive;
        
        private UnitMeasureDataTable tableUnitMeasure;
        
        private WorkOrderDataTable tableWorkOrder;
        
        private WorkOrderRoutingDataTable tableWorkOrderRouting;
        
        private ProductVendorDataTable tableProductVendor;
        
        private PurchaseOrderDetailDataTable tablePurchaseOrderDetail;
        
        private PurchaseOrderHeaderDataTable tablePurchaseOrderHeader;
        
        private ShipMethodDataTable tableShipMethod;
        
        private VendorDataTable tableVendor;
        
        private VendorAddressDataTable tableVendorAddress;
        
        private VendorContactDataTable tableVendorContact;
        
        private ContactCreditCardDataTable tableContactCreditCard;
        
        private CountryRegionCurrencyDataTable tableCountryRegionCurrency;
        
        private CreditCardDataTable tableCreditCard;
        
        private CurrencyDataTable tableCurrency;
        
        private CurrencyRateDataTable tableCurrencyRate;
        
        private CustomerDataTable tableCustomer;
        
        private CustomerAddressDataTable tableCustomerAddress;
        
        private IndividualDataTable tableIndividual;
        
        private SalesOrderDetailDataTable tableSalesOrderDetail;
        
        private SalesOrderHeaderDataTable tableSalesOrderHeader;
        
        private SalesOrderHeaderSalesReasonDataTable tableSalesOrderHeaderSalesReason;
        
        private SalesPersonDataTable tableSalesPerson;
        
        private SalesPersonQuotaHistoryDataTable tableSalesPersonQuotaHistory;
        
        private SalesReasonDataTable tableSalesReason;
        
        private SalesTaxRateDataTable tableSalesTaxRate;
        
        private SalesTerritoryDataTable tableSalesTerritory;
        
        private SalesTerritoryHistoryDataTable tableSalesTerritoryHistory;
        
        private ShoppingCartItemDataTable tableShoppingCartItem;
        
        private SpecialOfferDataTable tableSpecialOffer;
        
        private SpecialOfferProductDataTable tableSpecialOfferProduct;
        
        private StoreDataTable tableStore;
        
        private StoreContactDataTable tableStoreContact;
        
        private vEmployeeDataTable tablevEmployee;
        
        private vEmployeeDepartmentDataTable tablevEmployeeDepartment;
        
        private vEmployeeDepartmentHistoryDataTable tablevEmployeeDepartmentHistory;
        
        private vJobCandidateDataTable tablevJobCandidate;
        
        private vJobCandidateEducationDataTable tablevJobCandidateEducation;
        
        private vJobCandidateEmploymentDataTable tablevJobCandidateEmployment;
        
        private vAdditionalContactInfoDataTable tablevAdditionalContactInfo;
        
        private vStateProvinceCountryRegionDataTable tablevStateProvinceCountryRegion;
        
        private vProductAndDescriptionDataTable tablevProductAndDescription;
        
        private vProductModelCatalogDescriptionDataTable tablevProductModelCatalogDescription;
        
        private vProductModelInstructionsDataTable tablevProductModelInstructions;
        
        private vVendorDataTable tablevVendor;
        
        private vIndividualDataTable tablevIndividual;
        
        private vIndividualDemographicsDataTable tablevIndividualDemographics;
        
        private vSalesPersonDataTable tablevSalesPerson;
        
        private vSalesPersonSalesByFiscalYearsDataTable tablevSalesPersonSalesByFiscalYears;
        
        private vStoreWithDemographicsDataTable tablevStoreWithDemographics;
        
        private uspGetBillOfMaterialsDataTable tableuspGetBillOfMaterials;
        
        private uspGetEmployeeManagersDataTable tableuspGetEmployeeManagers;
        
        private uspGetManagerEmployeesDataTable tableuspGetManagerEmployees;
        
        private uspGetWhereUsedProductIDDataTable tableuspGetWhereUsedProductID;
        
        private ufnGetContactInformationDataTable tableufnGetContactInformation;
        
        private System.Data.DataRelation relationFK_Employee_Contact_ContactID;
        
        private System.Data.DataRelation relationFK_Employee_Employee_ManagerID;
        
        private System.Data.DataRelation relationFK_EmployeeAddress_Address_AddressID;
        
        private System.Data.DataRelation relationFK_EmployeeAddress_Employee_EmployeeID;
        
        private System.Data.DataRelation relationFK_EmployeeDepartmentHistory_Department_DepartmentID;
        
        private System.Data.DataRelation relationFK_EmployeeDepartmentHistory_Employee_EmployeeID;
        
        private System.Data.DataRelation relationFK_EmployeeDepartmentHistory_Shift_ShiftID;
        
        private System.Data.DataRelation relationFK_EmployeePayHistory_Employee_EmployeeID;
        
        private System.Data.DataRelation relationFK_JobCandidate_Employee_EmployeeID;
        
        private System.Data.DataRelation relationFK_Address_StateProvince_StateProvinceID;
        
        private System.Data.DataRelation relationFK_StateProvince_CountryRegion_CountryRegionCode;
        
        private System.Data.DataRelation relationFK_StateProvince_SalesTerritory_TerritoryID;
        
        private System.Data.DataRelation relationFK_BillOfMaterials_Product_ComponentID;
        
        private System.Data.DataRelation relationFK_BillOfMaterials_Product_ProductAssemblyID;
        
        private System.Data.DataRelation relationFK_BillOfMaterials_UnitMeasure_UnitMeasureCode;
        
        private System.Data.DataRelation relationFK_Product_ProductModel_ProductModelID;
        
        private System.Data.DataRelation relationFK_Product_ProductSubcategory_ProductSubcategoryID;
        
        private System.Data.DataRelation relationFK_Product_UnitMeasure_SizeUnitMeasureCode;
        
        private System.Data.DataRelation relationFK_Product_UnitMeasure_WeightUnitMeasureCode;
        
        private System.Data.DataRelation relationFK_ProductCostHistory_Product_ProductID;
        
        private System.Data.DataRelation relationFK_ProductDocument_Document_DocumentID;
        
        private System.Data.DataRelation relationFK_ProductDocument_Product_ProductID;
        
        private System.Data.DataRelation relationFK_ProductInventory_Location_LocationID;
        
        private System.Data.DataRelation relationFK_ProductInventory_Product_ProductID;
        
        private System.Data.DataRelation relationFK_ProductListPriceHistory_Product_ProductID;
        
        private System.Data.DataRelation relationFK_ProductModelIllustration_Illustration_IllustrationID;
        
        private System.Data.DataRelation relationFK_ProductModelIllustration_ProductModel_ProductModelID;
        
        private System.Data.DataRelation relationFK_ProductModelProductDescriptionCulture_Culture_CultureID;
        
        private System.Data.DataRelation relationFK_ProductModelProductDescriptionCulture_ProductDescription_ProductDescriptionID;
        
        private System.Data.DataRelation relationFK_ProductModelProductDescriptionCulture_ProductModel_ProductModelID;
        
        private System.Data.DataRelation relationFK_ProductProductPhoto_Product_ProductID;
        
        private System.Data.DataRelation relationFK_ProductProductPhoto_ProductPhoto_ProductPhotoID;
        
        private System.Data.DataRelation relationFK_ProductReview_Product_ProductID;
        
        private System.Data.DataRelation relationFK_ProductSubcategory_ProductCategory_ProductCategoryID;
        
        private System.Data.DataRelation relationFK_TransactionHistory_Product_ProductID;
        
        private System.Data.DataRelation relationFK_WorkOrder_Product_ProductID;
        
        private System.Data.DataRelation relationFK_WorkOrder_ScrapReason_ScrapReasonID;
        
        private System.Data.DataRelation relationFK_WorkOrderRouting_Location_LocationID;
        
        private System.Data.DataRelation relationFK_WorkOrderRouting_WorkOrder_WorkOrderID;
        
        private System.Data.DataRelation relationFK_ProductVendor_Product_ProductID;
        
        private System.Data.DataRelation relationFK_ProductVendor_UnitMeasure_UnitMeasureCode;
        
        private System.Data.DataRelation relationFK_ProductVendor_Vendor_VendorID;
        
        private System.Data.DataRelation relationFK_PurchaseOrderDetail_Product_ProductID;
        
        private System.Data.DataRelation relationFK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID;
        
        private System.Data.DataRelation relationFK_PurchaseOrderHeader_Employee_EmployeeID;
        
        private System.Data.DataRelation relationFK_PurchaseOrderHeader_ShipMethod_ShipMethodID;
        
        private System.Data.DataRelation relationFK_PurchaseOrderHeader_Vendor_VendorID;
        
        private System.Data.DataRelation relationFK_VendorAddress_Address_AddressID;
        
        private System.Data.DataRelation relationFK_VendorAddress_AddressType_AddressTypeID;
        
        private System.Data.DataRelation relationFK_VendorAddress_Vendor_VendorID;
        
        private System.Data.DataRelation relationFK_VendorContact_Contact_ContactID;
        
        private System.Data.DataRelation relationFK_VendorContact_ContactType_ContactTypeID;
        
        private System.Data.DataRelation relationFK_VendorContact_Vendor_VendorID;
        
        private System.Data.DataRelation relationFK_ContactCreditCard_Contact_ContactID;
        
        private System.Data.DataRelation relationFK_ContactCreditCard_CreditCard_CreditCardID;
        
        private System.Data.DataRelation relationFK_CountryRegionCurrency_CountryRegion_CountryRegionCode;
        
        private System.Data.DataRelation relationFK_CountryRegionCurrency_Currency_CurrencyCode;
        
        private System.Data.DataRelation relationFK_CurrencyRate_Currency_FromCurrencyCode;
        
        private System.Data.DataRelation relationFK_CurrencyRate_Currency_ToCurrencyCode;
        
        private System.Data.DataRelation relationFK_Customer_SalesTerritory_TerritoryID;
        
        private System.Data.DataRelation relationFK_CustomerAddress_Address_AddressID;
        
        private System.Data.DataRelation relationFK_CustomerAddress_AddressType_AddressTypeID;
        
        private System.Data.DataRelation relationFK_CustomerAddress_Customer_CustomerID;
        
        private System.Data.DataRelation relationFK_Individual_Contact_ContactID;
        
        private System.Data.DataRelation relationFK_Individual_Customer_CustomerID;
        
        private System.Data.DataRelation relationFK_SalesOrderDetail_SalesOrderHeader_SalesOrderID;
        
        private System.Data.DataRelation relationFK_SalesOrderDetail_SpecialOfferProduct_SpecialOfferIDProductID;
        
        private System.Data.DataRelation relationFK_SalesOrderHeader_Address_BillToAddressID;
        
        private System.Data.DataRelation relationFK_SalesOrderHeader_Address_ShipToAddressID;
        
        private System.Data.DataRelation relationFK_SalesOrderHeader_Contact_ContactID;
        
        private System.Data.DataRelation relationFK_SalesOrderHeader_CreditCard_CreditCardID;
        
        private System.Data.DataRelation relationFK_SalesOrderHeader_CurrencyRate_CurrencyRateID;
        
        private System.Data.DataRelation relationFK_SalesOrderHeader_Customer_CustomerID;
        
        private System.Data.DataRelation relationFK_SalesOrderHeader_SalesPerson_SalesPersonID;
        
        private System.Data.DataRelation relationFK_SalesOrderHeader_SalesTerritory_TerritoryID;
        
        private System.Data.DataRelation relationFK_SalesOrderHeader_ShipMethod_ShipMethodID;
        
        private System.Data.DataRelation relationFK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderID;
        
        private System.Data.DataRelation relationFK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID;
        
        private System.Data.DataRelation relationFK_SalesPerson_Employee_SalesPersonID;
        
        private System.Data.DataRelation relationFK_SalesPerson_SalesTerritory_TerritoryID;
        
        private System.Data.DataRelation relationFK_SalesPersonQuotaHistory_SalesPerson_SalesPersonID;
        
        private System.Data.DataRelation relationFK_SalesTaxRate_StateProvince_StateProvinceID;
        
        private System.Data.DataRelation relationFK_SalesTerritoryHistory_SalesPerson_SalesPersonID;
        
        private System.Data.DataRelation relationFK_SalesTerritoryHistory_SalesTerritory_TerritoryID;
        
        private System.Data.DataRelation relationFK_ShoppingCartItem_Product_ProductID;
        
        private System.Data.DataRelation relationFK_SpecialOfferProduct_Product_ProductID;
        
        private System.Data.DataRelation relationFK_SpecialOfferProduct_SpecialOffer_SpecialOfferID;
        
        private System.Data.DataRelation relationFK_Store_Customer_CustomerID;
        
        private System.Data.DataRelation relationFK_Store_SalesPerson_SalesPersonID;
        
        private System.Data.DataRelation relationFK_StoreContact_Contact_ContactID;
        
        private System.Data.DataRelation relationFK_StoreContact_ContactType_ContactTypeID;
        
        private System.Data.DataRelation relationFK_StoreContact_Store_CustomerID;
        
        private System.Data.SchemaSerializationMode _schemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
        
        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
        public AdventureWorksDataSet() {
            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.CodeAnalysis.SuppressMessageAttribute("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
        protected AdventureWorksDataSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                base(info, context) {
            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["AWBuildVersion"] != null)) {
                    base.Tables.Add(new AWBuildVersionDataTable(ds.Tables["AWBuildVersion"]));
                }
                if ((ds.Tables["DatabaseLog"] != null)) {
                    base.Tables.Add(new DatabaseLogDataTable(ds.Tables["DatabaseLog"]));
                }
                if ((ds.Tables["Department"] != null)) {
                    base.Tables.Add(new DepartmentDataTable(ds.Tables["Department"]));
                }
                if ((ds.Tables["Employee"] != null)) {
                    base.Tables.Add(new EmployeeDataTable(ds.Tables["Employee"]));
                }
                if ((ds.Tables["EmployeeAddress"] != null)) {
                    base.Tables.Add(new EmployeeAddressDataTable(ds.Tables["EmployeeAddress"]));
                }
                if ((ds.Tables["EmployeeDepartmentHistory"] != null)) {
                    base.Tables.Add(new EmployeeDepartmentHistoryDataTable(ds.Tables["EmployeeDepartmentHistory"]));
                }
                if ((ds.Tables["EmployeePayHistory"] != null)) {
                    base.Tables.Add(new EmployeePayHistoryDataTable(ds.Tables["EmployeePayHistory"]));
                }
                if ((ds.Tables["JobCandidate"] != null)) {
                    base.Tables.Add(new JobCandidateDataTable(ds.Tables["JobCandidate"]));
                }
                if ((ds.Tables["Shift"] != null)) {
                    base.Tables.Add(new ShiftDataTable(ds.Tables["Shift"]));
                }
                if ((ds.Tables["Address"] != null)) {
                    base.Tables.Add(new AddressDataTable(ds.Tables["Address"]));
                }
                if ((ds.Tables["AddressType"] != null)) {
                    base.Tables.Add(new AddressTypeDataTable(ds.Tables["AddressType"]));
                }
                if ((ds.Tables["Contact"] != null)) {
                    base.Tables.Add(new ContactDataTable(ds.Tables["Contact"]));
                }
                if ((ds.Tables["ContactType"] != null)) {
                    base.Tables.Add(new ContactTypeDataTable(ds.Tables["ContactType"]));
                }
                if ((ds.Tables["CountryRegion"] != null)) {
                    base.Tables.Add(new CountryRegionDataTable(ds.Tables["CountryRegion"]));
                }
                if ((ds.Tables["StateProvince"] != null)) {
                    base.Tables.Add(new StateProvinceDataTable(ds.Tables["StateProvince"]));
                }
                if ((ds.Tables["BillOfMaterials"] != null)) {
                    base.Tables.Add(new BillOfMaterialsDataTable(ds.Tables["BillOfMaterials"]));
                }
                if ((ds.Tables["Culture"] != null)) {
                    base.Tables.Add(new CultureDataTable(ds.Tables["Culture"]));
                }
                if ((ds.Tables["Document"] != null)) {
                    base.Tables.Add(new DocumentDataTable(ds.Tables["Document"]));
                }
                if ((ds.Tables["Illustration"] != null)) {
                    base.Tables.Add(new IllustrationDataTable(ds.Tables["Illustration"]));
                }
                if ((ds.Tables["Location"] != null)) {
                    base.Tables.Add(new LocationDataTable(ds.Tables["Location"]));
                }
                if ((ds.Tables["Product"] != null)) {
                    base.Tables.Add(new ProductDataTable(ds.Tables["Product"]));
                }
                if ((ds.Tables["ProductCategory"] != null)) {
                    base.Tables.Add(new ProductCategoryDataTable(ds.Tables["ProductCategory"]));
                }
                if ((ds.Tables["ProductCostHistory"] != null)) {
                    base.Tables.Add(new ProductCostHistoryDataTable(ds.Tables["ProductCostHistory"]));
                }
                if ((ds.Tables["ProductDescription"] != null)) {
                    base.Tables.Add(new ProductDescriptionDataTable(ds.Tables["ProductDescription"]));
                }
                if ((ds.Tables["ProductDocument"] != null)) {
                    base.Tables.Add(new ProductDocumentDataTable(ds.Tables["ProductDocument"]));
                }
                if ((ds.Tables["ProductInventory"] != null)) {
                    base.Tables.Add(new ProductInventoryDataTable(ds.Tables["ProductInventory"]));
                }
                if ((ds.Tables["ProductListPriceHistory"] != null)) {
                    base.Tables.Add(new ProductListPriceHistoryDataTable(ds.Tables["ProductListPriceHistory"]));
                }
                if ((ds.Tables["ProductModel"] != null)) {
                    base.Tables.Add(new ProductModelDataTable(ds.Tables["ProductModel"]));
                }
                if ((ds.Tables["ProductModelIllustration"] != null)) {
                    base.Tables.Add(new ProductModelIllustrationDataTable(ds.Tables["ProductModelIllustration"]));
                }
                if ((ds.Tables["ProductModelProductDescriptionCulture"] != null)) {
                    base.Tables.Add(new ProductModelProductDescriptionCultureDataTable(ds.Tables["ProductModelProductDescriptionCulture"]));
                }
                if ((ds.Tables["ProductPhoto"] != null)) {
                    base.Tables.Add(new ProductPhotoDataTable(ds.Tables["ProductPhoto"]));
                }
                if ((ds.Tables["ProductProductPhoto"] != null)) {
                    base.Tables.Add(new ProductProductPhotoDataTable(ds.Tables["ProductProductPhoto"]));
                }
                if ((ds.Tables["ProductReview"] != null)) {
                    base.Tables.Add(new ProductReviewDataTable(ds.Tables["ProductReview"]));
                }
                if ((ds.Tables["ProductSubcategory"] != null)) {
                    base.Tables.Add(new ProductSubcategoryDataTable(ds.Tables["ProductSubcategory"]));
                }
                if ((ds.Tables["ScrapReason"] != null)) {
                    base.Tables.Add(new ScrapReasonDataTable(ds.Tables["ScrapReason"]));
                }
                if ((ds.Tables["TransactionHistory"] != null)) {
                    base.Tables.Add(new TransactionHistoryDataTable(ds.Tables["TransactionHistory"]));
                }
                if ((ds.Tables["TransactionHistoryArchive"] != null)) {
                    base.Tables.Add(new TransactionHistoryArchiveDataTable(ds.Tables["TransactionHistoryArchive"]));
                }
                if ((ds.Tables["UnitMeasure"] != null)) {
                    base.Tables.Add(new UnitMeasureDataTable(ds.Tables["UnitMeasure"]));
                }
                if ((ds.Tables["WorkOrder"] != null)) {
                    base.Tables.Add(new WorkOrderDataTable(ds.Tables["WorkOrder"]));
                }
                if ((ds.Tables["WorkOrderRouting"] != null)) {
                    base.Tables.Add(new WorkOrderRoutingDataTable(ds.Tables["WorkOrderRouting"]));
                }
                if ((ds.Tables["ProductVendor"] != null)) {
                    base.Tables.Add(new ProductVendorDataTable(ds.Tables["ProductVendor"]));
                }
                if ((ds.Tables["PurchaseOrderDetail"] != null)) {
                    base.Tables.Add(new PurchaseOrderDetailDataTable(ds.Tables["PurchaseOrderDetail"]));
                }
                if ((ds.Tables["PurchaseOrderHeader"] != null)) {
                    base.Tables.Add(new PurchaseOrderHeaderDataTable(ds.Tables["PurchaseOrderHeader"]));
                }
                if ((ds.Tables["ShipMethod"] != null)) {
                    base.Tables.Add(new ShipMethodDataTable(ds.Tables["ShipMethod"]));
                }
                if ((ds.Tables["Vendor"] != null)) {
                    base.Tables.Add(new VendorDataTable(ds.Tables["Vendor"]));
                }
                if ((ds.Tables["VendorAddress"] != null)) {
                    base.Tables.Add(new VendorAddressDataTable(ds.Tables["VendorAddress"]));
                }
                if ((ds.Tables["VendorContact"] != null)) {
                    base.Tables.Add(new VendorContactDataTable(ds.Tables["VendorContact"]));
                }
                if ((ds.Tables["ContactCreditCard"] != null)) {
                    base.Tables.Add(new ContactCreditCardDataTable(ds.Tables["ContactCreditCard"]));
                }
                if ((ds.Tables["CountryRegionCurrency"] != null)) {
                    base.Tables.Add(new CountryRegionCurrencyDataTable(ds.Tables["CountryRegionCurrency"]));
                }
                if ((ds.Tables["CreditCard"] != null)) {
                    base.Tables.Add(new CreditCardDataTable(ds.Tables["CreditCard"]));
                }
                if ((ds.Tables["Currency"] != null)) {
                    base.Tables.Add(new CurrencyDataTable(ds.Tables["Currency"]));
                }
                if ((ds.Tables["CurrencyRate"] != null)) {
                    base.Tables.Add(new CurrencyRateDataTable(ds.Tables["CurrencyRate"]));
                }
                if ((ds.Tables["Customer"] != null)) {
                    base.Tables.Add(new CustomerDataTable(ds.Tables["Customer"]));
                }
                if ((ds.Tables["CustomerAddress"] != null)) {
                    base.Tables.Add(new CustomerAddressDataTable(ds.Tables["CustomerAddress"]));
                }
                if ((ds.Tables["Individual"] != null)) {
                    base.Tables.Add(new IndividualDataTable(ds.Tables["Individual"]));
                }
                if ((ds.Tables["SalesOrderDetail"] != null)) {
                    base.Tables.Add(new SalesOrderDetailDataTable(ds.Tables["SalesOrderDetail"]));
                }
                if ((ds.Tables["SalesOrderHeader"] != null)) {
                    base.Tables.Add(new SalesOrderHeaderDataTable(ds.Tables["SalesOrderHeader"]));
                }
                if ((ds.Tables["SalesOrderHeaderSalesReason"] != null)) {
                    base.Tables.Add(new SalesOrderHeaderSalesReasonDataTable(ds.Tables["SalesOrderHeaderSalesReason"]));
                }
                if ((ds.Tables["SalesPerson"] != null)) {
                    base.Tables.Add(new SalesPersonDataTable(ds.Tables["SalesPerson"]));
                }
                if ((ds.Tables["SalesPersonQuotaHistory"] != null)) {
                    base.Tables.Add(new SalesPersonQuotaHistoryDataTable(ds.Tables["SalesPersonQuotaHistory"]));
                }
                if ((ds.Tables["SalesReason"] != null)) {
                    base.Tables.Add(new SalesReasonDataTable(ds.Tables["SalesReason"]));
                }
                if ((ds.Tables["SalesTaxRate"] != null)) {
                    base.Tables.Add(new SalesTaxRateDataTable(ds.Tables["SalesTaxRate"]));
                }
                if ((ds.Tables["SalesTerritory"] != null)) {
                    base.Tables.Add(new SalesTerritoryDataTable(ds.Tables["SalesTerritory"]));
                }
                if ((ds.Tables["SalesTerritoryHistory"] != null)) {
                    base.Tables.Add(new SalesTerritoryHistoryDataTable(ds.Tables["SalesTerritoryHistory"]));
                }
                if ((ds.Tables["ShoppingCartItem"] != null)) {
                    base.Tables.Add(new ShoppingCartItemDataTable(ds.Tables["ShoppingCartItem"]));
                }
                if ((ds.Tables["SpecialOffer"] != null)) {
                    base.Tables.Add(new SpecialOfferDataTable(ds.Tables["SpecialOffer"]));
                }
                if ((ds.Tables["SpecialOfferProduct"] != null)) {
                    base.Tables.Add(new SpecialOfferProductDataTable(ds.Tables["SpecialOfferProduct"]));
                }
                if ((ds.Tables["Store"] != null)) {
                    base.Tables.Add(new StoreDataTable(ds.Tables["Store"]));
                }
                if ((ds.Tables["StoreContact"] != null)) {
                    base.Tables.Add(new StoreContactDataTable(ds.Tables["StoreContact"]));
                }
                if ((ds.Tables["vEmployee"] != null)) {
                    base.Tables.Add(new vEmployeeDataTable(ds.Tables["vEmployee"]));
                }
                if ((ds.Tables["vEmployeeDepartment"] != null)) {
                    base.Tables.Add(new vEmployeeDepartmentDataTable(ds.Tables["vEmployeeDepartment"]));
                }
                if ((ds.Tables["vEmployeeDepartmentHistory"] != null)) {
                    base.Tables.Add(new vEmployeeDepartmentHistoryDataTable(ds.Tables["vEmployeeDepartmentHistory"]));
                }
                if ((ds.Tables["vJobCandidate"] != null)) {
                    base.Tables.Add(new vJobCandidateDataTable(ds.Tables["vJobCandidate"]));
                }
                if ((ds.Tables["vJobCandidateEducation"] != null)) {
                    base.Tables.Add(new vJobCandidateEducationDataTable(ds.Tables["vJobCandidateEducation"]));
                }
                if ((ds.Tables["vJobCandidateEmployment"] != null)) {
                    base.Tables.Add(new vJobCandidateEmploymentDataTable(ds.Tables["vJobCandidateEmployment"]));
                }
                if ((ds.Tables["vAdditionalContactInfo"] != null)) {
                    base.Tables.Add(new vAdditionalContactInfoDataTable(ds.Tables["vAdditionalContactInfo"]));
                }
                if ((ds.Tables["vStateProvinceCountryRegion"] != null)) {
                    base.Tables.Add(new vStateProvinceCountryRegionDataTable(ds.Tables["vStateProvinceCountryRegion"]));
                }
                if ((ds.Tables["vProductAndDescription"] != null)) {
                    base.Tables.Add(new vProductAndDescriptionDataTable(ds.Tables["vProductAndDescription"]));
                }
                if ((ds.Tables["vProductModelCatalogDescription"] != null)) {
                    base.Tables.Add(new vProductModelCatalogDescriptionDataTable(ds.Tables["vProductModelCatalogDescription"]));
                }
                if ((ds.Tables["vProductModelInstructions"] != null)) {
                    base.Tables.Add(new vProductModelInstructionsDataTable(ds.Tables["vProductModelInstructions"]));
                }
                if ((ds.Tables["vVendor"] != null)) {
                    base.Tables.Add(new vVendorDataTable(ds.Tables["vVendor"]));
                }
                if ((ds.Tables["vIndividual"] != null)) {
                    base.Tables.Add(new vIndividualDataTable(ds.Tables["vIndividual"]));
                }
                if ((ds.Tables["vIndividualDemographics"] != null)) {
                    base.Tables.Add(new vIndividualDemographicsDataTable(ds.Tables["vIndividualDemographics"]));
                }
                if ((ds.Tables["vSalesPerson"] != null)) {
                    base.Tables.Add(new vSalesPersonDataTable(ds.Tables["vSalesPerson"]));
                }
                if ((ds.Tables["vSalesPersonSalesByFiscalYears"] != null)) {
                    base.Tables.Add(new vSalesPersonSalesByFiscalYearsDataTable(ds.Tables["vSalesPersonSalesByFiscalYears"]));
                }
                if ((ds.Tables["vStoreWithDemographics"] != null)) {
                    base.Tables.Add(new vStoreWithDemographicsDataTable(ds.Tables["vStoreWithDemographics"]));
                }
                if ((ds.Tables["uspGetBillOfMaterials"] != null)) {
                    base.Tables.Add(new uspGetBillOfMaterialsDataTable(ds.Tables["uspGetBillOfMaterials"]));
                }
                if ((ds.Tables["uspGetEmployeeManagers"] != null)) {
                    base.Tables.Add(new uspGetEmployeeManagersDataTable(ds.Tables["uspGetEmployeeManagers"]));
                }
                if ((ds.Tables["uspGetManagerEmployees"] != null)) {
                    base.Tables.Add(new uspGetManagerEmployeesDataTable(ds.Tables["uspGetManagerEmployees"]));
                }
                if ((ds.Tables["uspGetWhereUsedProductID"] != null)) {
                    base.Tables.Add(new uspGetWhereUsedProductIDDataTable(ds.Tables["uspGetWhereUsedProductID"]));
                }
                if ((ds.Tables["ufnGetContactInformation"] != null)) {
                    base.Tables.Add(new ufnGetContactInformationDataTable(ds.Tables["ufnGetContactInformation"]));
                }
                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.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public AWBuildVersionDataTable AWBuildVersion {
            get {
                return this.tableAWBuildVersion;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public DatabaseLogDataTable DatabaseLog {
            get {
                return this.tableDatabaseLog;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public DepartmentDataTable Department {
            get {
                return this.tableDepartment;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public EmployeeDataTable Employee {
            get {
                return this.tableEmployee;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public EmployeeAddressDataTable EmployeeAddress {
            get {
                return this.tableEmployeeAddress;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public EmployeeDepartmentHistoryDataTable EmployeeDepartmentHistory {
            get {
                return this.tableEmployeeDepartmentHistory;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public EmployeePayHistoryDataTable EmployeePayHistory {
            get {
                return this.tableEmployeePayHistory;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public JobCandidateDataTable JobCandidate {
            get {
                return this.tableJobCandidate;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ShiftDataTable Shift {
            get {
                return this.tableShift;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public AddressDataTable Address {
            get {
                return this.tableAddress;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public AddressTypeDataTable AddressType {
            get {
                return this.tableAddressType;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ContactDataTable Contact {
            get {
                return this.tableContact;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ContactTypeDataTable ContactType {
            get {
                return this.tableContactType;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public CountryRegionDataTable CountryRegion {
            get {
                return this.tableCountryRegion;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public StateProvinceDataTable StateProvince {
            get {
                return this.tableStateProvince;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public BillOfMaterialsDataTable BillOfMaterials {
            get {
                return this.tableBillOfMaterials;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public CultureDataTable Culture {
            get {
                return this.tableCulture;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public DocumentDataTable Document {
            get {
                return this.tableDocument;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public IllustrationDataTable Illustration {
            get {
                return this.tableIllustration;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public LocationDataTable Location {
            get {
                return this.tableLocation;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ProductDataTable Product {
            get {
                return this.tableProduct;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ProductCategoryDataTable ProductCategory {
            get {
                return this.tableProductCategory;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ProductCostHistoryDataTable ProductCostHistory {
            get {
                return this.tableProductCostHistory;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ProductDescriptionDataTable ProductDescription {
            get {
                return this.tableProductDescription;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ProductDocumentDataTable ProductDocument {
            get {
                return this.tableProductDocument;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ProductInventoryDataTable ProductInventory {
            get {
                return this.tableProductInventory;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ProductListPriceHistoryDataTable ProductListPriceHistory {
            get {
                return this.tableProductListPriceHistory;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ProductModelDataTable ProductModel {
            get {
                return this.tableProductModel;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ProductModelIllustrationDataTable ProductModelIllustration {
            get {
                return this.tableProductModelIllustration;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ProductModelProductDescriptionCultureDataTable ProductModelProductDescriptionCulture {
            get {
                return this.tableProductModelProductDescriptionCulture;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ProductPhotoDataTable ProductPhoto {
            get {
                return this.tableProductPhoto;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ProductProductPhotoDataTable ProductProductPhoto {
            get {
                return this.tableProductProductPhoto;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ProductReviewDataTable ProductReview {
            get {
                return this.tableProductReview;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ProductSubcategoryDataTable ProductSubcategory {
            get {
                return this.tableProductSubcategory;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ScrapReasonDataTable ScrapReason {
            get {
                return this.tableScrapReason;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public TransactionHistoryDataTable TransactionHistory {
            get {
                return this.tableTransactionHistory;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public TransactionHistoryArchiveDataTable TransactionHistoryArchive {
            get {
                return this.tableTransactionHistoryArchive;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public UnitMeasureDataTable UnitMeasure {
            get {
                return this.tableUnitMeasure;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public WorkOrderDataTable WorkOrder {
            get {
                return this.tableWorkOrder;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public WorkOrderRoutingDataTable WorkOrderRouting {
            get {
                return this.tableWorkOrderRouting;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ProductVendorDataTable ProductVendor {
            get {
                return this.tableProductVendor;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public PurchaseOrderDetailDataTable PurchaseOrderDetail {
            get {
                return this.tablePurchaseOrderDetail;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public PurchaseOrderHeaderDataTable PurchaseOrderHeader {
            get {
                return this.tablePurchaseOrderHeader;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ShipMethodDataTable ShipMethod {
            get {
                return this.tableShipMethod;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public VendorDataTable Vendor {
            get {
                return this.tableVendor;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public VendorAddressDataTable VendorAddress {
            get {
                return this.tableVendorAddress;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public VendorContactDataTable VendorContact {
            get {
                return this.tableVendorContact;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ContactCreditCardDataTable ContactCreditCard {
            get {
                return this.tableContactCreditCard;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public CountryRegionCurrencyDataTable CountryRegionCurrency {
            get {
                return this.tableCountryRegionCurrency;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public CreditCardDataTable CreditCard {
            get {
                return this.tableCreditCard;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public CurrencyDataTable Currency {
            get {
                return this.tableCurrency;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public CurrencyRateDataTable CurrencyRate {
            get {
                return this.tableCurrencyRate;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public CustomerDataTable Customer {
            get {
                return this.tableCustomer;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public CustomerAddressDataTable CustomerAddress {
            get {
                return this.tableCustomerAddress;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public IndividualDataTable Individual {
            get {
                return this.tableIndividual;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public SalesOrderDetailDataTable SalesOrderDetail {
            get {
                return this.tableSalesOrderDetail;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public SalesOrderHeaderDataTable SalesOrderHeader {
            get {
                return this.tableSalesOrderHeader;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public SalesOrderHeaderSalesReasonDataTable SalesOrderHeaderSalesReason {
            get {
                return this.tableSalesOrderHeaderSalesReason;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public SalesPersonDataTable SalesPerson {
            get {
                return this.tableSalesPerson;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public SalesPersonQuotaHistoryDataTable SalesPersonQuotaHistory {
            get {
                return this.tableSalesPersonQuotaHistory;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public SalesReasonDataTable SalesReason {
            get {
                return this.tableSalesReason;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public SalesTaxRateDataTable SalesTaxRate {
            get {
                return this.tableSalesTaxRate;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public SalesTerritoryDataTable SalesTerritory {
            get {
                return this.tableSalesTerritory;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public SalesTerritoryHistoryDataTable SalesTerritoryHistory {
            get {
                return this.tableSalesTerritoryHistory;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ShoppingCartItemDataTable ShoppingCartItem {
            get {
                return this.tableShoppingCartItem;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public SpecialOfferDataTable SpecialOffer {
            get {
                return this.tableSpecialOffer;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public SpecialOfferProductDataTable SpecialOfferProduct {
            get {
                return this.tableSpecialOfferProduct;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public StoreDataTable Store {
            get {
                return this.tableStore;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public StoreContactDataTable StoreContact {
            get {
                return this.tableStoreContact;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public vEmployeeDataTable vEmployee {
            get {
                return this.tablevEmployee;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public vEmployeeDepartmentDataTable vEmployeeDepartment {
            get {
                return this.tablevEmployeeDepartment;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public vEmployeeDepartmentHistoryDataTable vEmployeeDepartmentHistory {
            get {
                return this.tablevEmployeeDepartmentHistory;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public vJobCandidateDataTable vJobCandidate {
            get {
                return this.tablevJobCandidate;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public vJobCandidateEducationDataTable vJobCandidateEducation {
            get {
                return this.tablevJobCandidateEducation;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public vJobCandidateEmploymentDataTable vJobCandidateEmployment {
            get {
                return this.tablevJobCandidateEmployment;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public vAdditionalContactInfoDataTable vAdditionalContactInfo {
            get {
                return this.tablevAdditionalContactInfo;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public vStateProvinceCountryRegionDataTable vStateProvinceCountryRegion {
            get {
                return this.tablevStateProvinceCountryRegion;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public vProductAndDescriptionDataTable vProductAndDescription {
            get {
                return this.tablevProductAndDescription;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public vProductModelCatalogDescriptionDataTable vProductModelCatalogDescription {
            get {
                return this.tablevProductModelCatalogDescription;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public vProductModelInstructionsDataTable vProductModelInstructions {
            get {
                return this.tablevProductModelInstructions;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public vVendorDataTable vVendor {
            get {
                return this.tablevVendor;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public vIndividualDataTable vIndividual {
            get {
                return this.tablevIndividual;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public vIndividualDemographicsDataTable vIndividualDemographics {
            get {
                return this.tablevIndividualDemographics;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public vSalesPersonDataTable vSalesPerson {
            get {
                return this.tablevSalesPerson;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public vSalesPersonSalesByFiscalYearsDataTable vSalesPersonSalesByFiscalYears {
            get {
                return this.tablevSalesPersonSalesByFiscalYears;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public vStoreWithDemographicsDataTable vStoreWithDemographics {
            get {
                return this.tablevStoreWithDemographics;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public uspGetBillOfMaterialsDataTable uspGetBillOfMaterials {
            get {
                return this.tableuspGetBillOfMaterials;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public uspGetEmployeeManagersDataTable uspGetEmployeeManagers {
            get {
                return this.tableuspGetEmployeeManagers;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public uspGetManagerEmployeesDataTable uspGetManagerEmployees {
            get {
                return this.tableuspGetManagerEmployees;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public uspGetWhereUsedProductIDDataTable uspGetWhereUsedProductID {
            get {
                return this.tableuspGetWhereUsedProductID;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ufnGetContactInformationDataTable ufnGetContactInformation {
            get {
                return this.tableufnGetContactInformation;
            }
        }
        
        public override System.Data.SchemaSerializationMode SchemaSerializationMode {
            get {
                return this._schemaSerializationMode;
            }
            set {
                this._schemaSerializationMode = value;
            }
        }
        
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
        public new System.Data.DataTableCollection Tables {
            get {
                return base.Tables;
            }
        }
        
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
        public new System.Data.DataRelationCollection Relations {
            get {
                return base.Relations;
            }
        }
        
        [System.ComponentModel.DefaultValueAttribute(true)]
        public new bool EnforceConstraints {
            get {
                return base.EnforceConstraints;
            }
            set {
                base.EnforceConstraints = value;
            }
        }
        
        protected override void InitializeDerivedDataSet() {
            this.BeginInit();
            this.InitClass();
            this.EndInit();
        }
        
        public override System.Data.DataSet Clone() {
            AdventureWorksDataSet cln = ((AdventureWorksDataSet)(base.Clone()));
            cln.InitVars();
            return cln;
        }
        
        protected override bool ShouldSerializeTables() {
            return false;
        }
        
        protected override bool ShouldSerializeRelations() {
            return false;
        }
        
        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["AWBuildVersion"] != null)) {
                    base.Tables.Add(new AWBuildVersionDataTable(ds.Tables["AWBuildVersion"]));
                }
                if ((ds.Tables["DatabaseLog"] != null)) {
                    base.Tables.Add(new DatabaseLogDataTable(ds.Tables["DatabaseLog"]));
                }
                if ((ds.Tables["Department"] != null)) {
                    base.Tables.Add(new DepartmentDataTable(ds.Tables["Department"]));
                }
                if ((ds.Tables["Employee"] != null)) {
                    base.Tables.Add(new EmployeeDataTable(ds.Tables["Employee"]));
                }
                if ((ds.Tables["EmployeeAddress"] != null)) {
                    base.Tables.Add(new EmployeeAddressDataTable(ds.Tables["EmployeeAddress"]));
                }
                if ((ds.Tables["EmployeeDepartmentHistory"] != null)) {
                    base.Tables.Add(new EmployeeDepartmentHistoryDataTable(ds.Tables["EmployeeDepartmentHistory"]));
                }
                if ((ds.Tables["EmployeePayHistory"] != null)) {
                    base.Tables.Add(new EmployeePayHistoryDataTable(ds.Tables["EmployeePayHistory"]));
                }
                if ((ds.Tables["JobCandidate"] != null)) {
                    base.Tables.Add(new JobCandidateDataTable(ds.Tables["JobCandidate"]));
                }
                if ((ds.Tables["Shift"] != null)) {
                    base.Tables.Add(new ShiftDataTable(ds.Tables["Shift"]));
                }
                if ((ds.Tables["Address"] != null)) {
                    base.Tables.Add(new AddressDataTable(ds.Tables["Address"]));
                }
                if ((ds.Tables["AddressType"] != null)) {
                    base.Tables.Add(new AddressTypeDataTable(ds.Tables["AddressType"]));
                }
                if ((ds.Tables["Contact"] != null)) {
                    base.Tables.Add(new ContactDataTable(ds.Tables["Contact"]));
                }
                if ((ds.Tables["ContactType"] != null)) {
                    base.Tables.Add(new ContactTypeDataTable(ds.Tables["ContactType"]));
                }
                if ((ds.Tables["CountryRegion"] != null)) {
                    base.Tables.Add(new CountryRegionDataTable(ds.Tables["CountryRegion"]));
                }
                if ((ds.Tables["StateProvince"] != null)) {
                    base.Tables.Add(new StateProvinceDataTable(ds.Tables["StateProvince"]));
                }
                if ((ds.Tables["BillOfMaterials"] != null)) {
                    base.Tables.Add(new BillOfMaterialsDataTable(ds.Tables["BillOfMaterials"]));
                }
                if ((ds.Tables["Culture"] != null)) {
                    base.Tables.Add(new CultureDataTable(ds.Tables["Culture"]));
                }
                if ((ds.Tables["Document"] != null)) {
                    base.Tables.Add(new DocumentDataTable(ds.Tables["Document"]));
                }
                if ((ds.Tables["Illustration"] != null)) {
                    base.Tables.Add(new IllustrationDataTable(ds.Tables["Illustration"]));
                }
                if ((ds.Tables["Location"] != null)) {
                    base.Tables.Add(new LocationDataTable(ds.Tables["Location"]));
                }
                if ((ds.Tables["Product"] != null)) {
                    base.Tables.Add(new ProductDataTable(ds.Tables["Product"]));
                }
                if ((ds.Tables["ProductCategory"] != null)) {
                    base.Tables.Add(new ProductCategoryDataTable(ds.Tables["ProductCategory"]));
                }
                if ((ds.Tables["ProductCostHistory"] != null)) {
                    base.Tables.Add(new ProductCostHistoryDataTable(ds.Tables["ProductCostHistory"]));
                }
                if ((ds.Tables["ProductDescription"] != null)) {
                    base.Tables.Add(new ProductDescriptionDataTable(ds.Tables["ProductDescription"]));
                }
                if ((ds.Tables["ProductDocument"] != null)) {
                    base.Tables.Add(new ProductDocumentDataTable(ds.Tables["ProductDocument"]));
                }
                if ((ds.Tables["ProductInventory"] != null)) {
                    base.Tables.Add(new ProductInventoryDataTable(ds.Tables["ProductInventory"]));
                }
                if ((ds.Tables["ProductListPriceHistory"] != null)) {
                    base.Tables.Add(new ProductListPriceHistoryDataTable(ds.Tables["ProductListPriceHistory"]));
                }
                if ((ds.Tables["ProductModel"] != null)) {
                    base.Tables.Add(new ProductModelDataTable(ds.Tables["ProductModel"]));
                }
                if ((ds.Tables["ProductModelIllustration"] != null)) {
                    base.Tables.Add(new ProductModelIllustrationDataTable(ds.Tables["ProductModelIllustration"]));
                }
                if ((ds.Tables["ProductModelProductDescriptionCulture"] != null)) {
                    base.Tables.Add(new ProductModelProductDescriptionCultureDataTable(ds.Tables["ProductModelProductDescriptionCulture"]));
                }
                if ((ds.Tables["ProductPhoto"] != null)) {
                    base.Tables.Add(new ProductPhotoDataTable(ds.Tables["ProductPhoto"]));
                }
                if ((ds.Tables["ProductProductPhoto"] != null)) {
                    base.Tables.Add(new ProductProductPhotoDataTable(ds.Tables["ProductProductPhoto"]));
                }
                if ((ds.Tables["ProductReview"] != null)) {
                    base.Tables.Add(new ProductReviewDataTable(ds.Tables["ProductReview"]));
                }
                if ((ds.Tables["ProductSubcategory"] != null)) {
                    base.Tables.Add(new ProductSubcategoryDataTable(ds.Tables["ProductSubcategory"]));
                }
                if ((ds.Tables["ScrapReason"] != null)) {
                    base.Tables.Add(new ScrapReasonDataTable(ds.Tables["ScrapReason"]));
                }
                if ((ds.Tables["TransactionHistory"] != null)) {
                    base.Tables.Add(new TransactionHistoryDataTable(ds.Tables["TransactionHistory"]));
                }
                if ((ds.Tables["TransactionHistoryArchive"] != null)) {
                    base.Tables.Add(new TransactionHistoryArchiveDataTable(ds.Tables["TransactionHistoryArchive"]));
                }
                if ((ds.Tables["UnitMeasure"] != null)) {
                    base.Tables.Add(new UnitMeasureDataTable(ds.Tables["UnitMeasure"]));
                }
                if ((ds.Tables["WorkOrder"] != null)) {
                    base.Tables.Add(new WorkOrderDataTable(ds.Tables["WorkOrder"]));
                }
                if ((ds.Tables["WorkOrderRouting"] != null)) {
                    base.Tables.Add(new WorkOrderRoutingDataTable(ds.Tables["WorkOrderRouting"]));
                }
                if ((ds.Tables["ProductVendor"] != null)) {
                    base.Tables.Add(new ProductVendorDataTable(ds.Tables["ProductVendor"]));
                }
                if ((ds.Tables["PurchaseOrderDetail"] != null)) {
                    base.Tables.Add(new PurchaseOrderDetailDataTable(ds.Tables["PurchaseOrderDetail"]));
                }
                if ((ds.Tables["PurchaseOrderHeader"] != null)) {
                    base.Tables.Add(new PurchaseOrderHeaderDataTable(ds.Tables["PurchaseOrderHeader"]));
                }
                if ((ds.Tables["ShipMethod"] != null)) {
                    base.Tables.Add(new ShipMethodDataTable(ds.Tables["ShipMethod"]));
                }
                if ((ds.Tables["Vendor"] != null)) {
                    base.Tables.Add(new VendorDataTable(ds.Tables["Vendor"]));
                }
                if ((ds.Tables["VendorAddress"] != null)) {
                    base.Tables.Add(new VendorAddressDataTable(ds.Tables["VendorAddress"]));
                }
                if ((ds.Tables["VendorContact"] != null)) {
                    base.Tables.Add(new VendorContactDataTable(ds.Tables["VendorContact"]));
                }
                if ((ds.Tables["ContactCreditCard"] != null)) {
                    base.Tables.Add(new ContactCreditCardDataTable(ds.Tables["ContactCreditCard"]));
                }
                if ((ds.Tables["CountryRegionCurrency"] != null)) {
                    base.Tables.Add(new CountryRegionCurrencyDataTable(ds.Tables["CountryRegionCurrency"]));
                }
                if ((ds.Tables["CreditCard"] != null)) {
                    base.Tables.Add(new CreditCardDataTable(ds.Tables["CreditCard"]));
                }
                if ((ds.Tables["Currency"] != null)) {
                    base.Tables.Add(new CurrencyDataTable(ds.Tables["Currency"]));
                }
                if ((ds.Tables["CurrencyRate"] != null)) {
                    base.Tables.Add(new CurrencyRateDataTable(ds.Tables["CurrencyRate"]));
                }
                if ((ds.Tables["Customer"] != null)) {
                    base.Tables.Add(new CustomerDataTable(ds.Tables["Customer"]));
                }
                if ((ds.Tables["CustomerAddress"] != null)) {
                    base.Tables.Add(new CustomerAddressDataTable(ds.Tables["CustomerAddress"]));
                }
                if ((ds.Tables["Individual"] != null)) {
                    base.Tables.Add(new IndividualDataTable(ds.Tables["Individual"]));
                }
                if ((ds.Tables["SalesOrderDetail"] != null)) {
                    base.Tables.Add(new SalesOrderDetailDataTable(ds.Tables["SalesOrderDetail"]));
                }
                if ((ds.Tables["SalesOrderHeader"] != null)) {
                    base.Tables.Add(new SalesOrderHeaderDataTable(ds.Tables["SalesOrderHeader"]));
                }
                if ((ds.Tables["SalesOrderHeaderSalesReason"] != null)) {
                    base.Tables.Add(new SalesOrderHeaderSalesReasonDataTable(ds.Tables["SalesOrderHeaderSalesReason"]));
                }
                if ((ds.Tables["SalesPerson"] != null)) {
                    base.Tables.Add(new SalesPersonDataTable(ds.Tables["SalesPerson"]));
                }
                if ((ds.Tables["SalesPersonQuotaHistory"] != null)) {
                    base.Tables.Add(new SalesPersonQuotaHistoryDataTable(ds.Tables["SalesPersonQuotaHistory"]));
                }
                if ((ds.Tables["SalesReason"] != null)) {
                    base.Tables.Add(new SalesReasonDataTable(ds.Tables["SalesReason"]));
                }
                if ((ds.Tables["SalesTaxRate"] != null)) {
                    base.Tables.Add(new SalesTaxRateDataTable(ds.Tables["SalesTaxRate"]));
                }
                if ((ds.Tables["SalesTerritory"] != null)) {
                    base.Tables.Add(new SalesTerritoryDataTable(ds.Tables["SalesTerritory"]));
                }
                if ((ds.Tables["SalesTerritoryHistory"] != null)) {
                    base.Tables.Add(new SalesTerritoryHistoryDataTable(ds.Tables["SalesTerritoryHistory"]));
                }
                if ((ds.Tables["ShoppingCartItem"] != null)) {
                    base.Tables.Add(new ShoppingCartItemDataTable(ds.Tables["ShoppingCartItem"]));
                }
                if ((ds.Tables["SpecialOffer"] != null)) {
                    base.Tables.Add(new SpecialOfferDataTable(ds.Tables["SpecialOffer"]));
                }
                if ((ds.Tables["SpecialOfferProduct"] != null)) {
                    base.Tables.Add(new SpecialOfferProductDataTable(ds.Tables["SpecialOfferProduct"]));
                }
                if ((ds.Tables["Store"] != null)) {
                    base.Tables.Add(new StoreDataTable(ds.Tables["Store"]));
                }
                if ((ds.Tables["StoreContact"] != null)) {
                    base.Tables.Add(new StoreContactDataTable(ds.Tables["StoreContact"]));
                }
                if ((ds.Tables["vEmployee"] != null)) {
                    base.Tables.Add(new vEmployeeDataTable(ds.Tables["vEmployee"]));
                }
                if ((ds.Tables["vEmployeeDepartment"] != null)) {
                    base.Tables.Add(new vEmployeeDepartmentDataTable(ds.Tables["vEmployeeDepartment"]));
                }
                if ((ds.Tables["vEmployeeDepartmentHistory"] != null)) {
                    base.Tables.Add(new vEmployeeDepartmentHistoryDataTable(ds.Tables["vEmployeeDepartmentHistory"]));
                }
                if ((ds.Tables["vJobCandidate"] != null)) {
                    base.Tables.Add(new vJobCandidateDataTable(ds.Tables["vJobCandidate"]));
                }
                if ((ds.Tables["vJobCandidateEducation"] != null)) {
                    base.Tables.Add(new vJobCandidateEducationDataTable(ds.Tables["vJobCandidateEducation"]));
                }
                if ((ds.Tables["vJobCandidateEmployment"] != null)) {
                    base.Tables.Add(new vJobCandidateEmploymentDataTable(ds.Tables["vJobCandidateEmployment"]));
                }
                if ((ds.Tables["vAdditionalContactInfo"] != null)) {
                    base.Tables.Add(new vAdditionalContactInfoDataTable(ds.Tables["vAdditionalContactInfo"]));
                }
                if ((ds.Tables["vStateProvinceCountryRegion"] != null)) {
                    base.Tables.Add(new vStateProvinceCountryRegionDataTable(ds.Tables["vStateProvinceCountryRegion"]));
                }
                if ((ds.Tables["vProductAndDescription"] != null)) {
                    base.Tables.Add(new vProductAndDescriptionDataTable(ds.Tables["vProductAndDescription"]));
                }
                if ((ds.Tables["vProductModelCatalogDescription"] != null)) {
                    base.Tables.Add(new vProductModelCatalogDescriptionDataTable(ds.Tables["vProductModelCatalogDescription"]));
                }
                if ((ds.Tables["vProductModelInstructions"] != null)) {
                    base.Tables.Add(new vProductModelInstructionsDataTable(ds.Tables["vProductModelInstructions"]));
                }
                if ((ds.Tables["vVendor"] != null)) {
                    base.Tables.Add(new vVendorDataTable(ds.Tables["vVendor"]));
                }
                if ((ds.Tables["vIndividual"] != null)) {
                    base.Tables.Add(new vIndividualDataTable(ds.Tables["vIndividual"]));
                }
                if ((ds.Tables["vIndividualDemographics"] != null)) {
                    base.Tables.Add(new vIndividualDemographicsDataTable(ds.Tables["vIndividualDemographics"]));
                }
                if ((ds.Tables["vSalesPerson"] != null)) {
                    base.Tables.Add(new vSalesPersonDataTable(ds.Tables["vSalesPerson"]));
                }
                if ((ds.Tables["vSalesPersonSalesByFiscalYears"] != null)) {
                    base.Tables.Add(new vSalesPersonSalesByFiscalYearsDataTable(ds.Tables["vSalesPersonSalesByFiscalYears"]));
                }
                if ((ds.Tables["vStoreWithDemographics"] != null)) {
                    base.Tables.Add(new vStoreWithDemographicsDataTable(ds.Tables["vStoreWithDemographics"]));
                }
                if ((ds.Tables["uspGetBillOfMaterials"] != null)) {
                    base.Tables.Add(new uspGetBillOfMaterialsDataTable(ds.Tables["uspGetBillOfMaterials"]));
                }
                if ((ds.Tables["uspGetEmployeeManagers"] != null)) {
                    base.Tables.Add(new uspGetEmployeeManagersDataTable(ds.Tables["uspGetEmployeeManagers"]));
                }
                if ((ds.Tables["uspGetManagerEmployees"] != null)) {
                    base.Tables.Add(new uspGetManagerEmployeesDataTable(ds.Tables["uspGetManagerEmployees"]));
                }
                if ((ds.Tables["uspGetWhereUsedProductID"] != null)) {
                    base.Tables.Add(new uspGetWhereUsedProductIDDataTable(ds.Tables["uspGetWhereUsedProductID"]));
                }
                if ((ds.Tables["ufnGetContactInformation"] != null)) {
                    base.Tables.Add(new ufnGetContactInformationDataTable(ds.Tables["ufnGetContactInformation"]));
                }
                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();
            }
        }
        
        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);
        }
        
        internal void InitVars() {
            this.InitVars(true);
        }
        
        internal void InitVars(bool initTable) {
            this.tableAWBuildVersion = ((AWBuildVersionDataTable)(base.Tables["AWBuildVersion"]));
            if ((initTable == true)) {
                if ((this.tableAWBuildVersion != null)) {
                    this.tableAWBuildVersion.InitVars();
                }
            }
            this.tableDatabaseLog = ((DatabaseLogDataTable)(base.Tables["DatabaseLog"]));
            if ((initTable == true)) {
                if ((this.tableDatabaseLog != null)) {
                    this.tableDatabaseLog.InitVars();
                }
            }
            this.tableDepartment = ((DepartmentDataTable)(base.Tables["Department"]));
            if ((initTable == true)) {
                if ((this.tableDepartment != null)) {
                    this.tableDepartment.InitVars();
                }
            }
            this.tableEmployee = ((EmployeeDataTable)(base.Tables["Employee"]));
            if ((initTable == true)) {
                if ((this.tableEmployee != null)) {
                    this.tableEmployee.InitVars();
                }
            }
            this.tableEmployeeAddress = ((EmployeeAddressDataTable)(base.Tables["EmployeeAddress"]));
            if ((initTable == true)) {
                if ((this.tableEmployeeAddress != null)) {
                    this.tableEmployeeAddress.InitVars();
                }
            }
            this.tableEmployeeDepartmentHistory = ((EmployeeDepartmentHistoryDataTable)(base.Tables["EmployeeDepartmentHistory"]));
            if ((initTable == true)) {
                if ((this.tableEmployeeDepartmentHistory != null)) {
                    this.tableEmployeeDepartmentHistory.InitVars();
                }
            }
            this.tableEmployeePayHistory = ((EmployeePayHistoryDataTable)(base.Tables["EmployeePayHistory"]));
            if ((initTable == true)) {
                if ((this.tableEmployeePayHistory != null)) {
                    this.tableEmployeePayHistory.InitVars();
                }
            }
            this.tableJobCandidate = ((JobCandidateDataTable)(base.Tables["JobCandidate"]));
            if ((initTable == true)) {
                if ((this.tableJobCandidate != null)) {
                    this.tableJobCandidate.InitVars();
                }
            }
            this.tableShift = ((ShiftDataTable)(base.Tables["Shift"]));
            if ((initTable == true)) {
                if ((this.tableShift != null)) {
                    this.tableShift.InitVars();
                }
            }
            this.tableAddress = ((AddressDataTable)(base.Tables["Address"]));
            if ((initTable == true)) {
                if ((this.tableAddress != null)) {
                    this.tableAddress.InitVars();
                }
            }
            this.tableAddressType = ((AddressTypeDataTable)(base.Tables["AddressType"]));
            if ((initTable == true)) {
                if ((this.tableAddressType != null)) {
                    this.tableAddressType.InitVars();
                }
            }
            this.tableContact = ((ContactDataTable)(base.Tables["Contact"]));
            if ((initTable == true)) {
                if ((this.tableContact != null)) {
                    this.tableContact.InitVars();
                }
            }
            this.tableContactType = ((ContactTypeDataTable)(base.Tables["ContactType"]));
            if ((initTable == true)) {
                if ((this.tableContactType != null)) {
                    this.tableContactType.InitVars();
                }
            }
            this.tableCountryRegion = ((CountryRegionDataTable)(base.Tables["CountryRegion"]));
            if ((initTable == true)) {
                if ((this.tableCountryRegion != null)) {
                    this.tableCountryRegion.InitVars();
                }
            }
            this.tableStateProvince = ((StateProvinceDataTable)(base.Tables["StateProvince"]));
            if ((initTable == true)) {
                if ((this.tableStateProvince != null)) {
                    this.tableStateProvince.InitVars();
                }
            }
            this.tableBillOfMaterials = ((BillOfMaterialsDataTable)(base.Tables["BillOfMaterials"]));
            if ((initTable == true)) {
                if ((this.tableBillOfMaterials != null)) {
                    this.tableBillOfMaterials.InitVars();
                }
            }
            this.tableCulture = ((CultureDataTable)(base.Tables["Culture"]));
            if ((initTable == true)) {
                if ((this.tableCulture != null)) {
                    this.tableCulture.InitVars();
                }
            }
            this.tableDocument = ((DocumentDataTable)(base.Tables["Document"]));
            if ((initTable == true)) {
                if ((this.tableDocument != null)) {
                    this.tableDocument.InitVars();
                }
            }
            this.tableIllustration = ((IllustrationDataTable)(base.Tables["Illustration"]));
            if ((initTable == true)) {
                if ((this.tableIllustration != null)) {
                    this.tableIllustration.InitVars();
                }
            }
            this.tableLocation = ((LocationDataTable)(base.Tables["Location"]));
            if ((initTable == true)) {
                if ((this.tableLocation != null)) {
                    this.tableLocation.InitVars();
                }
            }
            this.tableProduct = ((ProductDataTable)(base.Tables["Product"]));
            if ((initTable == true)) {
                if ((this.tableProduct != null)) {
                    this.tableProduct.InitVars();
                }
            }
            this.tableProductCategory = ((ProductCategoryDataTable)(base.Tables["ProductCategory"]));
            if ((initTable == true)) {
                if ((this.tableProductCategory != null)) {
                    this.tableProductCategory.InitVars();
                }
            }
            this.tableProductCostHistory = ((ProductCostHistoryDataTable)(base.Tables["ProductCostHistory"]));
            if ((initTable == true)) {
                if ((this.tableProductCostHistory != null)) {
                    this.tableProductCostHistory.InitVars();
                }
            }
            this.tableProductDescription = ((ProductDescriptionDataTable)(base.Tables["ProductDescription"]));
            if ((initTable == true)) {
                if ((this.tableProductDescription != null)) {
                    this.tableProductDescription.InitVars();
                }
            }
            this.tableProductDocument = ((ProductDocumentDataTable)(base.Tables["ProductDocument"]));
            if ((initTable == true)) {
                if ((this.tableProductDocument != null)) {
                    this.tableProductDocument.InitVars();
                }
            }
            this.tableProductInventory = ((ProductInventoryDataTable)(base.Tables["ProductInventory"]));
            if ((initTable == true)) {
                if ((this.tableProductInventory != null)) {
                    this.tableProductInventory.InitVars();
                }
            }
            this.tableProductListPriceHistory = ((ProductListPriceHistoryDataTable)(base.Tables["ProductListPriceHistory"]));
            if ((initTable == true)) {
                if ((this.tableProductListPriceHistory != null)) {
                    this.tableProductListPriceHistory.InitVars();
                }
            }
            this.tableProductModel = ((ProductModelDataTable)(base.Tables["ProductModel"]));
            if ((initTable == true)) {
                if ((this.tableProductModel != null)) {
                    this.tableProductModel.InitVars();
                }
            }
            this.tableProductModelIllustration = ((ProductModelIllustrationDataTable)(base.Tables["ProductModelIllustration"]));
            if ((initTable == true)) {
                if ((this.tableProductModelIllustration != null)) {
                    this.tableProductModelIllustration.InitVars();
                }
            }
            this.tableProductModelProductDescriptionCulture = ((ProductModelProductDescriptionCultureDataTable)(base.Tables["ProductModelProductDescriptionCulture"]));
            if ((initTable == true)) {
                if ((this.tableProductModelProductDescriptionCulture != null)) {
                    this.tableProductModelProductDescriptionCulture.InitVars();
                }
            }
            this.tableProductPhoto = ((ProductPhotoDataTable)(base.Tables["ProductPhoto"]));
            if ((initTable == true)) {
                if ((this.tableProductPhoto != null)) {
                    this.tableProductPhoto.InitVars();
                }
            }
            this.tableProductProductPhoto = ((ProductProductPhotoDataTable)(base.Tables["ProductProductPhoto"]));
            if ((initTable == true)) {
                if ((this.tableProductProductPhoto != null)) {
                    this.tableProductProductPhoto.InitVars();
                }
            }
            this.tableProductReview = ((ProductReviewDataTable)(base.Tables["ProductReview"]));
            if ((initTable == true)) {
                if ((this.tableProductReview != null)) {
                    this.tableProductReview.InitVars();
                }
            }
            this.tableProductSubcategory = ((ProductSubcategoryDataTable)(base.Tables["ProductSubcategory"]));
            if ((initTable == true)) {
                if ((this.tableProductSubcategory != null)) {
                    this.tableProductSubcategory.InitVars();
                }
            }
            this.tableScrapReason = ((ScrapReasonDataTable)(base.Tables["ScrapReason"]));
            if ((initTable == true)) {
                if ((this.tableScrapReason != null)) {
                    this.tableScrapReason.InitVars();
                }
            }
            this.tableTransactionHistory = ((TransactionHistoryDataTable)(base.Tables["TransactionHistory"]));
            if ((initTable == true)) {
                if ((this.tableTransactionHistory != null)) {
                    this.tableTransactionHistory.InitVars();
                }
            }
            this.tableTransactionHistoryArchive = ((TransactionHistoryArchiveDataTable)(base.Tables["TransactionHistoryArchive"]));
            if ((initTable == true)) {
                if ((this.tableTransactionHistoryArchive != null)) {
                    this.tableTransactionHistoryArchive.InitVars();
                }
            }
            this.tableUnitMeasure = ((UnitMeasureDataTable)(base.Tables["UnitMeasure"]));
            if ((initTable == true)) {
                if ((this.tableUnitMeasure != null)) {
                    this.tableUnitMeasure.InitVars();
                }
            }
            this.tableWorkOrder = ((WorkOrderDataTable)(base.Tables["WorkOrder"]));
            if ((initTable == true)) {
                if ((this.tableWorkOrder != null)) {
                    this.tableWorkOrder.InitVars();
                }
            }
            this.tableWorkOrderRouting = ((WorkOrderRoutingDataTable)(base.Tables["WorkOrderRouting"]));
            if ((initTable == true)) {
                if ((this.tableWorkOrderRouting != null)) {
                    this.tableWorkOrderRouting.InitVars();
                }
            }
            this.tableProductVendor = ((ProductVendorDataTable)(base.Tables["ProductVendor"]));
            if ((initTable == true)) {
                if ((this.tableProductVendor != null)) {
                    this.tableProductVendor.InitVars();
                }
            }
            this.tablePurchaseOrderDetail = ((PurchaseOrderDetailDataTable)(base.Tables["PurchaseOrderDetail"]));
            if ((initTable == true)) {
                if ((this.tablePurchaseOrderDetail != null)) {
                    this.tablePurchaseOrderDetail.InitVars();
                }
            }
            this.tablePurchaseOrderHeader = ((PurchaseOrderHeaderDataTable)(base.Tables["PurchaseOrderHeader"]));
            if ((initTable == true)) {
                if ((this.tablePurchaseOrderHeader != null)) {
                    this.tablePurchaseOrderHeader.InitVars();
                }
            }
            this.tableShipMethod = ((ShipMethodDataTable)(base.Tables["ShipMethod"]));
            if ((initTable == true)) {
                if ((this.tableShipMethod != null)) {
                    this.tableShipMethod.InitVars();
                }
            }
            this.tableVendor = ((VendorDataTable)(base.Tables["Vendor"]));
            if ((initTable == true)) {
                if ((this.tableVendor != null)) {
                    this.tableVendor.InitVars();
                }
            }
            this.tableVendorAddress = ((VendorAddressDataTable)(base.Tables["VendorAddress"]));
            if ((initTable == true)) {
                if ((this.tableVendorAddress != null)) {
                    this.tableVendorAddress.InitVars();
                }
            }
            this.tableVendorContact = ((VendorContactDataTable)(base.Tables["VendorContact"]));
            if ((initTable == true)) {
                if ((this.tableVendorContact != null)) {
                    this.tableVendorContact.InitVars();
                }
            }
            this.tableContactCreditCard = ((ContactCreditCardDataTable)(base.Tables["ContactCreditCard"]));
            if ((initTable == true)) {
                if ((this.tableContactCreditCard != null)) {
                    this.tableContactCreditCard.InitVars();
                }
            }
            this.tableCountryRegionCurrency = ((CountryRegionCurrencyDataTable)(base.Tables["CountryRegionCurrency"]));
            if ((initTable == true)) {
                if ((this.tableCountryRegionCurrency != null)) {
                    this.tableCountryRegionCurrency.InitVars();
                }
            }
            this.tableCreditCard = ((CreditCardDataTable)(base.Tables["CreditCard"]));
            if ((initTable == true)) {
                if ((this.tableCreditCard != null)) {
                    this.tableCreditCard.InitVars();
                }
            }
            this.tableCurrency = ((CurrencyDataTable)(base.Tables["Currency"]));
            if ((initTable == true)) {
                if ((this.tableCurrency != null)) {
                    this.tableCurrency.InitVars();
                }
            }
            this.tableCurrencyRate = ((CurrencyRateDataTable)(base.Tables["CurrencyRate"]));
            if ((initTable == true)) {
                if ((this.tableCurrencyRate != null)) {
                    this.tableCurrencyRate.InitVars();
                }
            }
            this.tableCustomer = ((CustomerDataTable)(base.Tables["Customer"]));
            if ((initTable == true)) {
                if ((this.tableCustomer != null)) {
                    this.tableCustomer.InitVars();
                }
            }
            this.tableCustomerAddress = ((CustomerAddressDataTable)(base.Tables["CustomerAddress"]));
            if ((initTable == true)) {
                if ((this.tableCustomerAddress != null)) {
                    this.tableCustomerAddress.InitVars();
                }
            }
            this.tableIndividual = ((IndividualDataTable)(base.Tables["Individual"]));
            if ((initTable == true)) {
                if ((this.tableIndividual != null)) {
                    this.tableIndividual.InitVars();
                }
            }
            this.tableSalesOrderDetail = ((SalesOrderDetailDataTable)(base.Tables["SalesOrderDetail"]));
            if ((initTable == true)) {
                if ((this.tableSalesOrderDetail != null)) {
                    this.tableSalesOrderDetail.InitVars();
                }
            }
            this.tableSalesOrderHeader = ((SalesOrderHeaderDataTable)(base.Tables["SalesOrderHeader"]));
            if ((initTable == true)) {
                if ((this.tableSalesOrderHeader != null)) {
                    this.tableSalesOrderHeader.InitVars();
                }
            }
            this.tableSalesOrderHeaderSalesReason = ((SalesOrderHeaderSalesReasonDataTable)(base.Tables["SalesOrderHeaderSalesReason"]));
            if ((initTable == true)) {
                if ((this.tableSalesOrderHeaderSalesReason != null)) {
                    this.tableSalesOrderHeaderSalesReason.InitVars();
                }
            }
            this.tableSalesPerson = ((SalesPersonDataTable)(base.Tables["SalesPerson"]));
            if ((initTable == true)) {
                if ((this.tableSalesPerson != null)) {
                    this.tableSalesPerson.InitVars();
                }
            }
            this.tableSalesPersonQuotaHistory = ((SalesPersonQuotaHistoryDataTable)(base.Tables["SalesPersonQuotaHistory"]));
            if ((initTable == true)) {
                if ((this.tableSalesPersonQuotaHistory != null)) {
                    this.tableSalesPersonQuotaHistory.InitVars();
                }
            }
            this.tableSalesReason = ((SalesReasonDataTable)(base.Tables["SalesReason"]));
            if ((initTable == true)) {
                if ((this.tableSalesReason != null)) {
                    this.tableSalesReason.InitVars();
                }
            }
            this.tableSalesTaxRate = ((SalesTaxRateDataTable)(base.Tables["SalesTaxRate"]));
            if ((initTable == true)) {
                if ((this.tableSalesTaxRate != null)) {
                    this.tableSalesTaxRate.InitVars();
                }
            }
            this.tableSalesTerritory = ((SalesTerritoryDataTable)(base.Tables["SalesTerritory"]));
            if ((initTable == true)) {
                if ((this.tableSalesTerritory != null)) {
                    this.tableSalesTerritory.InitVars();
                }
            }
            this.tableSalesTerritoryHistory = ((SalesTerritoryHistoryDataTable)(base.Tables["SalesTerritoryHistory"]));
            if ((initTable == true)) {
                if ((this.tableSalesTerritoryHistory != null)) {
                    this.tableSalesTerritoryHistory.InitVars();
                }
            }
            this.tableShoppingCartItem = ((ShoppingCartItemDataTable)(base.Tables["ShoppingCartItem"]));
            if ((initTable == true)) {
                if ((this.tableShoppingCartItem != null)) {
                    this.tableShoppingCartItem.InitVars();
                }
            }
            this.tableSpecialOffer = ((SpecialOfferDataTable)(base.Tables["SpecialOffer"]));
            if ((initTable == true)) {
                if ((this.tableSpecialOffer != null)) {
                    this.tableSpecialOffer.InitVars();
                }
            }
            this.tableSpecialOfferProduct = ((SpecialOfferProductDataTable)(base.Tables["SpecialOfferProduct"]));
            if ((initTable == true)) {
                if ((this.tableSpecialOfferProduct != null)) {
                    this.tableSpecialOfferProduct.InitVars();
                }
            }
            this.tableStore = ((StoreDataTable)(base.Tables["Store"]));
            if ((initTable == true)) {
                if ((this.tableStore != null)) {
                    this.tableStore.InitVars();
                }
            }
            this.tableStoreContact = ((StoreContactDataTable)(base.Tables["StoreContact"]));
            if ((initTable == true)) {
                if ((this.tableStoreContact != null)) {
                    this.tableStoreContact.InitVars();
                }
            }
            this.tablevEmployee = ((vEmployeeDataTable)(base.Tables["vEmployee"]));
            if ((initTable == true)) {
                if ((this.tablevEmployee != null)) {
                    this.tablevEmployee.InitVars();
                }
            }
            this.tablevEmployeeDepartment = ((vEmployeeDepartmentDataTable)(base.Tables["vEmployeeDepartment"]));
            if ((initTable == true)) {
                if ((this.tablevEmployeeDepartment != null)) {
                    this.tablevEmployeeDepartment.InitVars();
                }
            }
            this.tablevEmployeeDepartmentHistory = ((vEmployeeDepartmentHistoryDataTable)(base.Tables["vEmployeeDepartmentHistory"]));
            if ((initTable == true)) {
                if ((this.tablevEmployeeDepartmentHistory != null)) {
                    this.tablevEmployeeDepartmentHistory.InitVars();
                }
            }
            this.tablevJobCandidate = ((vJobCandidateDataTable)(base.Tables["vJobCandidate"]));
            if ((initTable == true)) {
                if ((this.tablevJobCandidate != null)) {
                    this.tablevJobCandidate.InitVars();
                }
            }
            this.tablevJobCandidateEducation = ((vJobCandidateEducationDataTable)(base.Tables["vJobCandidateEducation"]));
            if ((initTable == true)) {
                if ((this.tablevJobCandidateEducation != null)) {
                    this.tablevJobCandidateEducation.InitVars();
                }
            }
            this.tablevJobCandidateEmployment = ((vJobCandidateEmploymentDataTable)(base.Tables["vJobCandidateEmployment"]));
            if ((initTable == true)) {
                if ((this.tablevJobCandidateEmployment != null)) {
                    this.tablevJobCandidateEmployment.InitVars();
                }
            }
            this.tablevAdditionalContactInfo = ((vAdditionalContactInfoDataTable)(base.Tables["vAdditionalContactInfo"]));
            if ((initTable == true)) {
                if ((this.tablevAdditionalContactInfo != null)) {
                    this.tablevAdditionalContactInfo.InitVars();
                }
            }
            this.tablevStateProvinceCountryRegion = ((vStateProvinceCountryRegionDataTable)(base.Tables["vStateProvinceCountryRegion"]));
            if ((initTable == true)) {
                if ((this.tablevStateProvinceCountryRegion != null)) {
                    this.tablevStateProvinceCountryRegion.InitVars();
                }
            }
            this.tablevProductAndDescription = ((vProductAndDescriptionDataTable)(base.Tables["vProductAndDescription"]));
            if ((initTable == true)) {
                if ((this.tablevProductAndDescription != null)) {
                    this.tablevProductAndDescription.InitVars();
                }
            }
            this.tablevProductModelCatalogDescription = ((vProductModelCatalogDescriptionDataTable)(base.Tables["vProductModelCatalogDescription"]));
            if ((initTable == true)) {
                if ((this.tablevProductModelCatalogDescription != null)) {
                    this.tablevProductModelCatalogDescription.InitVars();
                }
            }
            this.tablevProductModelInstructions = ((vProductModelInstructionsDataTable)(base.Tables["vProductModelInstructions"]));
            if ((initTable == true)) {
                if ((this.tablevProductModelInstructions != null)) {
                    this.tablevProductModelInstructions.InitVars();
                }
            }
            this.tablevVendor = ((vVendorDataTable)(base.Tables["vVendor"]));
            if ((initTable == true)) {
                if ((this.tablevVendor != null)) {
                    this.tablevVendor.InitVars();
                }
            }
            this.tablevIndividual = ((vIndividualDataTable)(base.Tables["vIndividual"]));
            if ((initTable == true)) {
                if ((this.tablevIndividual != null)) {
                    this.tablevIndividual.InitVars();
                }
            }
            this.tablevIndividualDemographics = ((vIndividualDemographicsDataTable)(base.Tables["vIndividualDemographics"]));
            if ((initTable == true)) {
                if ((this.tablevIndividualDemographics != null)) {
                    this.tablevIndividualDemographics.InitVars();
                }
            }
            this.tablevSalesPerson = ((vSalesPersonDataTable)(base.Tables["vSalesPerson"]));
            if ((initTable == true)) {
                if ((this.tablevSalesPerson != null)) {
                    this.tablevSalesPerson.InitVars();
                }
            }
            this.tablevSalesPersonSalesByFiscalYears = ((vSalesPersonSalesByFiscalYearsDataTable)(base.Tables["vSalesPersonSalesByFiscalYears"]));
            if ((initTable == true)) {
                if ((this.tablevSalesPersonSalesByFiscalYears != null)) {
                    this.tablevSalesPersonSalesByFiscalYears.InitVars();
                }
            }
            this.tablevStoreWithDemographics = ((vStoreWithDemographicsDataTable)(base.Tables["vStoreWithDemographics"]));
            if ((initTable == true)) {
                if ((this.tablevStoreWithDemographics != null)) {
                    this.tablevStoreWithDemographics.InitVars();
                }
            }
            this.tableuspGetBillOfMaterials = ((uspGetBillOfMaterialsDataTable)(base.Tables["uspGetBillOfMaterials"]));
            if ((initTable == true)) {
                if ((this.tableuspGetBillOfMaterials != null)) {
                    this.tableuspGetBillOfMaterials.InitVars();
                }
            }
            this.tableuspGetEmployeeManagers = ((uspGetEmployeeManagersDataTable)(base.Tables["uspGetEmployeeManagers"]));
            if ((initTable == true)) {
                if ((this.tableuspGetEmployeeManagers != null)) {
                    this.tableuspGetEmployeeManagers.InitVars();
                }
            }
            this.tableuspGetManagerEmployees = ((uspGetManagerEmployeesDataTable)(base.Tables["uspGetManagerEmployees"]));
            if ((initTable == true)) {
                if ((this.tableuspGetManagerEmployees != null)) {
                    this.tableuspGetManagerEmployees.InitVars();
                }
            }
            this.tableuspGetWhereUsedProductID = ((uspGetWhereUsedProductIDDataTable)(base.Tables["uspGetWhereUsedProductID"]));
            if ((initTable == true)) {
                if ((this.tableuspGetWhereUsedProductID != null)) {
                    this.tableuspGetWhereUsedProductID.InitVars();
                }
            }
            this.tableufnGetContactInformation = ((ufnGetContactInformationDataTable)(base.Tables["ufnGetContactInformation"]));
            if ((initTable == true)) {
                if ((this.tableufnGetContactInformation != null)) {
                    this.tableufnGetContactInformation.InitVars();
                }
            }
            this.relationFK_Employee_Contact_ContactID = this.Relations["FK_Employee_Contact_ContactID"];
            this.relationFK_Employee_Employee_ManagerID = this.Relations["FK_Employee_Employee_ManagerID"];
            this.relationFK_EmployeeAddress_Address_AddressID = this.Relations["FK_EmployeeAddress_Address_AddressID"];
            this.relationFK_EmployeeAddress_Employee_EmployeeID = this.Relations["FK_EmployeeAddress_Employee_EmployeeID"];
            this.relationFK_EmployeeDepartmentHistory_Department_DepartmentID = this.Relations["FK_EmployeeDepartmentHistory_Department_DepartmentID"];
            this.relationFK_EmployeeDepartmentHistory_Employee_EmployeeID = this.Relations["FK_EmployeeDepartmentHistory_Employee_EmployeeID"];
            this.relationFK_EmployeeDepartmentHistory_Shift_ShiftID = this.Relations["FK_EmployeeDepartmentHistory_Shift_ShiftID"];
            this.relationFK_EmployeePayHistory_Employee_EmployeeID = this.Relations["FK_EmployeePayHistory_Employee_EmployeeID"];
            this.relationFK_JobCandidate_Employee_EmployeeID = this.Relations["FK_JobCandidate_Employee_EmployeeID"];
            this.relationFK_Address_StateProvince_StateProvinceID = this.Relations["FK_Address_StateProvince_StateProvinceID"];
            this.relationFK_StateProvince_CountryRegion_CountryRegionCode = this.Relations["FK_StateProvince_CountryRegion_CountryRegionCode"];
            this.relationFK_StateProvince_SalesTerritory_TerritoryID = this.Relations["FK_StateProvince_SalesTerritory_TerritoryID"];
            this.relationFK_BillOfMaterials_Product_ComponentID = this.Relations["FK_BillOfMaterials_Product_ComponentID"];
            this.relationFK_BillOfMaterials_Product_ProductAssemblyID = this.Relations["FK_BillOfMaterials_Product_ProductAssemblyID"];
            this.relationFK_BillOfMaterials_UnitMeasure_UnitMeasureCode = this.Relations["FK_BillOfMaterials_UnitMeasure_UnitMeasureCode"];
            this.relationFK_Product_ProductModel_ProductModelID = this.Relations["FK_Product_ProductModel_ProductModelID"];
            this.relationFK_Product_ProductSubcategory_ProductSubcategoryID = this.Relations["FK_Product_ProductSubcategory_ProductSubcategoryID"];
            this.relationFK_Product_UnitMeasure_SizeUnitMeasureCode = this.Relations["FK_Product_UnitMeasure_SizeUnitMeasureCode"];
            this.relationFK_Product_UnitMeasure_WeightUnitMeasureCode = this.Relations["FK_Product_UnitMeasure_WeightUnitMeasureCode"];
            this.relationFK_ProductCostHistory_Product_ProductID = this.Relations["FK_ProductCostHistory_Product_ProductID"];
            this.relationFK_ProductDocument_Document_DocumentID = this.Relations["FK_ProductDocument_Document_DocumentID"];
            this.relationFK_ProductDocument_Product_ProductID = this.Relations["FK_ProductDocument_Product_ProductID"];
            this.relationFK_ProductInventory_Location_LocationID = this.Relations["FK_ProductInventory_Location_LocationID"];
            this.relationFK_ProductInventory_Product_ProductID = this.Relations["FK_ProductInventory_Product_ProductID"];
            this.relationFK_ProductListPriceHistory_Product_ProductID = this.Relations["FK_ProductListPriceHistory_Product_ProductID"];
            this.relationFK_ProductModelIllustration_Illustration_IllustrationID = this.Relations["FK_ProductModelIllustration_Illustration_IllustrationID"];
            this.relationFK_ProductModelIllustration_ProductModel_ProductModelID = this.Relations["FK_ProductModelIllustration_ProductModel_ProductModelID"];
            this.relationFK_ProductModelProductDescriptionCulture_Culture_CultureID = this.Relations["FK_ProductModelProductDescriptionCulture_Culture_CultureID"];
            this.relationFK_ProductModelProductDescriptionCulture_ProductDescription_ProductDescriptionID = this.Relations["FK_ProductModelProductDescriptionCulture_ProductDescription_ProductDescriptionID"];
            this.relationFK_ProductModelProductDescriptionCulture_ProductModel_ProductModelID = this.Relations["FK_ProductModelProductDescriptionCulture_ProductModel_ProductModelID"];
            this.relationFK_ProductProductPhoto_Product_ProductID = this.Relations["FK_ProductProductPhoto_Product_ProductID"];
            this.relationFK_ProductProductPhoto_ProductPhoto_ProductPhotoID = this.Relations["FK_ProductProductPhoto_ProductPhoto_ProductPhotoID"];
            this.relationFK_ProductReview_Product_ProductID = this.Relations["FK_ProductReview_Product_ProductID"];
            this.relationFK_ProductSubcategory_ProductCategory_ProductCategoryID = this.Relations["FK_ProductSubcategory_ProductCategory_ProductCategoryID"];
            this.relationFK_TransactionHistory_Product_ProductID = this.Relations["FK_TransactionHistory_Product_ProductID"];
            this.relationFK_WorkOrder_Product_ProductID = this.Relations["FK_WorkOrder_Product_ProductID"];
            this.relationFK_WorkOrder_ScrapReason_ScrapReasonID = this.Relations["FK_WorkOrder_ScrapReason_ScrapReasonID"];
            this.relationFK_WorkOrderRouting_Location_LocationID = this.Relations["FK_WorkOrderRouting_Location_LocationID"];
            this.relationFK_WorkOrderRouting_WorkOrder_WorkOrderID = this.Relations["FK_WorkOrderRouting_WorkOrder_WorkOrderID"];
            this.relationFK_ProductVendor_Product_ProductID = this.Relations["FK_ProductVendor_Product_ProductID"];
            this.relationFK_ProductVendor_UnitMeasure_UnitMeasureCode = this.Relations["FK_ProductVendor_UnitMeasure_UnitMeasureCode"];
            this.relationFK_ProductVendor_Vendor_VendorID = this.Relations["FK_ProductVendor_Vendor_VendorID"];
            this.relationFK_PurchaseOrderDetail_Product_ProductID = this.Relations["FK_PurchaseOrderDetail_Product_ProductID"];
            this.relationFK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID = this.Relations["FK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID"];
            this.relationFK_PurchaseOrderHeader_Employee_EmployeeID = this.Relations["FK_PurchaseOrderHeader_Employee_EmployeeID"];
            this.relationFK_PurchaseOrderHeader_ShipMethod_ShipMethodID = this.Relations["FK_PurchaseOrderHeader_ShipMethod_ShipMethodID"];
            this.relationFK_PurchaseOrderHeader_Vendor_VendorID = this.Relations["FK_PurchaseOrderHeader_Vendor_VendorID"];
            this.relationFK_VendorAddress_Address_AddressID = this.Relations["FK_VendorAddress_Address_AddressID"];
            this.relationFK_VendorAddress_AddressType_AddressTypeID = this.Relations["FK_VendorAddress_AddressType_AddressTypeID"];
            this.relationFK_VendorAddress_Vendor_VendorID = this.Relations["FK_VendorAddress_Vendor_VendorID"];
            this.relationFK_VendorContact_Contact_ContactID = this.Relations["FK_VendorContact_Contact_ContactID"];
            this.relationFK_VendorContact_ContactType_ContactTypeID = this.Relations["FK_VendorContact_ContactType_ContactTypeID"];
            this.relationFK_VendorContact_Vendor_VendorID = this.Relations["FK_VendorContact_Vendor_VendorID"];
            this.relationFK_ContactCreditCard_Contact_ContactID = this.Relations["FK_ContactCreditCard_Contact_ContactID"];
            this.relationFK_ContactCreditCard_CreditCard_CreditCardID = this.Relations["FK_ContactCreditCard_CreditCard_CreditCardID"];
            this.relationFK_CountryRegionCurrency_CountryRegion_CountryRegionCode = this.Relations["FK_CountryRegionCurrency_CountryRegion_CountryRegionCode"];
            this.relationFK_CountryRegionCurrency_Currency_CurrencyCode = this.Relations["FK_CountryRegionCurrency_Currency_CurrencyCode"];
            this.relationFK_CurrencyRate_Currency_FromCurrencyCode = this.Relations["FK_CurrencyRate_Currency_FromCurrencyCode"];
            this.relationFK_CurrencyRate_Currency_ToCurrencyCode = this.Relations["FK_CurrencyRate_Currency_ToCurrencyCode"];
            this.relationFK_Customer_SalesTerritory_TerritoryID = this.Relations["FK_Customer_SalesTerritory_TerritoryID"];
            this.relationFK_CustomerAddress_Address_AddressID = this.Relations["FK_CustomerAddress_Address_AddressID"];
            this.relationFK_CustomerAddress_AddressType_AddressTypeID = this.Relations["FK_CustomerAddress_AddressType_AddressTypeID"];
            this.relationFK_CustomerAddress_Customer_CustomerID = this.Relations["FK_CustomerAddress_Customer_CustomerID"];
            this.relationFK_Individual_Contact_ContactID = this.Relations["FK_Individual_Contact_ContactID"];
            this.relationFK_Individual_Customer_CustomerID = this.Relations["FK_Individual_Customer_CustomerID"];
            this.relationFK_SalesOrderDetail_SalesOrderHeader_SalesOrderID = this.Relations["FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID"];
            this.relationFK_SalesOrderDetail_SpecialOfferProduct_SpecialOfferIDProductID = this.Relations["FK_SalesOrderDetail_SpecialOfferProduct_SpecialOfferIDProductID"];
            this.relationFK_SalesOrderHeader_Address_BillToAddressID = this.Relations["FK_SalesOrderHeader_Address_BillToAddressID"];
            this.relationFK_SalesOrderHeader_Address_ShipToAddressID = this.Relations["FK_SalesOrderHeader_Address_ShipToAddressID"];
            this.relationFK_SalesOrderHeader_Contact_ContactID = this.Relations["FK_SalesOrderHeader_Contact_ContactID"];
            this.relationFK_SalesOrderHeader_CreditCard_CreditCardID = this.Relations["FK_SalesOrderHeader_CreditCard_CreditCardID"];
            this.relationFK_SalesOrderHeader_CurrencyRate_CurrencyRateID = this.Relations["FK_SalesOrderHeader_CurrencyRate_CurrencyRateID"];
            this.relationFK_SalesOrderHeader_Customer_CustomerID = this.Relations["FK_SalesOrderHeader_Customer_CustomerID"];
            this.relationFK_SalesOrderHeader_SalesPerson_SalesPersonID = this.Relations["FK_SalesOrderHeader_SalesPerson_SalesPersonID"];
            this.relationFK_SalesOrderHeader_SalesTerritory_TerritoryID = this.Relations["FK_SalesOrderHeader_SalesTerritory_TerritoryID"];
            this.relationFK_SalesOrderHeader_ShipMethod_ShipMethodID = this.Relations["FK_SalesOrderHeader_ShipMethod_ShipMethodID"];
            this.relationFK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderID = this.Relations["FK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderID"];
            this.relationFK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID = this.Relations["FK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID"];
            this.relationFK_SalesPerson_Employee_SalesPersonID = this.Relations["FK_SalesPerson_Employee_SalesPersonID"];
            this.relationFK_SalesPerson_SalesTerritory_TerritoryID = this.Relations["FK_SalesPerson_SalesTerritory_TerritoryID"];
            this.relationFK_SalesPersonQuotaHistory_SalesPerson_SalesPersonID = this.Relations["FK_SalesPersonQuotaHistory_SalesPerson_SalesPersonID"];
            this.relationFK_SalesTaxRate_StateProvince_StateProvinceID = this.Relations["FK_SalesTaxRate_StateProvince_StateProvinceID"];
            this.relationFK_SalesTerritoryHistory_SalesPerson_SalesPersonID = this.Relations["FK_SalesTerritoryHistory_SalesPerson_SalesPersonID"];
            this.relationFK_SalesTerritoryHistory_SalesTerritory_TerritoryID = this.Relations["FK_SalesTerritoryHistory_SalesTerritory_TerritoryID"];
            this.relationFK_ShoppingCartItem_Product_ProductID = this.Relations["FK_ShoppingCartItem_Product_ProductID"];
            this.relationFK_SpecialOfferProduct_Product_ProductID = this.Relations["FK_SpecialOfferProduct_Product_ProductID"];
            this.relationFK_SpecialOfferProduct_SpecialOffer_SpecialOfferID = this.Relations["FK_SpecialOfferProduct_SpecialOffer_SpecialOfferID"];
            this.relationFK_Store_Customer_CustomerID = this.Relations["FK_Store_Customer_CustomerID"];
            this.relationFK_Store_SalesPerson_SalesPersonID = this.Relations["FK_Store_SalesPerson_SalesPersonID"];
            this.relationFK_StoreContact_Contact_ContactID = this.Relations["FK_StoreContact_Contact_ContactID"];
            this.relationFK_StoreContact_ContactType_ContactTypeID = this.Relations["FK_StoreContact_ContactType_ContactTypeID"];
            this.relationFK_StoreContact_Store_CustomerID = this.Relations["FK_StoreContact_Store_CustomerID"];
        }
        
        private void InitClass() {
            this.DataSetName = "AdventureWorksDataSet";
            this.Prefix = "";
            this.Namespace = "http://tempuri.org/AdventureWorksDataSet.xsd";
            this.EnforceConstraints = true;
            this.tableAWBuildVersion = new AWBuildVersionDataTable();
            base.Tables.Add(this.tableAWBuildVersion);
            this.tableDatabaseLog = new DatabaseLogDataTable();
            base.Tables.Add(this.tableDatabaseLog);
            this.tableDepartment = new DepartmentDataTable();
            base.Tables.Add(this.tableDepartment);
            this.tableEmployee = new EmployeeDataTable();
            base.Tables.Add(this.tableEmployee);
            this.tableEmployeeAddress = new EmployeeAddressDataTable();
            base.Tables.Add(this.tableEmployeeAddress);
            this.tableEmployeeDepartmentHistory = new EmployeeDepartmentHistoryDataTable();
            base.Tables.Add(this.tableEmployeeDepartmentHistory);
            this.tableEmployeePayHistory = new EmployeePayHistoryDataTable();
            base.Tables.Add(this.tableEmployeePayHistory);
            this.tableJobCandidate = new JobCandidateDataTable();
            base.Tables.Add(this.tableJobCandidate);
            this.tableShift = new ShiftDataTable();
            base.Tables.Add(this.tableShift);
            this.tableAddress = new AddressDataTable();
            base.Tables.Add(this.tableAddress);
            this.tableAddressType = new AddressTypeDataTable();
            base.Tables.Add(this.tableAddressType);
            this.tableContact = new ContactDataTable();
            base.Tables.Add(this.tableContact);
            this.tableContactType = new ContactTypeDataTable();
            base.Tables.Add(this.tableContactType);
            this.tableCountryRegion = new CountryRegionDataTable();
            base.Tables.Add(this.tableCountryRegion);
            this.tableStateProvince = new StateProvinceDataTable();
            base.Tables.Add(this.tableStateProvince);
            this.tableBillOfMaterials = new BillOfMaterialsDataTable();
            base.Tables.Add(this.tableBillOfMaterials);
            this.tableCulture = new CultureDataTable();
            base.Tables.Add(this.tableCulture);
            this.tableDocument = new DocumentDataTable();
            base.Tables.Add(this.tableDocument);
            this.tableIllustration = new IllustrationDataTable();
            base.Tables.Add(this.tableIllustration);
            this.tableLocation = new LocationDataTable();
            base.Tables.Add(this.tableLocation);
            this.tableProduct = new ProductDataTable();
            base.Tables.Add(this.tableProduct);
            this.tableProductCategory = new ProductCategoryDataTable();
            base.Tables.Add(this.tableProductCategory);
            this.tableProductCostHistory = new ProductCostHistoryDataTable();
            base.Tables.Add(this.tableProductCostHistory);
            this.tableProductDescription = new ProductDescriptionDataTable();
            base.Tables.Add(this.tableProductDescription);
            this.tableProductDocument = new ProductDocumentDataTable();
            base.Tables.Add(this.tableProductDocument);
            this.tableProductInventory = new ProductInventoryDataTable();
            base.Tables.Add(this.tableProductInventory);
            this.tableProductListPriceHistory = new ProductListPriceHistoryDataTable();
            base.Tables.Add(this.tableProductListPriceHistory);
            this.tableProductModel = new ProductModelDataTable();
            base.Tables.Add(this.tableProductModel);
            this.tableProductModelIllustration = new ProductModelIllustrationDataTable();
            base.Tables.Add(this.tableProductModelIllustration);
            this.tableProductModelProductDescriptionCulture = new ProductModelProductDescriptionCultureDataTable();
            base.Tables.Add(this.tableProductModelProductDescriptionCulture);
            this.tableProductPhoto = new ProductPhotoDataTable();
            base.Tables.Add(this.tableProductPhoto);
            this.tableProductProductPhoto = new ProductProductPhotoDataTable();
            base.Tables.Add(this.tableProductProductPhoto);
            this.tableProductReview = new ProductReviewDataTable();
            base.Tables.Add(this.tableProductReview);
            this.tableProductSubcategory = new ProductSubcategoryDataTable();
            base.Tables.Add(this.tableProductSubcategory);
            this.tableScrapReason = new ScrapReasonDataTable();
            base.Tables.Add(this.tableScrapReason);
            this.tableTransactionHistory = new TransactionHistoryDataTable();
            base.Tables.Add(this.tableTransactionHistory);
            this.tableTransactionHistoryArchive = new TransactionHistoryArchiveDataTable();
            base.Tables.Add(this.tableTransactionHistoryArchive);
            this.tableUnitMeasure = new UnitMeasureDataTable();
            base.Tables.Add(this.tableUnitMeasure);
            this.tableWorkOrder = new WorkOrderDataTable();
            base.Tables.Add(this.tableWorkOrder);
            this.tableWorkOrderRouting = new WorkOrderRoutingDataTable();
            base.Tables.Add(this.tableWorkOrderRouting);
            this.tableProductVendor = new ProductVendorDataTable();
            base.Tables.Add(this.tableProductVendor);
            this.tablePurchaseOrderDetail = new PurchaseOrderDetailDataTable();
            base.Tables.Add(this.tablePurchaseOrderDetail);
            this.tablePurchaseOrderHeader = new PurchaseOrderHeaderDataTable();
            base.Tables.Add(this.tablePurchaseOrderHeader);
            this.tableShipMethod = new ShipMethodDataTable();
            base.Tables.Add(this.tableShipMethod);
            this.tableVendor = new VendorDataTable();
            base.Tables.Add(this.tableVendor);
            this.tableVendorAddress = new VendorAddressDataTable();
            base.Tables.Add(this.tableVendorAddress);
            this.tableVendorContact = new VendorContactDataTable();
            base.Tables.Add(this.tableVendorContact);
            this.tableContactCreditCard = new ContactCreditCardDataTable();
            base.Tables.Add(this.tableContactCreditCard);
            this.tableCountryRegionCurrency = new CountryRegionCurrencyDataTable();
            base.Tables.Add(this.tableCountryRegionCurrency);
            this.tableCreditCard = new CreditCardDataTable();
            base.Tables.Add(this.tableCreditCard);
            this.tableCurrency = new CurrencyDataTable();
            base.Tables.Add(this.tableCurrency);
            this.tableCurrencyRate = new CurrencyRateDataTable();
            base.Tables.Add(this.tableCurrencyRate);
            this.tableCustomer = new CustomerDataTable();
            base.Tables.Add(this.tableCustomer);
            this.tableCustomerAddress = new CustomerAddressDataTable();
            base.Tables.Add(this.tableCustomerAddress);
            this.tableIndividual = new IndividualDataTable();
            base.Tables.Add(this.tableIndividual);
            this.tableSalesOrderDetail = new SalesOrderDetailDataTable();
            base.Tables.Add(this.tableSalesOrderDetail);
            this.tableSalesOrderHeader = new SalesOrderHeaderDataTable();
            base.Tables.Add(this.tableSalesOrderHeader);
            this.tableSalesOrderHeaderSalesReason = new SalesOrderHeaderSalesReasonDataTable();
            base.Tables.Add(this.tableSalesOrderHeaderSalesReason);
            this.tableSalesPerson = new SalesPersonDataTable();
            base.Tables.Add(this.tableSalesPerson);
            this.tableSalesPersonQuotaHistory = new SalesPersonQuotaHistoryDataTable();
            base.Tables.Add(this.tableSalesPersonQuotaHistory);
            this.tableSalesReason = new SalesReasonDataTable();
            base.Tables.Add(this.tableSalesReason);
            this.tableSalesTaxRate = new SalesTaxRateDataTable();
            base.Tables.Add(this.tableSalesTaxRate);
            this.tableSalesTerritory = new SalesTerritoryDataTable();
            base.Tables.Add(this.tableSalesTerritory);
            this.tableSalesTerritoryHistory = new SalesTerritoryHistoryDataTable();
            base.Tables.Add(this.tableSalesTerritoryHistory);
            this.tableShoppingCartItem = new ShoppingCartItemDataTable();
            base.Tables.Add(this.tableShoppingCartItem);
            this.tableSpecialOffer = new SpecialOfferDataTable();
            base.Tables.Add(this.tableSpecialOffer);
            this.tableSpecialOfferProduct = new SpecialOfferProductDataTable();
            base.Tables.Add(this.tableSpecialOfferProduct);
            this.tableStore = new StoreDataTable();
            base.Tables.Add(this.tableStore);
            this.tableStoreContact = new StoreContactDataTable();
            base.Tables.Add(this.tableStoreContact);
            this.tablevEmployee = new vEmployeeDataTable();
            base.Tables.Add(this.tablevEmployee);
            this.tablevEmployeeDepartment = new vEmployeeDepartmentDataTable();
            base.Tables.Add(this.tablevEmployeeDepartment);
            this.tablevEmployeeDepartmentHistory = new vEmployeeDepartmentHistoryDataTable();
            base.Tables.Add(this.tablevEmployeeDepartmentHistory);
            this.tablevJobCandidate = new vJobCandidateDataTable();
            base.Tables.Add(this.tablevJobCandidate);
            this.tablevJobCandidateEducation = new vJobCandidateEducationDataTable();
            base.Tables.Add(this.tablevJobCandidateEducation);
            this.tablevJobCandidateEmployment = new vJobCandidateEmploymentDataTable();
            base.Tables.Add(this.tablevJobCandidateEmployment);
            this.tablevAdditionalContactInfo = new vAdditionalContactInfoDataTable();
            base.Tables.Add(this.tablevAdditionalContactInfo);
            this.tablevStateProvinceCountryRegion = new vStateProvinceCountryRegionDataTable();
            base.Tables.Add(this.tablevStateProvinceCountryRegion);
            this.tablevProductAndDescription = new vProductAndDescriptionDataTable();
            base.Tables.Add(this.tablevProductAndDescription);
            this.tablevProductModelCatalogDescription = new vProductModelCatalogDescriptionDataTable();
            base.Tables.Add(this.tablevProductModelCatalogDescription);
            this.tablevProductModelInstructions = new vProductModelInstructionsDataTable();
            base.Tables.Add(this.tablevProductModelInstructions);
            this.tablevVendor = new vVendorDataTable();
            base.Tables.Add(this.tablevVendor);
            this.tablevIndividual = new vIndividualDataTable();
            base.Tables.Add(this.tablevIndividual);
            this.tablevIndividualDemographics = new vIndividualDemographicsDataTable();
            base.Tables.Add(this.tablevIndividualDemographics);
            this.tablevSalesPerson = new vSalesPersonDataTable();
            base.Tables.Add(this.tablevSalesPerson);
            this.tablevSalesPersonSalesByFiscalYears = new vSalesPersonSalesByFiscalYearsDataTable();
            base.Tables.Add(this.tablevSalesPersonSalesByFiscalYears);
            this.tablevStoreWithDemographics = new vStoreWithDemographicsDataTable();
            base.Tables.Add(this.tablevStoreWithDemographics);
            this.tableuspGetBillOfMaterials = new uspGetBillOfMaterialsDataTable();
            base.Tables.Add(this.tableuspGetBillOfMaterials);
            this.tableuspGetEmployeeManagers = new uspGetEmployeeManagersDataTable();
            base.Tables.Add(this.tableuspGetEmployeeManagers);
            this.tableuspGetManagerEmployees = new uspGetManagerEmployeesDataTable();
            base.Tables.Add(this.tableuspGetManagerEmployees);
            this.tableuspGetWhereUsedProductID = new uspGetWhereUsedProductIDDataTable();
            base.Tables.Add(this.tableuspGetWhereUsedProductID);
            this.tableufnGetContactInformation = new ufnGetContactInformationDataTable();
            base.Tables.Add(this.tableufnGetContactInformation);
            this.relationFK_Employee_Contact_ContactID = new System.Data.DataRelation("FK_Employee_Contact_ContactID", new System.Data.DataColumn[] {
                        this.tableContact.ContactIDColumn}, new System.Data.DataColumn[] {
                        this.tableEmployee.ContactIDColumn}, false);
            this.Relations.Add(this.relationFK_Employee_Contact_ContactID);
            this.relationFK_Employee_Employee_ManagerID = new System.Data.DataRelation("FK_Employee_Employee_ManagerID", new System.Data.DataColumn[] {
                        this.tableEmployee.EmployeeIDColumn}, new System.Data.DataColumn[] {
                        this.tableEmployee.ManagerIDColumn}, false);
            this.Relations.Add(this.relationFK_Employee_Employee_ManagerID);
            this.relationFK_EmployeeAddress_Address_AddressID = new System.Data.DataRelation("FK_EmployeeAddress_Address_AddressID", new System.Data.DataColumn[] {
                        this.tableAddress.AddressIDColumn}, new System.Data.DataColumn[] {
                        this.tableEmployeeAddress.AddressIDColumn}, false);
            this.Relations.Add(this.relationFK_EmployeeAddress_Address_AddressID);
            this.relationFK_EmployeeAddress_Employee_EmployeeID = new System.Data.DataRelation("FK_EmployeeAddress_Employee_EmployeeID", new System.Data.DataColumn[] {
                        this.tableEmployee.EmployeeIDColumn}, new System.Data.DataColumn[] {
                        this.tableEmployeeAddress.EmployeeIDColumn}, false);
            this.Relations.Add(this.relationFK_EmployeeAddress_Employee_EmployeeID);
            this.relationFK_EmployeeDepartmentHistory_Department_DepartmentID = new System.Data.DataRelation("FK_EmployeeDepartmentHistory_Department_DepartmentID", new System.Data.DataColumn[] {
                        this.tableDepartment.DepartmentIDColumn}, new System.Data.DataColumn[] {
                        this.tableEmployeeDepartmentHistory.DepartmentIDColumn}, false);
            this.Relations.Add(this.relationFK_EmployeeDepartmentHistory_Department_DepartmentID);
            this.relationFK_EmployeeDepartmentHistory_Employee_EmployeeID = new System.Data.DataRelation("FK_EmployeeDepartmentHistory_Employee_EmployeeID", new System.Data.DataColumn[] {
                        this.tableEmployee.EmployeeIDColumn}, new System.Data.DataColumn[] {
                        this.tableEmployeeDepartmentHistory.EmployeeIDColumn}, false);
            this.Relations.Add(this.relationFK_EmployeeDepartmentHistory_Employee_EmployeeID);
            this.relationFK_EmployeeDepartmentHistory_Shift_ShiftID = new System.Data.DataRelation("FK_EmployeeDepartmentHistory_Shift_ShiftID", new System.Data.DataColumn[] {
                        this.tableShift.ShiftIDColumn}, new System.Data.DataColumn[] {
                        this.tableEmployeeDepartmentHistory.ShiftIDColumn}, false);
            this.Relations.Add(this.relationFK_EmployeeDepartmentHistory_Shift_ShiftID);
            this.relationFK_EmployeePayHistory_Employee_EmployeeID = new System.Data.DataRelation("FK_EmployeePayHistory_Employee_EmployeeID", new System.Data.DataColumn[] {
                        this.tableEmployee.EmployeeIDColumn}, new System.Data.DataColumn[] {
                        this.tableEmployeePayHistory.EmployeeIDColumn}, false);
            this.Relations.Add(this.relationFK_EmployeePayHistory_Employee_EmployeeID);
            this.relationFK_JobCandidate_Employee_EmployeeID = new System.Data.DataRelation("FK_JobCandidate_Employee_EmployeeID", new System.Data.DataColumn[] {
                        this.tableEmployee.EmployeeIDColumn}, new System.Data.DataColumn[] {
                        this.tableJobCandidate.EmployeeIDColumn}, false);
            this.Relations.Add(this.relationFK_JobCandidate_Employee_EmployeeID);
            this.relationFK_Address_StateProvince_StateProvinceID = new System.Data.DataRelation("FK_Address_StateProvince_StateProvinceID", new System.Data.DataColumn[] {
                        this.tableStateProvince.StateProvinceIDColumn}, new System.Data.DataColumn[] {
                        this.tableAddress.StateProvinceIDColumn}, false);
            this.Relations.Add(this.relationFK_Address_StateProvince_StateProvinceID);
            this.relationFK_StateProvince_CountryRegion_CountryRegionCode = new System.Data.DataRelation("FK_StateProvince_CountryRegion_CountryRegionCode", new System.Data.DataColumn[] {
                        this.tableCountryRegion.CountryRegionCodeColumn}, new System.Data.DataColumn[] {
                        this.tableStateProvince.CountryRegionCodeColumn}, false);
            this.Relations.Add(this.relationFK_StateProvince_CountryRegion_CountryRegionCode);
            this.relationFK_StateProvince_SalesTerritory_TerritoryID = new System.Data.DataRelation("FK_StateProvince_SalesTerritory_TerritoryID", new System.Data.DataColumn[] {
                        this.tableSalesTerritory.TerritoryIDColumn}, new System.Data.DataColumn[] {
                        this.tableStateProvince.TerritoryIDColumn}, false);
            this.Relations.Add(this.relationFK_StateProvince_SalesTerritory_TerritoryID);
            this.relationFK_BillOfMaterials_Product_ComponentID = new System.Data.DataRelation("FK_BillOfMaterials_Product_ComponentID", new System.Data.DataColumn[] {
                        this.tableProduct.ProductIDColumn}, new System.Data.DataColumn[] {
                        this.tableBillOfMaterials.ComponentIDColumn}, false);
            this.Relations.Add(this.relationFK_BillOfMaterials_Product_ComponentID);
            this.relationFK_BillOfMaterials_Product_ProductAssemblyID = new System.Data.DataRelation("FK_BillOfMaterials_Product_ProductAssemblyID", new System.Data.DataColumn[] {
                        this.tableProduct.ProductIDColumn}, new System.Data.DataColumn[] {
                        this.tableBillOfMaterials.ProductAssemblyIDColumn}, false);
            this.Relations.Add(this.relationFK_BillOfMaterials_Product_ProductAssemblyID);
            this.relationFK_BillOfMaterials_UnitMeasure_UnitMeasureCode = new System.Data.DataRelation("FK_BillOfMaterials_UnitMeasure_UnitMeasureCode", new System.Data.DataColumn[] {
                        this.tableUnitMeasure.UnitMeasureCodeColumn}, new System.Data.DataColumn[] {
                        this.tableBillOfMaterials.UnitMeasureCodeColumn}, false);
            this.Relations.Add(this.relationFK_BillOfMaterials_UnitMeasure_UnitMeasureCode);
            this.relationFK_Product_ProductModel_ProductModelID = new System.Data.DataRelation("FK_Product_ProductModel_ProductModelID", new System.Data.DataColumn[] {
                        this.tableProductModel.ProductModelIDColumn}, new System.Data.DataColumn[] {
                        this.tableProduct.ProductModelIDColumn}, false);
            this.Relations.Add(this.relationFK_Product_ProductModel_ProductModelID);
            this.relationFK_Product_ProductSubcategory_ProductSubcategoryID = new System.Data.DataRelation("FK_Product_ProductSubcategory_ProductSubcategoryID", new System.Data.DataColumn[] {
                        this.tableProductSubcategory.ProductSubcategoryIDColumn}, new System.Data.DataColumn[] {
                        this.tableProduct.ProductSubcategoryIDColumn}, false);
            this.Relations.Add(this.relationFK_Product_ProductSubcategory_ProductSubcategoryID);
            this.relationFK_Product_UnitMeasure_SizeUnitMeasureCode = new System.Data.DataRelation("FK_Product_UnitMeasure_SizeUnitMeasureCode", new System.Data.DataColumn[] {
                        this.tableUnitMeasure.UnitMeasureCodeColumn}, new System.Data.DataColumn[] {
                        this.tableProduct.SizeUnitMeasureCodeColumn}, false);
            this.Relations.Add(this.relationFK_Product_UnitMeasure_SizeUnitMeasureCode);
            this.relationFK_Product_UnitMeasure_WeightUnitMeasureCode = new System.Data.DataRelation("FK_Product_UnitMeasure_WeightUnitMeasureCode", new System.Data.DataColumn[] {
                        this.tableUnitMeasure.UnitMeasureCodeColumn}, new System.Data.DataColumn[] {
                        this.tableProduct.WeightUnitMeasureCodeColumn}, false);
            this.Relations.Add(this.relationFK_Product_UnitMeasure_WeightUnitMeasureCode);
            this.relationFK_ProductCostHistory_Product_ProductID = new System.Data.DataRelation("FK_ProductCostHistory_Product_ProductID", new System.Data.DataColumn[] {
                        this.tableProduct.ProductIDColumn}, new System.Data.DataColumn[] {
                        this.tableProductCostHistory.ProductIDColumn}, false);
            this.Relations.Add(this.relationFK_ProductCostHistory_Product_ProductID);
            this.relationFK_ProductDocument_Document_DocumentID = new System.Data.DataRelation("FK_ProductDocument_Document_DocumentID", new System.Data.DataColumn[] {
                        this.tableDocument.DocumentIDColumn}, new System.Data.DataColumn[] {
                        this.tableProductDocument.DocumentIDColumn}, false);
            this.Relations.Add(this.relationFK_ProductDocument_Document_DocumentID);
            this.relationFK_ProductDocument_Product_ProductID = new System.Data.DataRelation("FK_ProductDocument_Product_ProductID", new System.Data.DataColumn[] {
                        this.tableProduct.ProductIDColumn}, new System.Data.DataColumn[] {
                        this.tableProductDocument.ProductIDColumn}, false);
            this.Relations.Add(this.relationFK_ProductDocument_Product_ProductID);
            this.relationFK_ProductInventory_Location_LocationID = new System.Data.DataRelation("FK_ProductInventory_Location_LocationID", new System.Data.DataColumn[] {
                        this.tableLocation.LocationIDColumn}, new System.Data.DataColumn[] {
                        this.tableProductInventory.LocationIDColumn}, false);
            this.Relations.Add(this.relationFK_ProductInventory_Location_LocationID);
            this.relationFK_ProductInventory_Product_ProductID = new System.Data.DataRelation("FK_ProductInventory_Product_ProductID", new System.Data.DataColumn[] {
                        this.tableProduct.ProductIDColumn}, new System.Data.DataColumn[] {
                        this.tableProductInventory.ProductIDColumn}, false);
            this.Relations.Add(this.relationFK_ProductInventory_Product_ProductID);
            this.relationFK_ProductListPriceHistory_Product_ProductID = new System.Data.DataRelation("FK_ProductListPriceHistory_Product_ProductID", new System.Data.DataColumn[] {
                        this.tableProduct.ProductIDColumn}, new System.Data.DataColumn[] {
                        this.tableProductListPriceHistory.ProductIDColumn}, false);
            this.Relations.Add(this.relationFK_ProductListPriceHistory_Product_ProductID);
            this.relationFK_ProductModelIllustration_Illustration_IllustrationID = new System.Data.DataRelation("FK_ProductModelIllustration_Illustration_IllustrationID", new System.Data.DataColumn[] {
                        this.tableIllustration.IllustrationIDColumn}, new System.Data.DataColumn[] {
                        this.tableProductModelIllustration.IllustrationIDColumn}, false);
            this.Relations.Add(this.relationFK_ProductModelIllustration_Illustration_IllustrationID);
            this.relationFK_ProductModelIllustration_ProductModel_ProductModelID = new System.Data.DataRelation("FK_ProductModelIllustration_ProductModel_ProductModelID", new System.Data.DataColumn[] {
                        this.tableProductModel.ProductModelIDColumn}, new System.Data.DataColumn[] {
                        this.tableProductModelIllustration.ProductModelIDColumn}, false);
            this.Relations.Add(this.relationFK_ProductModelIllustration_ProductModel_ProductModelID);
            this.relationFK_ProductModelProductDescriptionCulture_Culture_CultureID = new System.Data.DataRelation("FK_ProductModelProductDescriptionCulture_Culture_CultureID", new System.Data.DataColumn[] {
                        this.tableCulture.CultureIDColumn}, new System.Data.DataColumn[] {
                        this.tableProductModelProductDescriptionCulture.CultureIDColumn}, false);
            this.Relations.Add(this.relationFK_ProductModelProductDescriptionCulture_Culture_CultureID);
            this.relationFK_ProductModelProductDescriptionCulture_ProductDescription_ProductDescriptionID = new System.Data.DataRelation("FK_ProductModelProductDescriptionCulture_ProductDescription_ProductDescriptionID", new System.Data.DataColumn[] {
                        this.tableProductDescription.ProductDescriptionIDColumn}, new System.Data.DataColumn[] {
                        this.tableProductModelProductDescriptionCulture.ProductDescriptionIDColumn}, false);
            this.Relations.Add(this.relationFK_ProductModelProductDescriptionCulture_ProductDescription_ProductDescriptionID);
            this.relationFK_ProductModelProductDescriptionCulture_ProductModel_ProductModelID = new System.Data.DataRelation("FK_ProductModelProductDescriptionCulture_ProductModel_ProductModelID", new System.Data.DataColumn[] {
                        this.tableProductModel.ProductModelIDColumn}, new System.Data.DataColumn[] {
                        this.tableProductModelProductDescriptionCulture.ProductModelIDColumn}, false);
            this.Relations.Add(this.relationFK_ProductModelProductDescriptionCulture_ProductModel_ProductModelID);
            this.relationFK_ProductProductPhoto_Product_ProductID = new System.Data.DataRelation("FK_ProductProductPhoto_Product_ProductID", new System.Data.DataColumn[] {
                        this.tableProduct.ProductIDColumn}, new System.Data.DataColumn[] {
                        this.tableProductProductPhoto.ProductIDColumn}, false);
            this.Relations.Add(this.relationFK_ProductProductPhoto_Product_ProductID);
            this.relationFK_ProductProductPhoto_ProductPhoto_ProductPhotoID = new System.Data.DataRelation("FK_ProductProductPhoto_ProductPhoto_ProductPhotoID", new System.Data.DataColumn[] {
                        this.tableProductPhoto.ProductPhotoIDColumn}, new System.Data.DataColumn[] {
                        this.tableProductProductPhoto.ProductPhotoIDColumn}, false);
            this.Relations.Add(this.relationFK_ProductProductPhoto_ProductPhoto_ProductPhotoID);
            this.relationFK_ProductReview_Product_ProductID = new System.Data.DataRelation("FK_ProductReview_Product_ProductID", new System.Data.DataColumn[] {
                        this.tableProduct.ProductIDColumn}, new System.Data.DataColumn[] {
                        this.tableProductReview.ProductIDColumn}, false);
            this.Relations.Add(this.relationFK_ProductReview_Product_ProductID);
            this.relationFK_ProductSubcategory_ProductCategory_ProductCategoryID = new System.Data.DataRelation("FK_ProductSubcategory_ProductCategory_ProductCategoryID", new System.Data.DataColumn[] {
                        this.tableProductCategory.ProductCategoryIDColumn}, new System.Data.DataColumn[] {
                        this.tableProductSubcategory.ProductCategoryIDColumn}, false);
            this.Relations.Add(this.relationFK_ProductSubcategory_ProductCategory_ProductCategoryID);
            this.relationFK_TransactionHistory_Product_ProductID = new System.Data.DataRelation("FK_TransactionHistory_Product_ProductID", new System.Data.DataColumn[] {
                        this.tableProduct.ProductIDColumn}, new System.Data.DataColumn[] {
                        this.tableTransactionHistory.ProductIDColumn}, false);
            this.Relations.Add(this.relationFK_TransactionHistory_Product_ProductID);
            this.relationFK_WorkOrder_Product_ProductID = new System.Data.DataRelation("FK_WorkOrder_Product_ProductID", new System.Data.DataColumn[] {
                        this.tableProduct.ProductIDColumn}, new System.Data.DataColumn[] {
                        this.tableWorkOrder.ProductIDColumn}, false);
            this.Relations.Add(this.relationFK_WorkOrder_Product_ProductID);
            this.relationFK_WorkOrder_ScrapReason_ScrapReasonID = new System.Data.DataRelation("FK_WorkOrder_ScrapReason_ScrapReasonID", new System.Data.DataColumn[] {
                        this.tableScrapReason.ScrapReasonIDColumn}, new System.Data.DataColumn[] {
                        this.tableWorkOrder.ScrapReasonIDColumn}, false);
            this.Relations.Add(this.relationFK_WorkOrder_ScrapReason_ScrapReasonID);
            this.relationFK_WorkOrderRouting_Location_LocationID = new System.Data.DataRelation("FK_WorkOrderRouting_Location_LocationID", new System.Data.DataColumn[] {
                        this.tableLocation.LocationIDColumn}, new System.Data.DataColumn[] {
                        this.tableWorkOrderRouting.LocationIDColumn}, false);
            this.Relations.Add(this.relationFK_WorkOrderRouting_Location_LocationID);
            this.relationFK_WorkOrderRouting_WorkOrder_WorkOrderID = new System.Data.DataRelation("FK_WorkOrderRouting_WorkOrder_WorkOrderID", new System.Data.DataColumn[] {
                        this.tableWorkOrder.WorkOrderIDColumn}, new System.Data.DataColumn[] {
                        this.tableWorkOrderRouting.WorkOrderIDColumn}, false);
            this.Relations.Add(this.relationFK_WorkOrderRouting_WorkOrder_WorkOrderID);
            this.relationFK_ProductVendor_Product_ProductID = new System.Data.DataRelation("FK_ProductVendor_Product_ProductID", new System.Data.DataColumn[] {
                        this.tableProduct.ProductIDColumn}, new System.Data.DataColumn[] {
                        this.tableProductVendor.ProductIDColumn}, false);
            this.Relations.Add(this.relationFK_ProductVendor_Product_ProductID);
            this.relationFK_ProductVendor_UnitMeasure_UnitMeasureCode = new System.Data.DataRelation("FK_ProductVendor_UnitMeasure_UnitMeasureCode", new System.Data.DataColumn[] {
                        this.tableUnitMeasure.UnitMeasureCodeColumn}, new System.Data.DataColumn[] {
                        this.tableProductVendor.UnitMeasureCodeColumn}, false);
            this.Relations.Add(this.relationFK_ProductVendor_UnitMeasure_UnitMeasureCode);
            this.relationFK_ProductVendor_Vendor_VendorID = new System.Data.DataRelation("FK_ProductVendor_Vendor_VendorID", new System.Data.DataColumn[] {
                        this.tableVendor.VendorIDColumn}, new System.Data.DataColumn[] {
                        this.tableProductVendor.VendorIDColumn}, false);
            this.Relations.Add(this.relationFK_ProductVendor_Vendor_VendorID);
            this.relationFK_PurchaseOrderDetail_Product_ProductID = new System.Data.DataRelation("FK_PurchaseOrderDetail_Product_ProductID", new System.Data.DataColumn[] {
                        this.tableProduct.ProductIDColumn}, new System.Data.DataColumn[] {
                        this.tablePurchaseOrderDetail.ProductIDColumn}, false);
            this.Relations.Add(this.relationFK_PurchaseOrderDetail_Product_ProductID);
            this.relationFK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID = new System.Data.DataRelation("FK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID", new System.Data.DataColumn[] {
                        this.tablePurchaseOrderHeader.PurchaseOrderIDColumn}, new System.Data.DataColumn[] {
                        this.tablePurchaseOrderDetail.PurchaseOrderIDColumn}, false);
            this.Relations.Add(this.relationFK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID);
            this.relationFK_PurchaseOrderHeader_Employee_EmployeeID = new System.Data.DataRelation("FK_PurchaseOrderHeader_Employee_EmployeeID", new System.Data.DataColumn[] {
                        this.tableEmployee.EmployeeIDColumn}, new System.Data.DataColumn[] {
                        this.tablePurchaseOrderHeader.EmployeeIDColumn}, false);
            this.Relations.Add(this.relationFK_PurchaseOrderHeader_Employee_EmployeeID);
            this.relationFK_PurchaseOrderHeader_ShipMethod_ShipMethodID = new System.Data.DataRelation("FK_PurchaseOrderHeader_ShipMethod_ShipMethodID", new System.Data.DataColumn[] {
                        this.tableShipMethod.ShipMethodIDColumn}, new System.Data.DataColumn[] {
                        this.tablePurchaseOrderHeader.ShipMethodIDColumn}, false);
            this.Relations.Add(this.relationFK_PurchaseOrderHeader_ShipMethod_ShipMethodID);
            this.relationFK_PurchaseOrderHeader_Vendor_VendorID = new System.Data.DataRelation("FK_PurchaseOrderHeader_Vendor_VendorID", new System.Data.DataColumn[] {
                        this.tableVendor.VendorIDColumn}, new System.Data.DataColumn[] {
                        this.tablePurchaseOrderHeader.VendorIDColumn}, false);
            this.Relations.Add(this.relationFK_PurchaseOrderHeader_Vendor_VendorID);
            this.relationFK_VendorAddress_Address_AddressID = new System.Data.DataRelation("FK_VendorAddress_Address_AddressID", new System.Data.DataColumn[] {
                        this.tableAddress.AddressIDColumn}, new System.Data.DataColumn[] {
                        this.tableVendorAddress.AddressIDColumn}, false);
            this.Relations.Add(this.relationFK_VendorAddress_Address_AddressID);
            this.relationFK_VendorAddress_AddressType_AddressTypeID = new System.Data.DataRelation("FK_VendorAddress_AddressType_AddressTypeID", new System.Data.DataColumn[] {
                        this.tableAddressType.AddressTypeIDColumn}, new System.Data.DataColumn[] {
                        this.tableVendorAddress.AddressTypeIDColumn}, false);
            this.Relations.Add(this.relationFK_VendorAddress_AddressType_AddressTypeID);
            this.relationFK_VendorAddress_Vendor_VendorID = new System.Data.DataRelation("FK_VendorAddress_Vendor_VendorID", new System.Data.DataColumn[] {
                        this.tableVendor.VendorIDColumn}, new System.Data.DataColumn[] {
                        this.tableVendorAddress.VendorIDColumn}, false);
            this.Relations.Add(this.relationFK_VendorAddress_Vendor_VendorID);
            this.relationFK_VendorContact_Contact_ContactID = new System.Data.DataRelation("FK_VendorContact_Contact_ContactID", new System.Data.DataColumn[] {
                        this.tableContact.ContactIDColumn}, new System.Data.DataColumn[] {
                        this.tableVendorContact.ContactIDColumn}, false);
            this.Relations.Add(this.relationFK_VendorContact_Contact_ContactID);
            this.relationFK_VendorContact_ContactType_ContactTypeID = new System.Data.DataRelation("FK_VendorContact_ContactType_ContactTypeID", new System.Data.DataColumn[] {
                        this.tableContactType.ContactTypeIDColumn}, new System.Data.DataColumn[] {
                        this.tableVendorContact.ContactTypeIDColumn}, false);
            this.Relations.Add(this.relationFK_VendorContact_ContactType_ContactTypeID);
            this.relationFK_VendorContact_Vendor_VendorID = new System.Data.DataRelation("FK_VendorContact_Vendor_VendorID", new System.Data.DataColumn[] {
                        this.tableVendor.VendorIDColumn}, new System.Data.DataColumn[] {
                        this.tableVendorContact.VendorIDColumn}, false);
            this.Relations.Add(this.relationFK_VendorContact_Vendor_VendorID);
            this.relationFK_ContactCreditCard_Contact_ContactID = new System.Data.DataRelation("FK_ContactCreditCard_Contact_ContactID", new System.Data.DataColumn[] {
                        this.tableContact.ContactIDColumn}, new System.Data.DataColumn[] {
                        this.tableContactCreditCard.ContactIDColumn}, false);
            this.Relations.Add(this.relationFK_ContactCreditCard_Contact_ContactID);
            this.relationFK_ContactCreditCard_CreditCard_CreditCardID = new System.Data.DataRelation("FK_ContactCreditCard_CreditCard_CreditCardID", new System.Data.DataColumn[] {
                        this.tableCreditCard.CreditCardIDColumn}, new System.Data.DataColumn[] {
                        this.tableContactCreditCard.CreditCardIDColumn}, false);
            this.Relations.Add(this.relationFK_ContactCreditCard_CreditCard_CreditCardID);
            this.relationFK_CountryRegionCurrency_CountryRegion_CountryRegionCode = new System.Data.DataRelation("FK_CountryRegionCurrency_CountryRegion_CountryRegionCode", new System.Data.DataColumn[] {
                        this.tableCountryRegion.CountryRegionCodeColumn}, new System.Data.DataColumn[] {
                        this.tableCountryRegionCurrency.CountryRegionCodeColumn}, false);
            this.Relations.Add(this.relationFK_CountryRegionCurrency_CountryRegion_CountryRegionCode);
            this.relationFK_CountryRegionCurrency_Currency_CurrencyCode = new System.Data.DataRelation("FK_CountryRegionCurrency_Currency_CurrencyCode", new System.Data.DataColumn[] {
                        this.tableCurrency.CurrencyCodeColumn}, new System.Data.DataColumn[] {
                        this.tableCountryRegionCurrency.CurrencyCodeColumn}, false);
            this.Relations.Add(this.relationFK_CountryRegionCurrency_Currency_CurrencyCode);
            this.relationFK_CurrencyRate_Currency_FromCurrencyCode = new System.Data.DataRelation("FK_CurrencyRate_Currency_FromCurrencyCode", new System.Data.DataColumn[] {
                        this.tableCurrency.CurrencyCodeColumn}, new System.Data.DataColumn[] {
                        this.tableCurrencyRate.FromCurrencyCodeColumn}, false);
            this.Relations.Add(this.relationFK_CurrencyRate_Currency_FromCurrencyCode);
            this.relationFK_CurrencyRate_Currency_ToCurrencyCode = new System.Data.DataRelation("FK_CurrencyRate_Currency_ToCurrencyCode", new System.Data.DataColumn[] {
                        this.tableCurrency.CurrencyCodeColumn}, new System.Data.DataColumn[] {
                        this.tableCurrencyRate.ToCurrencyCodeColumn}, false);
            this.Relations.Add(this.relationFK_CurrencyRate_Currency_ToCurrencyCode);
            this.relationFK_Customer_SalesTerritory_TerritoryID = new System.Data.DataRelation("FK_Customer_SalesTerritory_TerritoryID", new System.Data.DataColumn[] {
                        this.tableSalesTerritory.TerritoryIDColumn}, new System.Data.DataColumn[] {
                        this.tableCustomer.TerritoryIDColumn}, false);
            this.Relations.Add(this.relationFK_Customer_SalesTerritory_TerritoryID);
            this.relationFK_CustomerAddress_Address_AddressID = new System.Data.DataRelation("FK_CustomerAddress_Address_AddressID", new System.Data.DataColumn[] {
                        this.tableAddress.AddressIDColumn}, new System.Data.DataColumn[] {
                        this.tableCustomerAddress.AddressIDColumn}, false);
            this.Relations.Add(this.relationFK_CustomerAddress_Address_AddressID);
            this.relationFK_CustomerAddress_AddressType_AddressTypeID = new System.Data.DataRelation("FK_CustomerAddress_AddressType_AddressTypeID", new System.Data.DataColumn[] {
                        this.tableAddressType.AddressTypeIDColumn}, new System.Data.DataColumn[] {
                        this.tableCustomerAddress.AddressTypeIDColumn}, false);
            this.Relations.Add(this.relationFK_CustomerAddress_AddressType_AddressTypeID);
            this.relationFK_CustomerAddress_Customer_CustomerID = new System.Data.DataRelation("FK_CustomerAddress_Customer_CustomerID", new System.Data.DataColumn[] {
                        this.tableCustomer.CustomerIDColumn}, new System.Data.DataColumn[] {
                        this.tableCustomerAddress.CustomerIDColumn}, false);
            this.Relations.Add(this.relationFK_CustomerAddress_Customer_CustomerID);
            this.relationFK_Individual_Contact_ContactID = new System.Data.DataRelation("FK_Individual_Contact_ContactID", new System.Data.DataColumn[] {
                        this.tableContact.ContactIDColumn}, new System.Data.DataColumn[] {
                        this.tableIndividual.ContactIDColumn}, false);
            this.Relations.Add(this.relationFK_Individual_Contact_ContactID);
            this.relationFK_Individual_Customer_CustomerID = new System.Data.DataRelation("FK_Individual_Customer_CustomerID", new System.Data.DataColumn[] {
                        this.tableCustomer.CustomerIDColumn}, new System.Data.DataColumn[] {
                        this.tableIndividual.CustomerIDColumn}, false);
            this.Relations.Add(this.relationFK_Individual_Customer_CustomerID);
            this.relationFK_SalesOrderDetail_SalesOrderHeader_SalesOrderID = new System.Data.DataRelation("FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID", new System.Data.DataColumn[] {
                        this.tableSalesOrderHeader.SalesOrderIDColumn}, new System.Data.DataColumn[] {
                        this.tableSalesOrderDetail.SalesOrderIDColumn}, false);
            this.Relations.Add(this.relationFK_SalesOrderDetail_SalesOrderHeader_SalesOrderID);
            this.relationFK_SalesOrderDetail_SpecialOfferProduct_SpecialOfferIDProductID = new System.Data.DataRelation("FK_SalesOrderDetail_SpecialOfferProduct_SpecialOfferIDProductID", new System.Data.DataColumn[] {
                        this.tableSpecialOfferProduct.SpecialOfferIDColumn,
                        this.tableSpecialOfferProduct.ProductIDColumn}, new System.Data.DataColumn[] {
                        this.tableSalesOrderDetail.SpecialOfferIDColumn,
                        this.tableSalesOrderDetail.ProductIDColumn}, false);
            this.Relations.Add(this.relationFK_SalesOrderDetail_SpecialOfferProduct_SpecialOfferIDProductID);
            this.relationFK_SalesOrderHeader_Address_BillToAddressID = new System.Data.DataRelation("FK_SalesOrderHeader_Address_BillToAddressID", new System.Data.DataColumn[] {
                        this.tableAddress.AddressIDColumn}, new System.Data.DataColumn[] {
                        this.tableSalesOrderHeader.BillToAddressIDColumn}, false);
            this.Relations.Add(this.relationFK_SalesOrderHeader_Address_BillToAddressID);
            this.relationFK_SalesOrderHeader_Address_ShipToAddressID = new System.Data.DataRelation("FK_SalesOrderHeader_Address_ShipToAddressID", new System.Data.DataColumn[] {
                        this.tableAddress.AddressIDColumn}, new System.Data.DataColumn[] {
                        this.tableSalesOrderHeader.ShipToAddressIDColumn}, false);
            this.Relations.Add(this.relationFK_SalesOrderHeader_Address_ShipToAddressID);
            this.relationFK_SalesOrderHeader_Contact_ContactID = new System.Data.DataRelation("FK_SalesOrderHeader_Contact_ContactID", new System.Data.DataColumn[] {
                        this.tableContact.ContactIDColumn}, new System.Data.DataColumn[] {
                        this.tableSalesOrderHeader.ContactIDColumn}, false);
            this.Relations.Add(this.relationFK_SalesOrderHeader_Contact_ContactID);
            this.relationFK_SalesOrderHeader_CreditCard_CreditCardID = new System.Data.DataRelation("FK_SalesOrderHeader_CreditCard_CreditCardID", new System.Data.DataColumn[] {
                        this.tableCreditCard.CreditCardIDColumn}, new System.Data.DataColumn[] {
                        this.tableSalesOrderHeader.CreditCardIDColumn}, false);
            this.Relations.Add(this.relationFK_SalesOrderHeader_CreditCard_CreditCardID);
            this.relationFK_SalesOrderHeader_CurrencyRate_CurrencyRateID = new System.Data.DataRelation("FK_SalesOrderHeader_CurrencyRate_CurrencyRateID", new System.Data.DataColumn[] {
                        this.tableCurrencyRate.CurrencyRateIDColumn}, new System.Data.DataColumn[] {
                        this.tableSalesOrderHeader.CurrencyRateIDColumn}, false);
            this.Relations.Add(this.relationFK_SalesOrderHeader_CurrencyRate_CurrencyRateID);
            this.relationFK_SalesOrderHeader_Customer_CustomerID = new System.Data.DataRelation("FK_SalesOrderHeader_Customer_CustomerID", new System.Data.DataColumn[] {
                        this.tableCustomer.CustomerIDColumn}, new System.Data.DataColumn[] {
                        this.tableSalesOrderHeader.CustomerIDColumn}, false);
            this.Relations.Add(this.relationFK_SalesOrderHeader_Customer_CustomerID);
            this.relationFK_SalesOrderHeader_SalesPerson_SalesPersonID = new System.Data.DataRelation("FK_SalesOrderHeader_SalesPerson_SalesPersonID", new System.Data.DataColumn[] {
                        this.tableSalesPerson.SalesPersonIDColumn}, new System.Data.DataColumn[] {
                        this.tableSalesOrderHeader.SalesPersonIDColumn}, false);
            this.Relations.Add(this.relationFK_SalesOrderHeader_SalesPerson_SalesPersonID);
            this.relationFK_SalesOrderHeader_SalesTerritory_TerritoryID = new System.Data.DataRelation("FK_SalesOrderHeader_SalesTerritory_TerritoryID", new System.Data.DataColumn[] {
                        this.tableSalesTerritory.TerritoryIDColumn}, new System.Data.DataColumn[] {
                        this.tableSalesOrderHeader.TerritoryIDColumn}, false);
            this.Relations.Add(this.relationFK_SalesOrderHeader_SalesTerritory_TerritoryID);
            this.relationFK_SalesOrderHeader_ShipMethod_ShipMethodID = new System.Data.DataRelation("FK_SalesOrderHeader_ShipMethod_ShipMethodID", new System.Data.DataColumn[] {
                        this.tableShipMethod.ShipMethodIDColumn}, new System.Data.DataColumn[] {
                        this.tableSalesOrderHeader.ShipMethodIDColumn}, false);
            this.Relations.Add(this.relationFK_SalesOrderHeader_ShipMethod_ShipMethodID);
            this.relationFK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderID = new System.Data.DataRelation("FK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderID", new System.Data.DataColumn[] {
                        this.tableSalesOrderHeader.SalesOrderIDColumn}, new System.Data.DataColumn[] {
                        this.tableSalesOrderHeaderSalesReason.SalesOrderIDColumn}, false);
            this.Relations.Add(this.relationFK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderID);
            this.relationFK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID = new System.Data.DataRelation("FK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID", new System.Data.DataColumn[] {
                        this.tableSalesReason.SalesReasonIDColumn}, new System.Data.DataColumn[] {
                        this.tableSalesOrderHeaderSalesReason.SalesReasonIDColumn}, false);
            this.Relations.Add(this.relationFK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID);
            this.relationFK_SalesPerson_Employee_SalesPersonID = new System.Data.DataRelation("FK_SalesPerson_Employee_SalesPersonID", new System.Data.DataColumn[] {
                        this.tableEmployee.EmployeeIDColumn}, new System.Data.DataColumn[] {
                        this.tableSalesPerson.SalesPersonIDColumn}, false);
            this.Relations.Add(this.relationFK_SalesPerson_Employee_SalesPersonID);
            this.relationFK_SalesPerson_SalesTerritory_TerritoryID = new System.Data.DataRelation("FK_SalesPerson_SalesTerritory_TerritoryID", new System.Data.DataColumn[] {
                        this.tableSalesTerritory.TerritoryIDColumn}, new System.Data.DataColumn[] {
                        this.tableSalesPerson.TerritoryIDColumn}, false);
            this.Relations.Add(this.relationFK_SalesPerson_SalesTerritory_TerritoryID);
            this.relationFK_SalesPersonQuotaHistory_SalesPerson_SalesPersonID = new System.Data.DataRelation("FK_SalesPersonQuotaHistory_SalesPerson_SalesPersonID", new System.Data.DataColumn[] {
                        this.tableSalesPerson.SalesPersonIDColumn}, new System.Data.DataColumn[] {
                        this.tableSalesPersonQuotaHistory.SalesPersonIDColumn}, false);
            this.Relations.Add(this.relationFK_SalesPersonQuotaHistory_SalesPerson_SalesPersonID);
            this.relationFK_SalesTaxRate_StateProvince_StateProvinceID = new System.Data.DataRelation("FK_SalesTaxRate_StateProvince_StateProvinceID", new System.Data.DataColumn[] {
                        this.tableStateProvince.StateProvinceIDColumn}, new System.Data.DataColumn[] {
                        this.tableSalesTaxRate.StateProvinceIDColumn}, false);
            this.Relations.Add(this.relationFK_SalesTaxRate_StateProvince_StateProvinceID);
            this.relationFK_SalesTerritoryHistory_SalesPerson_SalesPersonID = new System.Data.DataRelation("FK_SalesTerritoryHistory_SalesPerson_SalesPersonID", new System.Data.DataColumn[] {
                        this.tableSalesPerson.SalesPersonIDColumn}, new System.Data.DataColumn[] {
                        this.tableSalesTerritoryHistory.SalesPersonIDColumn}, false);
            this.Relations.Add(this.relationFK_SalesTerritoryHistory_SalesPerson_SalesPersonID);
            this.relationFK_SalesTerritoryHistory_SalesTerritory_TerritoryID = new System.Data.DataRelation("FK_SalesTerritoryHistory_SalesTerritory_TerritoryID", new System.Data.DataColumn[] {
                        this.tableSalesTerritory.TerritoryIDColumn}, new System.Data.DataColumn[] {
                        this.tableSalesTerritoryHistory.TerritoryIDColumn}, false);
            this.Relations.Add(this.relationFK_SalesTerritoryHistory_SalesTerritory_TerritoryID);
            this.relationFK_ShoppingCartItem_Product_ProductID = new System.Data.DataRelation("FK_ShoppingCartItem_Product_ProductID", new System.Data.DataColumn[] {
                        this.tableProduct.ProductIDColumn}, new System.Data.DataColumn[] {
                        this.tableShoppingCartItem.ProductIDColumn}, false);
            this.Relations.Add(this.relationFK_ShoppingCartItem_Product_ProductID);
            this.relationFK_SpecialOfferProduct_Product_ProductID = new System.Data.DataRelation("FK_SpecialOfferProduct_Product_ProductID", new System.Data.DataColumn[] {
                        this.tableProduct.ProductIDColumn}, new System.Data.DataColumn[] {
                        this.tableSpecialOfferProduct.ProductIDColumn}, false);
            this.Relations.Add(this.relationFK_SpecialOfferProduct_Product_ProductID);
            this.relationFK_SpecialOfferProduct_SpecialOffer_SpecialOfferID = new System.Data.DataRelation("FK_SpecialOfferProduct_SpecialOffer_SpecialOfferID", new System.Data.DataColumn[] {
                        this.tableSpecialOffer.SpecialOfferIDColumn}, new System.Data.DataColumn[] {
                        this.tableSpecialOfferProduct.SpecialOfferIDColumn}, false);
            this.Relations.Add(this.relationFK_SpecialOfferProduct_SpecialOffer_SpecialOfferID);
            this.relationFK_Store_Customer_CustomerID = new System.Data.DataRelation("FK_Store_Customer_CustomerID", new System.Data.DataColumn[] {
                        this.tableCustomer.CustomerIDColumn}, new System.Data.DataColumn[] {
                        this.tableStore.CustomerIDColumn}, false);
            this.Relations.Add(this.relationFK_Store_Customer_CustomerID);
            this.relationFK_Store_SalesPerson_SalesPersonID = new System.Data.DataRelation("FK_Store_SalesPerson_SalesPersonID", new System.Data.DataColumn[] {
                        this.tableSalesPerson.SalesPersonIDColumn}, new System.Data.DataColumn[] {
                        this.tableStore.SalesPersonIDColumn}, false);
            this.Relations.Add(this.relationFK_Store_SalesPerson_SalesPersonID);
            this.relationFK_StoreContact_Contact_ContactID = new System.Data.DataRelation("FK_StoreContact_Contact_ContactID", new System.Data.DataColumn[] {
                        this.tableContact.ContactIDColumn}, new System.Data.DataColumn[] {
                        this.tableStoreContact.ContactIDColumn}, false);
            this.Relations.Add(this.relationFK_StoreContact_Contact_ContactID);
            this.relationFK_StoreContact_ContactType_ContactTypeID = new System.Data.DataRelation("FK_StoreContact_ContactType_ContactTypeID", new System.Data.DataColumn[] {
                        this.tableContactType.ContactTypeIDColumn}, new System.Data.DataColumn[] {
                        this.tableStoreContact.ContactTypeIDColumn}, false);
            this.Relations.Add(this.relationFK_StoreContact_ContactType_ContactTypeID);
            this.relationFK_StoreContact_Store_CustomerID = new System.Data.DataRelation("FK_StoreContact_Store_CustomerID", new System.Data.DataColumn[] {
                        this.tableStore.CustomerIDColumn}, new System.Data.DataColumn[] {
                        this.tableStoreContact.CustomerIDColumn}, false);
            this.Relations.Add(this.relationFK_StoreContact_Store_CustomerID);
        }
        
        private bool ShouldSerializeAWBuildVersion() {
            return false;
        }
        
        private bool ShouldSerializeDatabaseLog() {
            return false;
        }
        
        private bool ShouldSerializeDepartment() {
            return false;
        }
        
        private bool ShouldSerializeEmployee() {
            return false;
        }
        
        private bool ShouldSerializeEmployeeAddress() {
            return false;
        }
        
        private bool ShouldSerializeEmployeeDepartmentHistory() {
            return false;
        }
        
        private bool ShouldSerializeEmployeePayHistory() {
            return false;
        }
        
        private bool ShouldSerializeJobCandidate() {
            return false;
        }
        
        private bool ShouldSerializeShift() {
            return false;
        }
        
        private bool ShouldSerializeAddress() {
            return false;
        }
        
        private bool ShouldSerializeAddressType() {
            return false;
        }
        
        private bool ShouldSerializeContact() {
            return false;
        }
        
        private bool ShouldSerializeContactType() {
            return false;
        }
        
        private bool ShouldSerializeCountryRegion() {
            return false;
        }
        
        private bool ShouldSerializeStateProvince() {
            return false;
        }
        
        private bool ShouldSerializeBillOfMaterials() {
            return false;
        }
        
        private bool ShouldSerializeCulture() {
            return false;
        }
        
        private bool ShouldSerializeDocument() {
            return false;
        }
        
        private bool ShouldSerializeIllustration() {
            return false;
        }
        
        private bool ShouldSerializeLocation() {
            return false;
        }
        
        private bool ShouldSerializeProduct() {
            return false;
        }
        
        private bool ShouldSerializeProductCategory() {
            return false;
        }
        
        private bool ShouldSerializeProductCostHistory() {
            return false;
        }
        
        private bool ShouldSerializeProductDescription() {
            return false;
        }
        
        private bool ShouldSerializeProductDocument() {
            return false;
        }
        
        private bool ShouldSerializeProductInventory() {
            return false;
        }
        
        private bool ShouldSerializeProductListPriceHistory() {
            return false;
        }
        
        private bool ShouldSerializeProductModel() {
            return false;
        }
        
        private bool ShouldSerializeProductModelIllustration() {
            return false;
        }
        
        private bool ShouldSerializeProductModelProductDescriptionCulture() {
            return false;
        }
        
        private bool ShouldSerializeProductPhoto() {
            return false;
        }
        
        private bool ShouldSerializeProductProductPhoto() {
            return false;
        }
        
        private bool ShouldSerializeProductReview() {
            return false;
        }
        
        private bool ShouldSerializeProductSubcategory() {
            return false;
        }
        
        private bool ShouldSerializeScrapReason() {
            return false;
        }
        
        private bool ShouldSerializeTransactionHistory() {
            return false;
        }
        
        private bool ShouldSerializeTransactionHistoryArchive() {
            return false;
        }
        
        private bool ShouldSerializeUnitMeasure() {
            return false;
        }
        
        private bool ShouldSerializeWorkOrder() {
            return false;
        }
        
        private bool ShouldSerializeWorkOrderRouting() {
            return false;
        }
        
        private bool ShouldSerializeProductVendor() {
            return false;
        }
        
        private bool ShouldSerializePurchaseOrderDetail() {
            return false;
        }
        
        private bool ShouldSerializePurchaseOrderHeader() {
            return false;
        }
        
        private bool ShouldSerializeShipMethod() {
            return false;
        }
        
        private bool ShouldSerializeVendor() {
            return false;
        }
        
        private bool ShouldSerializeVendorAddress() {
            return false;
        }
        
        private bool ShouldSerializeVendorContact() {
            return false;
        }
        
        private bool ShouldSerializeContactCreditCard() {
            return false;
        }
        
        private bool ShouldSerializeCountryRegionCurrency() {
            return false;
        }
        
        private bool ShouldSerializeCreditCard() {
            return false;
        }
        
        private bool ShouldSerializeCurrency() {
            return false;
        }
        
        private bool ShouldSerializeCurrencyRate() {
            return false;
        }
        
        private bool ShouldSerializeCustomer() {
            return false;
        }
        
        private bool ShouldSerializeCustomerAddress() {
            return false;
        }
        
        private bool ShouldSerializeIndividual() {
            return false;
        }
        
        private bool ShouldSerializeSalesOrderDetail() {
            return false;
        }
        
        private bool ShouldSerializeSalesOrderHeader() {
            return false;
        }
        
        private bool ShouldSerializeSalesOrderHeaderSalesReason() {
            return false;
        }
        
        private bool ShouldSerializeSalesPerson() {
            return false;
        }
        
        private bool ShouldSerializeSalesPersonQuotaHistory() {
            return false;
        }
        
        private bool ShouldSerializeSalesReason() {
            return false;
        }
        
        private bool ShouldSerializeSalesTaxRate() {
            return false;
        }
        
        private bool ShouldSerializeSalesTerritory() {
            return false;
        }
        
        private bool ShouldSerializeSalesTerritoryHistory() {
            return false;
        }
        
        private bool ShouldSerializeShoppingCartItem() {
            return false;
        }
        
        private bool ShouldSerializeSpecialOffer() {
            return false;
        }
        
        private bool ShouldSerializeSpecialOfferProduct() {
            return false;
        }
        
        private bool ShouldSerializeStore() {
            return false;
        }
        
        private bool ShouldSerializeStoreContact() {
            return false;
        }
        
        private bool ShouldSerializevEmployee() {
            return false;
        }
        
        private bool ShouldSerializevEmployeeDepartment() {
            return false;
        }
        
        private bool ShouldSerializevEmployeeDepartmentHistory() {
            return false;
        }
        
        private bool ShouldSerializevJobCandidate() {
            return false;
        }
        
        private bool ShouldSerializevJobCandidateEducation() {
            return false;
        }
        
        private bool ShouldSerializevJobCandidateEmployment() {
            return false;
        }
        
        private bool ShouldSerializevAdditionalContactInfo() {
            return false;
        }
        
        private bool ShouldSerializevStateProvinceCountryRegion() {
            return false;
        }
        
        private bool ShouldSerializevProductAndDescription() {
            return false;
        }
        
        private bool ShouldSerializevProductModelCatalogDescription() {
            return false;
        }
        
        private bool ShouldSerializevProductModelInstructions() {
            return false;
        }
        
        private bool ShouldSerializevVendor() {
            return false;
        }
        
        private bool ShouldSerializevIndividual() {
            return false;
        }
        
        private bool ShouldSerializevIndividualDemographics() {
            return false;
        }
        
        private bool ShouldSerializevSalesPerson() {
            return false;
        }
        
        private bool ShouldSerializevSalesPersonSalesByFiscalYears() {
            return false;
        }
        
        private bool ShouldSerializevStoreWithDemographics() {
            return false;
        }
        
        private bool ShouldSerializeuspGetBillOfMaterials() {
            return false;
        }
        
        private bool ShouldSerializeuspGetEmployeeManagers() {
            return false;
        }
        
        private bool ShouldSerializeuspGetManagerEmployees() {
            return false;
        }
        
        private bool ShouldSerializeuspGetWhereUsedProductID() {
            return false;
        }
        
        private bool ShouldSerializeufnGetContactInformation() {
            return false;
        }
        
        private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
            if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
                this.InitVars();
            }
        }
        
        public static System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(System.Xml.Schema.XmlSchemaSet xs) {
            AdventureWorksDataSet ds = new AdventureWorksDataSet();
            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 AWBuildVersionRowChangeEventHandler(object sender, AWBuildVersionRowChangeEvent e);
        
        public delegate void DatabaseLogRowChangeEventHandler(object sender, DatabaseLogRowChangeEvent e);
        
        public delegate void DepartmentRowChangeEventHandler(object sender, DepartmentRowChangeEvent e);
        
        public delegate void EmployeeRowChangeEventHandler(object sender, EmployeeRowChangeEvent e);
        
        public delegate void EmployeeAddressRowChangeEventHandler(object sender, EmployeeAddressRowChangeEvent e);
        
        public delegate void EmployeeDepartmentHistoryRowChangeEventHandler(object sender, EmployeeDepartmentHistoryRowChangeEvent e);
        
        public delegate void EmployeePayHistoryRowChangeEventHandler(object sender, EmployeePayHistoryRowChangeEvent e);
        
        public delegate void JobCandidateRowChangeEventHandler(object sender, JobCandidateRowChangeEvent e);
        
        public delegate void ShiftRowChangeEventHandler(object sender, ShiftRowChangeEvent e);
        
        public delegate void AddressRowChangeEventHandler(object sender, AddressRowChangeEvent e);
        
        public delegate void AddressTypeRowChangeEventHandler(object sender, AddressTypeRowChangeEvent e);
        
        public delegate void ContactRowChangeEventHandler(object sender, ContactRowChangeEvent e);
        
        public delegate void ContactTypeRowChangeEventHandler(object sender, ContactTypeRowChangeEvent e);
        
        public delegate void CountryRegionRowChangeEventHandler(object sender, CountryRegionRowChangeEvent e);
        
        public delegate void StateProvinceRowChangeEventHandler(object sender, StateProvinceRowChangeEvent e);
        
        public delegate void BillOfMaterialsRowChangeEventHandler(object sender, BillOfMaterialsRowChangeEvent e);
        
        public delegate void CultureRowChangeEventHandler(object sender, CultureRowChangeEvent e);
        
        public delegate void DocumentRowChangeEventHandler(object sender, DocumentRowChangeEvent e);
        
        public delegate void IllustrationRowChangeEventHandler(object sender, IllustrationRowChangeEvent e);
        
        public delegate void LocationRowChangeEventHandler(object sender, LocationRowChangeEvent e);
        
        public delegate void ProductRowChangeEventHandler(object sender, ProductRowChangeEvent e);
        
        public delegate void ProductCategoryRowChangeEventHandler(object sender, ProductCategoryRowChangeEvent e);
        
        public delegate void ProductCostHistoryRowChangeEventHandler(object sender, ProductCostHistoryRowChangeEvent e);
        
        public delegate void ProductDescriptionRowChangeEventHandler(object sender, ProductDescriptionRowChangeEvent e);
        
        public delegate void ProductDocumentRowChangeEventHandler(object sender, ProductDocumentRowChangeEvent e);
        
        public delegate void ProductInventoryRowChangeEventHandler(object sender, ProductInventoryRowChangeEvent e);
        
        public delegate void ProductListPriceHistoryRowChangeEventHandler(object sender, ProductListPriceHistoryRowChangeEvent e);
        
        public delegate void ProductModelRowChangeEventHandler(object sender, ProductModelRowChangeEvent e);
        
        public delegate void ProductModelIllustrationRowChangeEventHandler(object sender, ProductModelIllustrationRowChangeEvent e);
        
        public delegate void ProductModelProductDescriptionCultureRowChangeEventHandler(object sender, ProductModelProductDescriptionCultureRowChangeEvent e);
        
        public delegate void ProductPhotoRowChangeEventHandler(object sender, ProductPhotoRowChangeEvent e);
        
        public delegate void ProductProductPhotoRowChangeEventHandler(object sender, ProductProductPhotoRowChangeEvent e);
        
        public delegate void ProductReviewRowChangeEventHandler(object sender, ProductReviewRowChangeEvent e);
        
        public delegate void ProductSubcategoryRowChangeEventHandler(object sender, ProductSubcategoryRowChangeEvent e);
        
        public delegate void ScrapReasonRowChangeEventHandler(object sender, ScrapReasonRowChangeEvent e);
        
        public delegate void TransactionHistoryRowChangeEventHandler(object sender, TransactionHistoryRowChangeEvent e);
        
        public delegate void TransactionHistoryArchiveRowChangeEventHandler(object sender, TransactionHistoryArchiveRowChangeEvent e);
        
        public delegate void UnitMeasureRowChangeEventHandler(object sender, UnitMeasureRowChangeEvent e);
        
        public delegate void WorkOrderRowChangeEventHandler(object sender, WorkOrderRowChangeEvent e);
        
        public delegate void WorkOrderRoutingRowChangeEventHandler(object sender, WorkOrderRoutingRowChangeEvent e);
        
        public delegate void ProductVendorRowChangeEventHandler(object sender, ProductVendorRowChangeEvent e);
        
        public delegate void PurchaseOrderDetailRowChangeEventHandler(object sender, PurchaseOrderDetailRowChangeEvent e);
        
        public delegate void PurchaseOrderHeaderRowChangeEventHandler(object sender, PurchaseOrderHeaderRowChangeEvent e);
        
        public delegate void ShipMethodRowChangeEventHandler(object sender, ShipMethodRowChangeEvent e);
        
        public delegate void VendorRowChangeEventHandler(object sender, VendorRowChangeEvent e);
        
        public delegate void VendorAddressRowChangeEventHandler(object sender, VendorAddressRowChangeEvent e);
        
        public delegate void VendorContactRowChangeEventHandler(object sender, VendorContactRowChangeEvent e);
        
        public delegate void ContactCreditCardRowChangeEventHandler(object sender, ContactCreditCardRowChangeEvent e);
        
        public delegate void CountryRegionCurrencyRowChangeEventHandler(object sender, CountryRegionCurrencyRowChangeEvent e);
        
        public delegate void CreditCardRowChangeEventHandler(object sender, CreditCardRowChangeEvent e);
        
        public delegate void CurrencyRowChangeEventHandler(object sender, CurrencyRowChangeEvent e);
        
        public delegate void CurrencyRateRowChangeEventHandler(object sender, CurrencyRateRowChangeEvent e);
        
        public delegate void CustomerRowChangeEventHandler(object sender, CustomerRowChangeEvent e);
        
        public delegate void CustomerAddressRowChangeEventHandler(object sender, CustomerAddressRowChangeEvent e);
        
        public delegate void IndividualRowChangeEventHandler(object sender, IndividualRowChangeEvent e);
        
        public delegate void SalesOrderDetailRowChangeEventHandler(object sender, SalesOrderDetailRowChangeEvent e);
        
        public delegate void SalesOrderHeaderRowChangeEventHandler(object sender, SalesOrderHeaderRowChangeEvent e);
        
        public delegate void SalesOrderHeaderSalesReasonRowChangeEventHandler(object sender, SalesOrderHeaderSalesReasonRowChangeEvent e);
        
        public delegate void SalesPersonRowChangeEventHandler(object sender, SalesPersonRowChangeEvent e);
        
        public delegate void SalesPersonQuotaHistoryRowChangeEventHandler(object sender, SalesPersonQuotaHistoryRowChangeEvent e);
        
        public delegate void SalesReasonRowChangeEventHandler(object sender, SalesReasonRowChangeEvent e);
        
        public delegate void SalesTaxRateRowChangeEventHandler(object sender, SalesTaxRateRowChangeEvent e);
        
        public delegate void SalesTerritoryRowChangeEventHandler(object sender, SalesTerritoryRowChangeEvent e);
        
        public delegate void SalesTerritoryHistoryRowChangeEventHandler(object sender, SalesTerritoryHistoryRowChangeEvent e);
        
        public delegate void ShoppingCartItemRowChangeEventHandler(object sender, ShoppingCartItemRowChangeEvent e);
        
        public delegate void SpecialOfferRowChangeEventHandler(object sender, SpecialOfferRowChangeEvent e);
        
        public delegate void SpecialOfferProductRowChangeEventHandler(object sender, SpecialOfferProductRowChangeEvent e);
        
        public delegate void StoreRowChangeEventHandler(object sender, StoreRowChangeEvent e);
        
        public delegate void StoreContactRowChangeEventHandler(object sender, StoreContactRowChangeEvent e);
        
        public delegate void vEmployeeRowChangeEventHandler(object sender, vEmployeeRowChangeEvent e);
        
        public delegate void vEmployeeDepartmentRowChangeEventHandler(object sender, vEmployeeDepartmentRowChangeEvent e);
        
        public delegate void vEmployeeDepartmentHistoryRowChangeEventHandler(object sender, vEmployeeDepartmentHistoryRowChangeEvent e);
        
        public delegate void vJobCandidateRowChangeEventHandler(object sender, vJobCandidateRowChangeEvent e);
        
        public delegate void vJobCandidateEducationRowChangeEventHandler(object sender, vJobCandidateEducationRowChangeEvent e);
        
        public delegate void vJobCandidateEmploymentRowChangeEventHandler(object sender, vJobCandidateEmploymentRowChangeEvent e);
        
        public delegate void vAdditionalContactInfoRowChangeEventHandler(object sender, vAdditionalContactInfoRowChangeEvent e);
        
        public delegate void vStateProvinceCountryRegionRowChangeEventHandler(object sender, vStateProvinceCountryRegionRowChangeEvent e);
        
        public delegate void vProductAndDescriptionRowChangeEventHandler(object sender, vProductAndDescriptionRowChangeEvent e);
        
        public delegate void vProductModelCatalogDescriptionRowChangeEventHandler(object sender, vProductModelCatalogDescriptionRowChangeEvent e);
        
        public delegate void vProductModelInstructionsRowChangeEventHandler(object sender, vProductModelInstructionsRowChangeEvent e);
        
        public delegate void vVendorRowChangeEventHandler(object sender, vVendorRowChangeEvent e);
        
        public delegate void vIndividualRowChangeEventHandler(object sender, vIndividualRowChangeEvent e);
        
        public delegate void vIndividualDemographicsRowChangeEventHandler(object sender, vIndividualDemographicsRowChangeEvent e);
        
        public delegate void vSalesPersonRowChangeEventHandler(object sender, vSalesPersonRowChangeEvent e);
        
        public delegate void vSalesPersonSalesByFiscalYearsRowChangeEventHandler(object sender, vSalesPersonSalesByFiscalYearsRowChangeEvent e);
        
        public delegate void vStoreWithDemographicsRowChangeEventHandler(object sender, vStoreWithDemographicsRowChangeEvent e);
        
        public delegate void uspGetBillOfMaterialsRowChangeEventHandler(object sender, uspGetBillOfMaterialsRowChangeEvent e);
        
        public delegate void uspGetEmployeeManagersRowChangeEventHandler(object sender, uspGetEmployeeManagersRowChangeEvent e);
        
        public delegate void uspGetManagerEmployeesRowChangeEventHandler(object sender, uspGetManagerEmployeesRowChangeEvent e);
        
        public delegate void uspGetWhereUsedProductIDRowChangeEventHandler(object sender, uspGetWhereUsedProductIDRowChangeEvent e);
        
        public delegate void ufnGetContactInformationRowChangeEventHandler(object sender, ufnGetContactInformationRowChangeEvent e);
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class AWBuildVersionDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnSystemInformationID;
            
            private System.Data.DataColumn columnDatabase_Version;
            
            private System.Data.DataColumn columnVersionDate;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public AWBuildVersionDataTable() {
                this.TableName = "AWBuildVersion";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal AWBuildVersionDataTable(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;
            }
            
            protected AWBuildVersionDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn SystemInformationIDColumn {
                get {
                    return this.columnSystemInformationID;
                }
            }
            
            public System.Data.DataColumn Database_VersionColumn {
                get {
                    return this.columnDatabase_Version;
                }
            }
            
            public System.Data.DataColumn VersionDateColumn {
                get {
                    return this.columnVersionDate;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public AWBuildVersionRow this[int index] {
                get {
                    return ((AWBuildVersionRow)(this.Rows[index]));
                }
            }
            
            public event AWBuildVersionRowChangeEventHandler AWBuildVersionRowChanged;
            
            public event AWBuildVersionRowChangeEventHandler AWBuildVersionRowChanging;
            
            public event AWBuildVersionRowChangeEventHandler AWBuildVersionRowDeleted;
            
            public event AWBuildVersionRowChangeEventHandler AWBuildVersionRowDeleting;
            
            public void AddAWBuildVersionRow(AWBuildVersionRow row) {
                this.Rows.Add(row);
            }
            
            public AWBuildVersionRow AddAWBuildVersionRow(byte SystemInformationID, string Database_Version, System.DateTime VersionDate, System.DateTime ModifiedDate) {
                AWBuildVersionRow rowAWBuildVersionRow = ((AWBuildVersionRow)(this.NewRow()));
                rowAWBuildVersionRow.ItemArray = new object[] {
                        SystemInformationID,
                        Database_Version,
                        VersionDate,
                        ModifiedDate};
                this.Rows.Add(rowAWBuildVersionRow);
                return rowAWBuildVersionRow;
            }
            
            public AWBuildVersionRow FindBySystemInformationID(byte SystemInformationID) {
                return ((AWBuildVersionRow)(this.Rows.Find(new object[] {
                            SystemInformationID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                AWBuildVersionDataTable cln = ((AWBuildVersionDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new AWBuildVersionDataTable();
            }
            
            internal void InitVars() {
                this.columnSystemInformationID = base.Columns["SystemInformationID"];
                this.columnDatabase_Version = base.Columns["Database Version"];
                this.columnVersionDate = base.Columns["VersionDate"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnSystemInformationID = new System.Data.DataColumn("SystemInformationID", typeof(byte), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSystemInformationID);
                this.columnDatabase_Version = new System.Data.DataColumn("Database Version", typeof(string), null, System.Data.MappingType.Element);
                this.columnDatabase_Version.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "Database_Version");
                this.columnDatabase_Version.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "Database_VersionColumn");
                this.columnDatabase_Version.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "columnDatabase_Version");
                this.columnDatabase_Version.ExtendedProperties.Add("Generator_UserColumnName", "Database Version");
                base.Columns.Add(this.columnDatabase_Version);
                this.columnVersionDate = new System.Data.DataColumn("VersionDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnVersionDate);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnSystemInformationID}, true));
                this.columnSystemInformationID.AllowDBNull = false;
                this.columnSystemInformationID.ReadOnly = true;
                this.columnSystemInformationID.Unique = true;
                this.columnDatabase_Version.AllowDBNull = false;
                this.columnDatabase_Version.MaxLength = 25;
                this.columnVersionDate.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public AWBuildVersionRow NewAWBuildVersionRow() {
                return ((AWBuildVersionRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new AWBuildVersionRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(AWBuildVersionRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.AWBuildVersionRowChanged != null)) {
                    this.AWBuildVersionRowChanged(this, new AWBuildVersionRowChangeEvent(((AWBuildVersionRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.AWBuildVersionRowChanging != null)) {
                    this.AWBuildVersionRowChanging(this, new AWBuildVersionRowChangeEvent(((AWBuildVersionRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.AWBuildVersionRowDeleted != null)) {
                    this.AWBuildVersionRowDeleted(this, new AWBuildVersionRowChangeEvent(((AWBuildVersionRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.AWBuildVersionRowDeleting != null)) {
                    this.AWBuildVersionRowDeleting(this, new AWBuildVersionRowChangeEvent(((AWBuildVersionRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveAWBuildVersionRow(AWBuildVersionRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "AWBuildVersionDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class DatabaseLogDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnDatabaseLogID;
            
            private System.Data.DataColumn columnPostTime;
            
            private System.Data.DataColumn columnDatabaseUser;
            
            private System.Data.DataColumn columnEvent;
            
            private System.Data.DataColumn columnSchema;
            
            private System.Data.DataColumn columnObject;
            
            private System.Data.DataColumn columnTSQL;
            
            private System.Data.DataColumn columnXmlEvent;
            
            public DatabaseLogDataTable() {
                this.TableName = "DatabaseLog";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal DatabaseLogDataTable(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;
            }
            
            protected DatabaseLogDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn DatabaseLogIDColumn {
                get {
                    return this.columnDatabaseLogID;
                }
            }
            
            public System.Data.DataColumn PostTimeColumn {
                get {
                    return this.columnPostTime;
                }
            }
            
            public System.Data.DataColumn DatabaseUserColumn {
                get {
                    return this.columnDatabaseUser;
                }
            }
            
            public System.Data.DataColumn EventColumn {
                get {
                    return this.columnEvent;
                }
            }
            
            public System.Data.DataColumn SchemaColumn {
                get {
                    return this.columnSchema;
                }
            }
            
            public System.Data.DataColumn ObjectColumn {
                get {
                    return this.columnObject;
                }
            }
            
            public System.Data.DataColumn TSQLColumn {
                get {
                    return this.columnTSQL;
                }
            }
            
            public System.Data.DataColumn XmlEventColumn {
                get {
                    return this.columnXmlEvent;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public DatabaseLogRow this[int index] {
                get {
                    return ((DatabaseLogRow)(this.Rows[index]));
                }
            }
            
            public event DatabaseLogRowChangeEventHandler DatabaseLogRowChanged;
            
            public event DatabaseLogRowChangeEventHandler DatabaseLogRowChanging;
            
            public event DatabaseLogRowChangeEventHandler DatabaseLogRowDeleted;
            
            public event DatabaseLogRowChangeEventHandler DatabaseLogRowDeleting;
            
            public void AddDatabaseLogRow(DatabaseLogRow row) {
                this.Rows.Add(row);
            }
            
            public DatabaseLogRow AddDatabaseLogRow(System.DateTime PostTime, string DatabaseUser, string Event, string Schema, string Object, string TSQL, string XmlEvent) {
                DatabaseLogRow rowDatabaseLogRow = ((DatabaseLogRow)(this.NewRow()));
                rowDatabaseLogRow.ItemArray = new object[] {
                        null,
                        PostTime,
                        DatabaseUser,
                        Event,
                        Schema,
                        Object,
                        TSQL,
                        XmlEvent};
                this.Rows.Add(rowDatabaseLogRow);
                return rowDatabaseLogRow;
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                DatabaseLogDataTable cln = ((DatabaseLogDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new DatabaseLogDataTable();
            }
            
            internal void InitVars() {
                this.columnDatabaseLogID = base.Columns["DatabaseLogID"];
                this.columnPostTime = base.Columns["PostTime"];
                this.columnDatabaseUser = base.Columns["DatabaseUser"];
                this.columnEvent = base.Columns["Event"];
                this.columnSchema = base.Columns["Schema"];
                this.columnObject = base.Columns["Object"];
                this.columnTSQL = base.Columns["TSQL"];
                this.columnXmlEvent = base.Columns["XmlEvent"];
            }
            
            private void InitClass() {
                this.columnDatabaseLogID = new System.Data.DataColumn("DatabaseLogID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDatabaseLogID);
                this.columnPostTime = new System.Data.DataColumn("PostTime", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPostTime);
                this.columnDatabaseUser = new System.Data.DataColumn("DatabaseUser", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDatabaseUser);
                this.columnEvent = new System.Data.DataColumn("Event", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEvent);
                this.columnSchema = new System.Data.DataColumn("Schema", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSchema);
                this.columnObject = new System.Data.DataColumn("Object", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnObject);
                this.columnTSQL = new System.Data.DataColumn("TSQL", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTSQL);
                this.columnXmlEvent = new System.Data.DataColumn("XmlEvent", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnXmlEvent);
                this.columnDatabaseLogID.AutoIncrement = true;
                this.columnDatabaseLogID.AllowDBNull = false;
                this.columnDatabaseLogID.ReadOnly = true;
                this.columnPostTime.AllowDBNull = false;
                this.columnDatabaseUser.AllowDBNull = false;
                this.columnDatabaseUser.MaxLength = 128;
                this.columnEvent.AllowDBNull = false;
                this.columnEvent.MaxLength = 128;
                this.columnSchema.MaxLength = 128;
                this.columnObject.MaxLength = 128;
                this.columnTSQL.AllowDBNull = false;
                this.columnTSQL.MaxLength = 2147483647;
                this.columnXmlEvent.AllowDBNull = false;
                this.columnXmlEvent.MaxLength = 2147483647;
            }
            
            public DatabaseLogRow NewDatabaseLogRow() {
                return ((DatabaseLogRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new DatabaseLogRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(DatabaseLogRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.DatabaseLogRowChanged != null)) {
                    this.DatabaseLogRowChanged(this, new DatabaseLogRowChangeEvent(((DatabaseLogRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.DatabaseLogRowChanging != null)) {
                    this.DatabaseLogRowChanging(this, new DatabaseLogRowChangeEvent(((DatabaseLogRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.DatabaseLogRowDeleted != null)) {
                    this.DatabaseLogRowDeleted(this, new DatabaseLogRowChangeEvent(((DatabaseLogRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.DatabaseLogRowDeleting != null)) {
                    this.DatabaseLogRowDeleting(this, new DatabaseLogRowChangeEvent(((DatabaseLogRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveDatabaseLogRow(DatabaseLogRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "DatabaseLogDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class DepartmentDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnDepartmentID;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnGroupName;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public DepartmentDataTable() {
                this.TableName = "Department";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal DepartmentDataTable(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;
            }
            
            protected DepartmentDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn DepartmentIDColumn {
                get {
                    return this.columnDepartmentID;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn GroupNameColumn {
                get {
                    return this.columnGroupName;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public DepartmentRow this[int index] {
                get {
                    return ((DepartmentRow)(this.Rows[index]));
                }
            }
            
            public event DepartmentRowChangeEventHandler DepartmentRowChanged;
            
            public event DepartmentRowChangeEventHandler DepartmentRowChanging;
            
            public event DepartmentRowChangeEventHandler DepartmentRowDeleted;
            
            public event DepartmentRowChangeEventHandler DepartmentRowDeleting;
            
            public void AddDepartmentRow(DepartmentRow row) {
                this.Rows.Add(row);
            }
            
            public DepartmentRow AddDepartmentRow(string Name, string GroupName, System.DateTime ModifiedDate) {
                DepartmentRow rowDepartmentRow = ((DepartmentRow)(this.NewRow()));
                rowDepartmentRow.ItemArray = new object[] {
                        null,
                        Name,
                        GroupName,
                        ModifiedDate};
                this.Rows.Add(rowDepartmentRow);
                return rowDepartmentRow;
            }
            
            public DepartmentRow FindByDepartmentID(short DepartmentID) {
                return ((DepartmentRow)(this.Rows.Find(new object[] {
                            DepartmentID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                DepartmentDataTable cln = ((DepartmentDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new DepartmentDataTable();
            }
            
            internal void InitVars() {
                this.columnDepartmentID = base.Columns["DepartmentID"];
                this.columnName = base.Columns["Name"];
                this.columnGroupName = base.Columns["GroupName"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnDepartmentID = new System.Data.DataColumn("DepartmentID", typeof(short), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDepartmentID);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnGroupName = new System.Data.DataColumn("GroupName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnGroupName);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnDepartmentID}, true));
                this.columnDepartmentID.AutoIncrement = true;
                this.columnDepartmentID.AllowDBNull = false;
                this.columnDepartmentID.ReadOnly = true;
                this.columnDepartmentID.Unique = true;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnGroupName.AllowDBNull = false;
                this.columnGroupName.MaxLength = 50;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public DepartmentRow NewDepartmentRow() {
                return ((DepartmentRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new DepartmentRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(DepartmentRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.DepartmentRowChanged != null)) {
                    this.DepartmentRowChanged(this, new DepartmentRowChangeEvent(((DepartmentRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.DepartmentRowChanging != null)) {
                    this.DepartmentRowChanging(this, new DepartmentRowChangeEvent(((DepartmentRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.DepartmentRowDeleted != null)) {
                    this.DepartmentRowDeleted(this, new DepartmentRowChangeEvent(((DepartmentRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.DepartmentRowDeleting != null)) {
                    this.DepartmentRowDeleting(this, new DepartmentRowChangeEvent(((DepartmentRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveDepartmentRow(DepartmentRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "DepartmentDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class EmployeeDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnEmployeeID;
            
            private System.Data.DataColumn columnNationalIDNumber;
            
            private System.Data.DataColumn columnContactID;
            
            private System.Data.DataColumn columnLoginID;
            
            private System.Data.DataColumn columnManagerID;
            
            private System.Data.DataColumn columnTitle;
            
            private System.Data.DataColumn columnBirthDate;
            
            private System.Data.DataColumn columnMaritalStatus;
            
            private System.Data.DataColumn columnGender;
            
            private System.Data.DataColumn columnHireDate;
            
            private System.Data.DataColumn columnSalariedFlag;
            
            private System.Data.DataColumn columnVacationHours;
            
            private System.Data.DataColumn columnSickLeaveHours;
            
            private System.Data.DataColumn columnCurrentFlag;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public EmployeeDataTable() {
                this.TableName = "Employee";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal EmployeeDataTable(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;
            }
            
            protected EmployeeDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn EmployeeIDColumn {
                get {
                    return this.columnEmployeeID;
                }
            }
            
            public System.Data.DataColumn NationalIDNumberColumn {
                get {
                    return this.columnNationalIDNumber;
                }
            }
            
            public System.Data.DataColumn ContactIDColumn {
                get {
                    return this.columnContactID;
                }
            }
            
            public System.Data.DataColumn LoginIDColumn {
                get {
                    return this.columnLoginID;
                }
            }
            
            public System.Data.DataColumn ManagerIDColumn {
                get {
                    return this.columnManagerID;
                }
            }
            
            public System.Data.DataColumn TitleColumn {
                get {
                    return this.columnTitle;
                }
            }
            
            public System.Data.DataColumn BirthDateColumn {
                get {
                    return this.columnBirthDate;
                }
            }
            
            public System.Data.DataColumn MaritalStatusColumn {
                get {
                    return this.columnMaritalStatus;
                }
            }
            
            public System.Data.DataColumn GenderColumn {
                get {
                    return this.columnGender;
                }
            }
            
            public System.Data.DataColumn HireDateColumn {
                get {
                    return this.columnHireDate;
                }
            }
            
            public System.Data.DataColumn SalariedFlagColumn {
                get {
                    return this.columnSalariedFlag;
                }
            }
            
            public System.Data.DataColumn VacationHoursColumn {
                get {
                    return this.columnVacationHours;
                }
            }
            
            public System.Data.DataColumn SickLeaveHoursColumn {
                get {
                    return this.columnSickLeaveHours;
                }
            }
            
            public System.Data.DataColumn CurrentFlagColumn {
                get {
                    return this.columnCurrentFlag;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public EmployeeRow this[int index] {
                get {
                    return ((EmployeeRow)(this.Rows[index]));
                }
            }
            
            public event EmployeeRowChangeEventHandler EmployeeRowChanged;
            
            public event EmployeeRowChangeEventHandler EmployeeRowChanging;
            
            public event EmployeeRowChangeEventHandler EmployeeRowDeleted;
            
            public event EmployeeRowChangeEventHandler EmployeeRowDeleting;
            
            public void AddEmployeeRow(EmployeeRow row) {
                this.Rows.Add(row);
            }
            
            public EmployeeRow AddEmployeeRow(string NationalIDNumber, ContactRow parentContactRowByFK_Employee_Contact_ContactID, string LoginID, EmployeeRow parentEmployeeRowByFK_Employee_Employee_ManagerID, string Title, System.DateTime BirthDate, string MaritalStatus, string Gender, System.DateTime HireDate, bool SalariedFlag, short VacationHours, short SickLeaveHours, bool CurrentFlag, System.Guid rowguid, System.DateTime ModifiedDate) {
                EmployeeRow rowEmployeeRow = ((EmployeeRow)(this.NewRow()));
                rowEmployeeRow.ItemArray = new object[] {
                        null,
                        NationalIDNumber,
                        parentContactRowByFK_Employee_Contact_ContactID[0],
                        LoginID,
                        parentEmployeeRowByFK_Employee_Employee_ManagerID[0],
                        Title,
                        BirthDate,
                        MaritalStatus,
                        Gender,
                        HireDate,
                        SalariedFlag,
                        VacationHours,
                        SickLeaveHours,
                        CurrentFlag,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowEmployeeRow);
                return rowEmployeeRow;
            }
            
            public EmployeeRow FindByEmployeeID(int EmployeeID) {
                return ((EmployeeRow)(this.Rows.Find(new object[] {
                            EmployeeID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                EmployeeDataTable cln = ((EmployeeDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new EmployeeDataTable();
            }
            
            internal void InitVars() {
                this.columnEmployeeID = base.Columns["EmployeeID"];
                this.columnNationalIDNumber = base.Columns["NationalIDNumber"];
                this.columnContactID = base.Columns["ContactID"];
                this.columnLoginID = base.Columns["LoginID"];
                this.columnManagerID = base.Columns["ManagerID"];
                this.columnTitle = base.Columns["Title"];
                this.columnBirthDate = base.Columns["BirthDate"];
                this.columnMaritalStatus = base.Columns["MaritalStatus"];
                this.columnGender = base.Columns["Gender"];
                this.columnHireDate = base.Columns["HireDate"];
                this.columnSalariedFlag = base.Columns["SalariedFlag"];
                this.columnVacationHours = base.Columns["VacationHours"];
                this.columnSickLeaveHours = base.Columns["SickLeaveHours"];
                this.columnCurrentFlag = base.Columns["CurrentFlag"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnEmployeeID = new System.Data.DataColumn("EmployeeID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmployeeID);
                this.columnNationalIDNumber = new System.Data.DataColumn("NationalIDNumber", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnNationalIDNumber);
                this.columnContactID = new System.Data.DataColumn("ContactID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnContactID);
                this.columnLoginID = new System.Data.DataColumn("LoginID", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLoginID);
                this.columnManagerID = new System.Data.DataColumn("ManagerID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnManagerID);
                this.columnTitle = new System.Data.DataColumn("Title", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTitle);
                this.columnBirthDate = new System.Data.DataColumn("BirthDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnBirthDate);
                this.columnMaritalStatus = new System.Data.DataColumn("MaritalStatus", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnMaritalStatus);
                this.columnGender = new System.Data.DataColumn("Gender", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnGender);
                this.columnHireDate = new System.Data.DataColumn("HireDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnHireDate);
                this.columnSalariedFlag = new System.Data.DataColumn("SalariedFlag", typeof(bool), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalariedFlag);
                this.columnVacationHours = new System.Data.DataColumn("VacationHours", typeof(short), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnVacationHours);
                this.columnSickLeaveHours = new System.Data.DataColumn("SickLeaveHours", typeof(short), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSickLeaveHours);
                this.columnCurrentFlag = new System.Data.DataColumn("CurrentFlag", typeof(bool), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCurrentFlag);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                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.columnNationalIDNumber.AllowDBNull = false;
                this.columnNationalIDNumber.MaxLength = 15;
                this.columnContactID.AllowDBNull = false;
                this.columnLoginID.AllowDBNull = false;
                this.columnLoginID.MaxLength = 256;
                this.columnTitle.AllowDBNull = false;
                this.columnTitle.MaxLength = 50;
                this.columnBirthDate.AllowDBNull = false;
                this.columnMaritalStatus.AllowDBNull = false;
                this.columnMaritalStatus.MaxLength = 1;
                this.columnGender.AllowDBNull = false;
                this.columnGender.MaxLength = 1;
                this.columnHireDate.AllowDBNull = false;
                this.columnSalariedFlag.AllowDBNull = false;
                this.columnVacationHours.AllowDBNull = false;
                this.columnSickLeaveHours.AllowDBNull = false;
                this.columnCurrentFlag.AllowDBNull = false;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public EmployeeRow NewEmployeeRow() {
                return ((EmployeeRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new EmployeeRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(EmployeeRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.EmployeeRowChanged != null)) {
                    this.EmployeeRowChanged(this, new EmployeeRowChangeEvent(((EmployeeRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.EmployeeRowChanging != null)) {
                    this.EmployeeRowChanging(this, new EmployeeRowChangeEvent(((EmployeeRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.EmployeeRowDeleted != null)) {
                    this.EmployeeRowDeleted(this, new EmployeeRowChangeEvent(((EmployeeRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.EmployeeRowDeleting != null)) {
                    this.EmployeeRowDeleting(this, new EmployeeRowChangeEvent(((EmployeeRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveEmployeeRow(EmployeeRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "EmployeeDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class EmployeeAddressDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnEmployeeID;
            
            private System.Data.DataColumn columnAddressID;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public EmployeeAddressDataTable() {
                this.TableName = "EmployeeAddress";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal EmployeeAddressDataTable(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;
            }
            
            protected EmployeeAddressDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn EmployeeIDColumn {
                get {
                    return this.columnEmployeeID;
                }
            }
            
            public System.Data.DataColumn AddressIDColumn {
                get {
                    return this.columnAddressID;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public EmployeeAddressRow this[int index] {
                get {
                    return ((EmployeeAddressRow)(this.Rows[index]));
                }
            }
            
            public event EmployeeAddressRowChangeEventHandler EmployeeAddressRowChanged;
            
            public event EmployeeAddressRowChangeEventHandler EmployeeAddressRowChanging;
            
            public event EmployeeAddressRowChangeEventHandler EmployeeAddressRowDeleted;
            
            public event EmployeeAddressRowChangeEventHandler EmployeeAddressRowDeleting;
            
            public void AddEmployeeAddressRow(EmployeeAddressRow row) {
                this.Rows.Add(row);
            }
            
            public EmployeeAddressRow AddEmployeeAddressRow(EmployeeRow parentEmployeeRowByFK_EmployeeAddress_Employee_EmployeeID, AddressRow parentAddressRowByFK_EmployeeAddress_Address_AddressID, System.Guid rowguid, System.DateTime ModifiedDate) {
                EmployeeAddressRow rowEmployeeAddressRow = ((EmployeeAddressRow)(this.NewRow()));
                rowEmployeeAddressRow.ItemArray = new object[] {
                        parentEmployeeRowByFK_EmployeeAddress_Employee_EmployeeID[0],
                        parentAddressRowByFK_EmployeeAddress_Address_AddressID[0],
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowEmployeeAddressRow);
                return rowEmployeeAddressRow;
            }
            
            public EmployeeAddressRow FindByEmployeeIDAddressID(int EmployeeID, int AddressID) {
                return ((EmployeeAddressRow)(this.Rows.Find(new object[] {
                            EmployeeID,
                            AddressID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                EmployeeAddressDataTable cln = ((EmployeeAddressDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new EmployeeAddressDataTable();
            }
            
            internal void InitVars() {
                this.columnEmployeeID = base.Columns["EmployeeID"];
                this.columnAddressID = base.Columns["AddressID"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnEmployeeID = new System.Data.DataColumn("EmployeeID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmployeeID);
                this.columnAddressID = new System.Data.DataColumn("AddressID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAddressID);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnEmployeeID,
                                this.columnAddressID}, true));
                this.columnEmployeeID.AllowDBNull = false;
                this.columnAddressID.AllowDBNull = false;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public EmployeeAddressRow NewEmployeeAddressRow() {
                return ((EmployeeAddressRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new EmployeeAddressRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(EmployeeAddressRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.EmployeeAddressRowChanged != null)) {
                    this.EmployeeAddressRowChanged(this, new EmployeeAddressRowChangeEvent(((EmployeeAddressRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.EmployeeAddressRowChanging != null)) {
                    this.EmployeeAddressRowChanging(this, new EmployeeAddressRowChangeEvent(((EmployeeAddressRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.EmployeeAddressRowDeleted != null)) {
                    this.EmployeeAddressRowDeleted(this, new EmployeeAddressRowChangeEvent(((EmployeeAddressRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.EmployeeAddressRowDeleting != null)) {
                    this.EmployeeAddressRowDeleting(this, new EmployeeAddressRowChangeEvent(((EmployeeAddressRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveEmployeeAddressRow(EmployeeAddressRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "EmployeeAddressDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class EmployeeDepartmentHistoryDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnEmployeeID;
            
            private System.Data.DataColumn columnDepartmentID;
            
            private System.Data.DataColumn columnShiftID;
            
            private System.Data.DataColumn columnStartDate;
            
            private System.Data.DataColumn columnEndDate;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public EmployeeDepartmentHistoryDataTable() {
                this.TableName = "EmployeeDepartmentHistory";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal EmployeeDepartmentHistoryDataTable(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;
            }
            
            protected EmployeeDepartmentHistoryDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn EmployeeIDColumn {
                get {
                    return this.columnEmployeeID;
                }
            }
            
            public System.Data.DataColumn DepartmentIDColumn {
                get {
                    return this.columnDepartmentID;
                }
            }
            
            public System.Data.DataColumn ShiftIDColumn {
                get {
                    return this.columnShiftID;
                }
            }
            
            public System.Data.DataColumn StartDateColumn {
                get {
                    return this.columnStartDate;
                }
            }
            
            public System.Data.DataColumn EndDateColumn {
                get {
                    return this.columnEndDate;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public EmployeeDepartmentHistoryRow this[int index] {
                get {
                    return ((EmployeeDepartmentHistoryRow)(this.Rows[index]));
                }
            }
            
            public event EmployeeDepartmentHistoryRowChangeEventHandler EmployeeDepartmentHistoryRowChanged;
            
            public event EmployeeDepartmentHistoryRowChangeEventHandler EmployeeDepartmentHistoryRowChanging;
            
            public event EmployeeDepartmentHistoryRowChangeEventHandler EmployeeDepartmentHistoryRowDeleted;
            
            public event EmployeeDepartmentHistoryRowChangeEventHandler EmployeeDepartmentHistoryRowDeleting;
            
            public void AddEmployeeDepartmentHistoryRow(EmployeeDepartmentHistoryRow row) {
                this.Rows.Add(row);
            }
            
            public EmployeeDepartmentHistoryRow AddEmployeeDepartmentHistoryRow(EmployeeRow parentEmployeeRowByFK_EmployeeDepartmentHistory_Employee_EmployeeID, DepartmentRow parentDepartmentRowByFK_EmployeeDepartmentHistory_Department_DepartmentID, ShiftRow parentShiftRowByFK_EmployeeDepartmentHistory_Shift_ShiftID, System.DateTime StartDate, System.DateTime EndDate, System.DateTime ModifiedDate) {
                EmployeeDepartmentHistoryRow rowEmployeeDepartmentHistoryRow = ((EmployeeDepartmentHistoryRow)(this.NewRow()));
                rowEmployeeDepartmentHistoryRow.ItemArray = new object[] {
                        parentEmployeeRowByFK_EmployeeDepartmentHistory_Employee_EmployeeID[0],
                        parentDepartmentRowByFK_EmployeeDepartmentHistory_Department_DepartmentID[0],
                        parentShiftRowByFK_EmployeeDepartmentHistory_Shift_ShiftID[0],
                        StartDate,
                        EndDate,
                        ModifiedDate};
                this.Rows.Add(rowEmployeeDepartmentHistoryRow);
                return rowEmployeeDepartmentHistoryRow;
            }
            
            public EmployeeDepartmentHistoryRow FindByEmployeeIDDepartmentIDShiftIDStartDate(int EmployeeID, short DepartmentID, byte ShiftID, System.DateTime StartDate) {
                return ((EmployeeDepartmentHistoryRow)(this.Rows.Find(new object[] {
                            EmployeeID,
                            DepartmentID,
                            ShiftID,
                            StartDate})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                EmployeeDepartmentHistoryDataTable cln = ((EmployeeDepartmentHistoryDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new EmployeeDepartmentHistoryDataTable();
            }
            
            internal void InitVars() {
                this.columnEmployeeID = base.Columns["EmployeeID"];
                this.columnDepartmentID = base.Columns["DepartmentID"];
                this.columnShiftID = base.Columns["ShiftID"];
                this.columnStartDate = base.Columns["StartDate"];
                this.columnEndDate = base.Columns["EndDate"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnEmployeeID = new System.Data.DataColumn("EmployeeID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmployeeID);
                this.columnDepartmentID = new System.Data.DataColumn("DepartmentID", typeof(short), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDepartmentID);
                this.columnShiftID = new System.Data.DataColumn("ShiftID", typeof(byte), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnShiftID);
                this.columnStartDate = new System.Data.DataColumn("StartDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStartDate);
                this.columnEndDate = new System.Data.DataColumn("EndDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEndDate);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnEmployeeID,
                                this.columnDepartmentID,
                                this.columnShiftID,
                                this.columnStartDate}, true));
                this.columnEmployeeID.AllowDBNull = false;
                this.columnDepartmentID.AllowDBNull = false;
                this.columnShiftID.AllowDBNull = false;
                this.columnStartDate.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public EmployeeDepartmentHistoryRow NewEmployeeDepartmentHistoryRow() {
                return ((EmployeeDepartmentHistoryRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new EmployeeDepartmentHistoryRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(EmployeeDepartmentHistoryRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.EmployeeDepartmentHistoryRowChanged != null)) {
                    this.EmployeeDepartmentHistoryRowChanged(this, new EmployeeDepartmentHistoryRowChangeEvent(((EmployeeDepartmentHistoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.EmployeeDepartmentHistoryRowChanging != null)) {
                    this.EmployeeDepartmentHistoryRowChanging(this, new EmployeeDepartmentHistoryRowChangeEvent(((EmployeeDepartmentHistoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.EmployeeDepartmentHistoryRowDeleted != null)) {
                    this.EmployeeDepartmentHistoryRowDeleted(this, new EmployeeDepartmentHistoryRowChangeEvent(((EmployeeDepartmentHistoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.EmployeeDepartmentHistoryRowDeleting != null)) {
                    this.EmployeeDepartmentHistoryRowDeleting(this, new EmployeeDepartmentHistoryRowChangeEvent(((EmployeeDepartmentHistoryRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveEmployeeDepartmentHistoryRow(EmployeeDepartmentHistoryRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "EmployeeDepartmentHistoryDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class EmployeePayHistoryDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnEmployeeID;
            
            private System.Data.DataColumn columnRateChangeDate;
            
            private System.Data.DataColumn columnRate;
            
            private System.Data.DataColumn columnPayFrequency;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public EmployeePayHistoryDataTable() {
                this.TableName = "EmployeePayHistory";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal EmployeePayHistoryDataTable(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;
            }
            
            protected EmployeePayHistoryDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn EmployeeIDColumn {
                get {
                    return this.columnEmployeeID;
                }
            }
            
            public System.Data.DataColumn RateChangeDateColumn {
                get {
                    return this.columnRateChangeDate;
                }
            }
            
            public System.Data.DataColumn RateColumn {
                get {
                    return this.columnRate;
                }
            }
            
            public System.Data.DataColumn PayFrequencyColumn {
                get {
                    return this.columnPayFrequency;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public EmployeePayHistoryRow this[int index] {
                get {
                    return ((EmployeePayHistoryRow)(this.Rows[index]));
                }
            }
            
            public event EmployeePayHistoryRowChangeEventHandler EmployeePayHistoryRowChanged;
            
            public event EmployeePayHistoryRowChangeEventHandler EmployeePayHistoryRowChanging;
            
            public event EmployeePayHistoryRowChangeEventHandler EmployeePayHistoryRowDeleted;
            
            public event EmployeePayHistoryRowChangeEventHandler EmployeePayHistoryRowDeleting;
            
            public void AddEmployeePayHistoryRow(EmployeePayHistoryRow row) {
                this.Rows.Add(row);
            }
            
            public EmployeePayHistoryRow AddEmployeePayHistoryRow(EmployeeRow parentEmployeeRowByFK_EmployeePayHistory_Employee_EmployeeID, System.DateTime RateChangeDate, decimal Rate, byte PayFrequency, System.DateTime ModifiedDate) {
                EmployeePayHistoryRow rowEmployeePayHistoryRow = ((EmployeePayHistoryRow)(this.NewRow()));
                rowEmployeePayHistoryRow.ItemArray = new object[] {
                        parentEmployeeRowByFK_EmployeePayHistory_Employee_EmployeeID[0],
                        RateChangeDate,
                        Rate,
                        PayFrequency,
                        ModifiedDate};
                this.Rows.Add(rowEmployeePayHistoryRow);
                return rowEmployeePayHistoryRow;
            }
            
            public EmployeePayHistoryRow FindByEmployeeIDRateChangeDate(int EmployeeID, System.DateTime RateChangeDate) {
                return ((EmployeePayHistoryRow)(this.Rows.Find(new object[] {
                            EmployeeID,
                            RateChangeDate})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                EmployeePayHistoryDataTable cln = ((EmployeePayHistoryDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new EmployeePayHistoryDataTable();
            }
            
            internal void InitVars() {
                this.columnEmployeeID = base.Columns["EmployeeID"];
                this.columnRateChangeDate = base.Columns["RateChangeDate"];
                this.columnRate = base.Columns["Rate"];
                this.columnPayFrequency = base.Columns["PayFrequency"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnEmployeeID = new System.Data.DataColumn("EmployeeID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmployeeID);
                this.columnRateChangeDate = new System.Data.DataColumn("RateChangeDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnRateChangeDate);
                this.columnRate = new System.Data.DataColumn("Rate", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnRate);
                this.columnPayFrequency = new System.Data.DataColumn("PayFrequency", typeof(byte), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPayFrequency);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnEmployeeID,
                                this.columnRateChangeDate}, true));
                this.columnEmployeeID.AllowDBNull = false;
                this.columnRateChangeDate.AllowDBNull = false;
                this.columnRate.AllowDBNull = false;
                this.columnPayFrequency.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public EmployeePayHistoryRow NewEmployeePayHistoryRow() {
                return ((EmployeePayHistoryRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new EmployeePayHistoryRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(EmployeePayHistoryRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.EmployeePayHistoryRowChanged != null)) {
                    this.EmployeePayHistoryRowChanged(this, new EmployeePayHistoryRowChangeEvent(((EmployeePayHistoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.EmployeePayHistoryRowChanging != null)) {
                    this.EmployeePayHistoryRowChanging(this, new EmployeePayHistoryRowChangeEvent(((EmployeePayHistoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.EmployeePayHistoryRowDeleted != null)) {
                    this.EmployeePayHistoryRowDeleted(this, new EmployeePayHistoryRowChangeEvent(((EmployeePayHistoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.EmployeePayHistoryRowDeleting != null)) {
                    this.EmployeePayHistoryRowDeleting(this, new EmployeePayHistoryRowChangeEvent(((EmployeePayHistoryRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveEmployeePayHistoryRow(EmployeePayHistoryRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "EmployeePayHistoryDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class JobCandidateDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnJobCandidateID;
            
            private System.Data.DataColumn columnEmployeeID;
            
            private System.Data.DataColumn columnResume;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public JobCandidateDataTable() {
                this.TableName = "JobCandidate";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal JobCandidateDataTable(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;
            }
            
            protected JobCandidateDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn JobCandidateIDColumn {
                get {
                    return this.columnJobCandidateID;
                }
            }
            
            public System.Data.DataColumn EmployeeIDColumn {
                get {
                    return this.columnEmployeeID;
                }
            }
            
            public System.Data.DataColumn ResumeColumn {
                get {
                    return this.columnResume;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public JobCandidateRow this[int index] {
                get {
                    return ((JobCandidateRow)(this.Rows[index]));
                }
            }
            
            public event JobCandidateRowChangeEventHandler JobCandidateRowChanged;
            
            public event JobCandidateRowChangeEventHandler JobCandidateRowChanging;
            
            public event JobCandidateRowChangeEventHandler JobCandidateRowDeleted;
            
            public event JobCandidateRowChangeEventHandler JobCandidateRowDeleting;
            
            public void AddJobCandidateRow(JobCandidateRow row) {
                this.Rows.Add(row);
            }
            
            public JobCandidateRow AddJobCandidateRow(EmployeeRow parentEmployeeRowByFK_JobCandidate_Employee_EmployeeID, string Resume, System.DateTime ModifiedDate) {
                JobCandidateRow rowJobCandidateRow = ((JobCandidateRow)(this.NewRow()));
                rowJobCandidateRow.ItemArray = new object[] {
                        null,
                        parentEmployeeRowByFK_JobCandidate_Employee_EmployeeID[0],
                        Resume,
                        ModifiedDate};
                this.Rows.Add(rowJobCandidateRow);
                return rowJobCandidateRow;
            }
            
            public JobCandidateRow FindByJobCandidateID(int JobCandidateID) {
                return ((JobCandidateRow)(this.Rows.Find(new object[] {
                            JobCandidateID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                JobCandidateDataTable cln = ((JobCandidateDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new JobCandidateDataTable();
            }
            
            internal void InitVars() {
                this.columnJobCandidateID = base.Columns["JobCandidateID"];
                this.columnEmployeeID = base.Columns["EmployeeID"];
                this.columnResume = base.Columns["Resume"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnJobCandidateID = new System.Data.DataColumn("JobCandidateID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnJobCandidateID);
                this.columnEmployeeID = new System.Data.DataColumn("EmployeeID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmployeeID);
                this.columnResume = new System.Data.DataColumn("Resume", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnResume);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnJobCandidateID}, true));
                this.columnJobCandidateID.AutoIncrement = true;
                this.columnJobCandidateID.AllowDBNull = false;
                this.columnJobCandidateID.ReadOnly = true;
                this.columnJobCandidateID.Unique = true;
                this.columnResume.MaxLength = 2147483647;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public JobCandidateRow NewJobCandidateRow() {
                return ((JobCandidateRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new JobCandidateRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(JobCandidateRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.JobCandidateRowChanged != null)) {
                    this.JobCandidateRowChanged(this, new JobCandidateRowChangeEvent(((JobCandidateRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.JobCandidateRowChanging != null)) {
                    this.JobCandidateRowChanging(this, new JobCandidateRowChangeEvent(((JobCandidateRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.JobCandidateRowDeleted != null)) {
                    this.JobCandidateRowDeleted(this, new JobCandidateRowChangeEvent(((JobCandidateRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.JobCandidateRowDeleting != null)) {
                    this.JobCandidateRowDeleting(this, new JobCandidateRowChangeEvent(((JobCandidateRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveJobCandidateRow(JobCandidateRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "JobCandidateDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ShiftDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnShiftID;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnStartTime;
            
            private System.Data.DataColumn columnEndTime;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public ShiftDataTable() {
                this.TableName = "Shift";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal ShiftDataTable(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;
            }
            
            protected ShiftDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ShiftIDColumn {
                get {
                    return this.columnShiftID;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn StartTimeColumn {
                get {
                    return this.columnStartTime;
                }
            }
            
            public System.Data.DataColumn EndTimeColumn {
                get {
                    return this.columnEndTime;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public ShiftRow this[int index] {
                get {
                    return ((ShiftRow)(this.Rows[index]));
                }
            }
            
            public event ShiftRowChangeEventHandler ShiftRowChanged;
            
            public event ShiftRowChangeEventHandler ShiftRowChanging;
            
            public event ShiftRowChangeEventHandler ShiftRowDeleted;
            
            public event ShiftRowChangeEventHandler ShiftRowDeleting;
            
            public void AddShiftRow(ShiftRow row) {
                this.Rows.Add(row);
            }
            
            public ShiftRow AddShiftRow(byte ShiftID, string Name, System.DateTime StartTime, System.DateTime EndTime, System.DateTime ModifiedDate) {
                ShiftRow rowShiftRow = ((ShiftRow)(this.NewRow()));
                rowShiftRow.ItemArray = new object[] {
                        ShiftID,
                        Name,
                        StartTime,
                        EndTime,
                        ModifiedDate};
                this.Rows.Add(rowShiftRow);
                return rowShiftRow;
            }
            
            public ShiftRow FindByShiftID(byte ShiftID) {
                return ((ShiftRow)(this.Rows.Find(new object[] {
                            ShiftID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                ShiftDataTable cln = ((ShiftDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new ShiftDataTable();
            }
            
            internal void InitVars() {
                this.columnShiftID = base.Columns["ShiftID"];
                this.columnName = base.Columns["Name"];
                this.columnStartTime = base.Columns["StartTime"];
                this.columnEndTime = base.Columns["EndTime"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnShiftID = new System.Data.DataColumn("ShiftID", typeof(byte), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnShiftID);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnStartTime = new System.Data.DataColumn("StartTime", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStartTime);
                this.columnEndTime = new System.Data.DataColumn("EndTime", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEndTime);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnShiftID}, true));
                this.columnShiftID.AllowDBNull = false;
                this.columnShiftID.ReadOnly = true;
                this.columnShiftID.Unique = true;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnStartTime.AllowDBNull = false;
                this.columnEndTime.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public ShiftRow NewShiftRow() {
                return ((ShiftRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ShiftRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ShiftRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ShiftRowChanged != null)) {
                    this.ShiftRowChanged(this, new ShiftRowChangeEvent(((ShiftRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ShiftRowChanging != null)) {
                    this.ShiftRowChanging(this, new ShiftRowChangeEvent(((ShiftRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ShiftRowDeleted != null)) {
                    this.ShiftRowDeleted(this, new ShiftRowChangeEvent(((ShiftRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ShiftRowDeleting != null)) {
                    this.ShiftRowDeleting(this, new ShiftRowChangeEvent(((ShiftRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveShiftRow(ShiftRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "ShiftDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class AddressDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnAddressID;
            
            private System.Data.DataColumn columnAddressLine1;
            
            private System.Data.DataColumn columnAddressLine2;
            
            private System.Data.DataColumn columnCity;
            
            private System.Data.DataColumn columnStateProvinceID;
            
            private System.Data.DataColumn columnPostalCode;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public AddressDataTable() {
                this.TableName = "Address";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal AddressDataTable(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;
            }
            
            protected AddressDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn AddressIDColumn {
                get {
                    return this.columnAddressID;
                }
            }
            
            public System.Data.DataColumn AddressLine1Column {
                get {
                    return this.columnAddressLine1;
                }
            }
            
            public System.Data.DataColumn AddressLine2Column {
                get {
                    return this.columnAddressLine2;
                }
            }
            
            public System.Data.DataColumn CityColumn {
                get {
                    return this.columnCity;
                }
            }
            
            public System.Data.DataColumn StateProvinceIDColumn {
                get {
                    return this.columnStateProvinceID;
                }
            }
            
            public System.Data.DataColumn PostalCodeColumn {
                get {
                    return this.columnPostalCode;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public AddressRow this[int index] {
                get {
                    return ((AddressRow)(this.Rows[index]));
                }
            }
            
            public event AddressRowChangeEventHandler AddressRowChanged;
            
            public event AddressRowChangeEventHandler AddressRowChanging;
            
            public event AddressRowChangeEventHandler AddressRowDeleted;
            
            public event AddressRowChangeEventHandler AddressRowDeleting;
            
            public void AddAddressRow(AddressRow row) {
                this.Rows.Add(row);
            }
            
            public AddressRow AddAddressRow(string AddressLine1, string AddressLine2, string City, StateProvinceRow parentStateProvinceRowByFK_Address_StateProvince_StateProvinceID, string PostalCode, System.Guid rowguid, System.DateTime ModifiedDate) {
                AddressRow rowAddressRow = ((AddressRow)(this.NewRow()));
                rowAddressRow.ItemArray = new object[] {
                        null,
                        AddressLine1,
                        AddressLine2,
                        City,
                        parentStateProvinceRowByFK_Address_StateProvince_StateProvinceID[0],
                        PostalCode,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowAddressRow);
                return rowAddressRow;
            }
            
            public AddressRow FindByAddressID(int AddressID) {
                return ((AddressRow)(this.Rows.Find(new object[] {
                            AddressID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                AddressDataTable cln = ((AddressDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new AddressDataTable();
            }
            
            internal void InitVars() {
                this.columnAddressID = base.Columns["AddressID"];
                this.columnAddressLine1 = base.Columns["AddressLine1"];
                this.columnAddressLine2 = base.Columns["AddressLine2"];
                this.columnCity = base.Columns["City"];
                this.columnStateProvinceID = base.Columns["StateProvinceID"];
                this.columnPostalCode = base.Columns["PostalCode"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnAddressID = new System.Data.DataColumn("AddressID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAddressID);
                this.columnAddressLine1 = new System.Data.DataColumn("AddressLine1", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAddressLine1);
                this.columnAddressLine2 = new System.Data.DataColumn("AddressLine2", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAddressLine2);
                this.columnCity = new System.Data.DataColumn("City", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCity);
                this.columnStateProvinceID = new System.Data.DataColumn("StateProvinceID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStateProvinceID);
                this.columnPostalCode = new System.Data.DataColumn("PostalCode", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPostalCode);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnAddressID}, true));
                this.columnAddressID.AutoIncrement = true;
                this.columnAddressID.AllowDBNull = false;
                this.columnAddressID.ReadOnly = true;
                this.columnAddressID.Unique = true;
                this.columnAddressLine1.AllowDBNull = false;
                this.columnAddressLine1.MaxLength = 60;
                this.columnAddressLine2.MaxLength = 60;
                this.columnCity.AllowDBNull = false;
                this.columnCity.MaxLength = 30;
                this.columnStateProvinceID.AllowDBNull = false;
                this.columnPostalCode.AllowDBNull = false;
                this.columnPostalCode.MaxLength = 15;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public AddressRow NewAddressRow() {
                return ((AddressRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new AddressRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(AddressRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.AddressRowChanged != null)) {
                    this.AddressRowChanged(this, new AddressRowChangeEvent(((AddressRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.AddressRowChanging != null)) {
                    this.AddressRowChanging(this, new AddressRowChangeEvent(((AddressRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.AddressRowDeleted != null)) {
                    this.AddressRowDeleted(this, new AddressRowChangeEvent(((AddressRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.AddressRowDeleting != null)) {
                    this.AddressRowDeleting(this, new AddressRowChangeEvent(((AddressRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveAddressRow(AddressRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "AddressDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class AddressTypeDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnAddressTypeID;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public AddressTypeDataTable() {
                this.TableName = "AddressType";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal AddressTypeDataTable(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;
            }
            
            protected AddressTypeDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn AddressTypeIDColumn {
                get {
                    return this.columnAddressTypeID;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public AddressTypeRow this[int index] {
                get {
                    return ((AddressTypeRow)(this.Rows[index]));
                }
            }
            
            public event AddressTypeRowChangeEventHandler AddressTypeRowChanged;
            
            public event AddressTypeRowChangeEventHandler AddressTypeRowChanging;
            
            public event AddressTypeRowChangeEventHandler AddressTypeRowDeleted;
            
            public event AddressTypeRowChangeEventHandler AddressTypeRowDeleting;
            
            public void AddAddressTypeRow(AddressTypeRow row) {
                this.Rows.Add(row);
            }
            
            public AddressTypeRow AddAddressTypeRow(string Name, System.Guid rowguid, System.DateTime ModifiedDate) {
                AddressTypeRow rowAddressTypeRow = ((AddressTypeRow)(this.NewRow()));
                rowAddressTypeRow.ItemArray = new object[] {
                        null,
                        Name,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowAddressTypeRow);
                return rowAddressTypeRow;
            }
            
            public AddressTypeRow FindByAddressTypeID(int AddressTypeID) {
                return ((AddressTypeRow)(this.Rows.Find(new object[] {
                            AddressTypeID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                AddressTypeDataTable cln = ((AddressTypeDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new AddressTypeDataTable();
            }
            
            internal void InitVars() {
                this.columnAddressTypeID = base.Columns["AddressTypeID"];
                this.columnName = base.Columns["Name"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnAddressTypeID = new System.Data.DataColumn("AddressTypeID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAddressTypeID);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnAddressTypeID}, true));
                this.columnAddressTypeID.AutoIncrement = true;
                this.columnAddressTypeID.AllowDBNull = false;
                this.columnAddressTypeID.ReadOnly = true;
                this.columnAddressTypeID.Unique = true;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public AddressTypeRow NewAddressTypeRow() {
                return ((AddressTypeRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new AddressTypeRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(AddressTypeRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.AddressTypeRowChanged != null)) {
                    this.AddressTypeRowChanged(this, new AddressTypeRowChangeEvent(((AddressTypeRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.AddressTypeRowChanging != null)) {
                    this.AddressTypeRowChanging(this, new AddressTypeRowChangeEvent(((AddressTypeRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.AddressTypeRowDeleted != null)) {
                    this.AddressTypeRowDeleted(this, new AddressTypeRowChangeEvent(((AddressTypeRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.AddressTypeRowDeleting != null)) {
                    this.AddressTypeRowDeleting(this, new AddressTypeRowChangeEvent(((AddressTypeRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveAddressTypeRow(AddressTypeRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "AddressTypeDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ContactDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnContactID;
            
            private System.Data.DataColumn columnNameStyle;
            
            private System.Data.DataColumn columnTitle;
            
            private System.Data.DataColumn columnFirstName;
            
            private System.Data.DataColumn columnMiddleName;
            
            private System.Data.DataColumn columnLastName;
            
            private System.Data.DataColumn columnSuffix;
            
            private System.Data.DataColumn columnEmailAddress;
            
            private System.Data.DataColumn columnEmailPromotion;
            
            private System.Data.DataColumn columnPhone;
            
            private System.Data.DataColumn columnPasswordHash;
            
            private System.Data.DataColumn columnPasswordSalt;
            
            private System.Data.DataColumn columnAdditionalContactInfo;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public ContactDataTable() {
                this.TableName = "Contact";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal ContactDataTable(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;
            }
            
            protected ContactDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ContactIDColumn {
                get {
                    return this.columnContactID;
                }
            }
            
            public System.Data.DataColumn NameStyleColumn {
                get {
                    return this.columnNameStyle;
                }
            }
            
            public System.Data.DataColumn TitleColumn {
                get {
                    return this.columnTitle;
                }
            }
            
            public System.Data.DataColumn FirstNameColumn {
                get {
                    return this.columnFirstName;
                }
            }
            
            public System.Data.DataColumn MiddleNameColumn {
                get {
                    return this.columnMiddleName;
                }
            }
            
            public System.Data.DataColumn LastNameColumn {
                get {
                    return this.columnLastName;
                }
            }
            
            public System.Data.DataColumn SuffixColumn {
                get {
                    return this.columnSuffix;
                }
            }
            
            public System.Data.DataColumn EmailAddressColumn {
                get {
                    return this.columnEmailAddress;
                }
            }
            
            public System.Data.DataColumn EmailPromotionColumn {
                get {
                    return this.columnEmailPromotion;
                }
            }
            
            public System.Data.DataColumn PhoneColumn {
                get {
                    return this.columnPhone;
                }
            }
            
            public System.Data.DataColumn PasswordHashColumn {
                get {
                    return this.columnPasswordHash;
                }
            }
            
            public System.Data.DataColumn PasswordSaltColumn {
                get {
                    return this.columnPasswordSalt;
                }
            }
            
            public System.Data.DataColumn AdditionalContactInfoColumn {
                get {
                    return this.columnAdditionalContactInfo;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public ContactRow this[int index] {
                get {
                    return ((ContactRow)(this.Rows[index]));
                }
            }
            
            public event ContactRowChangeEventHandler ContactRowChanged;
            
            public event ContactRowChangeEventHandler ContactRowChanging;
            
            public event ContactRowChangeEventHandler ContactRowDeleted;
            
            public event ContactRowChangeEventHandler ContactRowDeleting;
            
            public void AddContactRow(ContactRow row) {
                this.Rows.Add(row);
            }
            
            public ContactRow AddContactRow(bool NameStyle, string Title, string FirstName, string MiddleName, string LastName, string Suffix, string EmailAddress, int EmailPromotion, string Phone, string PasswordHash, string PasswordSalt, string AdditionalContactInfo, System.Guid rowguid, System.DateTime ModifiedDate) {
                ContactRow rowContactRow = ((ContactRow)(this.NewRow()));
                rowContactRow.ItemArray = new object[] {
                        null,
                        NameStyle,
                        Title,
                        FirstName,
                        MiddleName,
                        LastName,
                        Suffix,
                        EmailAddress,
                        EmailPromotion,
                        Phone,
                        PasswordHash,
                        PasswordSalt,
                        AdditionalContactInfo,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowContactRow);
                return rowContactRow;
            }
            
            public ContactRow FindByContactID(int ContactID) {
                return ((ContactRow)(this.Rows.Find(new object[] {
                            ContactID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                ContactDataTable cln = ((ContactDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new ContactDataTable();
            }
            
            internal void InitVars() {
                this.columnContactID = base.Columns["ContactID"];
                this.columnNameStyle = base.Columns["NameStyle"];
                this.columnTitle = base.Columns["Title"];
                this.columnFirstName = base.Columns["FirstName"];
                this.columnMiddleName = base.Columns["MiddleName"];
                this.columnLastName = base.Columns["LastName"];
                this.columnSuffix = base.Columns["Suffix"];
                this.columnEmailAddress = base.Columns["EmailAddress"];
                this.columnEmailPromotion = base.Columns["EmailPromotion"];
                this.columnPhone = base.Columns["Phone"];
                this.columnPasswordHash = base.Columns["PasswordHash"];
                this.columnPasswordSalt = base.Columns["PasswordSalt"];
                this.columnAdditionalContactInfo = base.Columns["AdditionalContactInfo"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnContactID = new System.Data.DataColumn("ContactID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnContactID);
                this.columnNameStyle = new System.Data.DataColumn("NameStyle", typeof(bool), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnNameStyle);
                this.columnTitle = new System.Data.DataColumn("Title", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTitle);
                this.columnFirstName = new System.Data.DataColumn("FirstName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnFirstName);
                this.columnMiddleName = new System.Data.DataColumn("MiddleName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnMiddleName);
                this.columnLastName = new System.Data.DataColumn("LastName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLastName);
                this.columnSuffix = new System.Data.DataColumn("Suffix", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSuffix);
                this.columnEmailAddress = new System.Data.DataColumn("EmailAddress", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmailAddress);
                this.columnEmailPromotion = new System.Data.DataColumn("EmailPromotion", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmailPromotion);
                this.columnPhone = new System.Data.DataColumn("Phone", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPhone);
                this.columnPasswordHash = new System.Data.DataColumn("PasswordHash", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPasswordHash);
                this.columnPasswordSalt = new System.Data.DataColumn("PasswordSalt", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPasswordSalt);
                this.columnAdditionalContactInfo = new System.Data.DataColumn("AdditionalContactInfo", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAdditionalContactInfo);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnContactID}, true));
                this.columnContactID.AutoIncrement = true;
                this.columnContactID.AllowDBNull = false;
                this.columnContactID.ReadOnly = true;
                this.columnContactID.Unique = true;
                this.columnNameStyle.AllowDBNull = false;
                this.columnTitle.MaxLength = 8;
                this.columnFirstName.AllowDBNull = false;
                this.columnFirstName.MaxLength = 50;
                this.columnMiddleName.MaxLength = 50;
                this.columnLastName.AllowDBNull = false;
                this.columnLastName.MaxLength = 50;
                this.columnSuffix.MaxLength = 10;
                this.columnEmailAddress.MaxLength = 50;
                this.columnEmailPromotion.AllowDBNull = false;
                this.columnPhone.MaxLength = 25;
                this.columnPasswordHash.AllowDBNull = false;
                this.columnPasswordHash.MaxLength = 40;
                this.columnPasswordSalt.AllowDBNull = false;
                this.columnPasswordSalt.MaxLength = 10;
                this.columnAdditionalContactInfo.MaxLength = 2147483647;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public ContactRow NewContactRow() {
                return ((ContactRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ContactRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ContactRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ContactRowChanged != null)) {
                    this.ContactRowChanged(this, new ContactRowChangeEvent(((ContactRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ContactRowChanging != null)) {
                    this.ContactRowChanging(this, new ContactRowChangeEvent(((ContactRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ContactRowDeleted != null)) {
                    this.ContactRowDeleted(this, new ContactRowChangeEvent(((ContactRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ContactRowDeleting != null)) {
                    this.ContactRowDeleting(this, new ContactRowChangeEvent(((ContactRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveContactRow(ContactRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "ContactDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ContactTypeDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnContactTypeID;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public ContactTypeDataTable() {
                this.TableName = "ContactType";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal ContactTypeDataTable(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;
            }
            
            protected ContactTypeDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ContactTypeIDColumn {
                get {
                    return this.columnContactTypeID;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public ContactTypeRow this[int index] {
                get {
                    return ((ContactTypeRow)(this.Rows[index]));
                }
            }
            
            public event ContactTypeRowChangeEventHandler ContactTypeRowChanged;
            
            public event ContactTypeRowChangeEventHandler ContactTypeRowChanging;
            
            public event ContactTypeRowChangeEventHandler ContactTypeRowDeleted;
            
            public event ContactTypeRowChangeEventHandler ContactTypeRowDeleting;
            
            public void AddContactTypeRow(ContactTypeRow row) {
                this.Rows.Add(row);
            }
            
            public ContactTypeRow AddContactTypeRow(string Name, System.DateTime ModifiedDate) {
                ContactTypeRow rowContactTypeRow = ((ContactTypeRow)(this.NewRow()));
                rowContactTypeRow.ItemArray = new object[] {
                        null,
                        Name,
                        ModifiedDate};
                this.Rows.Add(rowContactTypeRow);
                return rowContactTypeRow;
            }
            
            public ContactTypeRow FindByContactTypeID(int ContactTypeID) {
                return ((ContactTypeRow)(this.Rows.Find(new object[] {
                            ContactTypeID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                ContactTypeDataTable cln = ((ContactTypeDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new ContactTypeDataTable();
            }
            
            internal void InitVars() {
                this.columnContactTypeID = base.Columns["ContactTypeID"];
                this.columnName = base.Columns["Name"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnContactTypeID = new System.Data.DataColumn("ContactTypeID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnContactTypeID);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnContactTypeID}, true));
                this.columnContactTypeID.AutoIncrement = true;
                this.columnContactTypeID.AllowDBNull = false;
                this.columnContactTypeID.ReadOnly = true;
                this.columnContactTypeID.Unique = true;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public ContactTypeRow NewContactTypeRow() {
                return ((ContactTypeRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ContactTypeRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ContactTypeRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ContactTypeRowChanged != null)) {
                    this.ContactTypeRowChanged(this, new ContactTypeRowChangeEvent(((ContactTypeRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ContactTypeRowChanging != null)) {
                    this.ContactTypeRowChanging(this, new ContactTypeRowChangeEvent(((ContactTypeRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ContactTypeRowDeleted != null)) {
                    this.ContactTypeRowDeleted(this, new ContactTypeRowChangeEvent(((ContactTypeRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ContactTypeRowDeleting != null)) {
                    this.ContactTypeRowDeleting(this, new ContactTypeRowChangeEvent(((ContactTypeRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveContactTypeRow(ContactTypeRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "ContactTypeDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class CountryRegionDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnCountryRegionCode;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public CountryRegionDataTable() {
                this.TableName = "CountryRegion";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal CountryRegionDataTable(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;
            }
            
            protected CountryRegionDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn CountryRegionCodeColumn {
                get {
                    return this.columnCountryRegionCode;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public CountryRegionRow this[int index] {
                get {
                    return ((CountryRegionRow)(this.Rows[index]));
                }
            }
            
            public event CountryRegionRowChangeEventHandler CountryRegionRowChanged;
            
            public event CountryRegionRowChangeEventHandler CountryRegionRowChanging;
            
            public event CountryRegionRowChangeEventHandler CountryRegionRowDeleted;
            
            public event CountryRegionRowChangeEventHandler CountryRegionRowDeleting;
            
            public void AddCountryRegionRow(CountryRegionRow row) {
                this.Rows.Add(row);
            }
            
            public CountryRegionRow AddCountryRegionRow(string CountryRegionCode, string Name, System.DateTime ModifiedDate) {
                CountryRegionRow rowCountryRegionRow = ((CountryRegionRow)(this.NewRow()));
                rowCountryRegionRow.ItemArray = new object[] {
                        CountryRegionCode,
                        Name,
                        ModifiedDate};
                this.Rows.Add(rowCountryRegionRow);
                return rowCountryRegionRow;
            }
            
            public CountryRegionRow FindByCountryRegionCode(string CountryRegionCode) {
                return ((CountryRegionRow)(this.Rows.Find(new object[] {
                            CountryRegionCode})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                CountryRegionDataTable cln = ((CountryRegionDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new CountryRegionDataTable();
            }
            
            internal void InitVars() {
                this.columnCountryRegionCode = base.Columns["CountryRegionCode"];
                this.columnName = base.Columns["Name"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnCountryRegionCode = new System.Data.DataColumn("CountryRegionCode", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCountryRegionCode);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnCountryRegionCode}, true));
                this.columnCountryRegionCode.AllowDBNull = false;
                this.columnCountryRegionCode.Unique = true;
                this.columnCountryRegionCode.MaxLength = 3;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public CountryRegionRow NewCountryRegionRow() {
                return ((CountryRegionRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new CountryRegionRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(CountryRegionRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.CountryRegionRowChanged != null)) {
                    this.CountryRegionRowChanged(this, new CountryRegionRowChangeEvent(((CountryRegionRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.CountryRegionRowChanging != null)) {
                    this.CountryRegionRowChanging(this, new CountryRegionRowChangeEvent(((CountryRegionRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.CountryRegionRowDeleted != null)) {
                    this.CountryRegionRowDeleted(this, new CountryRegionRowChangeEvent(((CountryRegionRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.CountryRegionRowDeleting != null)) {
                    this.CountryRegionRowDeleting(this, new CountryRegionRowChangeEvent(((CountryRegionRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveCountryRegionRow(CountryRegionRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "CountryRegionDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class StateProvinceDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnStateProvinceID;
            
            private System.Data.DataColumn columnStateProvinceCode;
            
            private System.Data.DataColumn columnCountryRegionCode;
            
            private System.Data.DataColumn columnIsOnlyStateProvinceFlag;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnTerritoryID;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public StateProvinceDataTable() {
                this.TableName = "StateProvince";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal StateProvinceDataTable(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;
            }
            
            protected StateProvinceDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn StateProvinceIDColumn {
                get {
                    return this.columnStateProvinceID;
                }
            }
            
            public System.Data.DataColumn StateProvinceCodeColumn {
                get {
                    return this.columnStateProvinceCode;
                }
            }
            
            public System.Data.DataColumn CountryRegionCodeColumn {
                get {
                    return this.columnCountryRegionCode;
                }
            }
            
            public System.Data.DataColumn IsOnlyStateProvinceFlagColumn {
                get {
                    return this.columnIsOnlyStateProvinceFlag;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn TerritoryIDColumn {
                get {
                    return this.columnTerritoryID;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public StateProvinceRow this[int index] {
                get {
                    return ((StateProvinceRow)(this.Rows[index]));
                }
            }
            
            public event StateProvinceRowChangeEventHandler StateProvinceRowChanged;
            
            public event StateProvinceRowChangeEventHandler StateProvinceRowChanging;
            
            public event StateProvinceRowChangeEventHandler StateProvinceRowDeleted;
            
            public event StateProvinceRowChangeEventHandler StateProvinceRowDeleting;
            
            public void AddStateProvinceRow(StateProvinceRow row) {
                this.Rows.Add(row);
            }
            
            public StateProvinceRow AddStateProvinceRow(string StateProvinceCode, CountryRegionRow parentCountryRegionRowByFK_StateProvince_CountryRegion_CountryRegionCode, bool IsOnlyStateProvinceFlag, string Name, SalesTerritoryRow parentSalesTerritoryRowByFK_StateProvince_SalesTerritory_TerritoryID, System.Guid rowguid, System.DateTime ModifiedDate) {
                StateProvinceRow rowStateProvinceRow = ((StateProvinceRow)(this.NewRow()));
                rowStateProvinceRow.ItemArray = new object[] {
                        null,
                        StateProvinceCode,
                        parentCountryRegionRowByFK_StateProvince_CountryRegion_CountryRegionCode[0],
                        IsOnlyStateProvinceFlag,
                        Name,
                        parentSalesTerritoryRowByFK_StateProvince_SalesTerritory_TerritoryID[0],
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowStateProvinceRow);
                return rowStateProvinceRow;
            }
            
            public StateProvinceRow FindByStateProvinceID(int StateProvinceID) {
                return ((StateProvinceRow)(this.Rows.Find(new object[] {
                            StateProvinceID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                StateProvinceDataTable cln = ((StateProvinceDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new StateProvinceDataTable();
            }
            
            internal void InitVars() {
                this.columnStateProvinceID = base.Columns["StateProvinceID"];
                this.columnStateProvinceCode = base.Columns["StateProvinceCode"];
                this.columnCountryRegionCode = base.Columns["CountryRegionCode"];
                this.columnIsOnlyStateProvinceFlag = base.Columns["IsOnlyStateProvinceFlag"];
                this.columnName = base.Columns["Name"];
                this.columnTerritoryID = base.Columns["TerritoryID"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnStateProvinceID = new System.Data.DataColumn("StateProvinceID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStateProvinceID);
                this.columnStateProvinceCode = new System.Data.DataColumn("StateProvinceCode", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStateProvinceCode);
                this.columnCountryRegionCode = new System.Data.DataColumn("CountryRegionCode", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCountryRegionCode);
                this.columnIsOnlyStateProvinceFlag = new System.Data.DataColumn("IsOnlyStateProvinceFlag", typeof(bool), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnIsOnlyStateProvinceFlag);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnTerritoryID = new System.Data.DataColumn("TerritoryID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTerritoryID);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnStateProvinceID}, true));
                this.columnStateProvinceID.AutoIncrement = true;
                this.columnStateProvinceID.AllowDBNull = false;
                this.columnStateProvinceID.ReadOnly = true;
                this.columnStateProvinceID.Unique = true;
                this.columnStateProvinceCode.AllowDBNull = false;
                this.columnStateProvinceCode.MaxLength = 3;
                this.columnCountryRegionCode.AllowDBNull = false;
                this.columnCountryRegionCode.MaxLength = 3;
                this.columnIsOnlyStateProvinceFlag.AllowDBNull = false;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnTerritoryID.AllowDBNull = false;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public StateProvinceRow NewStateProvinceRow() {
                return ((StateProvinceRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new StateProvinceRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(StateProvinceRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.StateProvinceRowChanged != null)) {
                    this.StateProvinceRowChanged(this, new StateProvinceRowChangeEvent(((StateProvinceRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.StateProvinceRowChanging != null)) {
                    this.StateProvinceRowChanging(this, new StateProvinceRowChangeEvent(((StateProvinceRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.StateProvinceRowDeleted != null)) {
                    this.StateProvinceRowDeleted(this, new StateProvinceRowChangeEvent(((StateProvinceRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.StateProvinceRowDeleting != null)) {
                    this.StateProvinceRowDeleting(this, new StateProvinceRowChangeEvent(((StateProvinceRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveStateProvinceRow(StateProvinceRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "StateProvinceDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class BillOfMaterialsDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnBillOfMaterialsID;
            
            private System.Data.DataColumn columnProductAssemblyID;
            
            private System.Data.DataColumn columnComponentID;
            
            private System.Data.DataColumn columnStartDate;
            
            private System.Data.DataColumn columnEndDate;
            
            private System.Data.DataColumn columnUnitMeasureCode;
            
            private System.Data.DataColumn columnBOMLevel;
            
            private System.Data.DataColumn columnPerAssemblyQty;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public BillOfMaterialsDataTable() {
                this.TableName = "BillOfMaterials";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal BillOfMaterialsDataTable(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;
            }
            
            protected BillOfMaterialsDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn BillOfMaterialsIDColumn {
                get {
                    return this.columnBillOfMaterialsID;
                }
            }
            
            public System.Data.DataColumn ProductAssemblyIDColumn {
                get {
                    return this.columnProductAssemblyID;
                }
            }
            
            public System.Data.DataColumn ComponentIDColumn {
                get {
                    return this.columnComponentID;
                }
            }
            
            public System.Data.DataColumn StartDateColumn {
                get {
                    return this.columnStartDate;
                }
            }
            
            public System.Data.DataColumn EndDateColumn {
                get {
                    return this.columnEndDate;
                }
            }
            
            public System.Data.DataColumn UnitMeasureCodeColumn {
                get {
                    return this.columnUnitMeasureCode;
                }
            }
            
            public System.Data.DataColumn BOMLevelColumn {
                get {
                    return this.columnBOMLevel;
                }
            }
            
            public System.Data.DataColumn PerAssemblyQtyColumn {
                get {
                    return this.columnPerAssemblyQty;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public BillOfMaterialsRow this[int index] {
                get {
                    return ((BillOfMaterialsRow)(this.Rows[index]));
                }
            }
            
            public event BillOfMaterialsRowChangeEventHandler BillOfMaterialsRowChanged;
            
            public event BillOfMaterialsRowChangeEventHandler BillOfMaterialsRowChanging;
            
            public event BillOfMaterialsRowChangeEventHandler BillOfMaterialsRowDeleted;
            
            public event BillOfMaterialsRowChangeEventHandler BillOfMaterialsRowDeleting;
            
            public void AddBillOfMaterialsRow(BillOfMaterialsRow row) {
                this.Rows.Add(row);
            }
            
            public BillOfMaterialsRow AddBillOfMaterialsRow(ProductRow parentProductRowByFK_BillOfMaterials_Product_ProductAssemblyID, ProductRow parentProductRowByFK_BillOfMaterials_Product_ComponentID, System.DateTime StartDate, System.DateTime EndDate, UnitMeasureRow parentUnitMeasureRowByFK_BillOfMaterials_UnitMeasure_UnitMeasureCode, short BOMLevel, decimal PerAssemblyQty, System.DateTime ModifiedDate) {
                BillOfMaterialsRow rowBillOfMaterialsRow = ((BillOfMaterialsRow)(this.NewRow()));
                rowBillOfMaterialsRow.ItemArray = new object[] {
                        null,
                        parentProductRowByFK_BillOfMaterials_Product_ProductAssemblyID[0],
                        parentProductRowByFK_BillOfMaterials_Product_ComponentID[0],
                        StartDate,
                        EndDate,
                        parentUnitMeasureRowByFK_BillOfMaterials_UnitMeasure_UnitMeasureCode[0],
                        BOMLevel,
                        PerAssemblyQty,
                        ModifiedDate};
                this.Rows.Add(rowBillOfMaterialsRow);
                return rowBillOfMaterialsRow;
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                BillOfMaterialsDataTable cln = ((BillOfMaterialsDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new BillOfMaterialsDataTable();
            }
            
            internal void InitVars() {
                this.columnBillOfMaterialsID = base.Columns["BillOfMaterialsID"];
                this.columnProductAssemblyID = base.Columns["ProductAssemblyID"];
                this.columnComponentID = base.Columns["ComponentID"];
                this.columnStartDate = base.Columns["StartDate"];
                this.columnEndDate = base.Columns["EndDate"];
                this.columnUnitMeasureCode = base.Columns["UnitMeasureCode"];
                this.columnBOMLevel = base.Columns["BOMLevel"];
                this.columnPerAssemblyQty = base.Columns["PerAssemblyQty"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnBillOfMaterialsID = new System.Data.DataColumn("BillOfMaterialsID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnBillOfMaterialsID);
                this.columnProductAssemblyID = new System.Data.DataColumn("ProductAssemblyID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductAssemblyID);
                this.columnComponentID = new System.Data.DataColumn("ComponentID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnComponentID);
                this.columnStartDate = new System.Data.DataColumn("StartDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStartDate);
                this.columnEndDate = new System.Data.DataColumn("EndDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEndDate);
                this.columnUnitMeasureCode = new System.Data.DataColumn("UnitMeasureCode", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnUnitMeasureCode);
                this.columnBOMLevel = new System.Data.DataColumn("BOMLevel", typeof(short), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnBOMLevel);
                this.columnPerAssemblyQty = new System.Data.DataColumn("PerAssemblyQty", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPerAssemblyQty);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnProductAssemblyID,
                                this.columnComponentID,
                                this.columnStartDate}, false));
                this.columnBillOfMaterialsID.AutoIncrement = true;
                this.columnBillOfMaterialsID.AllowDBNull = false;
                this.columnBillOfMaterialsID.ReadOnly = true;
                this.columnComponentID.AllowDBNull = false;
                this.columnStartDate.AllowDBNull = false;
                this.columnUnitMeasureCode.AllowDBNull = false;
                this.columnUnitMeasureCode.MaxLength = 3;
                this.columnBOMLevel.AllowDBNull = false;
                this.columnPerAssemblyQty.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public BillOfMaterialsRow NewBillOfMaterialsRow() {
                return ((BillOfMaterialsRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new BillOfMaterialsRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(BillOfMaterialsRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.BillOfMaterialsRowChanged != null)) {
                    this.BillOfMaterialsRowChanged(this, new BillOfMaterialsRowChangeEvent(((BillOfMaterialsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.BillOfMaterialsRowChanging != null)) {
                    this.BillOfMaterialsRowChanging(this, new BillOfMaterialsRowChangeEvent(((BillOfMaterialsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.BillOfMaterialsRowDeleted != null)) {
                    this.BillOfMaterialsRowDeleted(this, new BillOfMaterialsRowChangeEvent(((BillOfMaterialsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.BillOfMaterialsRowDeleting != null)) {
                    this.BillOfMaterialsRowDeleting(this, new BillOfMaterialsRowChangeEvent(((BillOfMaterialsRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveBillOfMaterialsRow(BillOfMaterialsRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "BillOfMaterialsDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class CultureDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnCultureID;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public CultureDataTable() {
                this.TableName = "Culture";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal CultureDataTable(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;
            }
            
            protected CultureDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn CultureIDColumn {
                get {
                    return this.columnCultureID;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public CultureRow this[int index] {
                get {
                    return ((CultureRow)(this.Rows[index]));
                }
            }
            
            public event CultureRowChangeEventHandler CultureRowChanged;
            
            public event CultureRowChangeEventHandler CultureRowChanging;
            
            public event CultureRowChangeEventHandler CultureRowDeleted;
            
            public event CultureRowChangeEventHandler CultureRowDeleting;
            
            public void AddCultureRow(CultureRow row) {
                this.Rows.Add(row);
            }
            
            public CultureRow AddCultureRow(string CultureID, string Name, System.DateTime ModifiedDate) {
                CultureRow rowCultureRow = ((CultureRow)(this.NewRow()));
                rowCultureRow.ItemArray = new object[] {
                        CultureID,
                        Name,
                        ModifiedDate};
                this.Rows.Add(rowCultureRow);
                return rowCultureRow;
            }
            
            public CultureRow FindByCultureID(string CultureID) {
                return ((CultureRow)(this.Rows.Find(new object[] {
                            CultureID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                CultureDataTable cln = ((CultureDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new CultureDataTable();
            }
            
            internal void InitVars() {
                this.columnCultureID = base.Columns["CultureID"];
                this.columnName = base.Columns["Name"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnCultureID = new System.Data.DataColumn("CultureID", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCultureID);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnCultureID}, true));
                this.columnCultureID.AllowDBNull = false;
                this.columnCultureID.Unique = true;
                this.columnCultureID.MaxLength = 6;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public CultureRow NewCultureRow() {
                return ((CultureRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new CultureRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(CultureRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.CultureRowChanged != null)) {
                    this.CultureRowChanged(this, new CultureRowChangeEvent(((CultureRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.CultureRowChanging != null)) {
                    this.CultureRowChanging(this, new CultureRowChangeEvent(((CultureRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.CultureRowDeleted != null)) {
                    this.CultureRowDeleted(this, new CultureRowChangeEvent(((CultureRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.CultureRowDeleting != null)) {
                    this.CultureRowDeleting(this, new CultureRowChangeEvent(((CultureRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveCultureRow(CultureRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "CultureDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class DocumentDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnDocumentID;
            
            private System.Data.DataColumn columnTitle;
            
            private System.Data.DataColumn columnFileName;
            
            private System.Data.DataColumn columnFileExtension;
            
            private System.Data.DataColumn columnRevision;
            
            private System.Data.DataColumn columnChangeNumber;
            
            private System.Data.DataColumn columnStatus;
            
            private System.Data.DataColumn columnDocumentSummary;
            
            private System.Data.DataColumn columnDocument;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public DocumentDataTable() {
                this.TableName = "Document";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal DocumentDataTable(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;
            }
            
            protected DocumentDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn DocumentIDColumn {
                get {
                    return this.columnDocumentID;
                }
            }
            
            public System.Data.DataColumn TitleColumn {
                get {
                    return this.columnTitle;
                }
            }
            
            public System.Data.DataColumn FileNameColumn {
                get {
                    return this.columnFileName;
                }
            }
            
            public System.Data.DataColumn FileExtensionColumn {
                get {
                    return this.columnFileExtension;
                }
            }
            
            public System.Data.DataColumn RevisionColumn {
                get {
                    return this.columnRevision;
                }
            }
            
            public System.Data.DataColumn ChangeNumberColumn {
                get {
                    return this.columnChangeNumber;
                }
            }
            
            public System.Data.DataColumn StatusColumn {
                get {
                    return this.columnStatus;
                }
            }
            
            public System.Data.DataColumn DocumentSummaryColumn {
                get {
                    return this.columnDocumentSummary;
                }
            }
            
            public System.Data.DataColumn DocumentColumn {
                get {
                    return this.columnDocument;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public DocumentRow this[int index] {
                get {
                    return ((DocumentRow)(this.Rows[index]));
                }
            }
            
            public event DocumentRowChangeEventHandler DocumentRowChanged;
            
            public event DocumentRowChangeEventHandler DocumentRowChanging;
            
            public event DocumentRowChangeEventHandler DocumentRowDeleted;
            
            public event DocumentRowChangeEventHandler DocumentRowDeleting;
            
            public void AddDocumentRow(DocumentRow row) {
                this.Rows.Add(row);
            }
            
            public DocumentRow AddDocumentRow(string Title, string FileName, string FileExtension, string Revision, int ChangeNumber, byte Status, string DocumentSummary, byte[] Document, System.DateTime ModifiedDate) {
                DocumentRow rowDocumentRow = ((DocumentRow)(this.NewRow()));
                rowDocumentRow.ItemArray = new object[] {
                        null,
                        Title,
                        FileName,
                        FileExtension,
                        Revision,
                        ChangeNumber,
                        Status,
                        DocumentSummary,
                        Document,
                        ModifiedDate};
                this.Rows.Add(rowDocumentRow);
                return rowDocumentRow;
            }
            
            public DocumentRow FindByDocumentID(int DocumentID) {
                return ((DocumentRow)(this.Rows.Find(new object[] {
                            DocumentID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                DocumentDataTable cln = ((DocumentDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new DocumentDataTable();
            }
            
            internal void InitVars() {
                this.columnDocumentID = base.Columns["DocumentID"];
                this.columnTitle = base.Columns["Title"];
                this.columnFileName = base.Columns["FileName"];
                this.columnFileExtension = base.Columns["FileExtension"];
                this.columnRevision = base.Columns["Revision"];
                this.columnChangeNumber = base.Columns["ChangeNumber"];
                this.columnStatus = base.Columns["Status"];
                this.columnDocumentSummary = base.Columns["DocumentSummary"];
                this.columnDocument = base.Columns["Document"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnDocumentID = new System.Data.DataColumn("DocumentID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDocumentID);
                this.columnTitle = new System.Data.DataColumn("Title", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTitle);
                this.columnFileName = new System.Data.DataColumn("FileName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnFileName);
                this.columnFileExtension = new System.Data.DataColumn("FileExtension", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnFileExtension);
                this.columnRevision = new System.Data.DataColumn("Revision", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnRevision);
                this.columnChangeNumber = new System.Data.DataColumn("ChangeNumber", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnChangeNumber);
                this.columnStatus = new System.Data.DataColumn("Status", typeof(byte), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStatus);
                this.columnDocumentSummary = new System.Data.DataColumn("DocumentSummary", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDocumentSummary);
                this.columnDocument = new System.Data.DataColumn("Document", typeof(byte[]), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDocument);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnDocumentID}, true));
                this.columnDocumentID.AutoIncrement = true;
                this.columnDocumentID.AllowDBNull = false;
                this.columnDocumentID.ReadOnly = true;
                this.columnDocumentID.Unique = true;
                this.columnTitle.AllowDBNull = false;
                this.columnTitle.MaxLength = 50;
                this.columnFileName.AllowDBNull = false;
                this.columnFileName.MaxLength = 400;
                this.columnFileExtension.AllowDBNull = false;
                this.columnFileExtension.MaxLength = 8;
                this.columnRevision.AllowDBNull = false;
                this.columnRevision.MaxLength = 5;
                this.columnChangeNumber.AllowDBNull = false;
                this.columnStatus.AllowDBNull = false;
                this.columnDocumentSummary.MaxLength = 2147483647;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public DocumentRow NewDocumentRow() {
                return ((DocumentRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new DocumentRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(DocumentRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.DocumentRowChanged != null)) {
                    this.DocumentRowChanged(this, new DocumentRowChangeEvent(((DocumentRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.DocumentRowChanging != null)) {
                    this.DocumentRowChanging(this, new DocumentRowChangeEvent(((DocumentRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.DocumentRowDeleted != null)) {
                    this.DocumentRowDeleted(this, new DocumentRowChangeEvent(((DocumentRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.DocumentRowDeleting != null)) {
                    this.DocumentRowDeleting(this, new DocumentRowChangeEvent(((DocumentRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveDocumentRow(DocumentRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "DocumentDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class IllustrationDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnIllustrationID;
            
            private System.Data.DataColumn columnDiagram;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public IllustrationDataTable() {
                this.TableName = "Illustration";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal IllustrationDataTable(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;
            }
            
            protected IllustrationDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn IllustrationIDColumn {
                get {
                    return this.columnIllustrationID;
                }
            }
            
            public System.Data.DataColumn DiagramColumn {
                get {
                    return this.columnDiagram;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public IllustrationRow this[int index] {
                get {
                    return ((IllustrationRow)(this.Rows[index]));
                }
            }
            
            public event IllustrationRowChangeEventHandler IllustrationRowChanged;
            
            public event IllustrationRowChangeEventHandler IllustrationRowChanging;
            
            public event IllustrationRowChangeEventHandler IllustrationRowDeleted;
            
            public event IllustrationRowChangeEventHandler IllustrationRowDeleting;
            
            public void AddIllustrationRow(IllustrationRow row) {
                this.Rows.Add(row);
            }
            
            public IllustrationRow AddIllustrationRow(string Diagram, System.DateTime ModifiedDate) {
                IllustrationRow rowIllustrationRow = ((IllustrationRow)(this.NewRow()));
                rowIllustrationRow.ItemArray = new object[] {
                        null,
                        Diagram,
                        ModifiedDate};
                this.Rows.Add(rowIllustrationRow);
                return rowIllustrationRow;
            }
            
            public IllustrationRow FindByIllustrationID(int IllustrationID) {
                return ((IllustrationRow)(this.Rows.Find(new object[] {
                            IllustrationID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                IllustrationDataTable cln = ((IllustrationDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new IllustrationDataTable();
            }
            
            internal void InitVars() {
                this.columnIllustrationID = base.Columns["IllustrationID"];
                this.columnDiagram = base.Columns["Diagram"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnIllustrationID = new System.Data.DataColumn("IllustrationID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnIllustrationID);
                this.columnDiagram = new System.Data.DataColumn("Diagram", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDiagram);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnIllustrationID}, true));
                this.columnIllustrationID.AutoIncrement = true;
                this.columnIllustrationID.AllowDBNull = false;
                this.columnIllustrationID.ReadOnly = true;
                this.columnIllustrationID.Unique = true;
                this.columnDiagram.MaxLength = 2147483647;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public IllustrationRow NewIllustrationRow() {
                return ((IllustrationRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new IllustrationRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(IllustrationRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.IllustrationRowChanged != null)) {
                    this.IllustrationRowChanged(this, new IllustrationRowChangeEvent(((IllustrationRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.IllustrationRowChanging != null)) {
                    this.IllustrationRowChanging(this, new IllustrationRowChangeEvent(((IllustrationRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.IllustrationRowDeleted != null)) {
                    this.IllustrationRowDeleted(this, new IllustrationRowChangeEvent(((IllustrationRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.IllustrationRowDeleting != null)) {
                    this.IllustrationRowDeleting(this, new IllustrationRowChangeEvent(((IllustrationRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveIllustrationRow(IllustrationRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "IllustrationDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class LocationDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnLocationID;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnCostRate;
            
            private System.Data.DataColumn columnAvailability;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public LocationDataTable() {
                this.TableName = "Location";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal LocationDataTable(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;
            }
            
            protected LocationDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn LocationIDColumn {
                get {
                    return this.columnLocationID;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn CostRateColumn {
                get {
                    return this.columnCostRate;
                }
            }
            
            public System.Data.DataColumn AvailabilityColumn {
                get {
                    return this.columnAvailability;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public LocationRow this[int index] {
                get {
                    return ((LocationRow)(this.Rows[index]));
                }
            }
            
            public event LocationRowChangeEventHandler LocationRowChanged;
            
            public event LocationRowChangeEventHandler LocationRowChanging;
            
            public event LocationRowChangeEventHandler LocationRowDeleted;
            
            public event LocationRowChangeEventHandler LocationRowDeleting;
            
            public void AddLocationRow(LocationRow row) {
                this.Rows.Add(row);
            }
            
            public LocationRow AddLocationRow(string Name, decimal CostRate, decimal Availability, System.DateTime ModifiedDate) {
                LocationRow rowLocationRow = ((LocationRow)(this.NewRow()));
                rowLocationRow.ItemArray = new object[] {
                        null,
                        Name,
                        CostRate,
                        Availability,
                        ModifiedDate};
                this.Rows.Add(rowLocationRow);
                return rowLocationRow;
            }
            
            public LocationRow FindByLocationID(short LocationID) {
                return ((LocationRow)(this.Rows.Find(new object[] {
                            LocationID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                LocationDataTable cln = ((LocationDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new LocationDataTable();
            }
            
            internal void InitVars() {
                this.columnLocationID = base.Columns["LocationID"];
                this.columnName = base.Columns["Name"];
                this.columnCostRate = base.Columns["CostRate"];
                this.columnAvailability = base.Columns["Availability"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnLocationID = new System.Data.DataColumn("LocationID", typeof(short), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLocationID);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnCostRate = new System.Data.DataColumn("CostRate", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCostRate);
                this.columnAvailability = new System.Data.DataColumn("Availability", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAvailability);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnLocationID}, true));
                this.columnLocationID.AutoIncrement = true;
                this.columnLocationID.AllowDBNull = false;
                this.columnLocationID.ReadOnly = true;
                this.columnLocationID.Unique = true;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnCostRate.AllowDBNull = false;
                this.columnAvailability.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public LocationRow NewLocationRow() {
                return ((LocationRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new LocationRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(LocationRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.LocationRowChanged != null)) {
                    this.LocationRowChanged(this, new LocationRowChangeEvent(((LocationRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.LocationRowChanging != null)) {
                    this.LocationRowChanging(this, new LocationRowChangeEvent(((LocationRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.LocationRowDeleted != null)) {
                    this.LocationRowDeleted(this, new LocationRowChangeEvent(((LocationRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.LocationRowDeleting != null)) {
                    this.LocationRowDeleting(this, new LocationRowChangeEvent(((LocationRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveLocationRow(LocationRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "LocationDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ProductDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnProductID;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnProductNumber;
            
            private System.Data.DataColumn columnMakeFlag;
            
            private System.Data.DataColumn columnFinishedGoodsFlag;
            
            private System.Data.DataColumn columnColor;
            
            private System.Data.DataColumn columnSafetyStockLevel;
            
            private System.Data.DataColumn columnReorderPoint;
            
            private System.Data.DataColumn columnStandardCost;
            
            private System.Data.DataColumn columnListPrice;
            
            private System.Data.DataColumn columnSize;
            
            private System.Data.DataColumn columnSizeUnitMeasureCode;
            
            private System.Data.DataColumn columnWeightUnitMeasureCode;
            
            private System.Data.DataColumn columnWeight;
            
            private System.Data.DataColumn columnDaysToManufacture;
            
            private System.Data.DataColumn columnProductLine;
            
            private System.Data.DataColumn columnClass;
            
            private System.Data.DataColumn columnStyle;
            
            private System.Data.DataColumn columnProductSubcategoryID;
            
            private System.Data.DataColumn columnProductModelID;
            
            private System.Data.DataColumn columnSellStartDate;
            
            private System.Data.DataColumn columnSellEndDate;
            
            private System.Data.DataColumn columnDiscontinuedDate;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public ProductDataTable() {
                this.TableName = "Product";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal ProductDataTable(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;
            }
            
            protected ProductDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ProductIDColumn {
                get {
                    return this.columnProductID;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn ProductNumberColumn {
                get {
                    return this.columnProductNumber;
                }
            }
            
            public System.Data.DataColumn MakeFlagColumn {
                get {
                    return this.columnMakeFlag;
                }
            }
            
            public System.Data.DataColumn FinishedGoodsFlagColumn {
                get {
                    return this.columnFinishedGoodsFlag;
                }
            }
            
            public System.Data.DataColumn ColorColumn {
                get {
                    return this.columnColor;
                }
            }
            
            public System.Data.DataColumn SafetyStockLevelColumn {
                get {
                    return this.columnSafetyStockLevel;
                }
            }
            
            public System.Data.DataColumn ReorderPointColumn {
                get {
                    return this.columnReorderPoint;
                }
            }
            
            public System.Data.DataColumn StandardCostColumn {
                get {
                    return this.columnStandardCost;
                }
            }
            
            public System.Data.DataColumn ListPriceColumn {
                get {
                    return this.columnListPrice;
                }
            }
            
            public System.Data.DataColumn SizeColumn {
                get {
                    return this.columnSize;
                }
            }
            
            public System.Data.DataColumn SizeUnitMeasureCodeColumn {
                get {
                    return this.columnSizeUnitMeasureCode;
                }
            }
            
            public System.Data.DataColumn WeightUnitMeasureCodeColumn {
                get {
                    return this.columnWeightUnitMeasureCode;
                }
            }
            
            public System.Data.DataColumn WeightColumn {
                get {
                    return this.columnWeight;
                }
            }
            
            public System.Data.DataColumn DaysToManufactureColumn {
                get {
                    return this.columnDaysToManufacture;
                }
            }
            
            public System.Data.DataColumn ProductLineColumn {
                get {
                    return this.columnProductLine;
                }
            }
            
            public System.Data.DataColumn ClassColumn {
                get {
                    return this.columnClass;
                }
            }
            
            public System.Data.DataColumn StyleColumn {
                get {
                    return this.columnStyle;
                }
            }
            
            public System.Data.DataColumn ProductSubcategoryIDColumn {
                get {
                    return this.columnProductSubcategoryID;
                }
            }
            
            public System.Data.DataColumn ProductModelIDColumn {
                get {
                    return this.columnProductModelID;
                }
            }
            
            public System.Data.DataColumn SellStartDateColumn {
                get {
                    return this.columnSellStartDate;
                }
            }
            
            public System.Data.DataColumn SellEndDateColumn {
                get {
                    return this.columnSellEndDate;
                }
            }
            
            public System.Data.DataColumn DiscontinuedDateColumn {
                get {
                    return this.columnDiscontinuedDate;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public ProductRow this[int index] {
                get {
                    return ((ProductRow)(this.Rows[index]));
                }
            }
            
            public event ProductRowChangeEventHandler ProductRowChanged;
            
            public event ProductRowChangeEventHandler ProductRowChanging;
            
            public event ProductRowChangeEventHandler ProductRowDeleted;
            
            public event ProductRowChangeEventHandler ProductRowDeleting;
            
            public void AddProductRow(ProductRow row) {
                this.Rows.Add(row);
            }
            
            public ProductRow AddProductRow(
                        string Name, 
                        string ProductNumber, 
                        bool MakeFlag, 
                        bool FinishedGoodsFlag, 
                        string Color, 
                        short SafetyStockLevel, 
                        short ReorderPoint, 
                        decimal StandardCost, 
                        decimal ListPrice, 
                        string Size, 
                        UnitMeasureRow parentUnitMeasureRowByFK_Product_UnitMeasure_SizeUnitMeasureCode, 
                        UnitMeasureRow parentUnitMeasureRowByFK_Product_UnitMeasure_WeightUnitMeasureCode, 
                        decimal Weight, 
                        int DaysToManufacture, 
                        string ProductLine, 
                        string Class, 
                        string Style, 
                        ProductSubcategoryRow parentProductSubcategoryRowByFK_Product_ProductSubcategory_ProductSubcategoryID, 
                        ProductModelRow parentProductModelRowByFK_Product_ProductModel_ProductModelID, 
                        System.DateTime SellStartDate, 
                        System.DateTime SellEndDate, 
                        System.DateTime DiscontinuedDate, 
                        System.Guid rowguid, 
                        System.DateTime ModifiedDate) {
                ProductRow rowProductRow = ((ProductRow)(this.NewRow()));
                rowProductRow.ItemArray = new object[] {
                        null,
                        Name,
                        ProductNumber,
                        MakeFlag,
                        FinishedGoodsFlag,
                        Color,
                        SafetyStockLevel,
                        ReorderPoint,
                        StandardCost,
                        ListPrice,
                        Size,
                        parentUnitMeasureRowByFK_Product_UnitMeasure_SizeUnitMeasureCode[0],
                        parentUnitMeasureRowByFK_Product_UnitMeasure_WeightUnitMeasureCode[0],
                        Weight,
                        DaysToManufacture,
                        ProductLine,
                        Class,
                        Style,
                        parentProductSubcategoryRowByFK_Product_ProductSubcategory_ProductSubcategoryID[0],
                        parentProductModelRowByFK_Product_ProductModel_ProductModelID[0],
                        SellStartDate,
                        SellEndDate,
                        DiscontinuedDate,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowProductRow);
                return rowProductRow;
            }
            
            public ProductRow FindByProductID(int ProductID) {
                return ((ProductRow)(this.Rows.Find(new object[] {
                            ProductID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                ProductDataTable cln = ((ProductDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new ProductDataTable();
            }
            
            internal void InitVars() {
                this.columnProductID = base.Columns["ProductID"];
                this.columnName = base.Columns["Name"];
                this.columnProductNumber = base.Columns["ProductNumber"];
                this.columnMakeFlag = base.Columns["MakeFlag"];
                this.columnFinishedGoodsFlag = base.Columns["FinishedGoodsFlag"];
                this.columnColor = base.Columns["Color"];
                this.columnSafetyStockLevel = base.Columns["SafetyStockLevel"];
                this.columnReorderPoint = base.Columns["ReorderPoint"];
                this.columnStandardCost = base.Columns["StandardCost"];
                this.columnListPrice = base.Columns["ListPrice"];
                this.columnSize = base.Columns["Size"];
                this.columnSizeUnitMeasureCode = base.Columns["SizeUnitMeasureCode"];
                this.columnWeightUnitMeasureCode = base.Columns["WeightUnitMeasureCode"];
                this.columnWeight = base.Columns["Weight"];
                this.columnDaysToManufacture = base.Columns["DaysToManufacture"];
                this.columnProductLine = base.Columns["ProductLine"];
                this.columnClass = base.Columns["Class"];
                this.columnStyle = base.Columns["Style"];
                this.columnProductSubcategoryID = base.Columns["ProductSubcategoryID"];
                this.columnProductModelID = base.Columns["ProductModelID"];
                this.columnSellStartDate = base.Columns["SellStartDate"];
                this.columnSellEndDate = base.Columns["SellEndDate"];
                this.columnDiscontinuedDate = base.Columns["DiscontinuedDate"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnProductID = new System.Data.DataColumn("ProductID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductID);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnProductNumber = new System.Data.DataColumn("ProductNumber", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductNumber);
                this.columnMakeFlag = new System.Data.DataColumn("MakeFlag", typeof(bool), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnMakeFlag);
                this.columnFinishedGoodsFlag = new System.Data.DataColumn("FinishedGoodsFlag", typeof(bool), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnFinishedGoodsFlag);
                this.columnColor = new System.Data.DataColumn("Color", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnColor);
                this.columnSafetyStockLevel = new System.Data.DataColumn("SafetyStockLevel", typeof(short), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSafetyStockLevel);
                this.columnReorderPoint = new System.Data.DataColumn("ReorderPoint", typeof(short), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnReorderPoint);
                this.columnStandardCost = new System.Data.DataColumn("StandardCost", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStandardCost);
                this.columnListPrice = new System.Data.DataColumn("ListPrice", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnListPrice);
                this.columnSize = new System.Data.DataColumn("Size", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSize);
                this.columnSizeUnitMeasureCode = new System.Data.DataColumn("SizeUnitMeasureCode", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSizeUnitMeasureCode);
                this.columnWeightUnitMeasureCode = new System.Data.DataColumn("WeightUnitMeasureCode", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnWeightUnitMeasureCode);
                this.columnWeight = new System.Data.DataColumn("Weight", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnWeight);
                this.columnDaysToManufacture = new System.Data.DataColumn("DaysToManufacture", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDaysToManufacture);
                this.columnProductLine = new System.Data.DataColumn("ProductLine", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductLine);
                this.columnClass = new System.Data.DataColumn("Class", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnClass);
                this.columnStyle = new System.Data.DataColumn("Style", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStyle);
                this.columnProductSubcategoryID = new System.Data.DataColumn("ProductSubcategoryID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductSubcategoryID);
                this.columnProductModelID = new System.Data.DataColumn("ProductModelID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductModelID);
                this.columnSellStartDate = new System.Data.DataColumn("SellStartDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSellStartDate);
                this.columnSellEndDate = new System.Data.DataColumn("SellEndDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSellEndDate);
                this.columnDiscontinuedDate = new System.Data.DataColumn("DiscontinuedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDiscontinuedDate);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                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.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnProductNumber.AllowDBNull = false;
                this.columnProductNumber.MaxLength = 25;
                this.columnMakeFlag.AllowDBNull = false;
                this.columnFinishedGoodsFlag.AllowDBNull = false;
                this.columnColor.MaxLength = 15;
                this.columnSafetyStockLevel.AllowDBNull = false;
                this.columnReorderPoint.AllowDBNull = false;
                this.columnStandardCost.AllowDBNull = false;
                this.columnListPrice.AllowDBNull = false;
                this.columnSize.MaxLength = 5;
                this.columnSizeUnitMeasureCode.MaxLength = 3;
                this.columnWeightUnitMeasureCode.MaxLength = 3;
                this.columnDaysToManufacture.AllowDBNull = false;
                this.columnProductLine.MaxLength = 2;
                this.columnClass.MaxLength = 2;
                this.columnStyle.MaxLength = 2;
                this.columnSellStartDate.AllowDBNull = false;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public ProductRow NewProductRow() {
                return ((ProductRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ProductRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ProductRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ProductRowChanged != null)) {
                    this.ProductRowChanged(this, new ProductRowChangeEvent(((ProductRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ProductRowChanging != null)) {
                    this.ProductRowChanging(this, new ProductRowChangeEvent(((ProductRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ProductRowDeleted != null)) {
                    this.ProductRowDeleted(this, new ProductRowChangeEvent(((ProductRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ProductRowDeleting != null)) {
                    this.ProductRowDeleting(this, new ProductRowChangeEvent(((ProductRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveProductRow(ProductRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "ProductDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ProductCategoryDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnProductCategoryID;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public ProductCategoryDataTable() {
                this.TableName = "ProductCategory";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal ProductCategoryDataTable(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;
            }
            
            protected ProductCategoryDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ProductCategoryIDColumn {
                get {
                    return this.columnProductCategoryID;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public ProductCategoryRow this[int index] {
                get {
                    return ((ProductCategoryRow)(this.Rows[index]));
                }
            }
            
            public event ProductCategoryRowChangeEventHandler ProductCategoryRowChanged;
            
            public event ProductCategoryRowChangeEventHandler ProductCategoryRowChanging;
            
            public event ProductCategoryRowChangeEventHandler ProductCategoryRowDeleted;
            
            public event ProductCategoryRowChangeEventHandler ProductCategoryRowDeleting;
            
            public void AddProductCategoryRow(ProductCategoryRow row) {
                this.Rows.Add(row);
            }
            
            public ProductCategoryRow AddProductCategoryRow(string Name, System.Guid rowguid, System.DateTime ModifiedDate) {
                ProductCategoryRow rowProductCategoryRow = ((ProductCategoryRow)(this.NewRow()));
                rowProductCategoryRow.ItemArray = new object[] {
                        null,
                        Name,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowProductCategoryRow);
                return rowProductCategoryRow;
            }
            
            public ProductCategoryRow FindByProductCategoryID(int ProductCategoryID) {
                return ((ProductCategoryRow)(this.Rows.Find(new object[] {
                            ProductCategoryID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                ProductCategoryDataTable cln = ((ProductCategoryDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new ProductCategoryDataTable();
            }
            
            internal void InitVars() {
                this.columnProductCategoryID = base.Columns["ProductCategoryID"];
                this.columnName = base.Columns["Name"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnProductCategoryID = new System.Data.DataColumn("ProductCategoryID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductCategoryID);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnProductCategoryID}, true));
                this.columnProductCategoryID.AutoIncrement = true;
                this.columnProductCategoryID.AllowDBNull = false;
                this.columnProductCategoryID.ReadOnly = true;
                this.columnProductCategoryID.Unique = true;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public ProductCategoryRow NewProductCategoryRow() {
                return ((ProductCategoryRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ProductCategoryRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ProductCategoryRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ProductCategoryRowChanged != null)) {
                    this.ProductCategoryRowChanged(this, new ProductCategoryRowChangeEvent(((ProductCategoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ProductCategoryRowChanging != null)) {
                    this.ProductCategoryRowChanging(this, new ProductCategoryRowChangeEvent(((ProductCategoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ProductCategoryRowDeleted != null)) {
                    this.ProductCategoryRowDeleted(this, new ProductCategoryRowChangeEvent(((ProductCategoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ProductCategoryRowDeleting != null)) {
                    this.ProductCategoryRowDeleting(this, new ProductCategoryRowChangeEvent(((ProductCategoryRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveProductCategoryRow(ProductCategoryRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "ProductCategoryDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ProductCostHistoryDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnProductID;
            
            private System.Data.DataColumn columnStartDate;
            
            private System.Data.DataColumn columnEndDate;
            
            private System.Data.DataColumn columnStandardCost;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public ProductCostHistoryDataTable() {
                this.TableName = "ProductCostHistory";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal ProductCostHistoryDataTable(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;
            }
            
            protected ProductCostHistoryDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ProductIDColumn {
                get {
                    return this.columnProductID;
                }
            }
            
            public System.Data.DataColumn StartDateColumn {
                get {
                    return this.columnStartDate;
                }
            }
            
            public System.Data.DataColumn EndDateColumn {
                get {
                    return this.columnEndDate;
                }
            }
            
            public System.Data.DataColumn StandardCostColumn {
                get {
                    return this.columnStandardCost;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public ProductCostHistoryRow this[int index] {
                get {
                    return ((ProductCostHistoryRow)(this.Rows[index]));
                }
            }
            
            public event ProductCostHistoryRowChangeEventHandler ProductCostHistoryRowChanged;
            
            public event ProductCostHistoryRowChangeEventHandler ProductCostHistoryRowChanging;
            
            public event ProductCostHistoryRowChangeEventHandler ProductCostHistoryRowDeleted;
            
            public event ProductCostHistoryRowChangeEventHandler ProductCostHistoryRowDeleting;
            
            public void AddProductCostHistoryRow(ProductCostHistoryRow row) {
                this.Rows.Add(row);
            }
            
            public ProductCostHistoryRow AddProductCostHistoryRow(ProductRow parentProductRowByFK_ProductCostHistory_Product_ProductID, System.DateTime StartDate, System.DateTime EndDate, decimal StandardCost, System.DateTime ModifiedDate) {
                ProductCostHistoryRow rowProductCostHistoryRow = ((ProductCostHistoryRow)(this.NewRow()));
                rowProductCostHistoryRow.ItemArray = new object[] {
                        parentProductRowByFK_ProductCostHistory_Product_ProductID[0],
                        StartDate,
                        EndDate,
                        StandardCost,
                        ModifiedDate};
                this.Rows.Add(rowProductCostHistoryRow);
                return rowProductCostHistoryRow;
            }
            
            public ProductCostHistoryRow FindByProductIDStartDate(int ProductID, System.DateTime StartDate) {
                return ((ProductCostHistoryRow)(this.Rows.Find(new object[] {
                            ProductID,
                            StartDate})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                ProductCostHistoryDataTable cln = ((ProductCostHistoryDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new ProductCostHistoryDataTable();
            }
            
            internal void InitVars() {
                this.columnProductID = base.Columns["ProductID"];
                this.columnStartDate = base.Columns["StartDate"];
                this.columnEndDate = base.Columns["EndDate"];
                this.columnStandardCost = base.Columns["StandardCost"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnProductID = new System.Data.DataColumn("ProductID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductID);
                this.columnStartDate = new System.Data.DataColumn("StartDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStartDate);
                this.columnEndDate = new System.Data.DataColumn("EndDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEndDate);
                this.columnStandardCost = new System.Data.DataColumn("StandardCost", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStandardCost);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnProductID,
                                this.columnStartDate}, true));
                this.columnProductID.AllowDBNull = false;
                this.columnStartDate.AllowDBNull = false;
                this.columnStandardCost.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public ProductCostHistoryRow NewProductCostHistoryRow() {
                return ((ProductCostHistoryRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ProductCostHistoryRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ProductCostHistoryRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ProductCostHistoryRowChanged != null)) {
                    this.ProductCostHistoryRowChanged(this, new ProductCostHistoryRowChangeEvent(((ProductCostHistoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ProductCostHistoryRowChanging != null)) {
                    this.ProductCostHistoryRowChanging(this, new ProductCostHistoryRowChangeEvent(((ProductCostHistoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ProductCostHistoryRowDeleted != null)) {
                    this.ProductCostHistoryRowDeleted(this, new ProductCostHistoryRowChangeEvent(((ProductCostHistoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ProductCostHistoryRowDeleting != null)) {
                    this.ProductCostHistoryRowDeleting(this, new ProductCostHistoryRowChangeEvent(((ProductCostHistoryRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveProductCostHistoryRow(ProductCostHistoryRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "ProductCostHistoryDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ProductDescriptionDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnProductDescriptionID;
            
            private System.Data.DataColumn columnDescription;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public ProductDescriptionDataTable() {
                this.TableName = "ProductDescription";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal ProductDescriptionDataTable(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;
            }
            
            protected ProductDescriptionDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ProductDescriptionIDColumn {
                get {
                    return this.columnProductDescriptionID;
                }
            }
            
            public System.Data.DataColumn DescriptionColumn {
                get {
                    return this.columnDescription;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public ProductDescriptionRow this[int index] {
                get {
                    return ((ProductDescriptionRow)(this.Rows[index]));
                }
            }
            
            public event ProductDescriptionRowChangeEventHandler ProductDescriptionRowChanged;
            
            public event ProductDescriptionRowChangeEventHandler ProductDescriptionRowChanging;
            
            public event ProductDescriptionRowChangeEventHandler ProductDescriptionRowDeleted;
            
            public event ProductDescriptionRowChangeEventHandler ProductDescriptionRowDeleting;
            
            public void AddProductDescriptionRow(ProductDescriptionRow row) {
                this.Rows.Add(row);
            }
            
            public ProductDescriptionRow AddProductDescriptionRow(string Description, System.Guid rowguid, System.DateTime ModifiedDate) {
                ProductDescriptionRow rowProductDescriptionRow = ((ProductDescriptionRow)(this.NewRow()));
                rowProductDescriptionRow.ItemArray = new object[] {
                        null,
                        Description,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowProductDescriptionRow);
                return rowProductDescriptionRow;
            }
            
            public ProductDescriptionRow FindByProductDescriptionID(int ProductDescriptionID) {
                return ((ProductDescriptionRow)(this.Rows.Find(new object[] {
                            ProductDescriptionID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                ProductDescriptionDataTable cln = ((ProductDescriptionDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new ProductDescriptionDataTable();
            }
            
            internal void InitVars() {
                this.columnProductDescriptionID = base.Columns["ProductDescriptionID"];
                this.columnDescription = base.Columns["Description"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnProductDescriptionID = new System.Data.DataColumn("ProductDescriptionID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductDescriptionID);
                this.columnDescription = new System.Data.DataColumn("Description", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDescription);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnProductDescriptionID}, true));
                this.columnProductDescriptionID.AutoIncrement = true;
                this.columnProductDescriptionID.AllowDBNull = false;
                this.columnProductDescriptionID.ReadOnly = true;
                this.columnProductDescriptionID.Unique = true;
                this.columnDescription.AllowDBNull = false;
                this.columnDescription.MaxLength = 400;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public ProductDescriptionRow NewProductDescriptionRow() {
                return ((ProductDescriptionRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ProductDescriptionRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ProductDescriptionRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ProductDescriptionRowChanged != null)) {
                    this.ProductDescriptionRowChanged(this, new ProductDescriptionRowChangeEvent(((ProductDescriptionRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ProductDescriptionRowChanging != null)) {
                    this.ProductDescriptionRowChanging(this, new ProductDescriptionRowChangeEvent(((ProductDescriptionRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ProductDescriptionRowDeleted != null)) {
                    this.ProductDescriptionRowDeleted(this, new ProductDescriptionRowChangeEvent(((ProductDescriptionRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ProductDescriptionRowDeleting != null)) {
                    this.ProductDescriptionRowDeleting(this, new ProductDescriptionRowChangeEvent(((ProductDescriptionRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveProductDescriptionRow(ProductDescriptionRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "ProductDescriptionDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ProductDocumentDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnProductID;
            
            private System.Data.DataColumn columnDocumentID;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public ProductDocumentDataTable() {
                this.TableName = "ProductDocument";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal ProductDocumentDataTable(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;
            }
            
            protected ProductDocumentDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ProductIDColumn {
                get {
                    return this.columnProductID;
                }
            }
            
            public System.Data.DataColumn DocumentIDColumn {
                get {
                    return this.columnDocumentID;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public ProductDocumentRow this[int index] {
                get {
                    return ((ProductDocumentRow)(this.Rows[index]));
                }
            }
            
            public event ProductDocumentRowChangeEventHandler ProductDocumentRowChanged;
            
            public event ProductDocumentRowChangeEventHandler ProductDocumentRowChanging;
            
            public event ProductDocumentRowChangeEventHandler ProductDocumentRowDeleted;
            
            public event ProductDocumentRowChangeEventHandler ProductDocumentRowDeleting;
            
            public void AddProductDocumentRow(ProductDocumentRow row) {
                this.Rows.Add(row);
            }
            
            public ProductDocumentRow AddProductDocumentRow(ProductRow parentProductRowByFK_ProductDocument_Product_ProductID, DocumentRow parentDocumentRowByFK_ProductDocument_Document_DocumentID, System.DateTime ModifiedDate) {
                ProductDocumentRow rowProductDocumentRow = ((ProductDocumentRow)(this.NewRow()));
                rowProductDocumentRow.ItemArray = new object[] {
                        parentProductRowByFK_ProductDocument_Product_ProductID[0],
                        parentDocumentRowByFK_ProductDocument_Document_DocumentID[0],
                        ModifiedDate};
                this.Rows.Add(rowProductDocumentRow);
                return rowProductDocumentRow;
            }
            
            public ProductDocumentRow FindByProductIDDocumentID(int ProductID, int DocumentID) {
                return ((ProductDocumentRow)(this.Rows.Find(new object[] {
                            ProductID,
                            DocumentID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                ProductDocumentDataTable cln = ((ProductDocumentDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new ProductDocumentDataTable();
            }
            
            internal void InitVars() {
                this.columnProductID = base.Columns["ProductID"];
                this.columnDocumentID = base.Columns["DocumentID"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnProductID = new System.Data.DataColumn("ProductID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductID);
                this.columnDocumentID = new System.Data.DataColumn("DocumentID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDocumentID);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnProductID,
                                this.columnDocumentID}, true));
                this.columnProductID.AllowDBNull = false;
                this.columnDocumentID.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public ProductDocumentRow NewProductDocumentRow() {
                return ((ProductDocumentRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ProductDocumentRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ProductDocumentRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ProductDocumentRowChanged != null)) {
                    this.ProductDocumentRowChanged(this, new ProductDocumentRowChangeEvent(((ProductDocumentRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ProductDocumentRowChanging != null)) {
                    this.ProductDocumentRowChanging(this, new ProductDocumentRowChangeEvent(((ProductDocumentRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ProductDocumentRowDeleted != null)) {
                    this.ProductDocumentRowDeleted(this, new ProductDocumentRowChangeEvent(((ProductDocumentRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ProductDocumentRowDeleting != null)) {
                    this.ProductDocumentRowDeleting(this, new ProductDocumentRowChangeEvent(((ProductDocumentRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveProductDocumentRow(ProductDocumentRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "ProductDocumentDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ProductInventoryDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnProductID;
            
            private System.Data.DataColumn columnLocationID;
            
            private System.Data.DataColumn columnShelf;
            
            private System.Data.DataColumn columnBin;
            
            private System.Data.DataColumn columnQuantity;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public ProductInventoryDataTable() {
                this.TableName = "ProductInventory";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal ProductInventoryDataTable(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;
            }
            
            protected ProductInventoryDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ProductIDColumn {
                get {
                    return this.columnProductID;
                }
            }
            
            public System.Data.DataColumn LocationIDColumn {
                get {
                    return this.columnLocationID;
                }
            }
            
            public System.Data.DataColumn ShelfColumn {
                get {
                    return this.columnShelf;
                }
            }
            
            public System.Data.DataColumn BinColumn {
                get {
                    return this.columnBin;
                }
            }
            
            public System.Data.DataColumn QuantityColumn {
                get {
                    return this.columnQuantity;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public ProductInventoryRow this[int index] {
                get {
                    return ((ProductInventoryRow)(this.Rows[index]));
                }
            }
            
            public event ProductInventoryRowChangeEventHandler ProductInventoryRowChanged;
            
            public event ProductInventoryRowChangeEventHandler ProductInventoryRowChanging;
            
            public event ProductInventoryRowChangeEventHandler ProductInventoryRowDeleted;
            
            public event ProductInventoryRowChangeEventHandler ProductInventoryRowDeleting;
            
            public void AddProductInventoryRow(ProductInventoryRow row) {
                this.Rows.Add(row);
            }
            
            public ProductInventoryRow AddProductInventoryRow(ProductRow parentProductRowByFK_ProductInventory_Product_ProductID, LocationRow parentLocationRowByFK_ProductInventory_Location_LocationID, string Shelf, byte Bin, short Quantity, System.Guid rowguid, System.DateTime ModifiedDate) {
                ProductInventoryRow rowProductInventoryRow = ((ProductInventoryRow)(this.NewRow()));
                rowProductInventoryRow.ItemArray = new object[] {
                        parentProductRowByFK_ProductInventory_Product_ProductID[0],
                        parentLocationRowByFK_ProductInventory_Location_LocationID[0],
                        Shelf,
                        Bin,
                        Quantity,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowProductInventoryRow);
                return rowProductInventoryRow;
            }
            
            public ProductInventoryRow FindByProductIDLocationID(int ProductID, short LocationID) {
                return ((ProductInventoryRow)(this.Rows.Find(new object[] {
                            ProductID,
                            LocationID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                ProductInventoryDataTable cln = ((ProductInventoryDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new ProductInventoryDataTable();
            }
            
            internal void InitVars() {
                this.columnProductID = base.Columns["ProductID"];
                this.columnLocationID = base.Columns["LocationID"];
                this.columnShelf = base.Columns["Shelf"];
                this.columnBin = base.Columns["Bin"];
                this.columnQuantity = base.Columns["Quantity"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnProductID = new System.Data.DataColumn("ProductID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductID);
                this.columnLocationID = new System.Data.DataColumn("LocationID", typeof(short), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLocationID);
                this.columnShelf = new System.Data.DataColumn("Shelf", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnShelf);
                this.columnBin = new System.Data.DataColumn("Bin", typeof(byte), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnBin);
                this.columnQuantity = new System.Data.DataColumn("Quantity", typeof(short), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnQuantity);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnProductID,
                                this.columnLocationID}, true));
                this.columnProductID.AllowDBNull = false;
                this.columnLocationID.AllowDBNull = false;
                this.columnShelf.AllowDBNull = false;
                this.columnShelf.MaxLength = 10;
                this.columnBin.AllowDBNull = false;
                this.columnQuantity.AllowDBNull = false;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public ProductInventoryRow NewProductInventoryRow() {
                return ((ProductInventoryRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ProductInventoryRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ProductInventoryRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ProductInventoryRowChanged != null)) {
                    this.ProductInventoryRowChanged(this, new ProductInventoryRowChangeEvent(((ProductInventoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ProductInventoryRowChanging != null)) {
                    this.ProductInventoryRowChanging(this, new ProductInventoryRowChangeEvent(((ProductInventoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ProductInventoryRowDeleted != null)) {
                    this.ProductInventoryRowDeleted(this, new ProductInventoryRowChangeEvent(((ProductInventoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ProductInventoryRowDeleting != null)) {
                    this.ProductInventoryRowDeleting(this, new ProductInventoryRowChangeEvent(((ProductInventoryRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveProductInventoryRow(ProductInventoryRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "ProductInventoryDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ProductListPriceHistoryDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnProductID;
            
            private System.Data.DataColumn columnStartDate;
            
            private System.Data.DataColumn columnEndDate;
            
            private System.Data.DataColumn columnListPrice;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public ProductListPriceHistoryDataTable() {
                this.TableName = "ProductListPriceHistory";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal ProductListPriceHistoryDataTable(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;
            }
            
            protected ProductListPriceHistoryDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ProductIDColumn {
                get {
                    return this.columnProductID;
                }
            }
            
            public System.Data.DataColumn StartDateColumn {
                get {
                    return this.columnStartDate;
                }
            }
            
            public System.Data.DataColumn EndDateColumn {
                get {
                    return this.columnEndDate;
                }
            }
            
            public System.Data.DataColumn ListPriceColumn {
                get {
                    return this.columnListPrice;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public ProductListPriceHistoryRow this[int index] {
                get {
                    return ((ProductListPriceHistoryRow)(this.Rows[index]));
                }
            }
            
            public event ProductListPriceHistoryRowChangeEventHandler ProductListPriceHistoryRowChanged;
            
            public event ProductListPriceHistoryRowChangeEventHandler ProductListPriceHistoryRowChanging;
            
            public event ProductListPriceHistoryRowChangeEventHandler ProductListPriceHistoryRowDeleted;
            
            public event ProductListPriceHistoryRowChangeEventHandler ProductListPriceHistoryRowDeleting;
            
            public void AddProductListPriceHistoryRow(ProductListPriceHistoryRow row) {
                this.Rows.Add(row);
            }
            
            public ProductListPriceHistoryRow AddProductListPriceHistoryRow(ProductRow parentProductRowByFK_ProductListPriceHistory_Product_ProductID, System.DateTime StartDate, System.DateTime EndDate, decimal ListPrice, System.DateTime ModifiedDate) {
                ProductListPriceHistoryRow rowProductListPriceHistoryRow = ((ProductListPriceHistoryRow)(this.NewRow()));
                rowProductListPriceHistoryRow.ItemArray = new object[] {
                        parentProductRowByFK_ProductListPriceHistory_Product_ProductID[0],
                        StartDate,
                        EndDate,
                        ListPrice,
                        ModifiedDate};
                this.Rows.Add(rowProductListPriceHistoryRow);
                return rowProductListPriceHistoryRow;
            }
            
            public ProductListPriceHistoryRow FindByProductIDStartDate(int ProductID, System.DateTime StartDate) {
                return ((ProductListPriceHistoryRow)(this.Rows.Find(new object[] {
                            ProductID,
                            StartDate})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                ProductListPriceHistoryDataTable cln = ((ProductListPriceHistoryDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new ProductListPriceHistoryDataTable();
            }
            
            internal void InitVars() {
                this.columnProductID = base.Columns["ProductID"];
                this.columnStartDate = base.Columns["StartDate"];
                this.columnEndDate = base.Columns["EndDate"];
                this.columnListPrice = base.Columns["ListPrice"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnProductID = new System.Data.DataColumn("ProductID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductID);
                this.columnStartDate = new System.Data.DataColumn("StartDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStartDate);
                this.columnEndDate = new System.Data.DataColumn("EndDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEndDate);
                this.columnListPrice = new System.Data.DataColumn("ListPrice", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnListPrice);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnProductID,
                                this.columnStartDate}, true));
                this.columnProductID.AllowDBNull = false;
                this.columnStartDate.AllowDBNull = false;
                this.columnListPrice.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public ProductListPriceHistoryRow NewProductListPriceHistoryRow() {
                return ((ProductListPriceHistoryRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ProductListPriceHistoryRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ProductListPriceHistoryRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ProductListPriceHistoryRowChanged != null)) {
                    this.ProductListPriceHistoryRowChanged(this, new ProductListPriceHistoryRowChangeEvent(((ProductListPriceHistoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ProductListPriceHistoryRowChanging != null)) {
                    this.ProductListPriceHistoryRowChanging(this, new ProductListPriceHistoryRowChangeEvent(((ProductListPriceHistoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ProductListPriceHistoryRowDeleted != null)) {
                    this.ProductListPriceHistoryRowDeleted(this, new ProductListPriceHistoryRowChangeEvent(((ProductListPriceHistoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ProductListPriceHistoryRowDeleting != null)) {
                    this.ProductListPriceHistoryRowDeleting(this, new ProductListPriceHistoryRowChangeEvent(((ProductListPriceHistoryRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveProductListPriceHistoryRow(ProductListPriceHistoryRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "ProductListPriceHistoryDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ProductModelDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnProductModelID;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnCatalogDescription;
            
            private System.Data.DataColumn columnInstructions;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public ProductModelDataTable() {
                this.TableName = "ProductModel";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal ProductModelDataTable(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;
            }
            
            protected ProductModelDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ProductModelIDColumn {
                get {
                    return this.columnProductModelID;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn CatalogDescriptionColumn {
                get {
                    return this.columnCatalogDescription;
                }
            }
            
            public System.Data.DataColumn InstructionsColumn {
                get {
                    return this.columnInstructions;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public ProductModelRow this[int index] {
                get {
                    return ((ProductModelRow)(this.Rows[index]));
                }
            }
            
            public event ProductModelRowChangeEventHandler ProductModelRowChanged;
            
            public event ProductModelRowChangeEventHandler ProductModelRowChanging;
            
            public event ProductModelRowChangeEventHandler ProductModelRowDeleted;
            
            public event ProductModelRowChangeEventHandler ProductModelRowDeleting;
            
            public void AddProductModelRow(ProductModelRow row) {
                this.Rows.Add(row);
            }
            
            public ProductModelRow AddProductModelRow(string Name, string CatalogDescription, string Instructions, System.Guid rowguid, System.DateTime ModifiedDate) {
                ProductModelRow rowProductModelRow = ((ProductModelRow)(this.NewRow()));
                rowProductModelRow.ItemArray = new object[] {
                        null,
                        Name,
                        CatalogDescription,
                        Instructions,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowProductModelRow);
                return rowProductModelRow;
            }
            
            public ProductModelRow FindByProductModelID(int ProductModelID) {
                return ((ProductModelRow)(this.Rows.Find(new object[] {
                            ProductModelID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                ProductModelDataTable cln = ((ProductModelDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new ProductModelDataTable();
            }
            
            internal void InitVars() {
                this.columnProductModelID = base.Columns["ProductModelID"];
                this.columnName = base.Columns["Name"];
                this.columnCatalogDescription = base.Columns["CatalogDescription"];
                this.columnInstructions = base.Columns["Instructions"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnProductModelID = new System.Data.DataColumn("ProductModelID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductModelID);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnCatalogDescription = new System.Data.DataColumn("CatalogDescription", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCatalogDescription);
                this.columnInstructions = new System.Data.DataColumn("Instructions", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnInstructions);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnProductModelID}, true));
                this.columnProductModelID.AutoIncrement = true;
                this.columnProductModelID.AllowDBNull = false;
                this.columnProductModelID.ReadOnly = true;
                this.columnProductModelID.Unique = true;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnCatalogDescription.MaxLength = 2147483647;
                this.columnInstructions.MaxLength = 2147483647;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public ProductModelRow NewProductModelRow() {
                return ((ProductModelRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ProductModelRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ProductModelRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ProductModelRowChanged != null)) {
                    this.ProductModelRowChanged(this, new ProductModelRowChangeEvent(((ProductModelRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ProductModelRowChanging != null)) {
                    this.ProductModelRowChanging(this, new ProductModelRowChangeEvent(((ProductModelRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ProductModelRowDeleted != null)) {
                    this.ProductModelRowDeleted(this, new ProductModelRowChangeEvent(((ProductModelRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ProductModelRowDeleting != null)) {
                    this.ProductModelRowDeleting(this, new ProductModelRowChangeEvent(((ProductModelRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveProductModelRow(ProductModelRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "ProductModelDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ProductModelIllustrationDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnProductModelID;
            
            private System.Data.DataColumn columnIllustrationID;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public ProductModelIllustrationDataTable() {
                this.TableName = "ProductModelIllustration";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal ProductModelIllustrationDataTable(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;
            }
            
            protected ProductModelIllustrationDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ProductModelIDColumn {
                get {
                    return this.columnProductModelID;
                }
            }
            
            public System.Data.DataColumn IllustrationIDColumn {
                get {
                    return this.columnIllustrationID;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public ProductModelIllustrationRow this[int index] {
                get {
                    return ((ProductModelIllustrationRow)(this.Rows[index]));
                }
            }
            
            public event ProductModelIllustrationRowChangeEventHandler ProductModelIllustrationRowChanged;
            
            public event ProductModelIllustrationRowChangeEventHandler ProductModelIllustrationRowChanging;
            
            public event ProductModelIllustrationRowChangeEventHandler ProductModelIllustrationRowDeleted;
            
            public event ProductModelIllustrationRowChangeEventHandler ProductModelIllustrationRowDeleting;
            
            public void AddProductModelIllustrationRow(ProductModelIllustrationRow row) {
                this.Rows.Add(row);
            }
            
            public ProductModelIllustrationRow AddProductModelIllustrationRow(ProductModelRow parentProductModelRowByFK_ProductModelIllustration_ProductModel_ProductModelID, IllustrationRow parentIllustrationRowByFK_ProductModelIllustration_Illustration_IllustrationID, System.DateTime ModifiedDate) {
                ProductModelIllustrationRow rowProductModelIllustrationRow = ((ProductModelIllustrationRow)(this.NewRow()));
                rowProductModelIllustrationRow.ItemArray = new object[] {
                        parentProductModelRowByFK_ProductModelIllustration_ProductModel_ProductModelID[0],
                        parentIllustrationRowByFK_ProductModelIllustration_Illustration_IllustrationID[0],
                        ModifiedDate};
                this.Rows.Add(rowProductModelIllustrationRow);
                return rowProductModelIllustrationRow;
            }
            
            public ProductModelIllustrationRow FindByProductModelIDIllustrationID(int ProductModelID, int IllustrationID) {
                return ((ProductModelIllustrationRow)(this.Rows.Find(new object[] {
                            ProductModelID,
                            IllustrationID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                ProductModelIllustrationDataTable cln = ((ProductModelIllustrationDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new ProductModelIllustrationDataTable();
            }
            
            internal void InitVars() {
                this.columnProductModelID = base.Columns["ProductModelID"];
                this.columnIllustrationID = base.Columns["IllustrationID"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnProductModelID = new System.Data.DataColumn("ProductModelID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductModelID);
                this.columnIllustrationID = new System.Data.DataColumn("IllustrationID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnIllustrationID);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnProductModelID,
                                this.columnIllustrationID}, true));
                this.columnProductModelID.AllowDBNull = false;
                this.columnIllustrationID.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public ProductModelIllustrationRow NewProductModelIllustrationRow() {
                return ((ProductModelIllustrationRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ProductModelIllustrationRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ProductModelIllustrationRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ProductModelIllustrationRowChanged != null)) {
                    this.ProductModelIllustrationRowChanged(this, new ProductModelIllustrationRowChangeEvent(((ProductModelIllustrationRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ProductModelIllustrationRowChanging != null)) {
                    this.ProductModelIllustrationRowChanging(this, new ProductModelIllustrationRowChangeEvent(((ProductModelIllustrationRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ProductModelIllustrationRowDeleted != null)) {
                    this.ProductModelIllustrationRowDeleted(this, new ProductModelIllustrationRowChangeEvent(((ProductModelIllustrationRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ProductModelIllustrationRowDeleting != null)) {
                    this.ProductModelIllustrationRowDeleting(this, new ProductModelIllustrationRowChangeEvent(((ProductModelIllustrationRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveProductModelIllustrationRow(ProductModelIllustrationRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "ProductModelIllustrationDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ProductModelProductDescriptionCultureDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnProductModelID;
            
            private System.Data.DataColumn columnProductDescriptionID;
            
            private System.Data.DataColumn columnCultureID;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public ProductModelProductDescriptionCultureDataTable() {
                this.TableName = "ProductModelProductDescriptionCulture";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal ProductModelProductDescriptionCultureDataTable(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;
            }
            
            protected ProductModelProductDescriptionCultureDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ProductModelIDColumn {
                get {
                    return this.columnProductModelID;
                }
            }
            
            public System.Data.DataColumn ProductDescriptionIDColumn {
                get {
                    return this.columnProductDescriptionID;
                }
            }
            
            public System.Data.DataColumn CultureIDColumn {
                get {
                    return this.columnCultureID;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public ProductModelProductDescriptionCultureRow this[int index] {
                get {
                    return ((ProductModelProductDescriptionCultureRow)(this.Rows[index]));
                }
            }
            
            public event ProductModelProductDescriptionCultureRowChangeEventHandler ProductModelProductDescriptionCultureRowChanged;
            
            public event ProductModelProductDescriptionCultureRowChangeEventHandler ProductModelProductDescriptionCultureRowChanging;
            
            public event ProductModelProductDescriptionCultureRowChangeEventHandler ProductModelProductDescriptionCultureRowDeleted;
            
            public event ProductModelProductDescriptionCultureRowChangeEventHandler ProductModelProductDescriptionCultureRowDeleting;
            
            public void AddProductModelProductDescriptionCultureRow(ProductModelProductDescriptionCultureRow row) {
                this.Rows.Add(row);
            }
            
            public ProductModelProductDescriptionCultureRow AddProductModelProductDescriptionCultureRow(ProductModelRow parentProductModelRowByFK_ProductModelProductDescriptionCulture_ProductModel_ProductModelID, ProductDescriptionRow parentProductDescriptionRowByFK_ProductModelProductDescriptionCulture_ProductDescription_ProductDescriptionID, CultureRow parentCultureRowByFK_ProductModelProductDescriptionCulture_Culture_CultureID, System.DateTime ModifiedDate) {
                ProductModelProductDescriptionCultureRow rowProductModelProductDescriptionCultureRow = ((ProductModelProductDescriptionCultureRow)(this.NewRow()));
                rowProductModelProductDescriptionCultureRow.ItemArray = new object[] {
                        parentProductModelRowByFK_ProductModelProductDescriptionCulture_ProductModel_ProductModelID[0],
                        parentProductDescriptionRowByFK_ProductModelProductDescriptionCulture_ProductDescription_ProductDescriptionID[0],
                        parentCultureRowByFK_ProductModelProductDescriptionCulture_Culture_CultureID[0],
                        ModifiedDate};
                this.Rows.Add(rowProductModelProductDescriptionCultureRow);
                return rowProductModelProductDescriptionCultureRow;
            }
            
            public ProductModelProductDescriptionCultureRow FindByProductModelIDProductDescriptionIDCultureID(int ProductModelID, int ProductDescriptionID, string CultureID) {
                return ((ProductModelProductDescriptionCultureRow)(this.Rows.Find(new object[] {
                            ProductModelID,
                            ProductDescriptionID,
                            CultureID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                ProductModelProductDescriptionCultureDataTable cln = ((ProductModelProductDescriptionCultureDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new ProductModelProductDescriptionCultureDataTable();
            }
            
            internal void InitVars() {
                this.columnProductModelID = base.Columns["ProductModelID"];
                this.columnProductDescriptionID = base.Columns["ProductDescriptionID"];
                this.columnCultureID = base.Columns["CultureID"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnProductModelID = new System.Data.DataColumn("ProductModelID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductModelID);
                this.columnProductDescriptionID = new System.Data.DataColumn("ProductDescriptionID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductDescriptionID);
                this.columnCultureID = new System.Data.DataColumn("CultureID", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCultureID);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnProductModelID,
                                this.columnProductDescriptionID,
                                this.columnCultureID}, true));
                this.columnProductModelID.AllowDBNull = false;
                this.columnProductDescriptionID.AllowDBNull = false;
                this.columnCultureID.AllowDBNull = false;
                this.columnCultureID.MaxLength = 6;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public ProductModelProductDescriptionCultureRow NewProductModelProductDescriptionCultureRow() {
                return ((ProductModelProductDescriptionCultureRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ProductModelProductDescriptionCultureRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ProductModelProductDescriptionCultureRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ProductModelProductDescriptionCultureRowChanged != null)) {
                    this.ProductModelProductDescriptionCultureRowChanged(this, new ProductModelProductDescriptionCultureRowChangeEvent(((ProductModelProductDescriptionCultureRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ProductModelProductDescriptionCultureRowChanging != null)) {
                    this.ProductModelProductDescriptionCultureRowChanging(this, new ProductModelProductDescriptionCultureRowChangeEvent(((ProductModelProductDescriptionCultureRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ProductModelProductDescriptionCultureRowDeleted != null)) {
                    this.ProductModelProductDescriptionCultureRowDeleted(this, new ProductModelProductDescriptionCultureRowChangeEvent(((ProductModelProductDescriptionCultureRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ProductModelProductDescriptionCultureRowDeleting != null)) {
                    this.ProductModelProductDescriptionCultureRowDeleting(this, new ProductModelProductDescriptionCultureRowChangeEvent(((ProductModelProductDescriptionCultureRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveProductModelProductDescriptionCultureRow(ProductModelProductDescriptionCultureRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "ProductModelProductDescriptionCultureDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ProductPhotoDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnProductPhotoID;
            
            private System.Data.DataColumn columnThumbNailPhoto;
            
            private System.Data.DataColumn columnThumbnailPhotoFileName;
            
            private System.Data.DataColumn columnLargePhoto;
            
            private System.Data.DataColumn columnLargePhotoFileName;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public ProductPhotoDataTable() {
                this.TableName = "ProductPhoto";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal ProductPhotoDataTable(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;
            }
            
            protected ProductPhotoDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ProductPhotoIDColumn {
                get {
                    return this.columnProductPhotoID;
                }
            }
            
            public System.Data.DataColumn ThumbNailPhotoColumn {
                get {
                    return this.columnThumbNailPhoto;
                }
            }
            
            public System.Data.DataColumn ThumbnailPhotoFileNameColumn {
                get {
                    return this.columnThumbnailPhotoFileName;
                }
            }
            
            public System.Data.DataColumn LargePhotoColumn {
                get {
                    return this.columnLargePhoto;
                }
            }
            
            public System.Data.DataColumn LargePhotoFileNameColumn {
                get {
                    return this.columnLargePhotoFileName;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public ProductPhotoRow this[int index] {
                get {
                    return ((ProductPhotoRow)(this.Rows[index]));
                }
            }
            
            public event ProductPhotoRowChangeEventHandler ProductPhotoRowChanged;
            
            public event ProductPhotoRowChangeEventHandler ProductPhotoRowChanging;
            
            public event ProductPhotoRowChangeEventHandler ProductPhotoRowDeleted;
            
            public event ProductPhotoRowChangeEventHandler ProductPhotoRowDeleting;
            
            public void AddProductPhotoRow(ProductPhotoRow row) {
                this.Rows.Add(row);
            }
            
            public ProductPhotoRow AddProductPhotoRow(byte[] ThumbNailPhoto, string ThumbnailPhotoFileName, byte[] LargePhoto, string LargePhotoFileName, System.DateTime ModifiedDate) {
                ProductPhotoRow rowProductPhotoRow = ((ProductPhotoRow)(this.NewRow()));
                rowProductPhotoRow.ItemArray = new object[] {
                        null,
                        ThumbNailPhoto,
                        ThumbnailPhotoFileName,
                        LargePhoto,
                        LargePhotoFileName,
                        ModifiedDate};
                this.Rows.Add(rowProductPhotoRow);
                return rowProductPhotoRow;
            }
            
            public ProductPhotoRow FindByProductPhotoID(int ProductPhotoID) {
                return ((ProductPhotoRow)(this.Rows.Find(new object[] {
                            ProductPhotoID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                ProductPhotoDataTable cln = ((ProductPhotoDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new ProductPhotoDataTable();
            }
            
            internal void InitVars() {
                this.columnProductPhotoID = base.Columns["ProductPhotoID"];
                this.columnThumbNailPhoto = base.Columns["ThumbNailPhoto"];
                this.columnThumbnailPhotoFileName = base.Columns["ThumbnailPhotoFileName"];
                this.columnLargePhoto = base.Columns["LargePhoto"];
                this.columnLargePhotoFileName = base.Columns["LargePhotoFileName"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnProductPhotoID = new System.Data.DataColumn("ProductPhotoID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductPhotoID);
                this.columnThumbNailPhoto = new System.Data.DataColumn("ThumbNailPhoto", typeof(byte[]), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnThumbNailPhoto);
                this.columnThumbnailPhotoFileName = new System.Data.DataColumn("ThumbnailPhotoFileName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnThumbnailPhotoFileName);
                this.columnLargePhoto = new System.Data.DataColumn("LargePhoto", typeof(byte[]), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLargePhoto);
                this.columnLargePhotoFileName = new System.Data.DataColumn("LargePhotoFileName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLargePhotoFileName);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnProductPhotoID}, true));
                this.columnProductPhotoID.AutoIncrement = true;
                this.columnProductPhotoID.AllowDBNull = false;
                this.columnProductPhotoID.ReadOnly = true;
                this.columnProductPhotoID.Unique = true;
                this.columnThumbnailPhotoFileName.MaxLength = 50;
                this.columnLargePhotoFileName.MaxLength = 50;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public ProductPhotoRow NewProductPhotoRow() {
                return ((ProductPhotoRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ProductPhotoRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ProductPhotoRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ProductPhotoRowChanged != null)) {
                    this.ProductPhotoRowChanged(this, new ProductPhotoRowChangeEvent(((ProductPhotoRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ProductPhotoRowChanging != null)) {
                    this.ProductPhotoRowChanging(this, new ProductPhotoRowChangeEvent(((ProductPhotoRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ProductPhotoRowDeleted != null)) {
                    this.ProductPhotoRowDeleted(this, new ProductPhotoRowChangeEvent(((ProductPhotoRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ProductPhotoRowDeleting != null)) {
                    this.ProductPhotoRowDeleting(this, new ProductPhotoRowChangeEvent(((ProductPhotoRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveProductPhotoRow(ProductPhotoRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "ProductPhotoDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ProductProductPhotoDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnProductID;
            
            private System.Data.DataColumn columnProductPhotoID;
            
            private System.Data.DataColumn columnPrimary;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public ProductProductPhotoDataTable() {
                this.TableName = "ProductProductPhoto";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal ProductProductPhotoDataTable(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;
            }
            
            protected ProductProductPhotoDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ProductIDColumn {
                get {
                    return this.columnProductID;
                }
            }
            
            public System.Data.DataColumn ProductPhotoIDColumn {
                get {
                    return this.columnProductPhotoID;
                }
            }
            
            public System.Data.DataColumn PrimaryColumn {
                get {
                    return this.columnPrimary;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public ProductProductPhotoRow this[int index] {
                get {
                    return ((ProductProductPhotoRow)(this.Rows[index]));
                }
            }
            
            public event ProductProductPhotoRowChangeEventHandler ProductProductPhotoRowChanged;
            
            public event ProductProductPhotoRowChangeEventHandler ProductProductPhotoRowChanging;
            
            public event ProductProductPhotoRowChangeEventHandler ProductProductPhotoRowDeleted;
            
            public event ProductProductPhotoRowChangeEventHandler ProductProductPhotoRowDeleting;
            
            public void AddProductProductPhotoRow(ProductProductPhotoRow row) {
                this.Rows.Add(row);
            }
            
            public ProductProductPhotoRow AddProductProductPhotoRow(ProductRow parentProductRowByFK_ProductProductPhoto_Product_ProductID, ProductPhotoRow parentProductPhotoRowByFK_ProductProductPhoto_ProductPhoto_ProductPhotoID, bool Primary, System.DateTime ModifiedDate) {
                ProductProductPhotoRow rowProductProductPhotoRow = ((ProductProductPhotoRow)(this.NewRow()));
                rowProductProductPhotoRow.ItemArray = new object[] {
                        parentProductRowByFK_ProductProductPhoto_Product_ProductID[0],
                        parentProductPhotoRowByFK_ProductProductPhoto_ProductPhoto_ProductPhotoID[0],
                        Primary,
                        ModifiedDate};
                this.Rows.Add(rowProductProductPhotoRow);
                return rowProductProductPhotoRow;
            }
            
            public ProductProductPhotoRow FindByProductIDProductPhotoID(int ProductID, int ProductPhotoID) {
                return ((ProductProductPhotoRow)(this.Rows.Find(new object[] {
                            ProductID,
                            ProductPhotoID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                ProductProductPhotoDataTable cln = ((ProductProductPhotoDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new ProductProductPhotoDataTable();
            }
            
            internal void InitVars() {
                this.columnProductID = base.Columns["ProductID"];
                this.columnProductPhotoID = base.Columns["ProductPhotoID"];
                this.columnPrimary = base.Columns["Primary"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnProductID = new System.Data.DataColumn("ProductID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductID);
                this.columnProductPhotoID = new System.Data.DataColumn("ProductPhotoID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductPhotoID);
                this.columnPrimary = new System.Data.DataColumn("Primary", typeof(bool), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPrimary);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnProductID,
                                this.columnProductPhotoID}, true));
                this.columnProductID.AllowDBNull = false;
                this.columnProductPhotoID.AllowDBNull = false;
                this.columnPrimary.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public ProductProductPhotoRow NewProductProductPhotoRow() {
                return ((ProductProductPhotoRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ProductProductPhotoRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ProductProductPhotoRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ProductProductPhotoRowChanged != null)) {
                    this.ProductProductPhotoRowChanged(this, new ProductProductPhotoRowChangeEvent(((ProductProductPhotoRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ProductProductPhotoRowChanging != null)) {
                    this.ProductProductPhotoRowChanging(this, new ProductProductPhotoRowChangeEvent(((ProductProductPhotoRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ProductProductPhotoRowDeleted != null)) {
                    this.ProductProductPhotoRowDeleted(this, new ProductProductPhotoRowChangeEvent(((ProductProductPhotoRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ProductProductPhotoRowDeleting != null)) {
                    this.ProductProductPhotoRowDeleting(this, new ProductProductPhotoRowChangeEvent(((ProductProductPhotoRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveProductProductPhotoRow(ProductProductPhotoRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "ProductProductPhotoDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ProductReviewDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnProductReviewID;
            
            private System.Data.DataColumn columnProductID;
            
            private System.Data.DataColumn columnReviewerName;
            
            private System.Data.DataColumn columnReviewDate;
            
            private System.Data.DataColumn columnEmailAddress;
            
            private System.Data.DataColumn columnRating;
            
            private System.Data.DataColumn columnComments;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public ProductReviewDataTable() {
                this.TableName = "ProductReview";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal ProductReviewDataTable(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;
            }
            
            protected ProductReviewDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ProductReviewIDColumn {
                get {
                    return this.columnProductReviewID;
                }
            }
            
            public System.Data.DataColumn ProductIDColumn {
                get {
                    return this.columnProductID;
                }
            }
            
            public System.Data.DataColumn ReviewerNameColumn {
                get {
                    return this.columnReviewerName;
                }
            }
            
            public System.Data.DataColumn ReviewDateColumn {
                get {
                    return this.columnReviewDate;
                }
            }
            
            public System.Data.DataColumn EmailAddressColumn {
                get {
                    return this.columnEmailAddress;
                }
            }
            
            public System.Data.DataColumn RatingColumn {
                get {
                    return this.columnRating;
                }
            }
            
            public System.Data.DataColumn CommentsColumn {
                get {
                    return this.columnComments;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public ProductReviewRow this[int index] {
                get {
                    return ((ProductReviewRow)(this.Rows[index]));
                }
            }
            
            public event ProductReviewRowChangeEventHandler ProductReviewRowChanged;
            
            public event ProductReviewRowChangeEventHandler ProductReviewRowChanging;
            
            public event ProductReviewRowChangeEventHandler ProductReviewRowDeleted;
            
            public event ProductReviewRowChangeEventHandler ProductReviewRowDeleting;
            
            public void AddProductReviewRow(ProductReviewRow row) {
                this.Rows.Add(row);
            }
            
            public ProductReviewRow AddProductReviewRow(ProductRow parentProductRowByFK_ProductReview_Product_ProductID, string ReviewerName, System.DateTime ReviewDate, string EmailAddress, int Rating, string Comments, System.DateTime ModifiedDate) {
                ProductReviewRow rowProductReviewRow = ((ProductReviewRow)(this.NewRow()));
                rowProductReviewRow.ItemArray = new object[] {
                        null,
                        parentProductRowByFK_ProductReview_Product_ProductID[0],
                        ReviewerName,
                        ReviewDate,
                        EmailAddress,
                        Rating,
                        Comments,
                        ModifiedDate};
                this.Rows.Add(rowProductReviewRow);
                return rowProductReviewRow;
            }
            
            public ProductReviewRow FindByProductReviewID(int ProductReviewID) {
                return ((ProductReviewRow)(this.Rows.Find(new object[] {
                            ProductReviewID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                ProductReviewDataTable cln = ((ProductReviewDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new ProductReviewDataTable();
            }
            
            internal void InitVars() {
                this.columnProductReviewID = base.Columns["ProductReviewID"];
                this.columnProductID = base.Columns["ProductID"];
                this.columnReviewerName = base.Columns["ReviewerName"];
                this.columnReviewDate = base.Columns["ReviewDate"];
                this.columnEmailAddress = base.Columns["EmailAddress"];
                this.columnRating = base.Columns["Rating"];
                this.columnComments = base.Columns["Comments"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnProductReviewID = new System.Data.DataColumn("ProductReviewID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductReviewID);
                this.columnProductID = new System.Data.DataColumn("ProductID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductID);
                this.columnReviewerName = new System.Data.DataColumn("ReviewerName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnReviewerName);
                this.columnReviewDate = new System.Data.DataColumn("ReviewDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnReviewDate);
                this.columnEmailAddress = new System.Data.DataColumn("EmailAddress", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmailAddress);
                this.columnRating = new System.Data.DataColumn("Rating", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnRating);
                this.columnComments = new System.Data.DataColumn("Comments", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnComments);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnProductReviewID}, true));
                this.columnProductReviewID.AutoIncrement = true;
                this.columnProductReviewID.AllowDBNull = false;
                this.columnProductReviewID.ReadOnly = true;
                this.columnProductReviewID.Unique = true;
                this.columnProductID.AllowDBNull = false;
                this.columnReviewerName.AllowDBNull = false;
                this.columnReviewerName.MaxLength = 50;
                this.columnReviewDate.AllowDBNull = false;
                this.columnEmailAddress.AllowDBNull = false;
                this.columnEmailAddress.MaxLength = 50;
                this.columnRating.AllowDBNull = false;
                this.columnComments.MaxLength = 3850;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public ProductReviewRow NewProductReviewRow() {
                return ((ProductReviewRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ProductReviewRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ProductReviewRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ProductReviewRowChanged != null)) {
                    this.ProductReviewRowChanged(this, new ProductReviewRowChangeEvent(((ProductReviewRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ProductReviewRowChanging != null)) {
                    this.ProductReviewRowChanging(this, new ProductReviewRowChangeEvent(((ProductReviewRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ProductReviewRowDeleted != null)) {
                    this.ProductReviewRowDeleted(this, new ProductReviewRowChangeEvent(((ProductReviewRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ProductReviewRowDeleting != null)) {
                    this.ProductReviewRowDeleting(this, new ProductReviewRowChangeEvent(((ProductReviewRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveProductReviewRow(ProductReviewRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "ProductReviewDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ProductSubcategoryDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnProductSubcategoryID;
            
            private System.Data.DataColumn columnProductCategoryID;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public ProductSubcategoryDataTable() {
                this.TableName = "ProductSubcategory";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal ProductSubcategoryDataTable(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;
            }
            
            protected ProductSubcategoryDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ProductSubcategoryIDColumn {
                get {
                    return this.columnProductSubcategoryID;
                }
            }
            
            public System.Data.DataColumn ProductCategoryIDColumn {
                get {
                    return this.columnProductCategoryID;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public ProductSubcategoryRow this[int index] {
                get {
                    return ((ProductSubcategoryRow)(this.Rows[index]));
                }
            }
            
            public event ProductSubcategoryRowChangeEventHandler ProductSubcategoryRowChanged;
            
            public event ProductSubcategoryRowChangeEventHandler ProductSubcategoryRowChanging;
            
            public event ProductSubcategoryRowChangeEventHandler ProductSubcategoryRowDeleted;
            
            public event ProductSubcategoryRowChangeEventHandler ProductSubcategoryRowDeleting;
            
            public void AddProductSubcategoryRow(ProductSubcategoryRow row) {
                this.Rows.Add(row);
            }
            
            public ProductSubcategoryRow AddProductSubcategoryRow(ProductCategoryRow parentProductCategoryRowByFK_ProductSubcategory_ProductCategory_ProductCategoryID, string Name, System.Guid rowguid, System.DateTime ModifiedDate) {
                ProductSubcategoryRow rowProductSubcategoryRow = ((ProductSubcategoryRow)(this.NewRow()));
                rowProductSubcategoryRow.ItemArray = new object[] {
                        null,
                        parentProductCategoryRowByFK_ProductSubcategory_ProductCategory_ProductCategoryID[0],
                        Name,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowProductSubcategoryRow);
                return rowProductSubcategoryRow;
            }
            
            public ProductSubcategoryRow FindByProductSubcategoryID(int ProductSubcategoryID) {
                return ((ProductSubcategoryRow)(this.Rows.Find(new object[] {
                            ProductSubcategoryID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                ProductSubcategoryDataTable cln = ((ProductSubcategoryDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new ProductSubcategoryDataTable();
            }
            
            internal void InitVars() {
                this.columnProductSubcategoryID = base.Columns["ProductSubcategoryID"];
                this.columnProductCategoryID = base.Columns["ProductCategoryID"];
                this.columnName = base.Columns["Name"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnProductSubcategoryID = new System.Data.DataColumn("ProductSubcategoryID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductSubcategoryID);
                this.columnProductCategoryID = new System.Data.DataColumn("ProductCategoryID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductCategoryID);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnProductSubcategoryID}, true));
                this.columnProductSubcategoryID.AutoIncrement = true;
                this.columnProductSubcategoryID.AllowDBNull = false;
                this.columnProductSubcategoryID.ReadOnly = true;
                this.columnProductSubcategoryID.Unique = true;
                this.columnProductCategoryID.AllowDBNull = false;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public ProductSubcategoryRow NewProductSubcategoryRow() {
                return ((ProductSubcategoryRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ProductSubcategoryRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ProductSubcategoryRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ProductSubcategoryRowChanged != null)) {
                    this.ProductSubcategoryRowChanged(this, new ProductSubcategoryRowChangeEvent(((ProductSubcategoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ProductSubcategoryRowChanging != null)) {
                    this.ProductSubcategoryRowChanging(this, new ProductSubcategoryRowChangeEvent(((ProductSubcategoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ProductSubcategoryRowDeleted != null)) {
                    this.ProductSubcategoryRowDeleted(this, new ProductSubcategoryRowChangeEvent(((ProductSubcategoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ProductSubcategoryRowDeleting != null)) {
                    this.ProductSubcategoryRowDeleting(this, new ProductSubcategoryRowChangeEvent(((ProductSubcategoryRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveProductSubcategoryRow(ProductSubcategoryRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "ProductSubcategoryDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ScrapReasonDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnScrapReasonID;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public ScrapReasonDataTable() {
                this.TableName = "ScrapReason";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal ScrapReasonDataTable(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;
            }
            
            protected ScrapReasonDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ScrapReasonIDColumn {
                get {
                    return this.columnScrapReasonID;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public ScrapReasonRow this[int index] {
                get {
                    return ((ScrapReasonRow)(this.Rows[index]));
                }
            }
            
            public event ScrapReasonRowChangeEventHandler ScrapReasonRowChanged;
            
            public event ScrapReasonRowChangeEventHandler ScrapReasonRowChanging;
            
            public event ScrapReasonRowChangeEventHandler ScrapReasonRowDeleted;
            
            public event ScrapReasonRowChangeEventHandler ScrapReasonRowDeleting;
            
            public void AddScrapReasonRow(ScrapReasonRow row) {
                this.Rows.Add(row);
            }
            
            public ScrapReasonRow AddScrapReasonRow(string Name, System.DateTime ModifiedDate) {
                ScrapReasonRow rowScrapReasonRow = ((ScrapReasonRow)(this.NewRow()));
                rowScrapReasonRow.ItemArray = new object[] {
                        null,
                        Name,
                        ModifiedDate};
                this.Rows.Add(rowScrapReasonRow);
                return rowScrapReasonRow;
            }
            
            public ScrapReasonRow FindByScrapReasonID(short ScrapReasonID) {
                return ((ScrapReasonRow)(this.Rows.Find(new object[] {
                            ScrapReasonID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                ScrapReasonDataTable cln = ((ScrapReasonDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new ScrapReasonDataTable();
            }
            
            internal void InitVars() {
                this.columnScrapReasonID = base.Columns["ScrapReasonID"];
                this.columnName = base.Columns["Name"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnScrapReasonID = new System.Data.DataColumn("ScrapReasonID", typeof(short), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnScrapReasonID);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnScrapReasonID}, true));
                this.columnScrapReasonID.AutoIncrement = true;
                this.columnScrapReasonID.AllowDBNull = false;
                this.columnScrapReasonID.ReadOnly = true;
                this.columnScrapReasonID.Unique = true;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public ScrapReasonRow NewScrapReasonRow() {
                return ((ScrapReasonRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ScrapReasonRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ScrapReasonRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ScrapReasonRowChanged != null)) {
                    this.ScrapReasonRowChanged(this, new ScrapReasonRowChangeEvent(((ScrapReasonRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ScrapReasonRowChanging != null)) {
                    this.ScrapReasonRowChanging(this, new ScrapReasonRowChangeEvent(((ScrapReasonRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ScrapReasonRowDeleted != null)) {
                    this.ScrapReasonRowDeleted(this, new ScrapReasonRowChangeEvent(((ScrapReasonRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ScrapReasonRowDeleting != null)) {
                    this.ScrapReasonRowDeleting(this, new ScrapReasonRowChangeEvent(((ScrapReasonRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveScrapReasonRow(ScrapReasonRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "ScrapReasonDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class TransactionHistoryDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnTransactionID;
            
            private System.Data.DataColumn columnProductID;
            
            private System.Data.DataColumn columnReferenceOrderID;
            
            private System.Data.DataColumn columnReferenceOrderLineID;
            
            private System.Data.DataColumn columnTransactionDate;
            
            private System.Data.DataColumn columnTransactionType;
            
            private System.Data.DataColumn columnQuantity;
            
            private System.Data.DataColumn columnActualCost;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public TransactionHistoryDataTable() {
                this.TableName = "TransactionHistory";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal TransactionHistoryDataTable(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;
            }
            
            protected TransactionHistoryDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn TransactionIDColumn {
                get {
                    return this.columnTransactionID;
                }
            }
            
            public System.Data.DataColumn ProductIDColumn {
                get {
                    return this.columnProductID;
                }
            }
            
            public System.Data.DataColumn ReferenceOrderIDColumn {
                get {
                    return this.columnReferenceOrderID;
                }
            }
            
            public System.Data.DataColumn ReferenceOrderLineIDColumn {
                get {
                    return this.columnReferenceOrderLineID;
                }
            }
            
            public System.Data.DataColumn TransactionDateColumn {
                get {
                    return this.columnTransactionDate;
                }
            }
            
            public System.Data.DataColumn TransactionTypeColumn {
                get {
                    return this.columnTransactionType;
                }
            }
            
            public System.Data.DataColumn QuantityColumn {
                get {
                    return this.columnQuantity;
                }
            }
            
            public System.Data.DataColumn ActualCostColumn {
                get {
                    return this.columnActualCost;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public TransactionHistoryRow this[int index] {
                get {
                    return ((TransactionHistoryRow)(this.Rows[index]));
                }
            }
            
            public event TransactionHistoryRowChangeEventHandler TransactionHistoryRowChanged;
            
            public event TransactionHistoryRowChangeEventHandler TransactionHistoryRowChanging;
            
            public event TransactionHistoryRowChangeEventHandler TransactionHistoryRowDeleted;
            
            public event TransactionHistoryRowChangeEventHandler TransactionHistoryRowDeleting;
            
            public void AddTransactionHistoryRow(TransactionHistoryRow row) {
                this.Rows.Add(row);
            }
            
            public TransactionHistoryRow AddTransactionHistoryRow(ProductRow parentProductRowByFK_TransactionHistory_Product_ProductID, int ReferenceOrderID, int ReferenceOrderLineID, System.DateTime TransactionDate, string TransactionType, int Quantity, decimal ActualCost, System.DateTime ModifiedDate) {
                TransactionHistoryRow rowTransactionHistoryRow = ((TransactionHistoryRow)(this.NewRow()));
                rowTransactionHistoryRow.ItemArray = new object[] {
                        null,
                        parentProductRowByFK_TransactionHistory_Product_ProductID[0],
                        ReferenceOrderID,
                        ReferenceOrderLineID,
                        TransactionDate,
                        TransactionType,
                        Quantity,
                        ActualCost,
                        ModifiedDate};
                this.Rows.Add(rowTransactionHistoryRow);
                return rowTransactionHistoryRow;
            }
            
            public TransactionHistoryRow FindByTransactionID(int TransactionID) {
                return ((TransactionHistoryRow)(this.Rows.Find(new object[] {
                            TransactionID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                TransactionHistoryDataTable cln = ((TransactionHistoryDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new TransactionHistoryDataTable();
            }
            
            internal void InitVars() {
                this.columnTransactionID = base.Columns["TransactionID"];
                this.columnProductID = base.Columns["ProductID"];
                this.columnReferenceOrderID = base.Columns["ReferenceOrderID"];
                this.columnReferenceOrderLineID = base.Columns["ReferenceOrderLineID"];
                this.columnTransactionDate = base.Columns["TransactionDate"];
                this.columnTransactionType = base.Columns["TransactionType"];
                this.columnQuantity = base.Columns["Quantity"];
                this.columnActualCost = base.Columns["ActualCost"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnTransactionID = new System.Data.DataColumn("TransactionID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTransactionID);
                this.columnProductID = new System.Data.DataColumn("ProductID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductID);
                this.columnReferenceOrderID = new System.Data.DataColumn("ReferenceOrderID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnReferenceOrderID);
                this.columnReferenceOrderLineID = new System.Data.DataColumn("ReferenceOrderLineID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnReferenceOrderLineID);
                this.columnTransactionDate = new System.Data.DataColumn("TransactionDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTransactionDate);
                this.columnTransactionType = new System.Data.DataColumn("TransactionType", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTransactionType);
                this.columnQuantity = new System.Data.DataColumn("Quantity", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnQuantity);
                this.columnActualCost = new System.Data.DataColumn("ActualCost", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnActualCost);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnTransactionID}, true));
                this.columnTransactionID.AutoIncrement = true;
                this.columnTransactionID.AllowDBNull = false;
                this.columnTransactionID.ReadOnly = true;
                this.columnTransactionID.Unique = true;
                this.columnProductID.AllowDBNull = false;
                this.columnReferenceOrderID.AllowDBNull = false;
                this.columnReferenceOrderLineID.AllowDBNull = false;
                this.columnTransactionDate.AllowDBNull = false;
                this.columnTransactionType.AllowDBNull = false;
                this.columnTransactionType.MaxLength = 1;
                this.columnQuantity.AllowDBNull = false;
                this.columnActualCost.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public TransactionHistoryRow NewTransactionHistoryRow() {
                return ((TransactionHistoryRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new TransactionHistoryRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(TransactionHistoryRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.TransactionHistoryRowChanged != null)) {
                    this.TransactionHistoryRowChanged(this, new TransactionHistoryRowChangeEvent(((TransactionHistoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.TransactionHistoryRowChanging != null)) {
                    this.TransactionHistoryRowChanging(this, new TransactionHistoryRowChangeEvent(((TransactionHistoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.TransactionHistoryRowDeleted != null)) {
                    this.TransactionHistoryRowDeleted(this, new TransactionHistoryRowChangeEvent(((TransactionHistoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.TransactionHistoryRowDeleting != null)) {
                    this.TransactionHistoryRowDeleting(this, new TransactionHistoryRowChangeEvent(((TransactionHistoryRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveTransactionHistoryRow(TransactionHistoryRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "TransactionHistoryDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class TransactionHistoryArchiveDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnTransactionID;
            
            private System.Data.DataColumn columnProductID;
            
            private System.Data.DataColumn columnReferenceOrderID;
            
            private System.Data.DataColumn columnReferenceOrderLineID;
            
            private System.Data.DataColumn columnTransactionDate;
            
            private System.Data.DataColumn columnTransactionType;
            
            private System.Data.DataColumn columnQuantity;
            
            private System.Data.DataColumn columnActualCost;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public TransactionHistoryArchiveDataTable() {
                this.TableName = "TransactionHistoryArchive";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal TransactionHistoryArchiveDataTable(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;
            }
            
            protected TransactionHistoryArchiveDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn TransactionIDColumn {
                get {
                    return this.columnTransactionID;
                }
            }
            
            public System.Data.DataColumn ProductIDColumn {
                get {
                    return this.columnProductID;
                }
            }
            
            public System.Data.DataColumn ReferenceOrderIDColumn {
                get {
                    return this.columnReferenceOrderID;
                }
            }
            
            public System.Data.DataColumn ReferenceOrderLineIDColumn {
                get {
                    return this.columnReferenceOrderLineID;
                }
            }
            
            public System.Data.DataColumn TransactionDateColumn {
                get {
                    return this.columnTransactionDate;
                }
            }
            
            public System.Data.DataColumn TransactionTypeColumn {
                get {
                    return this.columnTransactionType;
                }
            }
            
            public System.Data.DataColumn QuantityColumn {
                get {
                    return this.columnQuantity;
                }
            }
            
            public System.Data.DataColumn ActualCostColumn {
                get {
                    return this.columnActualCost;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public TransactionHistoryArchiveRow this[int index] {
                get {
                    return ((TransactionHistoryArchiveRow)(this.Rows[index]));
                }
            }
            
            public event TransactionHistoryArchiveRowChangeEventHandler TransactionHistoryArchiveRowChanged;
            
            public event TransactionHistoryArchiveRowChangeEventHandler TransactionHistoryArchiveRowChanging;
            
            public event TransactionHistoryArchiveRowChangeEventHandler TransactionHistoryArchiveRowDeleted;
            
            public event TransactionHistoryArchiveRowChangeEventHandler TransactionHistoryArchiveRowDeleting;
            
            public void AddTransactionHistoryArchiveRow(TransactionHistoryArchiveRow row) {
                this.Rows.Add(row);
            }
            
            public TransactionHistoryArchiveRow AddTransactionHistoryArchiveRow(int TransactionID, int ProductID, int ReferenceOrderID, int ReferenceOrderLineID, System.DateTime TransactionDate, string TransactionType, int Quantity, decimal ActualCost, System.DateTime ModifiedDate) {
                TransactionHistoryArchiveRow rowTransactionHistoryArchiveRow = ((TransactionHistoryArchiveRow)(this.NewRow()));
                rowTransactionHistoryArchiveRow.ItemArray = new object[] {
                        TransactionID,
                        ProductID,
                        ReferenceOrderID,
                        ReferenceOrderLineID,
                        TransactionDate,
                        TransactionType,
                        Quantity,
                        ActualCost,
                        ModifiedDate};
                this.Rows.Add(rowTransactionHistoryArchiveRow);
                return rowTransactionHistoryArchiveRow;
            }
            
            public TransactionHistoryArchiveRow FindByTransactionID(int TransactionID) {
                return ((TransactionHistoryArchiveRow)(this.Rows.Find(new object[] {
                            TransactionID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                TransactionHistoryArchiveDataTable cln = ((TransactionHistoryArchiveDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new TransactionHistoryArchiveDataTable();
            }
            
            internal void InitVars() {
                this.columnTransactionID = base.Columns["TransactionID"];
                this.columnProductID = base.Columns["ProductID"];
                this.columnReferenceOrderID = base.Columns["ReferenceOrderID"];
                this.columnReferenceOrderLineID = base.Columns["ReferenceOrderLineID"];
                this.columnTransactionDate = base.Columns["TransactionDate"];
                this.columnTransactionType = base.Columns["TransactionType"];
                this.columnQuantity = base.Columns["Quantity"];
                this.columnActualCost = base.Columns["ActualCost"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnTransactionID = new System.Data.DataColumn("TransactionID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTransactionID);
                this.columnProductID = new System.Data.DataColumn("ProductID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductID);
                this.columnReferenceOrderID = new System.Data.DataColumn("ReferenceOrderID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnReferenceOrderID);
                this.columnReferenceOrderLineID = new System.Data.DataColumn("ReferenceOrderLineID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnReferenceOrderLineID);
                this.columnTransactionDate = new System.Data.DataColumn("TransactionDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTransactionDate);
                this.columnTransactionType = new System.Data.DataColumn("TransactionType", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTransactionType);
                this.columnQuantity = new System.Data.DataColumn("Quantity", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnQuantity);
                this.columnActualCost = new System.Data.DataColumn("ActualCost", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnActualCost);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnTransactionID}, true));
                this.columnTransactionID.AllowDBNull = false;
                this.columnTransactionID.Unique = true;
                this.columnProductID.AllowDBNull = false;
                this.columnReferenceOrderID.AllowDBNull = false;
                this.columnReferenceOrderLineID.AllowDBNull = false;
                this.columnTransactionDate.AllowDBNull = false;
                this.columnTransactionType.AllowDBNull = false;
                this.columnTransactionType.MaxLength = 1;
                this.columnQuantity.AllowDBNull = false;
                this.columnActualCost.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public TransactionHistoryArchiveRow NewTransactionHistoryArchiveRow() {
                return ((TransactionHistoryArchiveRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new TransactionHistoryArchiveRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(TransactionHistoryArchiveRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.TransactionHistoryArchiveRowChanged != null)) {
                    this.TransactionHistoryArchiveRowChanged(this, new TransactionHistoryArchiveRowChangeEvent(((TransactionHistoryArchiveRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.TransactionHistoryArchiveRowChanging != null)) {
                    this.TransactionHistoryArchiveRowChanging(this, new TransactionHistoryArchiveRowChangeEvent(((TransactionHistoryArchiveRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.TransactionHistoryArchiveRowDeleted != null)) {
                    this.TransactionHistoryArchiveRowDeleted(this, new TransactionHistoryArchiveRowChangeEvent(((TransactionHistoryArchiveRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.TransactionHistoryArchiveRowDeleting != null)) {
                    this.TransactionHistoryArchiveRowDeleting(this, new TransactionHistoryArchiveRowChangeEvent(((TransactionHistoryArchiveRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveTransactionHistoryArchiveRow(TransactionHistoryArchiveRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "TransactionHistoryArchiveDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class UnitMeasureDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnUnitMeasureCode;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public UnitMeasureDataTable() {
                this.TableName = "UnitMeasure";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal UnitMeasureDataTable(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;
            }
            
            protected UnitMeasureDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn UnitMeasureCodeColumn {
                get {
                    return this.columnUnitMeasureCode;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public UnitMeasureRow this[int index] {
                get {
                    return ((UnitMeasureRow)(this.Rows[index]));
                }
            }
            
            public event UnitMeasureRowChangeEventHandler UnitMeasureRowChanged;
            
            public event UnitMeasureRowChangeEventHandler UnitMeasureRowChanging;
            
            public event UnitMeasureRowChangeEventHandler UnitMeasureRowDeleted;
            
            public event UnitMeasureRowChangeEventHandler UnitMeasureRowDeleting;
            
            public void AddUnitMeasureRow(UnitMeasureRow row) {
                this.Rows.Add(row);
            }
            
            public UnitMeasureRow AddUnitMeasureRow(string UnitMeasureCode, string Name, System.DateTime ModifiedDate) {
                UnitMeasureRow rowUnitMeasureRow = ((UnitMeasureRow)(this.NewRow()));
                rowUnitMeasureRow.ItemArray = new object[] {
                        UnitMeasureCode,
                        Name,
                        ModifiedDate};
                this.Rows.Add(rowUnitMeasureRow);
                return rowUnitMeasureRow;
            }
            
            public UnitMeasureRow FindByUnitMeasureCode(string UnitMeasureCode) {
                return ((UnitMeasureRow)(this.Rows.Find(new object[] {
                            UnitMeasureCode})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                UnitMeasureDataTable cln = ((UnitMeasureDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new UnitMeasureDataTable();
            }
            
            internal void InitVars() {
                this.columnUnitMeasureCode = base.Columns["UnitMeasureCode"];
                this.columnName = base.Columns["Name"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnUnitMeasureCode = new System.Data.DataColumn("UnitMeasureCode", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnUnitMeasureCode);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnUnitMeasureCode}, true));
                this.columnUnitMeasureCode.AllowDBNull = false;
                this.columnUnitMeasureCode.Unique = true;
                this.columnUnitMeasureCode.MaxLength = 3;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public UnitMeasureRow NewUnitMeasureRow() {
                return ((UnitMeasureRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new UnitMeasureRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(UnitMeasureRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.UnitMeasureRowChanged != null)) {
                    this.UnitMeasureRowChanged(this, new UnitMeasureRowChangeEvent(((UnitMeasureRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.UnitMeasureRowChanging != null)) {
                    this.UnitMeasureRowChanging(this, new UnitMeasureRowChangeEvent(((UnitMeasureRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.UnitMeasureRowDeleted != null)) {
                    this.UnitMeasureRowDeleted(this, new UnitMeasureRowChangeEvent(((UnitMeasureRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.UnitMeasureRowDeleting != null)) {
                    this.UnitMeasureRowDeleting(this, new UnitMeasureRowChangeEvent(((UnitMeasureRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveUnitMeasureRow(UnitMeasureRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "UnitMeasureDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class WorkOrderDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnWorkOrderID;
            
            private System.Data.DataColumn columnProductID;
            
            private System.Data.DataColumn columnOrderQty;
            
            private System.Data.DataColumn columnStockedQty;
            
            private System.Data.DataColumn columnScrappedQty;
            
            private System.Data.DataColumn columnStartDate;
            
            private System.Data.DataColumn columnEndDate;
            
            private System.Data.DataColumn columnDueDate;
            
            private System.Data.DataColumn columnScrapReasonID;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public WorkOrderDataTable() {
                this.TableName = "WorkOrder";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal WorkOrderDataTable(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;
            }
            
            protected WorkOrderDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn WorkOrderIDColumn {
                get {
                    return this.columnWorkOrderID;
                }
            }
            
            public System.Data.DataColumn ProductIDColumn {
                get {
                    return this.columnProductID;
                }
            }
            
            public System.Data.DataColumn OrderQtyColumn {
                get {
                    return this.columnOrderQty;
                }
            }
            
            public System.Data.DataColumn StockedQtyColumn {
                get {
                    return this.columnStockedQty;
                }
            }
            
            public System.Data.DataColumn ScrappedQtyColumn {
                get {
                    return this.columnScrappedQty;
                }
            }
            
            public System.Data.DataColumn StartDateColumn {
                get {
                    return this.columnStartDate;
                }
            }
            
            public System.Data.DataColumn EndDateColumn {
                get {
                    return this.columnEndDate;
                }
            }
            
            public System.Data.DataColumn DueDateColumn {
                get {
                    return this.columnDueDate;
                }
            }
            
            public System.Data.DataColumn ScrapReasonIDColumn {
                get {
                    return this.columnScrapReasonID;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public WorkOrderRow this[int index] {
                get {
                    return ((WorkOrderRow)(this.Rows[index]));
                }
            }
            
            public event WorkOrderRowChangeEventHandler WorkOrderRowChanged;
            
            public event WorkOrderRowChangeEventHandler WorkOrderRowChanging;
            
            public event WorkOrderRowChangeEventHandler WorkOrderRowDeleted;
            
            public event WorkOrderRowChangeEventHandler WorkOrderRowDeleting;
            
            public void AddWorkOrderRow(WorkOrderRow row) {
                this.Rows.Add(row);
            }
            
            public WorkOrderRow AddWorkOrderRow(ProductRow parentProductRowByFK_WorkOrder_Product_ProductID, int OrderQty, int StockedQty, short ScrappedQty, System.DateTime StartDate, System.DateTime EndDate, System.DateTime DueDate, ScrapReasonRow parentScrapReasonRowByFK_WorkOrder_ScrapReason_ScrapReasonID, System.DateTime ModifiedDate) {
                WorkOrderRow rowWorkOrderRow = ((WorkOrderRow)(this.NewRow()));
                rowWorkOrderRow.ItemArray = new object[] {
                        null,
                        parentProductRowByFK_WorkOrder_Product_ProductID[0],
                        OrderQty,
                        StockedQty,
                        ScrappedQty,
                        StartDate,
                        EndDate,
                        DueDate,
                        parentScrapReasonRowByFK_WorkOrder_ScrapReason_ScrapReasonID[0],
                        ModifiedDate};
                this.Rows.Add(rowWorkOrderRow);
                return rowWorkOrderRow;
            }
            
            public WorkOrderRow FindByWorkOrderID(int WorkOrderID) {
                return ((WorkOrderRow)(this.Rows.Find(new object[] {
                            WorkOrderID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                WorkOrderDataTable cln = ((WorkOrderDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new WorkOrderDataTable();
            }
            
            internal void InitVars() {
                this.columnWorkOrderID = base.Columns["WorkOrderID"];
                this.columnProductID = base.Columns["ProductID"];
                this.columnOrderQty = base.Columns["OrderQty"];
                this.columnStockedQty = base.Columns["StockedQty"];
                this.columnScrappedQty = base.Columns["ScrappedQty"];
                this.columnStartDate = base.Columns["StartDate"];
                this.columnEndDate = base.Columns["EndDate"];
                this.columnDueDate = base.Columns["DueDate"];
                this.columnScrapReasonID = base.Columns["ScrapReasonID"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnWorkOrderID = new System.Data.DataColumn("WorkOrderID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnWorkOrderID);
                this.columnProductID = new System.Data.DataColumn("ProductID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductID);
                this.columnOrderQty = new System.Data.DataColumn("OrderQty", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnOrderQty);
                this.columnStockedQty = new System.Data.DataColumn("StockedQty", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStockedQty);
                this.columnScrappedQty = new System.Data.DataColumn("ScrappedQty", typeof(short), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnScrappedQty);
                this.columnStartDate = new System.Data.DataColumn("StartDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStartDate);
                this.columnEndDate = new System.Data.DataColumn("EndDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEndDate);
                this.columnDueDate = new System.Data.DataColumn("DueDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDueDate);
                this.columnScrapReasonID = new System.Data.DataColumn("ScrapReasonID", typeof(short), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnScrapReasonID);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnWorkOrderID}, true));
                this.columnWorkOrderID.AutoIncrement = true;
                this.columnWorkOrderID.AllowDBNull = false;
                this.columnWorkOrderID.ReadOnly = true;
                this.columnWorkOrderID.Unique = true;
                this.columnProductID.AllowDBNull = false;
                this.columnOrderQty.AllowDBNull = false;
                this.columnStockedQty.ReadOnly = true;
                this.columnScrappedQty.AllowDBNull = false;
                this.columnStartDate.AllowDBNull = false;
                this.columnDueDate.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public WorkOrderRow NewWorkOrderRow() {
                return ((WorkOrderRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new WorkOrderRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(WorkOrderRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.WorkOrderRowChanged != null)) {
                    this.WorkOrderRowChanged(this, new WorkOrderRowChangeEvent(((WorkOrderRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.WorkOrderRowChanging != null)) {
                    this.WorkOrderRowChanging(this, new WorkOrderRowChangeEvent(((WorkOrderRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.WorkOrderRowDeleted != null)) {
                    this.WorkOrderRowDeleted(this, new WorkOrderRowChangeEvent(((WorkOrderRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.WorkOrderRowDeleting != null)) {
                    this.WorkOrderRowDeleting(this, new WorkOrderRowChangeEvent(((WorkOrderRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveWorkOrderRow(WorkOrderRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "WorkOrderDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class WorkOrderRoutingDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnWorkOrderID;
            
            private System.Data.DataColumn columnProductID;
            
            private System.Data.DataColumn columnOperationSequence;
            
            private System.Data.DataColumn columnLocationID;
            
            private System.Data.DataColumn columnScheduledStartDate;
            
            private System.Data.DataColumn columnScheduledEndDate;
            
            private System.Data.DataColumn columnActualStartDate;
            
            private System.Data.DataColumn columnActualEndDate;
            
            private System.Data.DataColumn columnActualResourceHrs;
            
            private System.Data.DataColumn columnPlannedCost;
            
            private System.Data.DataColumn columnActualCost;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public WorkOrderRoutingDataTable() {
                this.TableName = "WorkOrderRouting";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal WorkOrderRoutingDataTable(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;
            }
            
            protected WorkOrderRoutingDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn WorkOrderIDColumn {
                get {
                    return this.columnWorkOrderID;
                }
            }
            
            public System.Data.DataColumn ProductIDColumn {
                get {
                    return this.columnProductID;
                }
            }
            
            public System.Data.DataColumn OperationSequenceColumn {
                get {
                    return this.columnOperationSequence;
                }
            }
            
            public System.Data.DataColumn LocationIDColumn {
                get {
                    return this.columnLocationID;
                }
            }
            
            public System.Data.DataColumn ScheduledStartDateColumn {
                get {
                    return this.columnScheduledStartDate;
                }
            }
            
            public System.Data.DataColumn ScheduledEndDateColumn {
                get {
                    return this.columnScheduledEndDate;
                }
            }
            
            public System.Data.DataColumn ActualStartDateColumn {
                get {
                    return this.columnActualStartDate;
                }
            }
            
            public System.Data.DataColumn ActualEndDateColumn {
                get {
                    return this.columnActualEndDate;
                }
            }
            
            public System.Data.DataColumn ActualResourceHrsColumn {
                get {
                    return this.columnActualResourceHrs;
                }
            }
            
            public System.Data.DataColumn PlannedCostColumn {
                get {
                    return this.columnPlannedCost;
                }
            }
            
            public System.Data.DataColumn ActualCostColumn {
                get {
                    return this.columnActualCost;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public WorkOrderRoutingRow this[int index] {
                get {
                    return ((WorkOrderRoutingRow)(this.Rows[index]));
                }
            }
            
            public event WorkOrderRoutingRowChangeEventHandler WorkOrderRoutingRowChanged;
            
            public event WorkOrderRoutingRowChangeEventHandler WorkOrderRoutingRowChanging;
            
            public event WorkOrderRoutingRowChangeEventHandler WorkOrderRoutingRowDeleted;
            
            public event WorkOrderRoutingRowChangeEventHandler WorkOrderRoutingRowDeleting;
            
            public void AddWorkOrderRoutingRow(WorkOrderRoutingRow row) {
                this.Rows.Add(row);
            }
            
            public WorkOrderRoutingRow AddWorkOrderRoutingRow(WorkOrderRow parentWorkOrderRowByFK_WorkOrderRouting_WorkOrder_WorkOrderID, int ProductID, short OperationSequence, LocationRow parentLocationRowByFK_WorkOrderRouting_Location_LocationID, System.DateTime ScheduledStartDate, System.DateTime ScheduledEndDate, System.DateTime ActualStartDate, System.DateTime ActualEndDate, decimal ActualResourceHrs, decimal PlannedCost, decimal ActualCost, System.DateTime ModifiedDate) {
                WorkOrderRoutingRow rowWorkOrderRoutingRow = ((WorkOrderRoutingRow)(this.NewRow()));
                rowWorkOrderRoutingRow.ItemArray = new object[] {
                        parentWorkOrderRowByFK_WorkOrderRouting_WorkOrder_WorkOrderID[0],
                        ProductID,
                        OperationSequence,
                        parentLocationRowByFK_WorkOrderRouting_Location_LocationID[0],
                        ScheduledStartDate,
                        ScheduledEndDate,
                        ActualStartDate,
                        ActualEndDate,
                        ActualResourceHrs,
                        PlannedCost,
                        ActualCost,
                        ModifiedDate};
                this.Rows.Add(rowWorkOrderRoutingRow);
                return rowWorkOrderRoutingRow;
            }
            
            public WorkOrderRoutingRow FindByWorkOrderIDProductIDOperationSequence(int WorkOrderID, int ProductID, short OperationSequence) {
                return ((WorkOrderRoutingRow)(this.Rows.Find(new object[] {
                            WorkOrderID,
                            ProductID,
                            OperationSequence})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                WorkOrderRoutingDataTable cln = ((WorkOrderRoutingDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new WorkOrderRoutingDataTable();
            }
            
            internal void InitVars() {
                this.columnWorkOrderID = base.Columns["WorkOrderID"];
                this.columnProductID = base.Columns["ProductID"];
                this.columnOperationSequence = base.Columns["OperationSequence"];
                this.columnLocationID = base.Columns["LocationID"];
                this.columnScheduledStartDate = base.Columns["ScheduledStartDate"];
                this.columnScheduledEndDate = base.Columns["ScheduledEndDate"];
                this.columnActualStartDate = base.Columns["ActualStartDate"];
                this.columnActualEndDate = base.Columns["ActualEndDate"];
                this.columnActualResourceHrs = base.Columns["ActualResourceHrs"];
                this.columnPlannedCost = base.Columns["PlannedCost"];
                this.columnActualCost = base.Columns["ActualCost"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnWorkOrderID = new System.Data.DataColumn("WorkOrderID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnWorkOrderID);
                this.columnProductID = new System.Data.DataColumn("ProductID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductID);
                this.columnOperationSequence = new System.Data.DataColumn("OperationSequence", typeof(short), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnOperationSequence);
                this.columnLocationID = new System.Data.DataColumn("LocationID", typeof(short), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLocationID);
                this.columnScheduledStartDate = new System.Data.DataColumn("ScheduledStartDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnScheduledStartDate);
                this.columnScheduledEndDate = new System.Data.DataColumn("ScheduledEndDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnScheduledEndDate);
                this.columnActualStartDate = new System.Data.DataColumn("ActualStartDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnActualStartDate);
                this.columnActualEndDate = new System.Data.DataColumn("ActualEndDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnActualEndDate);
                this.columnActualResourceHrs = new System.Data.DataColumn("ActualResourceHrs", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnActualResourceHrs);
                this.columnPlannedCost = new System.Data.DataColumn("PlannedCost", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPlannedCost);
                this.columnActualCost = new System.Data.DataColumn("ActualCost", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnActualCost);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnWorkOrderID,
                                this.columnProductID,
                                this.columnOperationSequence}, true));
                this.columnWorkOrderID.AllowDBNull = false;
                this.columnProductID.AllowDBNull = false;
                this.columnOperationSequence.AllowDBNull = false;
                this.columnLocationID.AllowDBNull = false;
                this.columnScheduledStartDate.AllowDBNull = false;
                this.columnScheduledEndDate.AllowDBNull = false;
                this.columnPlannedCost.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public WorkOrderRoutingRow NewWorkOrderRoutingRow() {
                return ((WorkOrderRoutingRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new WorkOrderRoutingRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(WorkOrderRoutingRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.WorkOrderRoutingRowChanged != null)) {
                    this.WorkOrderRoutingRowChanged(this, new WorkOrderRoutingRowChangeEvent(((WorkOrderRoutingRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.WorkOrderRoutingRowChanging != null)) {
                    this.WorkOrderRoutingRowChanging(this, new WorkOrderRoutingRowChangeEvent(((WorkOrderRoutingRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.WorkOrderRoutingRowDeleted != null)) {
                    this.WorkOrderRoutingRowDeleted(this, new WorkOrderRoutingRowChangeEvent(((WorkOrderRoutingRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.WorkOrderRoutingRowDeleting != null)) {
                    this.WorkOrderRoutingRowDeleting(this, new WorkOrderRoutingRowChangeEvent(((WorkOrderRoutingRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveWorkOrderRoutingRow(WorkOrderRoutingRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "WorkOrderRoutingDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ProductVendorDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnProductID;
            
            private System.Data.DataColumn columnVendorID;
            
            private System.Data.DataColumn columnAverageLeadTime;
            
            private System.Data.DataColumn columnStandardPrice;
            
            private System.Data.DataColumn columnLastReceiptCost;
            
            private System.Data.DataColumn columnLastReceiptDate;
            
            private System.Data.DataColumn columnMinOrderQty;
            
            private System.Data.DataColumn columnMaxOrderQty;
            
            private System.Data.DataColumn columnOnOrderQty;
            
            private System.Data.DataColumn columnUnitMeasureCode;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public ProductVendorDataTable() {
                this.TableName = "ProductVendor";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal ProductVendorDataTable(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;
            }
            
            protected ProductVendorDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ProductIDColumn {
                get {
                    return this.columnProductID;
                }
            }
            
            public System.Data.DataColumn VendorIDColumn {
                get {
                    return this.columnVendorID;
                }
            }
            
            public System.Data.DataColumn AverageLeadTimeColumn {
                get {
                    return this.columnAverageLeadTime;
                }
            }
            
            public System.Data.DataColumn StandardPriceColumn {
                get {
                    return this.columnStandardPrice;
                }
            }
            
            public System.Data.DataColumn LastReceiptCostColumn {
                get {
                    return this.columnLastReceiptCost;
                }
            }
            
            public System.Data.DataColumn LastReceiptDateColumn {
                get {
                    return this.columnLastReceiptDate;
                }
            }
            
            public System.Data.DataColumn MinOrderQtyColumn {
                get {
                    return this.columnMinOrderQty;
                }
            }
            
            public System.Data.DataColumn MaxOrderQtyColumn {
                get {
                    return this.columnMaxOrderQty;
                }
            }
            
            public System.Data.DataColumn OnOrderQtyColumn {
                get {
                    return this.columnOnOrderQty;
                }
            }
            
            public System.Data.DataColumn UnitMeasureCodeColumn {
                get {
                    return this.columnUnitMeasureCode;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public ProductVendorRow this[int index] {
                get {
                    return ((ProductVendorRow)(this.Rows[index]));
                }
            }
            
            public event ProductVendorRowChangeEventHandler ProductVendorRowChanged;
            
            public event ProductVendorRowChangeEventHandler ProductVendorRowChanging;
            
            public event ProductVendorRowChangeEventHandler ProductVendorRowDeleted;
            
            public event ProductVendorRowChangeEventHandler ProductVendorRowDeleting;
            
            public void AddProductVendorRow(ProductVendorRow row) {
                this.Rows.Add(row);
            }
            
            public ProductVendorRow AddProductVendorRow(ProductRow parentProductRowByFK_ProductVendor_Product_ProductID, VendorRow parentVendorRowByFK_ProductVendor_Vendor_VendorID, int AverageLeadTime, decimal StandardPrice, decimal LastReceiptCost, System.DateTime LastReceiptDate, int MinOrderQty, int MaxOrderQty, int OnOrderQty, UnitMeasureRow parentUnitMeasureRowByFK_ProductVendor_UnitMeasure_UnitMeasureCode, System.DateTime ModifiedDate) {
                ProductVendorRow rowProductVendorRow = ((ProductVendorRow)(this.NewRow()));
                rowProductVendorRow.ItemArray = new object[] {
                        parentProductRowByFK_ProductVendor_Product_ProductID[0],
                        parentVendorRowByFK_ProductVendor_Vendor_VendorID[0],
                        AverageLeadTime,
                        StandardPrice,
                        LastReceiptCost,
                        LastReceiptDate,
                        MinOrderQty,
                        MaxOrderQty,
                        OnOrderQty,
                        parentUnitMeasureRowByFK_ProductVendor_UnitMeasure_UnitMeasureCode[0],
                        ModifiedDate};
                this.Rows.Add(rowProductVendorRow);
                return rowProductVendorRow;
            }
            
            public ProductVendorRow FindByProductIDVendorID(int ProductID, int VendorID) {
                return ((ProductVendorRow)(this.Rows.Find(new object[] {
                            ProductID,
                            VendorID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                ProductVendorDataTable cln = ((ProductVendorDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new ProductVendorDataTable();
            }
            
            internal void InitVars() {
                this.columnProductID = base.Columns["ProductID"];
                this.columnVendorID = base.Columns["VendorID"];
                this.columnAverageLeadTime = base.Columns["AverageLeadTime"];
                this.columnStandardPrice = base.Columns["StandardPrice"];
                this.columnLastReceiptCost = base.Columns["LastReceiptCost"];
                this.columnLastReceiptDate = base.Columns["LastReceiptDate"];
                this.columnMinOrderQty = base.Columns["MinOrderQty"];
                this.columnMaxOrderQty = base.Columns["MaxOrderQty"];
                this.columnOnOrderQty = base.Columns["OnOrderQty"];
                this.columnUnitMeasureCode = base.Columns["UnitMeasureCode"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnProductID = new System.Data.DataColumn("ProductID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductID);
                this.columnVendorID = new System.Data.DataColumn("VendorID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnVendorID);
                this.columnAverageLeadTime = new System.Data.DataColumn("AverageLeadTime", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAverageLeadTime);
                this.columnStandardPrice = new System.Data.DataColumn("StandardPrice", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStandardPrice);
                this.columnLastReceiptCost = new System.Data.DataColumn("LastReceiptCost", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLastReceiptCost);
                this.columnLastReceiptDate = new System.Data.DataColumn("LastReceiptDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLastReceiptDate);
                this.columnMinOrderQty = new System.Data.DataColumn("MinOrderQty", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnMinOrderQty);
                this.columnMaxOrderQty = new System.Data.DataColumn("MaxOrderQty", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnMaxOrderQty);
                this.columnOnOrderQty = new System.Data.DataColumn("OnOrderQty", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnOnOrderQty);
                this.columnUnitMeasureCode = new System.Data.DataColumn("UnitMeasureCode", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnUnitMeasureCode);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnProductID,
                                this.columnVendorID}, true));
                this.columnProductID.AllowDBNull = false;
                this.columnVendorID.AllowDBNull = false;
                this.columnAverageLeadTime.AllowDBNull = false;
                this.columnStandardPrice.AllowDBNull = false;
                this.columnMinOrderQty.AllowDBNull = false;
                this.columnMaxOrderQty.AllowDBNull = false;
                this.columnUnitMeasureCode.AllowDBNull = false;
                this.columnUnitMeasureCode.MaxLength = 3;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public ProductVendorRow NewProductVendorRow() {
                return ((ProductVendorRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ProductVendorRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ProductVendorRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ProductVendorRowChanged != null)) {
                    this.ProductVendorRowChanged(this, new ProductVendorRowChangeEvent(((ProductVendorRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ProductVendorRowChanging != null)) {
                    this.ProductVendorRowChanging(this, new ProductVendorRowChangeEvent(((ProductVendorRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ProductVendorRowDeleted != null)) {
                    this.ProductVendorRowDeleted(this, new ProductVendorRowChangeEvent(((ProductVendorRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ProductVendorRowDeleting != null)) {
                    this.ProductVendorRowDeleting(this, new ProductVendorRowChangeEvent(((ProductVendorRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveProductVendorRow(ProductVendorRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "ProductVendorDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class PurchaseOrderDetailDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnPurchaseOrderID;
            
            private System.Data.DataColumn columnPurchaseOrderDetailID;
            
            private System.Data.DataColumn columnDueDate;
            
            private System.Data.DataColumn columnOrderQty;
            
            private System.Data.DataColumn columnProductID;
            
            private System.Data.DataColumn columnUnitPrice;
            
            private System.Data.DataColumn columnLineTotal;
            
            private System.Data.DataColumn columnReceivedQty;
            
            private System.Data.DataColumn columnRejectedQty;
            
            private System.Data.DataColumn columnStockedQty;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public PurchaseOrderDetailDataTable() {
                this.TableName = "PurchaseOrderDetail";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal PurchaseOrderDetailDataTable(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;
            }
            
            protected PurchaseOrderDetailDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn PurchaseOrderIDColumn {
                get {
                    return this.columnPurchaseOrderID;
                }
            }
            
            public System.Data.DataColumn PurchaseOrderDetailIDColumn {
                get {
                    return this.columnPurchaseOrderDetailID;
                }
            }
            
            public System.Data.DataColumn DueDateColumn {
                get {
                    return this.columnDueDate;
                }
            }
            
            public System.Data.DataColumn OrderQtyColumn {
                get {
                    return this.columnOrderQty;
                }
            }
            
            public System.Data.DataColumn ProductIDColumn {
                get {
                    return this.columnProductID;
                }
            }
            
            public System.Data.DataColumn UnitPriceColumn {
                get {
                    return this.columnUnitPrice;
                }
            }
            
            public System.Data.DataColumn LineTotalColumn {
                get {
                    return this.columnLineTotal;
                }
            }
            
            public System.Data.DataColumn ReceivedQtyColumn {
                get {
                    return this.columnReceivedQty;
                }
            }
            
            public System.Data.DataColumn RejectedQtyColumn {
                get {
                    return this.columnRejectedQty;
                }
            }
            
            public System.Data.DataColumn StockedQtyColumn {
                get {
                    return this.columnStockedQty;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public PurchaseOrderDetailRow this[int index] {
                get {
                    return ((PurchaseOrderDetailRow)(this.Rows[index]));
                }
            }
            
            public event PurchaseOrderDetailRowChangeEventHandler PurchaseOrderDetailRowChanged;
            
            public event PurchaseOrderDetailRowChangeEventHandler PurchaseOrderDetailRowChanging;
            
            public event PurchaseOrderDetailRowChangeEventHandler PurchaseOrderDetailRowDeleted;
            
            public event PurchaseOrderDetailRowChangeEventHandler PurchaseOrderDetailRowDeleting;
            
            public void AddPurchaseOrderDetailRow(PurchaseOrderDetailRow row) {
                this.Rows.Add(row);
            }
            
            public PurchaseOrderDetailRow AddPurchaseOrderDetailRow(PurchaseOrderHeaderRow parentPurchaseOrderHeaderRowByFK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID, System.DateTime DueDate, short OrderQty, ProductRow parentProductRowByFK_PurchaseOrderDetail_Product_ProductID, decimal UnitPrice, decimal LineTotal, decimal ReceivedQty, decimal RejectedQty, decimal StockedQty, System.DateTime ModifiedDate) {
                PurchaseOrderDetailRow rowPurchaseOrderDetailRow = ((PurchaseOrderDetailRow)(this.NewRow()));
                rowPurchaseOrderDetailRow.ItemArray = new object[] {
                        parentPurchaseOrderHeaderRowByFK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID[0],
                        null,
                        DueDate,
                        OrderQty,
                        parentProductRowByFK_PurchaseOrderDetail_Product_ProductID[0],
                        UnitPrice,
                        LineTotal,
                        ReceivedQty,
                        RejectedQty,
                        StockedQty,
                        ModifiedDate};
                this.Rows.Add(rowPurchaseOrderDetailRow);
                return rowPurchaseOrderDetailRow;
            }
            
            public PurchaseOrderDetailRow FindByPurchaseOrderIDPurchaseOrderDetailID(int PurchaseOrderID, int PurchaseOrderDetailID) {
                return ((PurchaseOrderDetailRow)(this.Rows.Find(new object[] {
                            PurchaseOrderID,
                            PurchaseOrderDetailID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                PurchaseOrderDetailDataTable cln = ((PurchaseOrderDetailDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new PurchaseOrderDetailDataTable();
            }
            
            internal void InitVars() {
                this.columnPurchaseOrderID = base.Columns["PurchaseOrderID"];
                this.columnPurchaseOrderDetailID = base.Columns["PurchaseOrderDetailID"];
                this.columnDueDate = base.Columns["DueDate"];
                this.columnOrderQty = base.Columns["OrderQty"];
                this.columnProductID = base.Columns["ProductID"];
                this.columnUnitPrice = base.Columns["UnitPrice"];
                this.columnLineTotal = base.Columns["LineTotal"];
                this.columnReceivedQty = base.Columns["ReceivedQty"];
                this.columnRejectedQty = base.Columns["RejectedQty"];
                this.columnStockedQty = base.Columns["StockedQty"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnPurchaseOrderID = new System.Data.DataColumn("PurchaseOrderID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPurchaseOrderID);
                this.columnPurchaseOrderDetailID = new System.Data.DataColumn("PurchaseOrderDetailID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPurchaseOrderDetailID);
                this.columnDueDate = new System.Data.DataColumn("DueDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDueDate);
                this.columnOrderQty = new System.Data.DataColumn("OrderQty", typeof(short), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnOrderQty);
                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.columnLineTotal = new System.Data.DataColumn("LineTotal", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLineTotal);
                this.columnReceivedQty = new System.Data.DataColumn("ReceivedQty", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnReceivedQty);
                this.columnRejectedQty = new System.Data.DataColumn("RejectedQty", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnRejectedQty);
                this.columnStockedQty = new System.Data.DataColumn("StockedQty", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStockedQty);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnPurchaseOrderID,
                                this.columnPurchaseOrderDetailID}, true));
                this.columnPurchaseOrderID.AllowDBNull = false;
                this.columnPurchaseOrderDetailID.AutoIncrement = true;
                this.columnPurchaseOrderDetailID.AllowDBNull = false;
                this.columnPurchaseOrderDetailID.ReadOnly = true;
                this.columnDueDate.AllowDBNull = false;
                this.columnOrderQty.AllowDBNull = false;
                this.columnProductID.AllowDBNull = false;
                this.columnUnitPrice.AllowDBNull = false;
                this.columnLineTotal.ReadOnly = true;
                this.columnReceivedQty.AllowDBNull = false;
                this.columnRejectedQty.AllowDBNull = false;
                this.columnStockedQty.ReadOnly = true;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public PurchaseOrderDetailRow NewPurchaseOrderDetailRow() {
                return ((PurchaseOrderDetailRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new PurchaseOrderDetailRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(PurchaseOrderDetailRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.PurchaseOrderDetailRowChanged != null)) {
                    this.PurchaseOrderDetailRowChanged(this, new PurchaseOrderDetailRowChangeEvent(((PurchaseOrderDetailRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.PurchaseOrderDetailRowChanging != null)) {
                    this.PurchaseOrderDetailRowChanging(this, new PurchaseOrderDetailRowChangeEvent(((PurchaseOrderDetailRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.PurchaseOrderDetailRowDeleted != null)) {
                    this.PurchaseOrderDetailRowDeleted(this, new PurchaseOrderDetailRowChangeEvent(((PurchaseOrderDetailRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.PurchaseOrderDetailRowDeleting != null)) {
                    this.PurchaseOrderDetailRowDeleting(this, new PurchaseOrderDetailRowChangeEvent(((PurchaseOrderDetailRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovePurchaseOrderDetailRow(PurchaseOrderDetailRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "PurchaseOrderDetailDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class PurchaseOrderHeaderDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnPurchaseOrderID;
            
            private System.Data.DataColumn columnRevisionNumber;
            
            private System.Data.DataColumn columnStatus;
            
            private System.Data.DataColumn columnEmployeeID;
            
            private System.Data.DataColumn columnVendorID;
            
            private System.Data.DataColumn columnShipMethodID;
            
            private System.Data.DataColumn columnOrderDate;
            
            private System.Data.DataColumn columnShipDate;
            
            private System.Data.DataColumn columnSubTotal;
            
            private System.Data.DataColumn columnTaxAmt;
            
            private System.Data.DataColumn columnFreight;
            
            private System.Data.DataColumn columnTotalDue;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public PurchaseOrderHeaderDataTable() {
                this.TableName = "PurchaseOrderHeader";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal PurchaseOrderHeaderDataTable(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;
            }
            
            protected PurchaseOrderHeaderDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn PurchaseOrderIDColumn {
                get {
                    return this.columnPurchaseOrderID;
                }
            }
            
            public System.Data.DataColumn RevisionNumberColumn {
                get {
                    return this.columnRevisionNumber;
                }
            }
            
            public System.Data.DataColumn StatusColumn {
                get {
                    return this.columnStatus;
                }
            }
            
            public System.Data.DataColumn EmployeeIDColumn {
                get {
                    return this.columnEmployeeID;
                }
            }
            
            public System.Data.DataColumn VendorIDColumn {
                get {
                    return this.columnVendorID;
                }
            }
            
            public System.Data.DataColumn ShipMethodIDColumn {
                get {
                    return this.columnShipMethodID;
                }
            }
            
            public System.Data.DataColumn OrderDateColumn {
                get {
                    return this.columnOrderDate;
                }
            }
            
            public System.Data.DataColumn ShipDateColumn {
                get {
                    return this.columnShipDate;
                }
            }
            
            public System.Data.DataColumn SubTotalColumn {
                get {
                    return this.columnSubTotal;
                }
            }
            
            public System.Data.DataColumn TaxAmtColumn {
                get {
                    return this.columnTaxAmt;
                }
            }
            
            public System.Data.DataColumn FreightColumn {
                get {
                    return this.columnFreight;
                }
            }
            
            public System.Data.DataColumn TotalDueColumn {
                get {
                    return this.columnTotalDue;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public PurchaseOrderHeaderRow this[int index] {
                get {
                    return ((PurchaseOrderHeaderRow)(this.Rows[index]));
                }
            }
            
            public event PurchaseOrderHeaderRowChangeEventHandler PurchaseOrderHeaderRowChanged;
            
            public event PurchaseOrderHeaderRowChangeEventHandler PurchaseOrderHeaderRowChanging;
            
            public event PurchaseOrderHeaderRowChangeEventHandler PurchaseOrderHeaderRowDeleted;
            
            public event PurchaseOrderHeaderRowChangeEventHandler PurchaseOrderHeaderRowDeleting;
            
            public void AddPurchaseOrderHeaderRow(PurchaseOrderHeaderRow row) {
                this.Rows.Add(row);
            }
            
            public PurchaseOrderHeaderRow AddPurchaseOrderHeaderRow(byte RevisionNumber, byte Status, EmployeeRow parentEmployeeRowByFK_PurchaseOrderHeader_Employee_EmployeeID, VendorRow parentVendorRowByFK_PurchaseOrderHeader_Vendor_VendorID, ShipMethodRow parentShipMethodRowByFK_PurchaseOrderHeader_ShipMethod_ShipMethodID, System.DateTime OrderDate, System.DateTime ShipDate, decimal SubTotal, decimal TaxAmt, decimal Freight, decimal TotalDue, System.DateTime ModifiedDate) {
                PurchaseOrderHeaderRow rowPurchaseOrderHeaderRow = ((PurchaseOrderHeaderRow)(this.NewRow()));
                rowPurchaseOrderHeaderRow.ItemArray = new object[] {
                        null,
                        RevisionNumber,
                        Status,
                        parentEmployeeRowByFK_PurchaseOrderHeader_Employee_EmployeeID[0],
                        parentVendorRowByFK_PurchaseOrderHeader_Vendor_VendorID[0],
                        parentShipMethodRowByFK_PurchaseOrderHeader_ShipMethod_ShipMethodID[0],
                        OrderDate,
                        ShipDate,
                        SubTotal,
                        TaxAmt,
                        Freight,
                        TotalDue,
                        ModifiedDate};
                this.Rows.Add(rowPurchaseOrderHeaderRow);
                return rowPurchaseOrderHeaderRow;
            }
            
            public PurchaseOrderHeaderRow FindByPurchaseOrderID(int PurchaseOrderID) {
                return ((PurchaseOrderHeaderRow)(this.Rows.Find(new object[] {
                            PurchaseOrderID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                PurchaseOrderHeaderDataTable cln = ((PurchaseOrderHeaderDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new PurchaseOrderHeaderDataTable();
            }
            
            internal void InitVars() {
                this.columnPurchaseOrderID = base.Columns["PurchaseOrderID"];
                this.columnRevisionNumber = base.Columns["RevisionNumber"];
                this.columnStatus = base.Columns["Status"];
                this.columnEmployeeID = base.Columns["EmployeeID"];
                this.columnVendorID = base.Columns["VendorID"];
                this.columnShipMethodID = base.Columns["ShipMethodID"];
                this.columnOrderDate = base.Columns["OrderDate"];
                this.columnShipDate = base.Columns["ShipDate"];
                this.columnSubTotal = base.Columns["SubTotal"];
                this.columnTaxAmt = base.Columns["TaxAmt"];
                this.columnFreight = base.Columns["Freight"];
                this.columnTotalDue = base.Columns["TotalDue"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnPurchaseOrderID = new System.Data.DataColumn("PurchaseOrderID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPurchaseOrderID);
                this.columnRevisionNumber = new System.Data.DataColumn("RevisionNumber", typeof(byte), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnRevisionNumber);
                this.columnStatus = new System.Data.DataColumn("Status", typeof(byte), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStatus);
                this.columnEmployeeID = new System.Data.DataColumn("EmployeeID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmployeeID);
                this.columnVendorID = new System.Data.DataColumn("VendorID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnVendorID);
                this.columnShipMethodID = new System.Data.DataColumn("ShipMethodID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnShipMethodID);
                this.columnOrderDate = new System.Data.DataColumn("OrderDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnOrderDate);
                this.columnShipDate = new System.Data.DataColumn("ShipDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnShipDate);
                this.columnSubTotal = new System.Data.DataColumn("SubTotal", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSubTotal);
                this.columnTaxAmt = new System.Data.DataColumn("TaxAmt", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTaxAmt);
                this.columnFreight = new System.Data.DataColumn("Freight", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnFreight);
                this.columnTotalDue = new System.Data.DataColumn("TotalDue", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTotalDue);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnPurchaseOrderID}, true));
                this.columnPurchaseOrderID.AutoIncrement = true;
                this.columnPurchaseOrderID.AllowDBNull = false;
                this.columnPurchaseOrderID.ReadOnly = true;
                this.columnPurchaseOrderID.Unique = true;
                this.columnRevisionNumber.AllowDBNull = false;
                this.columnStatus.AllowDBNull = false;
                this.columnEmployeeID.AllowDBNull = false;
                this.columnVendorID.AllowDBNull = false;
                this.columnShipMethodID.AllowDBNull = false;
                this.columnOrderDate.AllowDBNull = false;
                this.columnSubTotal.AllowDBNull = false;
                this.columnTaxAmt.AllowDBNull = false;
                this.columnFreight.AllowDBNull = false;
                this.columnTotalDue.ReadOnly = true;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public PurchaseOrderHeaderRow NewPurchaseOrderHeaderRow() {
                return ((PurchaseOrderHeaderRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new PurchaseOrderHeaderRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(PurchaseOrderHeaderRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.PurchaseOrderHeaderRowChanged != null)) {
                    this.PurchaseOrderHeaderRowChanged(this, new PurchaseOrderHeaderRowChangeEvent(((PurchaseOrderHeaderRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.PurchaseOrderHeaderRowChanging != null)) {
                    this.PurchaseOrderHeaderRowChanging(this, new PurchaseOrderHeaderRowChangeEvent(((PurchaseOrderHeaderRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.PurchaseOrderHeaderRowDeleted != null)) {
                    this.PurchaseOrderHeaderRowDeleted(this, new PurchaseOrderHeaderRowChangeEvent(((PurchaseOrderHeaderRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.PurchaseOrderHeaderRowDeleting != null)) {
                    this.PurchaseOrderHeaderRowDeleting(this, new PurchaseOrderHeaderRowChangeEvent(((PurchaseOrderHeaderRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovePurchaseOrderHeaderRow(PurchaseOrderHeaderRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "PurchaseOrderHeaderDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ShipMethodDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnShipMethodID;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnShipBase;
            
            private System.Data.DataColumn columnShipRate;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public ShipMethodDataTable() {
                this.TableName = "ShipMethod";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal ShipMethodDataTable(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;
            }
            
            protected ShipMethodDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ShipMethodIDColumn {
                get {
                    return this.columnShipMethodID;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn ShipBaseColumn {
                get {
                    return this.columnShipBase;
                }
            }
            
            public System.Data.DataColumn ShipRateColumn {
                get {
                    return this.columnShipRate;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public ShipMethodRow this[int index] {
                get {
                    return ((ShipMethodRow)(this.Rows[index]));
                }
            }
            
            public event ShipMethodRowChangeEventHandler ShipMethodRowChanged;
            
            public event ShipMethodRowChangeEventHandler ShipMethodRowChanging;
            
            public event ShipMethodRowChangeEventHandler ShipMethodRowDeleted;
            
            public event ShipMethodRowChangeEventHandler ShipMethodRowDeleting;
            
            public void AddShipMethodRow(ShipMethodRow row) {
                this.Rows.Add(row);
            }
            
            public ShipMethodRow AddShipMethodRow(string Name, decimal ShipBase, decimal ShipRate, System.Guid rowguid, System.DateTime ModifiedDate) {
                ShipMethodRow rowShipMethodRow = ((ShipMethodRow)(this.NewRow()));
                rowShipMethodRow.ItemArray = new object[] {
                        null,
                        Name,
                        ShipBase,
                        ShipRate,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowShipMethodRow);
                return rowShipMethodRow;
            }
            
            public ShipMethodRow FindByShipMethodID(int ShipMethodID) {
                return ((ShipMethodRow)(this.Rows.Find(new object[] {
                            ShipMethodID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                ShipMethodDataTable cln = ((ShipMethodDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new ShipMethodDataTable();
            }
            
            internal void InitVars() {
                this.columnShipMethodID = base.Columns["ShipMethodID"];
                this.columnName = base.Columns["Name"];
                this.columnShipBase = base.Columns["ShipBase"];
                this.columnShipRate = base.Columns["ShipRate"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnShipMethodID = new System.Data.DataColumn("ShipMethodID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnShipMethodID);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnShipBase = new System.Data.DataColumn("ShipBase", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnShipBase);
                this.columnShipRate = new System.Data.DataColumn("ShipRate", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnShipRate);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnShipMethodID}, true));
                this.columnShipMethodID.AutoIncrement = true;
                this.columnShipMethodID.AllowDBNull = false;
                this.columnShipMethodID.ReadOnly = true;
                this.columnShipMethodID.Unique = true;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnShipBase.AllowDBNull = false;
                this.columnShipRate.AllowDBNull = false;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public ShipMethodRow NewShipMethodRow() {
                return ((ShipMethodRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ShipMethodRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ShipMethodRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ShipMethodRowChanged != null)) {
                    this.ShipMethodRowChanged(this, new ShipMethodRowChangeEvent(((ShipMethodRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ShipMethodRowChanging != null)) {
                    this.ShipMethodRowChanging(this, new ShipMethodRowChangeEvent(((ShipMethodRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ShipMethodRowDeleted != null)) {
                    this.ShipMethodRowDeleted(this, new ShipMethodRowChangeEvent(((ShipMethodRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ShipMethodRowDeleting != null)) {
                    this.ShipMethodRowDeleting(this, new ShipMethodRowChangeEvent(((ShipMethodRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveShipMethodRow(ShipMethodRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "ShipMethodDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class VendorDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnVendorID;
            
            private System.Data.DataColumn columnAccountNumber;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnCreditRating;
            
            private System.Data.DataColumn columnPreferredVendorStatus;
            
            private System.Data.DataColumn columnActiveFlag;
            
            private System.Data.DataColumn columnPurchasingWebServiceURL;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public VendorDataTable() {
                this.TableName = "Vendor";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal VendorDataTable(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;
            }
            
            protected VendorDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn VendorIDColumn {
                get {
                    return this.columnVendorID;
                }
            }
            
            public System.Data.DataColumn AccountNumberColumn {
                get {
                    return this.columnAccountNumber;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn CreditRatingColumn {
                get {
                    return this.columnCreditRating;
                }
            }
            
            public System.Data.DataColumn PreferredVendorStatusColumn {
                get {
                    return this.columnPreferredVendorStatus;
                }
            }
            
            public System.Data.DataColumn ActiveFlagColumn {
                get {
                    return this.columnActiveFlag;
                }
            }
            
            public System.Data.DataColumn PurchasingWebServiceURLColumn {
                get {
                    return this.columnPurchasingWebServiceURL;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public VendorRow this[int index] {
                get {
                    return ((VendorRow)(this.Rows[index]));
                }
            }
            
            public event VendorRowChangeEventHandler VendorRowChanged;
            
            public event VendorRowChangeEventHandler VendorRowChanging;
            
            public event VendorRowChangeEventHandler VendorRowDeleted;
            
            public event VendorRowChangeEventHandler VendorRowDeleting;
            
            public void AddVendorRow(VendorRow row) {
                this.Rows.Add(row);
            }
            
            public VendorRow AddVendorRow(string AccountNumber, string Name, byte CreditRating, bool PreferredVendorStatus, bool ActiveFlag, string PurchasingWebServiceURL, System.DateTime ModifiedDate) {
                VendorRow rowVendorRow = ((VendorRow)(this.NewRow()));
                rowVendorRow.ItemArray = new object[] {
                        null,
                        AccountNumber,
                        Name,
                        CreditRating,
                        PreferredVendorStatus,
                        ActiveFlag,
                        PurchasingWebServiceURL,
                        ModifiedDate};
                this.Rows.Add(rowVendorRow);
                return rowVendorRow;
            }
            
            public VendorRow FindByVendorID(int VendorID) {
                return ((VendorRow)(this.Rows.Find(new object[] {
                            VendorID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                VendorDataTable cln = ((VendorDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new VendorDataTable();
            }
            
            internal void InitVars() {
                this.columnVendorID = base.Columns["VendorID"];
                this.columnAccountNumber = base.Columns["AccountNumber"];
                this.columnName = base.Columns["Name"];
                this.columnCreditRating = base.Columns["CreditRating"];
                this.columnPreferredVendorStatus = base.Columns["PreferredVendorStatus"];
                this.columnActiveFlag = base.Columns["ActiveFlag"];
                this.columnPurchasingWebServiceURL = base.Columns["PurchasingWebServiceURL"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnVendorID = new System.Data.DataColumn("VendorID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnVendorID);
                this.columnAccountNumber = new System.Data.DataColumn("AccountNumber", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAccountNumber);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnCreditRating = new System.Data.DataColumn("CreditRating", typeof(byte), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCreditRating);
                this.columnPreferredVendorStatus = new System.Data.DataColumn("PreferredVendorStatus", typeof(bool), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPreferredVendorStatus);
                this.columnActiveFlag = new System.Data.DataColumn("ActiveFlag", typeof(bool), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnActiveFlag);
                this.columnPurchasingWebServiceURL = new System.Data.DataColumn("PurchasingWebServiceURL", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPurchasingWebServiceURL);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnVendorID}, true));
                this.columnVendorID.AutoIncrement = true;
                this.columnVendorID.AllowDBNull = false;
                this.columnVendorID.ReadOnly = true;
                this.columnVendorID.Unique = true;
                this.columnAccountNumber.AllowDBNull = false;
                this.columnAccountNumber.MaxLength = 15;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnCreditRating.AllowDBNull = false;
                this.columnPreferredVendorStatus.AllowDBNull = false;
                this.columnActiveFlag.AllowDBNull = false;
                this.columnPurchasingWebServiceURL.MaxLength = 1024;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public VendorRow NewVendorRow() {
                return ((VendorRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new VendorRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(VendorRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.VendorRowChanged != null)) {
                    this.VendorRowChanged(this, new VendorRowChangeEvent(((VendorRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.VendorRowChanging != null)) {
                    this.VendorRowChanging(this, new VendorRowChangeEvent(((VendorRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.VendorRowDeleted != null)) {
                    this.VendorRowDeleted(this, new VendorRowChangeEvent(((VendorRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.VendorRowDeleting != null)) {
                    this.VendorRowDeleting(this, new VendorRowChangeEvent(((VendorRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveVendorRow(VendorRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "VendorDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class VendorAddressDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnVendorID;
            
            private System.Data.DataColumn columnAddressID;
            
            private System.Data.DataColumn columnAddressTypeID;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public VendorAddressDataTable() {
                this.TableName = "VendorAddress";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal VendorAddressDataTable(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;
            }
            
            protected VendorAddressDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn VendorIDColumn {
                get {
                    return this.columnVendorID;
                }
            }
            
            public System.Data.DataColumn AddressIDColumn {
                get {
                    return this.columnAddressID;
                }
            }
            
            public System.Data.DataColumn AddressTypeIDColumn {
                get {
                    return this.columnAddressTypeID;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public VendorAddressRow this[int index] {
                get {
                    return ((VendorAddressRow)(this.Rows[index]));
                }
            }
            
            public event VendorAddressRowChangeEventHandler VendorAddressRowChanged;
            
            public event VendorAddressRowChangeEventHandler VendorAddressRowChanging;
            
            public event VendorAddressRowChangeEventHandler VendorAddressRowDeleted;
            
            public event VendorAddressRowChangeEventHandler VendorAddressRowDeleting;
            
            public void AddVendorAddressRow(VendorAddressRow row) {
                this.Rows.Add(row);
            }
            
            public VendorAddressRow AddVendorAddressRow(VendorRow parentVendorRowByFK_VendorAddress_Vendor_VendorID, AddressRow parentAddressRowByFK_VendorAddress_Address_AddressID, AddressTypeRow parentAddressTypeRowByFK_VendorAddress_AddressType_AddressTypeID, System.DateTime ModifiedDate) {
                VendorAddressRow rowVendorAddressRow = ((VendorAddressRow)(this.NewRow()));
                rowVendorAddressRow.ItemArray = new object[] {
                        parentVendorRowByFK_VendorAddress_Vendor_VendorID[0],
                        parentAddressRowByFK_VendorAddress_Address_AddressID[0],
                        parentAddressTypeRowByFK_VendorAddress_AddressType_AddressTypeID[0],
                        ModifiedDate};
                this.Rows.Add(rowVendorAddressRow);
                return rowVendorAddressRow;
            }
            
            public VendorAddressRow FindByVendorIDAddressID(int VendorID, int AddressID) {
                return ((VendorAddressRow)(this.Rows.Find(new object[] {
                            VendorID,
                            AddressID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                VendorAddressDataTable cln = ((VendorAddressDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new VendorAddressDataTable();
            }
            
            internal void InitVars() {
                this.columnVendorID = base.Columns["VendorID"];
                this.columnAddressID = base.Columns["AddressID"];
                this.columnAddressTypeID = base.Columns["AddressTypeID"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnVendorID = new System.Data.DataColumn("VendorID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnVendorID);
                this.columnAddressID = new System.Data.DataColumn("AddressID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAddressID);
                this.columnAddressTypeID = new System.Data.DataColumn("AddressTypeID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAddressTypeID);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnVendorID,
                                this.columnAddressID}, true));
                this.columnVendorID.AllowDBNull = false;
                this.columnAddressID.AllowDBNull = false;
                this.columnAddressTypeID.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public VendorAddressRow NewVendorAddressRow() {
                return ((VendorAddressRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new VendorAddressRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(VendorAddressRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.VendorAddressRowChanged != null)) {
                    this.VendorAddressRowChanged(this, new VendorAddressRowChangeEvent(((VendorAddressRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.VendorAddressRowChanging != null)) {
                    this.VendorAddressRowChanging(this, new VendorAddressRowChangeEvent(((VendorAddressRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.VendorAddressRowDeleted != null)) {
                    this.VendorAddressRowDeleted(this, new VendorAddressRowChangeEvent(((VendorAddressRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.VendorAddressRowDeleting != null)) {
                    this.VendorAddressRowDeleting(this, new VendorAddressRowChangeEvent(((VendorAddressRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveVendorAddressRow(VendorAddressRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "VendorAddressDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class VendorContactDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnVendorID;
            
            private System.Data.DataColumn columnContactID;
            
            private System.Data.DataColumn columnContactTypeID;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public VendorContactDataTable() {
                this.TableName = "VendorContact";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal VendorContactDataTable(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;
            }
            
            protected VendorContactDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn VendorIDColumn {
                get {
                    return this.columnVendorID;
                }
            }
            
            public System.Data.DataColumn ContactIDColumn {
                get {
                    return this.columnContactID;
                }
            }
            
            public System.Data.DataColumn ContactTypeIDColumn {
                get {
                    return this.columnContactTypeID;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public VendorContactRow this[int index] {
                get {
                    return ((VendorContactRow)(this.Rows[index]));
                }
            }
            
            public event VendorContactRowChangeEventHandler VendorContactRowChanged;
            
            public event VendorContactRowChangeEventHandler VendorContactRowChanging;
            
            public event VendorContactRowChangeEventHandler VendorContactRowDeleted;
            
            public event VendorContactRowChangeEventHandler VendorContactRowDeleting;
            
            public void AddVendorContactRow(VendorContactRow row) {
                this.Rows.Add(row);
            }
            
            public VendorContactRow AddVendorContactRow(VendorRow parentVendorRowByFK_VendorContact_Vendor_VendorID, ContactRow parentContactRowByFK_VendorContact_Contact_ContactID, ContactTypeRow parentContactTypeRowByFK_VendorContact_ContactType_ContactTypeID, System.DateTime ModifiedDate) {
                VendorContactRow rowVendorContactRow = ((VendorContactRow)(this.NewRow()));
                rowVendorContactRow.ItemArray = new object[] {
                        parentVendorRowByFK_VendorContact_Vendor_VendorID[0],
                        parentContactRowByFK_VendorContact_Contact_ContactID[0],
                        parentContactTypeRowByFK_VendorContact_ContactType_ContactTypeID[0],
                        ModifiedDate};
                this.Rows.Add(rowVendorContactRow);
                return rowVendorContactRow;
            }
            
            public VendorContactRow FindByVendorIDContactID(int VendorID, int ContactID) {
                return ((VendorContactRow)(this.Rows.Find(new object[] {
                            VendorID,
                            ContactID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                VendorContactDataTable cln = ((VendorContactDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new VendorContactDataTable();
            }
            
            internal void InitVars() {
                this.columnVendorID = base.Columns["VendorID"];
                this.columnContactID = base.Columns["ContactID"];
                this.columnContactTypeID = base.Columns["ContactTypeID"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnVendorID = new System.Data.DataColumn("VendorID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnVendorID);
                this.columnContactID = new System.Data.DataColumn("ContactID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnContactID);
                this.columnContactTypeID = new System.Data.DataColumn("ContactTypeID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnContactTypeID);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnVendorID,
                                this.columnContactID}, true));
                this.columnVendorID.AllowDBNull = false;
                this.columnContactID.AllowDBNull = false;
                this.columnContactTypeID.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public VendorContactRow NewVendorContactRow() {
                return ((VendorContactRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new VendorContactRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(VendorContactRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.VendorContactRowChanged != null)) {
                    this.VendorContactRowChanged(this, new VendorContactRowChangeEvent(((VendorContactRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.VendorContactRowChanging != null)) {
                    this.VendorContactRowChanging(this, new VendorContactRowChangeEvent(((VendorContactRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.VendorContactRowDeleted != null)) {
                    this.VendorContactRowDeleted(this, new VendorContactRowChangeEvent(((VendorContactRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.VendorContactRowDeleting != null)) {
                    this.VendorContactRowDeleting(this, new VendorContactRowChangeEvent(((VendorContactRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveVendorContactRow(VendorContactRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "VendorContactDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ContactCreditCardDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnContactID;
            
            private System.Data.DataColumn columnCreditCardID;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public ContactCreditCardDataTable() {
                this.TableName = "ContactCreditCard";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal ContactCreditCardDataTable(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;
            }
            
            protected ContactCreditCardDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ContactIDColumn {
                get {
                    return this.columnContactID;
                }
            }
            
            public System.Data.DataColumn CreditCardIDColumn {
                get {
                    return this.columnCreditCardID;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public ContactCreditCardRow this[int index] {
                get {
                    return ((ContactCreditCardRow)(this.Rows[index]));
                }
            }
            
            public event ContactCreditCardRowChangeEventHandler ContactCreditCardRowChanged;
            
            public event ContactCreditCardRowChangeEventHandler ContactCreditCardRowChanging;
            
            public event ContactCreditCardRowChangeEventHandler ContactCreditCardRowDeleted;
            
            public event ContactCreditCardRowChangeEventHandler ContactCreditCardRowDeleting;
            
            public void AddContactCreditCardRow(ContactCreditCardRow row) {
                this.Rows.Add(row);
            }
            
            public ContactCreditCardRow AddContactCreditCardRow(ContactRow parentContactRowByFK_ContactCreditCard_Contact_ContactID, CreditCardRow parentCreditCardRowByFK_ContactCreditCard_CreditCard_CreditCardID, System.DateTime ModifiedDate) {
                ContactCreditCardRow rowContactCreditCardRow = ((ContactCreditCardRow)(this.NewRow()));
                rowContactCreditCardRow.ItemArray = new object[] {
                        parentContactRowByFK_ContactCreditCard_Contact_ContactID[0],
                        parentCreditCardRowByFK_ContactCreditCard_CreditCard_CreditCardID[0],
                        ModifiedDate};
                this.Rows.Add(rowContactCreditCardRow);
                return rowContactCreditCardRow;
            }
            
            public ContactCreditCardRow FindByContactIDCreditCardID(int ContactID, int CreditCardID) {
                return ((ContactCreditCardRow)(this.Rows.Find(new object[] {
                            ContactID,
                            CreditCardID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                ContactCreditCardDataTable cln = ((ContactCreditCardDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new ContactCreditCardDataTable();
            }
            
            internal void InitVars() {
                this.columnContactID = base.Columns["ContactID"];
                this.columnCreditCardID = base.Columns["CreditCardID"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnContactID = new System.Data.DataColumn("ContactID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnContactID);
                this.columnCreditCardID = new System.Data.DataColumn("CreditCardID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCreditCardID);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnContactID,
                                this.columnCreditCardID}, true));
                this.columnContactID.AllowDBNull = false;
                this.columnCreditCardID.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public ContactCreditCardRow NewContactCreditCardRow() {
                return ((ContactCreditCardRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ContactCreditCardRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ContactCreditCardRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ContactCreditCardRowChanged != null)) {
                    this.ContactCreditCardRowChanged(this, new ContactCreditCardRowChangeEvent(((ContactCreditCardRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ContactCreditCardRowChanging != null)) {
                    this.ContactCreditCardRowChanging(this, new ContactCreditCardRowChangeEvent(((ContactCreditCardRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ContactCreditCardRowDeleted != null)) {
                    this.ContactCreditCardRowDeleted(this, new ContactCreditCardRowChangeEvent(((ContactCreditCardRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ContactCreditCardRowDeleting != null)) {
                    this.ContactCreditCardRowDeleting(this, new ContactCreditCardRowChangeEvent(((ContactCreditCardRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveContactCreditCardRow(ContactCreditCardRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "ContactCreditCardDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class CountryRegionCurrencyDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnCountryRegionCode;
            
            private System.Data.DataColumn columnCurrencyCode;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public CountryRegionCurrencyDataTable() {
                this.TableName = "CountryRegionCurrency";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal CountryRegionCurrencyDataTable(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;
            }
            
            protected CountryRegionCurrencyDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn CountryRegionCodeColumn {
                get {
                    return this.columnCountryRegionCode;
                }
            }
            
            public System.Data.DataColumn CurrencyCodeColumn {
                get {
                    return this.columnCurrencyCode;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public CountryRegionCurrencyRow this[int index] {
                get {
                    return ((CountryRegionCurrencyRow)(this.Rows[index]));
                }
            }
            
            public event CountryRegionCurrencyRowChangeEventHandler CountryRegionCurrencyRowChanged;
            
            public event CountryRegionCurrencyRowChangeEventHandler CountryRegionCurrencyRowChanging;
            
            public event CountryRegionCurrencyRowChangeEventHandler CountryRegionCurrencyRowDeleted;
            
            public event CountryRegionCurrencyRowChangeEventHandler CountryRegionCurrencyRowDeleting;
            
            public void AddCountryRegionCurrencyRow(CountryRegionCurrencyRow row) {
                this.Rows.Add(row);
            }
            
            public CountryRegionCurrencyRow AddCountryRegionCurrencyRow(CountryRegionRow parentCountryRegionRowByFK_CountryRegionCurrency_CountryRegion_CountryRegionCode, CurrencyRow parentCurrencyRowByFK_CountryRegionCurrency_Currency_CurrencyCode, System.DateTime ModifiedDate) {
                CountryRegionCurrencyRow rowCountryRegionCurrencyRow = ((CountryRegionCurrencyRow)(this.NewRow()));
                rowCountryRegionCurrencyRow.ItemArray = new object[] {
                        parentCountryRegionRowByFK_CountryRegionCurrency_CountryRegion_CountryRegionCode[0],
                        parentCurrencyRowByFK_CountryRegionCurrency_Currency_CurrencyCode[0],
                        ModifiedDate};
                this.Rows.Add(rowCountryRegionCurrencyRow);
                return rowCountryRegionCurrencyRow;
            }
            
            public CountryRegionCurrencyRow FindByCountryRegionCodeCurrencyCode(string CountryRegionCode, string CurrencyCode) {
                return ((CountryRegionCurrencyRow)(this.Rows.Find(new object[] {
                            CountryRegionCode,
                            CurrencyCode})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                CountryRegionCurrencyDataTable cln = ((CountryRegionCurrencyDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new CountryRegionCurrencyDataTable();
            }
            
            internal void InitVars() {
                this.columnCountryRegionCode = base.Columns["CountryRegionCode"];
                this.columnCurrencyCode = base.Columns["CurrencyCode"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnCountryRegionCode = new System.Data.DataColumn("CountryRegionCode", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCountryRegionCode);
                this.columnCurrencyCode = new System.Data.DataColumn("CurrencyCode", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCurrencyCode);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnCountryRegionCode,
                                this.columnCurrencyCode}, true));
                this.columnCountryRegionCode.AllowDBNull = false;
                this.columnCountryRegionCode.MaxLength = 3;
                this.columnCurrencyCode.AllowDBNull = false;
                this.columnCurrencyCode.MaxLength = 3;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public CountryRegionCurrencyRow NewCountryRegionCurrencyRow() {
                return ((CountryRegionCurrencyRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new CountryRegionCurrencyRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(CountryRegionCurrencyRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.CountryRegionCurrencyRowChanged != null)) {
                    this.CountryRegionCurrencyRowChanged(this, new CountryRegionCurrencyRowChangeEvent(((CountryRegionCurrencyRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.CountryRegionCurrencyRowChanging != null)) {
                    this.CountryRegionCurrencyRowChanging(this, new CountryRegionCurrencyRowChangeEvent(((CountryRegionCurrencyRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.CountryRegionCurrencyRowDeleted != null)) {
                    this.CountryRegionCurrencyRowDeleted(this, new CountryRegionCurrencyRowChangeEvent(((CountryRegionCurrencyRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.CountryRegionCurrencyRowDeleting != null)) {
                    this.CountryRegionCurrencyRowDeleting(this, new CountryRegionCurrencyRowChangeEvent(((CountryRegionCurrencyRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveCountryRegionCurrencyRow(CountryRegionCurrencyRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "CountryRegionCurrencyDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class CreditCardDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnCreditCardID;
            
            private System.Data.DataColumn columnCardType;
            
            private System.Data.DataColumn columnCardNumber;
            
            private System.Data.DataColumn columnExpMonth;
            
            private System.Data.DataColumn columnExpYear;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public CreditCardDataTable() {
                this.TableName = "CreditCard";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal CreditCardDataTable(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;
            }
            
            protected CreditCardDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn CreditCardIDColumn {
                get {
                    return this.columnCreditCardID;
                }
            }
            
            public System.Data.DataColumn CardTypeColumn {
                get {
                    return this.columnCardType;
                }
            }
            
            public System.Data.DataColumn CardNumberColumn {
                get {
                    return this.columnCardNumber;
                }
            }
            
            public System.Data.DataColumn ExpMonthColumn {
                get {
                    return this.columnExpMonth;
                }
            }
            
            public System.Data.DataColumn ExpYearColumn {
                get {
                    return this.columnExpYear;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public CreditCardRow this[int index] {
                get {
                    return ((CreditCardRow)(this.Rows[index]));
                }
            }
            
            public event CreditCardRowChangeEventHandler CreditCardRowChanged;
            
            public event CreditCardRowChangeEventHandler CreditCardRowChanging;
            
            public event CreditCardRowChangeEventHandler CreditCardRowDeleted;
            
            public event CreditCardRowChangeEventHandler CreditCardRowDeleting;
            
            public void AddCreditCardRow(CreditCardRow row) {
                this.Rows.Add(row);
            }
            
            public CreditCardRow AddCreditCardRow(string CardType, string CardNumber, byte ExpMonth, short ExpYear, System.DateTime ModifiedDate) {
                CreditCardRow rowCreditCardRow = ((CreditCardRow)(this.NewRow()));
                rowCreditCardRow.ItemArray = new object[] {
                        null,
                        CardType,
                        CardNumber,
                        ExpMonth,
                        ExpYear,
                        ModifiedDate};
                this.Rows.Add(rowCreditCardRow);
                return rowCreditCardRow;
            }
            
            public CreditCardRow FindByCreditCardID(int CreditCardID) {
                return ((CreditCardRow)(this.Rows.Find(new object[] {
                            CreditCardID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                CreditCardDataTable cln = ((CreditCardDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new CreditCardDataTable();
            }
            
            internal void InitVars() {
                this.columnCreditCardID = base.Columns["CreditCardID"];
                this.columnCardType = base.Columns["CardType"];
                this.columnCardNumber = base.Columns["CardNumber"];
                this.columnExpMonth = base.Columns["ExpMonth"];
                this.columnExpYear = base.Columns["ExpYear"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnCreditCardID = new System.Data.DataColumn("CreditCardID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCreditCardID);
                this.columnCardType = new System.Data.DataColumn("CardType", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCardType);
                this.columnCardNumber = new System.Data.DataColumn("CardNumber", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCardNumber);
                this.columnExpMonth = new System.Data.DataColumn("ExpMonth", typeof(byte), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnExpMonth);
                this.columnExpYear = new System.Data.DataColumn("ExpYear", typeof(short), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnExpYear);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnCreditCardID}, true));
                this.columnCreditCardID.AutoIncrement = true;
                this.columnCreditCardID.AllowDBNull = false;
                this.columnCreditCardID.ReadOnly = true;
                this.columnCreditCardID.Unique = true;
                this.columnCardType.AllowDBNull = false;
                this.columnCardType.MaxLength = 50;
                this.columnCardNumber.AllowDBNull = false;
                this.columnCardNumber.MaxLength = 25;
                this.columnExpMonth.AllowDBNull = false;
                this.columnExpYear.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public CreditCardRow NewCreditCardRow() {
                return ((CreditCardRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new CreditCardRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(CreditCardRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.CreditCardRowChanged != null)) {
                    this.CreditCardRowChanged(this, new CreditCardRowChangeEvent(((CreditCardRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.CreditCardRowChanging != null)) {
                    this.CreditCardRowChanging(this, new CreditCardRowChangeEvent(((CreditCardRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.CreditCardRowDeleted != null)) {
                    this.CreditCardRowDeleted(this, new CreditCardRowChangeEvent(((CreditCardRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.CreditCardRowDeleting != null)) {
                    this.CreditCardRowDeleting(this, new CreditCardRowChangeEvent(((CreditCardRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveCreditCardRow(CreditCardRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "CreditCardDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class CurrencyDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnCurrencyCode;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public CurrencyDataTable() {
                this.TableName = "Currency";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal CurrencyDataTable(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;
            }
            
            protected CurrencyDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn CurrencyCodeColumn {
                get {
                    return this.columnCurrencyCode;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public CurrencyRow this[int index] {
                get {
                    return ((CurrencyRow)(this.Rows[index]));
                }
            }
            
            public event CurrencyRowChangeEventHandler CurrencyRowChanged;
            
            public event CurrencyRowChangeEventHandler CurrencyRowChanging;
            
            public event CurrencyRowChangeEventHandler CurrencyRowDeleted;
            
            public event CurrencyRowChangeEventHandler CurrencyRowDeleting;
            
            public void AddCurrencyRow(CurrencyRow row) {
                this.Rows.Add(row);
            }
            
            public CurrencyRow AddCurrencyRow(string CurrencyCode, string Name, System.DateTime ModifiedDate) {
                CurrencyRow rowCurrencyRow = ((CurrencyRow)(this.NewRow()));
                rowCurrencyRow.ItemArray = new object[] {
                        CurrencyCode,
                        Name,
                        ModifiedDate};
                this.Rows.Add(rowCurrencyRow);
                return rowCurrencyRow;
            }
            
            public CurrencyRow FindByCurrencyCode(string CurrencyCode) {
                return ((CurrencyRow)(this.Rows.Find(new object[] {
                            CurrencyCode})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                CurrencyDataTable cln = ((CurrencyDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new CurrencyDataTable();
            }
            
            internal void InitVars() {
                this.columnCurrencyCode = base.Columns["CurrencyCode"];
                this.columnName = base.Columns["Name"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnCurrencyCode = new System.Data.DataColumn("CurrencyCode", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCurrencyCode);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnCurrencyCode}, true));
                this.columnCurrencyCode.AllowDBNull = false;
                this.columnCurrencyCode.Unique = true;
                this.columnCurrencyCode.MaxLength = 3;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public CurrencyRow NewCurrencyRow() {
                return ((CurrencyRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new CurrencyRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(CurrencyRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.CurrencyRowChanged != null)) {
                    this.CurrencyRowChanged(this, new CurrencyRowChangeEvent(((CurrencyRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.CurrencyRowChanging != null)) {
                    this.CurrencyRowChanging(this, new CurrencyRowChangeEvent(((CurrencyRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.CurrencyRowDeleted != null)) {
                    this.CurrencyRowDeleted(this, new CurrencyRowChangeEvent(((CurrencyRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.CurrencyRowDeleting != null)) {
                    this.CurrencyRowDeleting(this, new CurrencyRowChangeEvent(((CurrencyRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveCurrencyRow(CurrencyRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "CurrencyDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class CurrencyRateDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnCurrencyRateID;
            
            private System.Data.DataColumn columnCurrencyRateDate;
            
            private System.Data.DataColumn columnFromCurrencyCode;
            
            private System.Data.DataColumn columnToCurrencyCode;
            
            private System.Data.DataColumn columnAverageRate;
            
            private System.Data.DataColumn columnEndOfDayRate;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public CurrencyRateDataTable() {
                this.TableName = "CurrencyRate";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal CurrencyRateDataTable(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;
            }
            
            protected CurrencyRateDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn CurrencyRateIDColumn {
                get {
                    return this.columnCurrencyRateID;
                }
            }
            
            public System.Data.DataColumn CurrencyRateDateColumn {
                get {
                    return this.columnCurrencyRateDate;
                }
            }
            
            public System.Data.DataColumn FromCurrencyCodeColumn {
                get {
                    return this.columnFromCurrencyCode;
                }
            }
            
            public System.Data.DataColumn ToCurrencyCodeColumn {
                get {
                    return this.columnToCurrencyCode;
                }
            }
            
            public System.Data.DataColumn AverageRateColumn {
                get {
                    return this.columnAverageRate;
                }
            }
            
            public System.Data.DataColumn EndOfDayRateColumn {
                get {
                    return this.columnEndOfDayRate;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public CurrencyRateRow this[int index] {
                get {
                    return ((CurrencyRateRow)(this.Rows[index]));
                }
            }
            
            public event CurrencyRateRowChangeEventHandler CurrencyRateRowChanged;
            
            public event CurrencyRateRowChangeEventHandler CurrencyRateRowChanging;
            
            public event CurrencyRateRowChangeEventHandler CurrencyRateRowDeleted;
            
            public event CurrencyRateRowChangeEventHandler CurrencyRateRowDeleting;
            
            public void AddCurrencyRateRow(CurrencyRateRow row) {
                this.Rows.Add(row);
            }
            
            public CurrencyRateRow AddCurrencyRateRow(System.DateTime CurrencyRateDate, CurrencyRow parentCurrencyRowByFK_CurrencyRate_Currency_FromCurrencyCode, CurrencyRow parentCurrencyRowByFK_CurrencyRate_Currency_ToCurrencyCode, decimal AverageRate, decimal EndOfDayRate, System.DateTime ModifiedDate) {
                CurrencyRateRow rowCurrencyRateRow = ((CurrencyRateRow)(this.NewRow()));
                rowCurrencyRateRow.ItemArray = new object[] {
                        null,
                        CurrencyRateDate,
                        parentCurrencyRowByFK_CurrencyRate_Currency_FromCurrencyCode[0],
                        parentCurrencyRowByFK_CurrencyRate_Currency_ToCurrencyCode[0],
                        AverageRate,
                        EndOfDayRate,
                        ModifiedDate};
                this.Rows.Add(rowCurrencyRateRow);
                return rowCurrencyRateRow;
            }
            
            public CurrencyRateRow FindByCurrencyRateID(int CurrencyRateID) {
                return ((CurrencyRateRow)(this.Rows.Find(new object[] {
                            CurrencyRateID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                CurrencyRateDataTable cln = ((CurrencyRateDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new CurrencyRateDataTable();
            }
            
            internal void InitVars() {
                this.columnCurrencyRateID = base.Columns["CurrencyRateID"];
                this.columnCurrencyRateDate = base.Columns["CurrencyRateDate"];
                this.columnFromCurrencyCode = base.Columns["FromCurrencyCode"];
                this.columnToCurrencyCode = base.Columns["ToCurrencyCode"];
                this.columnAverageRate = base.Columns["AverageRate"];
                this.columnEndOfDayRate = base.Columns["EndOfDayRate"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnCurrencyRateID = new System.Data.DataColumn("CurrencyRateID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCurrencyRateID);
                this.columnCurrencyRateDate = new System.Data.DataColumn("CurrencyRateDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCurrencyRateDate);
                this.columnFromCurrencyCode = new System.Data.DataColumn("FromCurrencyCode", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnFromCurrencyCode);
                this.columnToCurrencyCode = new System.Data.DataColumn("ToCurrencyCode", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnToCurrencyCode);
                this.columnAverageRate = new System.Data.DataColumn("AverageRate", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAverageRate);
                this.columnEndOfDayRate = new System.Data.DataColumn("EndOfDayRate", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEndOfDayRate);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnCurrencyRateID}, true));
                this.columnCurrencyRateID.AutoIncrement = true;
                this.columnCurrencyRateID.AllowDBNull = false;
                this.columnCurrencyRateID.ReadOnly = true;
                this.columnCurrencyRateID.Unique = true;
                this.columnCurrencyRateDate.AllowDBNull = false;
                this.columnFromCurrencyCode.AllowDBNull = false;
                this.columnFromCurrencyCode.MaxLength = 3;
                this.columnToCurrencyCode.AllowDBNull = false;
                this.columnToCurrencyCode.MaxLength = 3;
                this.columnAverageRate.AllowDBNull = false;
                this.columnEndOfDayRate.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public CurrencyRateRow NewCurrencyRateRow() {
                return ((CurrencyRateRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new CurrencyRateRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(CurrencyRateRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.CurrencyRateRowChanged != null)) {
                    this.CurrencyRateRowChanged(this, new CurrencyRateRowChangeEvent(((CurrencyRateRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.CurrencyRateRowChanging != null)) {
                    this.CurrencyRateRowChanging(this, new CurrencyRateRowChangeEvent(((CurrencyRateRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.CurrencyRateRowDeleted != null)) {
                    this.CurrencyRateRowDeleted(this, new CurrencyRateRowChangeEvent(((CurrencyRateRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.CurrencyRateRowDeleting != null)) {
                    this.CurrencyRateRowDeleting(this, new CurrencyRateRowChangeEvent(((CurrencyRateRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveCurrencyRateRow(CurrencyRateRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "CurrencyRateDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class CustomerDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnCustomerID;
            
            private System.Data.DataColumn columnTerritoryID;
            
            private System.Data.DataColumn columnAccountNumber;
            
            private System.Data.DataColumn columnCustomerType;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public CustomerDataTable() {
                this.TableName = "Customer";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal CustomerDataTable(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;
            }
            
            protected CustomerDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn CustomerIDColumn {
                get {
                    return this.columnCustomerID;
                }
            }
            
            public System.Data.DataColumn TerritoryIDColumn {
                get {
                    return this.columnTerritoryID;
                }
            }
            
            public System.Data.DataColumn AccountNumberColumn {
                get {
                    return this.columnAccountNumber;
                }
            }
            
            public System.Data.DataColumn CustomerTypeColumn {
                get {
                    return this.columnCustomerType;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public CustomerRow this[int index] {
                get {
                    return ((CustomerRow)(this.Rows[index]));
                }
            }
            
            public event CustomerRowChangeEventHandler CustomerRowChanged;
            
            public event CustomerRowChangeEventHandler CustomerRowChanging;
            
            public event CustomerRowChangeEventHandler CustomerRowDeleted;
            
            public event CustomerRowChangeEventHandler CustomerRowDeleting;
            
            public void AddCustomerRow(CustomerRow row) {
                this.Rows.Add(row);
            }
            
            public CustomerRow AddCustomerRow(SalesTerritoryRow parentSalesTerritoryRowByFK_Customer_SalesTerritory_TerritoryID, string AccountNumber, string CustomerType, System.Guid rowguid, System.DateTime ModifiedDate) {
                CustomerRow rowCustomerRow = ((CustomerRow)(this.NewRow()));
                rowCustomerRow.ItemArray = new object[] {
                        null,
                        parentSalesTerritoryRowByFK_Customer_SalesTerritory_TerritoryID[0],
                        AccountNumber,
                        CustomerType,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowCustomerRow);
                return rowCustomerRow;
            }
            
            public CustomerRow FindByCustomerID(int CustomerID) {
                return ((CustomerRow)(this.Rows.Find(new object[] {
                            CustomerID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                CustomerDataTable cln = ((CustomerDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new CustomerDataTable();
            }
            
            internal void InitVars() {
                this.columnCustomerID = base.Columns["CustomerID"];
                this.columnTerritoryID = base.Columns["TerritoryID"];
                this.columnAccountNumber = base.Columns["AccountNumber"];
                this.columnCustomerType = base.Columns["CustomerType"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnCustomerID = new System.Data.DataColumn("CustomerID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCustomerID);
                this.columnTerritoryID = new System.Data.DataColumn("TerritoryID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTerritoryID);
                this.columnAccountNumber = new System.Data.DataColumn("AccountNumber", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAccountNumber);
                this.columnCustomerType = new System.Data.DataColumn("CustomerType", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCustomerType);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnCustomerID}, true));
                this.columnCustomerID.AutoIncrement = true;
                this.columnCustomerID.AllowDBNull = false;
                this.columnCustomerID.ReadOnly = true;
                this.columnCustomerID.Unique = true;
                this.columnAccountNumber.ReadOnly = true;
                this.columnAccountNumber.MaxLength = 10;
                this.columnCustomerType.AllowDBNull = false;
                this.columnCustomerType.MaxLength = 1;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public CustomerRow NewCustomerRow() {
                return ((CustomerRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new CustomerRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(CustomerRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.CustomerRowChanged != null)) {
                    this.CustomerRowChanged(this, new CustomerRowChangeEvent(((CustomerRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.CustomerRowChanging != null)) {
                    this.CustomerRowChanging(this, new CustomerRowChangeEvent(((CustomerRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.CustomerRowDeleted != null)) {
                    this.CustomerRowDeleted(this, new CustomerRowChangeEvent(((CustomerRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.CustomerRowDeleting != null)) {
                    this.CustomerRowDeleting(this, new CustomerRowChangeEvent(((CustomerRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveCustomerRow(CustomerRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "CustomerDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class CustomerAddressDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnCustomerID;
            
            private System.Data.DataColumn columnAddressID;
            
            private System.Data.DataColumn columnAddressTypeID;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public CustomerAddressDataTable() {
                this.TableName = "CustomerAddress";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal CustomerAddressDataTable(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;
            }
            
            protected CustomerAddressDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn CustomerIDColumn {
                get {
                    return this.columnCustomerID;
                }
            }
            
            public System.Data.DataColumn AddressIDColumn {
                get {
                    return this.columnAddressID;
                }
            }
            
            public System.Data.DataColumn AddressTypeIDColumn {
                get {
                    return this.columnAddressTypeID;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public CustomerAddressRow this[int index] {
                get {
                    return ((CustomerAddressRow)(this.Rows[index]));
                }
            }
            
            public event CustomerAddressRowChangeEventHandler CustomerAddressRowChanged;
            
            public event CustomerAddressRowChangeEventHandler CustomerAddressRowChanging;
            
            public event CustomerAddressRowChangeEventHandler CustomerAddressRowDeleted;
            
            public event CustomerAddressRowChangeEventHandler CustomerAddressRowDeleting;
            
            public void AddCustomerAddressRow(CustomerAddressRow row) {
                this.Rows.Add(row);
            }
            
            public CustomerAddressRow AddCustomerAddressRow(CustomerRow parentCustomerRowByFK_CustomerAddress_Customer_CustomerID, AddressRow parentAddressRowByFK_CustomerAddress_Address_AddressID, AddressTypeRow parentAddressTypeRowByFK_CustomerAddress_AddressType_AddressTypeID, System.Guid rowguid, System.DateTime ModifiedDate) {
                CustomerAddressRow rowCustomerAddressRow = ((CustomerAddressRow)(this.NewRow()));
                rowCustomerAddressRow.ItemArray = new object[] {
                        parentCustomerRowByFK_CustomerAddress_Customer_CustomerID[0],
                        parentAddressRowByFK_CustomerAddress_Address_AddressID[0],
                        parentAddressTypeRowByFK_CustomerAddress_AddressType_AddressTypeID[0],
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowCustomerAddressRow);
                return rowCustomerAddressRow;
            }
            
            public CustomerAddressRow FindByCustomerIDAddressID(int CustomerID, int AddressID) {
                return ((CustomerAddressRow)(this.Rows.Find(new object[] {
                            CustomerID,
                            AddressID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                CustomerAddressDataTable cln = ((CustomerAddressDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new CustomerAddressDataTable();
            }
            
            internal void InitVars() {
                this.columnCustomerID = base.Columns["CustomerID"];
                this.columnAddressID = base.Columns["AddressID"];
                this.columnAddressTypeID = base.Columns["AddressTypeID"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnCustomerID = new System.Data.DataColumn("CustomerID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCustomerID);
                this.columnAddressID = new System.Data.DataColumn("AddressID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAddressID);
                this.columnAddressTypeID = new System.Data.DataColumn("AddressTypeID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAddressTypeID);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnCustomerID,
                                this.columnAddressID}, true));
                this.columnCustomerID.AllowDBNull = false;
                this.columnAddressID.AllowDBNull = false;
                this.columnAddressTypeID.AllowDBNull = false;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public CustomerAddressRow NewCustomerAddressRow() {
                return ((CustomerAddressRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new CustomerAddressRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(CustomerAddressRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.CustomerAddressRowChanged != null)) {
                    this.CustomerAddressRowChanged(this, new CustomerAddressRowChangeEvent(((CustomerAddressRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.CustomerAddressRowChanging != null)) {
                    this.CustomerAddressRowChanging(this, new CustomerAddressRowChangeEvent(((CustomerAddressRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.CustomerAddressRowDeleted != null)) {
                    this.CustomerAddressRowDeleted(this, new CustomerAddressRowChangeEvent(((CustomerAddressRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.CustomerAddressRowDeleting != null)) {
                    this.CustomerAddressRowDeleting(this, new CustomerAddressRowChangeEvent(((CustomerAddressRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveCustomerAddressRow(CustomerAddressRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "CustomerAddressDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class IndividualDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnCustomerID;
            
            private System.Data.DataColumn columnContactID;
            
            private System.Data.DataColumn columnDemographics;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public IndividualDataTable() {
                this.TableName = "Individual";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal IndividualDataTable(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;
            }
            
            protected IndividualDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn CustomerIDColumn {
                get {
                    return this.columnCustomerID;
                }
            }
            
            public System.Data.DataColumn ContactIDColumn {
                get {
                    return this.columnContactID;
                }
            }
            
            public System.Data.DataColumn DemographicsColumn {
                get {
                    return this.columnDemographics;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public IndividualRow this[int index] {
                get {
                    return ((IndividualRow)(this.Rows[index]));
                }
            }
            
            public event IndividualRowChangeEventHandler IndividualRowChanged;
            
            public event IndividualRowChangeEventHandler IndividualRowChanging;
            
            public event IndividualRowChangeEventHandler IndividualRowDeleted;
            
            public event IndividualRowChangeEventHandler IndividualRowDeleting;
            
            public void AddIndividualRow(IndividualRow row) {
                this.Rows.Add(row);
            }
            
            public IndividualRow AddIndividualRow(CustomerRow parentCustomerRowByFK_Individual_Customer_CustomerID, ContactRow parentContactRowByFK_Individual_Contact_ContactID, string Demographics, System.DateTime ModifiedDate) {
                IndividualRow rowIndividualRow = ((IndividualRow)(this.NewRow()));
                rowIndividualRow.ItemArray = new object[] {
                        parentCustomerRowByFK_Individual_Customer_CustomerID[0],
                        parentContactRowByFK_Individual_Contact_ContactID[0],
                        Demographics,
                        ModifiedDate};
                this.Rows.Add(rowIndividualRow);
                return rowIndividualRow;
            }
            
            public IndividualRow FindByCustomerID(int CustomerID) {
                return ((IndividualRow)(this.Rows.Find(new object[] {
                            CustomerID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                IndividualDataTable cln = ((IndividualDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new IndividualDataTable();
            }
            
            internal void InitVars() {
                this.columnCustomerID = base.Columns["CustomerID"];
                this.columnContactID = base.Columns["ContactID"];
                this.columnDemographics = base.Columns["Demographics"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnCustomerID = new System.Data.DataColumn("CustomerID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCustomerID);
                this.columnContactID = new System.Data.DataColumn("ContactID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnContactID);
                this.columnDemographics = new System.Data.DataColumn("Demographics", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDemographics);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnCustomerID}, true));
                this.columnCustomerID.AllowDBNull = false;
                this.columnCustomerID.Unique = true;
                this.columnContactID.AllowDBNull = false;
                this.columnDemographics.MaxLength = 2147483647;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public IndividualRow NewIndividualRow() {
                return ((IndividualRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new IndividualRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(IndividualRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.IndividualRowChanged != null)) {
                    this.IndividualRowChanged(this, new IndividualRowChangeEvent(((IndividualRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.IndividualRowChanging != null)) {
                    this.IndividualRowChanging(this, new IndividualRowChangeEvent(((IndividualRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.IndividualRowDeleted != null)) {
                    this.IndividualRowDeleted(this, new IndividualRowChangeEvent(((IndividualRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.IndividualRowDeleting != null)) {
                    this.IndividualRowDeleting(this, new IndividualRowChangeEvent(((IndividualRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveIndividualRow(IndividualRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "IndividualDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class SalesOrderDetailDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnSalesOrderID;
            
            private System.Data.DataColumn columnSalesOrderDetailID;
            
            private System.Data.DataColumn columnCarrierTrackingNumber;
            
            private System.Data.DataColumn columnOrderQty;
            
            private System.Data.DataColumn columnProductID;
            
            private System.Data.DataColumn columnSpecialOfferID;
            
            private System.Data.DataColumn columnUnitPrice;
            
            private System.Data.DataColumn columnUnitPriceDiscount;
            
            private System.Data.DataColumn columnLineTotal;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public SalesOrderDetailDataTable() {
                this.TableName = "SalesOrderDetail";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal SalesOrderDetailDataTable(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;
            }
            
            protected SalesOrderDetailDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn SalesOrderIDColumn {
                get {
                    return this.columnSalesOrderID;
                }
            }
            
            public System.Data.DataColumn SalesOrderDetailIDColumn {
                get {
                    return this.columnSalesOrderDetailID;
                }
            }
            
            public System.Data.DataColumn CarrierTrackingNumberColumn {
                get {
                    return this.columnCarrierTrackingNumber;
                }
            }
            
            public System.Data.DataColumn OrderQtyColumn {
                get {
                    return this.columnOrderQty;
                }
            }
            
            public System.Data.DataColumn ProductIDColumn {
                get {
                    return this.columnProductID;
                }
            }
            
            public System.Data.DataColumn SpecialOfferIDColumn {
                get {
                    return this.columnSpecialOfferID;
                }
            }
            
            public System.Data.DataColumn UnitPriceColumn {
                get {
                    return this.columnUnitPrice;
                }
            }
            
            public System.Data.DataColumn UnitPriceDiscountColumn {
                get {
                    return this.columnUnitPriceDiscount;
                }
            }
            
            public System.Data.DataColumn LineTotalColumn {
                get {
                    return this.columnLineTotal;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public SalesOrderDetailRow this[int index] {
                get {
                    return ((SalesOrderDetailRow)(this.Rows[index]));
                }
            }
            
            public event SalesOrderDetailRowChangeEventHandler SalesOrderDetailRowChanged;
            
            public event SalesOrderDetailRowChangeEventHandler SalesOrderDetailRowChanging;
            
            public event SalesOrderDetailRowChangeEventHandler SalesOrderDetailRowDeleted;
            
            public event SalesOrderDetailRowChangeEventHandler SalesOrderDetailRowDeleting;
            
            public void AddSalesOrderDetailRow(SalesOrderDetailRow row) {
                this.Rows.Add(row);
            }
            
            public SalesOrderDetailRow AddSalesOrderDetailRow(SalesOrderHeaderRow parentSalesOrderHeaderRowByFK_SalesOrderDetail_SalesOrderHeader_SalesOrderID, string CarrierTrackingNumber, short OrderQty, int ProductID, int SpecialOfferID, decimal UnitPrice, decimal UnitPriceDiscount, decimal LineTotal, System.Guid rowguid, System.DateTime ModifiedDate) {
                SalesOrderDetailRow rowSalesOrderDetailRow = ((SalesOrderDetailRow)(this.NewRow()));
                rowSalesOrderDetailRow.ItemArray = new object[] {
                        parentSalesOrderHeaderRowByFK_SalesOrderDetail_SalesOrderHeader_SalesOrderID[0],
                        null,
                        CarrierTrackingNumber,
                        OrderQty,
                        ProductID,
                        SpecialOfferID,
                        UnitPrice,
                        UnitPriceDiscount,
                        LineTotal,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowSalesOrderDetailRow);
                return rowSalesOrderDetailRow;
            }
            
            public SalesOrderDetailRow FindBySalesOrderIDSalesOrderDetailID(int SalesOrderID, int SalesOrderDetailID) {
                return ((SalesOrderDetailRow)(this.Rows.Find(new object[] {
                            SalesOrderID,
                            SalesOrderDetailID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                SalesOrderDetailDataTable cln = ((SalesOrderDetailDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new SalesOrderDetailDataTable();
            }
            
            internal void InitVars() {
                this.columnSalesOrderID = base.Columns["SalesOrderID"];
                this.columnSalesOrderDetailID = base.Columns["SalesOrderDetailID"];
                this.columnCarrierTrackingNumber = base.Columns["CarrierTrackingNumber"];
                this.columnOrderQty = base.Columns["OrderQty"];
                this.columnProductID = base.Columns["ProductID"];
                this.columnSpecialOfferID = base.Columns["SpecialOfferID"];
                this.columnUnitPrice = base.Columns["UnitPrice"];
                this.columnUnitPriceDiscount = base.Columns["UnitPriceDiscount"];
                this.columnLineTotal = base.Columns["LineTotal"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnSalesOrderID = new System.Data.DataColumn("SalesOrderID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesOrderID);
                this.columnSalesOrderDetailID = new System.Data.DataColumn("SalesOrderDetailID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesOrderDetailID);
                this.columnCarrierTrackingNumber = new System.Data.DataColumn("CarrierTrackingNumber", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCarrierTrackingNumber);
                this.columnOrderQty = new System.Data.DataColumn("OrderQty", typeof(short), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnOrderQty);
                this.columnProductID = new System.Data.DataColumn("ProductID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductID);
                this.columnSpecialOfferID = new System.Data.DataColumn("SpecialOfferID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSpecialOfferID);
                this.columnUnitPrice = new System.Data.DataColumn("UnitPrice", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnUnitPrice);
                this.columnUnitPriceDiscount = new System.Data.DataColumn("UnitPriceDiscount", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnUnitPriceDiscount);
                this.columnLineTotal = new System.Data.DataColumn("LineTotal", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLineTotal);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnSalesOrderID,
                                this.columnSalesOrderDetailID}, true));
                this.columnSalesOrderID.AllowDBNull = false;
                this.columnSalesOrderDetailID.AutoIncrement = true;
                this.columnSalesOrderDetailID.AllowDBNull = false;
                this.columnSalesOrderDetailID.ReadOnly = true;
                this.columnCarrierTrackingNumber.MaxLength = 25;
                this.columnOrderQty.AllowDBNull = false;
                this.columnProductID.AllowDBNull = false;
                this.columnSpecialOfferID.AllowDBNull = false;
                this.columnUnitPrice.AllowDBNull = false;
                this.columnUnitPriceDiscount.AllowDBNull = false;
                this.columnLineTotal.ReadOnly = true;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public SalesOrderDetailRow NewSalesOrderDetailRow() {
                return ((SalesOrderDetailRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new SalesOrderDetailRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(SalesOrderDetailRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.SalesOrderDetailRowChanged != null)) {
                    this.SalesOrderDetailRowChanged(this, new SalesOrderDetailRowChangeEvent(((SalesOrderDetailRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.SalesOrderDetailRowChanging != null)) {
                    this.SalesOrderDetailRowChanging(this, new SalesOrderDetailRowChangeEvent(((SalesOrderDetailRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.SalesOrderDetailRowDeleted != null)) {
                    this.SalesOrderDetailRowDeleted(this, new SalesOrderDetailRowChangeEvent(((SalesOrderDetailRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.SalesOrderDetailRowDeleting != null)) {
                    this.SalesOrderDetailRowDeleting(this, new SalesOrderDetailRowChangeEvent(((SalesOrderDetailRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveSalesOrderDetailRow(SalesOrderDetailRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "SalesOrderDetailDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class SalesOrderHeaderDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnSalesOrderID;
            
            private System.Data.DataColumn columnRevisionNumber;
            
            private System.Data.DataColumn columnOrderDate;
            
            private System.Data.DataColumn columnDueDate;
            
            private System.Data.DataColumn columnShipDate;
            
            private System.Data.DataColumn columnStatus;
            
            private System.Data.DataColumn columnOnlineOrderFlag;
            
            private System.Data.DataColumn columnSalesOrderNumber;
            
            private System.Data.DataColumn columnPurchaseOrderNumber;
            
            private System.Data.DataColumn columnAccountNumber;
            
            private System.Data.DataColumn columnCustomerID;
            
            private System.Data.DataColumn columnContactID;
            
            private System.Data.DataColumn columnSalesPersonID;
            
            private System.Data.DataColumn columnTerritoryID;
            
            private System.Data.DataColumn columnBillToAddressID;
            
            private System.Data.DataColumn columnShipToAddressID;
            
            private System.Data.DataColumn columnShipMethodID;
            
            private System.Data.DataColumn columnCreditCardID;
            
            private System.Data.DataColumn columnCreditCardApprovalCode;
            
            private System.Data.DataColumn columnCurrencyRateID;
            
            private System.Data.DataColumn columnSubTotal;
            
            private System.Data.DataColumn columnTaxAmt;
            
            private System.Data.DataColumn columnFreight;
            
            private System.Data.DataColumn columnTotalDue;
            
            private System.Data.DataColumn columnComment;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public SalesOrderHeaderDataTable() {
                this.TableName = "SalesOrderHeader";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal SalesOrderHeaderDataTable(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;
            }
            
            protected SalesOrderHeaderDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn SalesOrderIDColumn {
                get {
                    return this.columnSalesOrderID;
                }
            }
            
            public System.Data.DataColumn RevisionNumberColumn {
                get {
                    return this.columnRevisionNumber;
                }
            }
            
            public System.Data.DataColumn OrderDateColumn {
                get {
                    return this.columnOrderDate;
                }
            }
            
            public System.Data.DataColumn DueDateColumn {
                get {
                    return this.columnDueDate;
                }
            }
            
            public System.Data.DataColumn ShipDateColumn {
                get {
                    return this.columnShipDate;
                }
            }
            
            public System.Data.DataColumn StatusColumn {
                get {
                    return this.columnStatus;
                }
            }
            
            public System.Data.DataColumn OnlineOrderFlagColumn {
                get {
                    return this.columnOnlineOrderFlag;
                }
            }
            
            public System.Data.DataColumn SalesOrderNumberColumn {
                get {
                    return this.columnSalesOrderNumber;
                }
            }
            
            public System.Data.DataColumn PurchaseOrderNumberColumn {
                get {
                    return this.columnPurchaseOrderNumber;
                }
            }
            
            public System.Data.DataColumn AccountNumberColumn {
                get {
                    return this.columnAccountNumber;
                }
            }
            
            public System.Data.DataColumn CustomerIDColumn {
                get {
                    return this.columnCustomerID;
                }
            }
            
            public System.Data.DataColumn ContactIDColumn {
                get {
                    return this.columnContactID;
                }
            }
            
            public System.Data.DataColumn SalesPersonIDColumn {
                get {
                    return this.columnSalesPersonID;
                }
            }
            
            public System.Data.DataColumn TerritoryIDColumn {
                get {
                    return this.columnTerritoryID;
                }
            }
            
            public System.Data.DataColumn BillToAddressIDColumn {
                get {
                    return this.columnBillToAddressID;
                }
            }
            
            public System.Data.DataColumn ShipToAddressIDColumn {
                get {
                    return this.columnShipToAddressID;
                }
            }
            
            public System.Data.DataColumn ShipMethodIDColumn {
                get {
                    return this.columnShipMethodID;
                }
            }
            
            public System.Data.DataColumn CreditCardIDColumn {
                get {
                    return this.columnCreditCardID;
                }
            }
            
            public System.Data.DataColumn CreditCardApprovalCodeColumn {
                get {
                    return this.columnCreditCardApprovalCode;
                }
            }
            
            public System.Data.DataColumn CurrencyRateIDColumn {
                get {
                    return this.columnCurrencyRateID;
                }
            }
            
            public System.Data.DataColumn SubTotalColumn {
                get {
                    return this.columnSubTotal;
                }
            }
            
            public System.Data.DataColumn TaxAmtColumn {
                get {
                    return this.columnTaxAmt;
                }
            }
            
            public System.Data.DataColumn FreightColumn {
                get {
                    return this.columnFreight;
                }
            }
            
            public System.Data.DataColumn TotalDueColumn {
                get {
                    return this.columnTotalDue;
                }
            }
            
            public System.Data.DataColumn CommentColumn {
                get {
                    return this.columnComment;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public SalesOrderHeaderRow this[int index] {
                get {
                    return ((SalesOrderHeaderRow)(this.Rows[index]));
                }
            }
            
            public event SalesOrderHeaderRowChangeEventHandler SalesOrderHeaderRowChanged;
            
            public event SalesOrderHeaderRowChangeEventHandler SalesOrderHeaderRowChanging;
            
            public event SalesOrderHeaderRowChangeEventHandler SalesOrderHeaderRowDeleted;
            
            public event SalesOrderHeaderRowChangeEventHandler SalesOrderHeaderRowDeleting;
            
            public void AddSalesOrderHeaderRow(SalesOrderHeaderRow row) {
                this.Rows.Add(row);
            }
            
            public SalesOrderHeaderRow AddSalesOrderHeaderRow(
                        byte RevisionNumber, 
                        System.DateTime OrderDate, 
                        System.DateTime DueDate, 
                        System.DateTime ShipDate, 
                        byte Status, 
                        bool OnlineOrderFlag, 
                        string SalesOrderNumber, 
                        string PurchaseOrderNumber, 
                        string AccountNumber, 
                        CustomerRow parentCustomerRowByFK_SalesOrderHeader_Customer_CustomerID, 
                        ContactRow parentContactRowByFK_SalesOrderHeader_Contact_ContactID, 
                        SalesPersonRow parentSalesPersonRowByFK_SalesOrderHeader_SalesPerson_SalesPersonID, 
                        SalesTerritoryRow parentSalesTerritoryRowByFK_SalesOrderHeader_SalesTerritory_TerritoryID, 
                        AddressRow parentAddressRowByFK_SalesOrderHeader_Address_BillToAddressID, 
                        AddressRow parentAddressRowByFK_SalesOrderHeader_Address_ShipToAddressID, 
                        ShipMethodRow parentShipMethodRowByFK_SalesOrderHeader_ShipMethod_ShipMethodID, 
                        CreditCardRow parentCreditCardRowByFK_SalesOrderHeader_CreditCard_CreditCardID, 
                        string CreditCardApprovalCode, 
                        CurrencyRateRow parentCurrencyRateRowByFK_SalesOrderHeader_CurrencyRate_CurrencyRateID, 
                        decimal SubTotal, 
                        decimal TaxAmt, 
                        decimal Freight, 
                        decimal TotalDue, 
                        string Comment, 
                        System.Guid rowguid, 
                        System.DateTime ModifiedDate) {
                SalesOrderHeaderRow rowSalesOrderHeaderRow = ((SalesOrderHeaderRow)(this.NewRow()));
                rowSalesOrderHeaderRow.ItemArray = new object[] {
                        null,
                        RevisionNumber,
                        OrderDate,
                        DueDate,
                        ShipDate,
                        Status,
                        OnlineOrderFlag,
                        SalesOrderNumber,
                        PurchaseOrderNumber,
                        AccountNumber,
                        parentCustomerRowByFK_SalesOrderHeader_Customer_CustomerID[0],
                        parentContactRowByFK_SalesOrderHeader_Contact_ContactID[0],
                        parentSalesPersonRowByFK_SalesOrderHeader_SalesPerson_SalesPersonID[0],
                        parentSalesTerritoryRowByFK_SalesOrderHeader_SalesTerritory_TerritoryID[0],
                        parentAddressRowByFK_SalesOrderHeader_Address_BillToAddressID[0],
                        parentAddressRowByFK_SalesOrderHeader_Address_ShipToAddressID[0],
                        parentShipMethodRowByFK_SalesOrderHeader_ShipMethod_ShipMethodID[0],
                        parentCreditCardRowByFK_SalesOrderHeader_CreditCard_CreditCardID[0],
                        CreditCardApprovalCode,
                        parentCurrencyRateRowByFK_SalesOrderHeader_CurrencyRate_CurrencyRateID[0],
                        SubTotal,
                        TaxAmt,
                        Freight,
                        TotalDue,
                        Comment,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowSalesOrderHeaderRow);
                return rowSalesOrderHeaderRow;
            }
            
            public SalesOrderHeaderRow FindBySalesOrderID(int SalesOrderID) {
                return ((SalesOrderHeaderRow)(this.Rows.Find(new object[] {
                            SalesOrderID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                SalesOrderHeaderDataTable cln = ((SalesOrderHeaderDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new SalesOrderHeaderDataTable();
            }
            
            internal void InitVars() {
                this.columnSalesOrderID = base.Columns["SalesOrderID"];
                this.columnRevisionNumber = base.Columns["RevisionNumber"];
                this.columnOrderDate = base.Columns["OrderDate"];
                this.columnDueDate = base.Columns["DueDate"];
                this.columnShipDate = base.Columns["ShipDate"];
                this.columnStatus = base.Columns["Status"];
                this.columnOnlineOrderFlag = base.Columns["OnlineOrderFlag"];
                this.columnSalesOrderNumber = base.Columns["SalesOrderNumber"];
                this.columnPurchaseOrderNumber = base.Columns["PurchaseOrderNumber"];
                this.columnAccountNumber = base.Columns["AccountNumber"];
                this.columnCustomerID = base.Columns["CustomerID"];
                this.columnContactID = base.Columns["ContactID"];
                this.columnSalesPersonID = base.Columns["SalesPersonID"];
                this.columnTerritoryID = base.Columns["TerritoryID"];
                this.columnBillToAddressID = base.Columns["BillToAddressID"];
                this.columnShipToAddressID = base.Columns["ShipToAddressID"];
                this.columnShipMethodID = base.Columns["ShipMethodID"];
                this.columnCreditCardID = base.Columns["CreditCardID"];
                this.columnCreditCardApprovalCode = base.Columns["CreditCardApprovalCode"];
                this.columnCurrencyRateID = base.Columns["CurrencyRateID"];
                this.columnSubTotal = base.Columns["SubTotal"];
                this.columnTaxAmt = base.Columns["TaxAmt"];
                this.columnFreight = base.Columns["Freight"];
                this.columnTotalDue = base.Columns["TotalDue"];
                this.columnComment = base.Columns["Comment"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnSalesOrderID = new System.Data.DataColumn("SalesOrderID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesOrderID);
                this.columnRevisionNumber = new System.Data.DataColumn("RevisionNumber", typeof(byte), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnRevisionNumber);
                this.columnOrderDate = new System.Data.DataColumn("OrderDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnOrderDate);
                this.columnDueDate = new System.Data.DataColumn("DueDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDueDate);
                this.columnShipDate = new System.Data.DataColumn("ShipDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnShipDate);
                this.columnStatus = new System.Data.DataColumn("Status", typeof(byte), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStatus);
                this.columnOnlineOrderFlag = new System.Data.DataColumn("OnlineOrderFlag", typeof(bool), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnOnlineOrderFlag);
                this.columnSalesOrderNumber = new System.Data.DataColumn("SalesOrderNumber", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesOrderNumber);
                this.columnPurchaseOrderNumber = new System.Data.DataColumn("PurchaseOrderNumber", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPurchaseOrderNumber);
                this.columnAccountNumber = new System.Data.DataColumn("AccountNumber", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAccountNumber);
                this.columnCustomerID = new System.Data.DataColumn("CustomerID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCustomerID);
                this.columnContactID = new System.Data.DataColumn("ContactID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnContactID);
                this.columnSalesPersonID = new System.Data.DataColumn("SalesPersonID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesPersonID);
                this.columnTerritoryID = new System.Data.DataColumn("TerritoryID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTerritoryID);
                this.columnBillToAddressID = new System.Data.DataColumn("BillToAddressID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnBillToAddressID);
                this.columnShipToAddressID = new System.Data.DataColumn("ShipToAddressID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnShipToAddressID);
                this.columnShipMethodID = new System.Data.DataColumn("ShipMethodID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnShipMethodID);
                this.columnCreditCardID = new System.Data.DataColumn("CreditCardID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCreditCardID);
                this.columnCreditCardApprovalCode = new System.Data.DataColumn("CreditCardApprovalCode", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCreditCardApprovalCode);
                this.columnCurrencyRateID = new System.Data.DataColumn("CurrencyRateID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCurrencyRateID);
                this.columnSubTotal = new System.Data.DataColumn("SubTotal", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSubTotal);
                this.columnTaxAmt = new System.Data.DataColumn("TaxAmt", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTaxAmt);
                this.columnFreight = new System.Data.DataColumn("Freight", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnFreight);
                this.columnTotalDue = new System.Data.DataColumn("TotalDue", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTotalDue);
                this.columnComment = new System.Data.DataColumn("Comment", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnComment);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnSalesOrderID}, true));
                this.columnSalesOrderID.AutoIncrement = true;
                this.columnSalesOrderID.AllowDBNull = false;
                this.columnSalesOrderID.ReadOnly = true;
                this.columnSalesOrderID.Unique = true;
                this.columnRevisionNumber.AllowDBNull = false;
                this.columnOrderDate.AllowDBNull = false;
                this.columnDueDate.AllowDBNull = false;
                this.columnStatus.AllowDBNull = false;
                this.columnOnlineOrderFlag.AllowDBNull = false;
                this.columnSalesOrderNumber.ReadOnly = true;
                this.columnSalesOrderNumber.MaxLength = 25;
                this.columnPurchaseOrderNumber.MaxLength = 25;
                this.columnAccountNumber.MaxLength = 15;
                this.columnCustomerID.AllowDBNull = false;
                this.columnContactID.AllowDBNull = false;
                this.columnBillToAddressID.AllowDBNull = false;
                this.columnShipToAddressID.AllowDBNull = false;
                this.columnShipMethodID.AllowDBNull = false;
                this.columnCreditCardApprovalCode.MaxLength = 15;
                this.columnSubTotal.AllowDBNull = false;
                this.columnTaxAmt.AllowDBNull = false;
                this.columnFreight.AllowDBNull = false;
                this.columnTotalDue.ReadOnly = true;
                this.columnComment.MaxLength = 128;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public SalesOrderHeaderRow NewSalesOrderHeaderRow() {
                return ((SalesOrderHeaderRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new SalesOrderHeaderRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(SalesOrderHeaderRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.SalesOrderHeaderRowChanged != null)) {
                    this.SalesOrderHeaderRowChanged(this, new SalesOrderHeaderRowChangeEvent(((SalesOrderHeaderRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.SalesOrderHeaderRowChanging != null)) {
                    this.SalesOrderHeaderRowChanging(this, new SalesOrderHeaderRowChangeEvent(((SalesOrderHeaderRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.SalesOrderHeaderRowDeleted != null)) {
                    this.SalesOrderHeaderRowDeleted(this, new SalesOrderHeaderRowChangeEvent(((SalesOrderHeaderRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.SalesOrderHeaderRowDeleting != null)) {
                    this.SalesOrderHeaderRowDeleting(this, new SalesOrderHeaderRowChangeEvent(((SalesOrderHeaderRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveSalesOrderHeaderRow(SalesOrderHeaderRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "SalesOrderHeaderDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class SalesOrderHeaderSalesReasonDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnSalesOrderID;
            
            private System.Data.DataColumn columnSalesReasonID;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public SalesOrderHeaderSalesReasonDataTable() {
                this.TableName = "SalesOrderHeaderSalesReason";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal SalesOrderHeaderSalesReasonDataTable(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;
            }
            
            protected SalesOrderHeaderSalesReasonDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn SalesOrderIDColumn {
                get {
                    return this.columnSalesOrderID;
                }
            }
            
            public System.Data.DataColumn SalesReasonIDColumn {
                get {
                    return this.columnSalesReasonID;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public SalesOrderHeaderSalesReasonRow this[int index] {
                get {
                    return ((SalesOrderHeaderSalesReasonRow)(this.Rows[index]));
                }
            }
            
            public event SalesOrderHeaderSalesReasonRowChangeEventHandler SalesOrderHeaderSalesReasonRowChanged;
            
            public event SalesOrderHeaderSalesReasonRowChangeEventHandler SalesOrderHeaderSalesReasonRowChanging;
            
            public event SalesOrderHeaderSalesReasonRowChangeEventHandler SalesOrderHeaderSalesReasonRowDeleted;
            
            public event SalesOrderHeaderSalesReasonRowChangeEventHandler SalesOrderHeaderSalesReasonRowDeleting;
            
            public void AddSalesOrderHeaderSalesReasonRow(SalesOrderHeaderSalesReasonRow row) {
                this.Rows.Add(row);
            }
            
            public SalesOrderHeaderSalesReasonRow AddSalesOrderHeaderSalesReasonRow(SalesOrderHeaderRow parentSalesOrderHeaderRowByFK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderID, SalesReasonRow parentSalesReasonRowByFK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID, System.DateTime ModifiedDate) {
                SalesOrderHeaderSalesReasonRow rowSalesOrderHeaderSalesReasonRow = ((SalesOrderHeaderSalesReasonRow)(this.NewRow()));
                rowSalesOrderHeaderSalesReasonRow.ItemArray = new object[] {
                        parentSalesOrderHeaderRowByFK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderID[0],
                        parentSalesReasonRowByFK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID[0],
                        ModifiedDate};
                this.Rows.Add(rowSalesOrderHeaderSalesReasonRow);
                return rowSalesOrderHeaderSalesReasonRow;
            }
            
            public SalesOrderHeaderSalesReasonRow FindBySalesOrderIDSalesReasonID(int SalesOrderID, int SalesReasonID) {
                return ((SalesOrderHeaderSalesReasonRow)(this.Rows.Find(new object[] {
                            SalesOrderID,
                            SalesReasonID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                SalesOrderHeaderSalesReasonDataTable cln = ((SalesOrderHeaderSalesReasonDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new SalesOrderHeaderSalesReasonDataTable();
            }
            
            internal void InitVars() {
                this.columnSalesOrderID = base.Columns["SalesOrderID"];
                this.columnSalesReasonID = base.Columns["SalesReasonID"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnSalesOrderID = new System.Data.DataColumn("SalesOrderID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesOrderID);
                this.columnSalesReasonID = new System.Data.DataColumn("SalesReasonID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesReasonID);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnSalesOrderID,
                                this.columnSalesReasonID}, true));
                this.columnSalesOrderID.AllowDBNull = false;
                this.columnSalesReasonID.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public SalesOrderHeaderSalesReasonRow NewSalesOrderHeaderSalesReasonRow() {
                return ((SalesOrderHeaderSalesReasonRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new SalesOrderHeaderSalesReasonRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(SalesOrderHeaderSalesReasonRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.SalesOrderHeaderSalesReasonRowChanged != null)) {
                    this.SalesOrderHeaderSalesReasonRowChanged(this, new SalesOrderHeaderSalesReasonRowChangeEvent(((SalesOrderHeaderSalesReasonRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.SalesOrderHeaderSalesReasonRowChanging != null)) {
                    this.SalesOrderHeaderSalesReasonRowChanging(this, new SalesOrderHeaderSalesReasonRowChangeEvent(((SalesOrderHeaderSalesReasonRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.SalesOrderHeaderSalesReasonRowDeleted != null)) {
                    this.SalesOrderHeaderSalesReasonRowDeleted(this, new SalesOrderHeaderSalesReasonRowChangeEvent(((SalesOrderHeaderSalesReasonRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.SalesOrderHeaderSalesReasonRowDeleting != null)) {
                    this.SalesOrderHeaderSalesReasonRowDeleting(this, new SalesOrderHeaderSalesReasonRowChangeEvent(((SalesOrderHeaderSalesReasonRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveSalesOrderHeaderSalesReasonRow(SalesOrderHeaderSalesReasonRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "SalesOrderHeaderSalesReasonDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class SalesPersonDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnSalesPersonID;
            
            private System.Data.DataColumn columnTerritoryID;
            
            private System.Data.DataColumn columnSalesQuota;
            
            private System.Data.DataColumn columnBonus;
            
            private System.Data.DataColumn columnCommissionPct;
            
            private System.Data.DataColumn columnSalesYTD;
            
            private System.Data.DataColumn columnSalesLastYear;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public SalesPersonDataTable() {
                this.TableName = "SalesPerson";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal SalesPersonDataTable(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;
            }
            
            protected SalesPersonDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn SalesPersonIDColumn {
                get {
                    return this.columnSalesPersonID;
                }
            }
            
            public System.Data.DataColumn TerritoryIDColumn {
                get {
                    return this.columnTerritoryID;
                }
            }
            
            public System.Data.DataColumn SalesQuotaColumn {
                get {
                    return this.columnSalesQuota;
                }
            }
            
            public System.Data.DataColumn BonusColumn {
                get {
                    return this.columnBonus;
                }
            }
            
            public System.Data.DataColumn CommissionPctColumn {
                get {
                    return this.columnCommissionPct;
                }
            }
            
            public System.Data.DataColumn SalesYTDColumn {
                get {
                    return this.columnSalesYTD;
                }
            }
            
            public System.Data.DataColumn SalesLastYearColumn {
                get {
                    return this.columnSalesLastYear;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public SalesPersonRow this[int index] {
                get {
                    return ((SalesPersonRow)(this.Rows[index]));
                }
            }
            
            public event SalesPersonRowChangeEventHandler SalesPersonRowChanged;
            
            public event SalesPersonRowChangeEventHandler SalesPersonRowChanging;
            
            public event SalesPersonRowChangeEventHandler SalesPersonRowDeleted;
            
            public event SalesPersonRowChangeEventHandler SalesPersonRowDeleting;
            
            public void AddSalesPersonRow(SalesPersonRow row) {
                this.Rows.Add(row);
            }
            
            public SalesPersonRow AddSalesPersonRow(EmployeeRow parentEmployeeRowByFK_SalesPerson_Employee_SalesPersonID, SalesTerritoryRow parentSalesTerritoryRowByFK_SalesPerson_SalesTerritory_TerritoryID, decimal SalesQuota, decimal Bonus, decimal CommissionPct, decimal SalesYTD, decimal SalesLastYear, System.Guid rowguid, System.DateTime ModifiedDate) {
                SalesPersonRow rowSalesPersonRow = ((SalesPersonRow)(this.NewRow()));
                rowSalesPersonRow.ItemArray = new object[] {
                        parentEmployeeRowByFK_SalesPerson_Employee_SalesPersonID[0],
                        parentSalesTerritoryRowByFK_SalesPerson_SalesTerritory_TerritoryID[0],
                        SalesQuota,
                        Bonus,
                        CommissionPct,
                        SalesYTD,
                        SalesLastYear,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowSalesPersonRow);
                return rowSalesPersonRow;
            }
            
            public SalesPersonRow FindBySalesPersonID(int SalesPersonID) {
                return ((SalesPersonRow)(this.Rows.Find(new object[] {
                            SalesPersonID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                SalesPersonDataTable cln = ((SalesPersonDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new SalesPersonDataTable();
            }
            
            internal void InitVars() {
                this.columnSalesPersonID = base.Columns["SalesPersonID"];
                this.columnTerritoryID = base.Columns["TerritoryID"];
                this.columnSalesQuota = base.Columns["SalesQuota"];
                this.columnBonus = base.Columns["Bonus"];
                this.columnCommissionPct = base.Columns["CommissionPct"];
                this.columnSalesYTD = base.Columns["SalesYTD"];
                this.columnSalesLastYear = base.Columns["SalesLastYear"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnSalesPersonID = new System.Data.DataColumn("SalesPersonID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesPersonID);
                this.columnTerritoryID = new System.Data.DataColumn("TerritoryID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTerritoryID);
                this.columnSalesQuota = new System.Data.DataColumn("SalesQuota", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesQuota);
                this.columnBonus = new System.Data.DataColumn("Bonus", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnBonus);
                this.columnCommissionPct = new System.Data.DataColumn("CommissionPct", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCommissionPct);
                this.columnSalesYTD = new System.Data.DataColumn("SalesYTD", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesYTD);
                this.columnSalesLastYear = new System.Data.DataColumn("SalesLastYear", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesLastYear);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnSalesPersonID}, true));
                this.columnSalesPersonID.AllowDBNull = false;
                this.columnSalesPersonID.Unique = true;
                this.columnBonus.AllowDBNull = false;
                this.columnCommissionPct.AllowDBNull = false;
                this.columnSalesYTD.AllowDBNull = false;
                this.columnSalesLastYear.AllowDBNull = false;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public SalesPersonRow NewSalesPersonRow() {
                return ((SalesPersonRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new SalesPersonRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(SalesPersonRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.SalesPersonRowChanged != null)) {
                    this.SalesPersonRowChanged(this, new SalesPersonRowChangeEvent(((SalesPersonRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.SalesPersonRowChanging != null)) {
                    this.SalesPersonRowChanging(this, new SalesPersonRowChangeEvent(((SalesPersonRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.SalesPersonRowDeleted != null)) {
                    this.SalesPersonRowDeleted(this, new SalesPersonRowChangeEvent(((SalesPersonRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.SalesPersonRowDeleting != null)) {
                    this.SalesPersonRowDeleting(this, new SalesPersonRowChangeEvent(((SalesPersonRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveSalesPersonRow(SalesPersonRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "SalesPersonDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class SalesPersonQuotaHistoryDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnSalesPersonID;
            
            private System.Data.DataColumn columnQuotaDate;
            
            private System.Data.DataColumn columnSalesQuota;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public SalesPersonQuotaHistoryDataTable() {
                this.TableName = "SalesPersonQuotaHistory";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal SalesPersonQuotaHistoryDataTable(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;
            }
            
            protected SalesPersonQuotaHistoryDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn SalesPersonIDColumn {
                get {
                    return this.columnSalesPersonID;
                }
            }
            
            public System.Data.DataColumn QuotaDateColumn {
                get {
                    return this.columnQuotaDate;
                }
            }
            
            public System.Data.DataColumn SalesQuotaColumn {
                get {
                    return this.columnSalesQuota;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public SalesPersonQuotaHistoryRow this[int index] {
                get {
                    return ((SalesPersonQuotaHistoryRow)(this.Rows[index]));
                }
            }
            
            public event SalesPersonQuotaHistoryRowChangeEventHandler SalesPersonQuotaHistoryRowChanged;
            
            public event SalesPersonQuotaHistoryRowChangeEventHandler SalesPersonQuotaHistoryRowChanging;
            
            public event SalesPersonQuotaHistoryRowChangeEventHandler SalesPersonQuotaHistoryRowDeleted;
            
            public event SalesPersonQuotaHistoryRowChangeEventHandler SalesPersonQuotaHistoryRowDeleting;
            
            public void AddSalesPersonQuotaHistoryRow(SalesPersonQuotaHistoryRow row) {
                this.Rows.Add(row);
            }
            
            public SalesPersonQuotaHistoryRow AddSalesPersonQuotaHistoryRow(SalesPersonRow parentSalesPersonRowByFK_SalesPersonQuotaHistory_SalesPerson_SalesPersonID, System.DateTime QuotaDate, decimal SalesQuota, System.Guid rowguid, System.DateTime ModifiedDate) {
                SalesPersonQuotaHistoryRow rowSalesPersonQuotaHistoryRow = ((SalesPersonQuotaHistoryRow)(this.NewRow()));
                rowSalesPersonQuotaHistoryRow.ItemArray = new object[] {
                        parentSalesPersonRowByFK_SalesPersonQuotaHistory_SalesPerson_SalesPersonID[0],
                        QuotaDate,
                        SalesQuota,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowSalesPersonQuotaHistoryRow);
                return rowSalesPersonQuotaHistoryRow;
            }
            
            public SalesPersonQuotaHistoryRow FindBySalesPersonIDQuotaDate(int SalesPersonID, System.DateTime QuotaDate) {
                return ((SalesPersonQuotaHistoryRow)(this.Rows.Find(new object[] {
                            SalesPersonID,
                            QuotaDate})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                SalesPersonQuotaHistoryDataTable cln = ((SalesPersonQuotaHistoryDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new SalesPersonQuotaHistoryDataTable();
            }
            
            internal void InitVars() {
                this.columnSalesPersonID = base.Columns["SalesPersonID"];
                this.columnQuotaDate = base.Columns["QuotaDate"];
                this.columnSalesQuota = base.Columns["SalesQuota"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnSalesPersonID = new System.Data.DataColumn("SalesPersonID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesPersonID);
                this.columnQuotaDate = new System.Data.DataColumn("QuotaDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnQuotaDate);
                this.columnSalesQuota = new System.Data.DataColumn("SalesQuota", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesQuota);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnSalesPersonID,
                                this.columnQuotaDate}, true));
                this.columnSalesPersonID.AllowDBNull = false;
                this.columnQuotaDate.AllowDBNull = false;
                this.columnSalesQuota.AllowDBNull = false;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public SalesPersonQuotaHistoryRow NewSalesPersonQuotaHistoryRow() {
                return ((SalesPersonQuotaHistoryRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new SalesPersonQuotaHistoryRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(SalesPersonQuotaHistoryRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.SalesPersonQuotaHistoryRowChanged != null)) {
                    this.SalesPersonQuotaHistoryRowChanged(this, new SalesPersonQuotaHistoryRowChangeEvent(((SalesPersonQuotaHistoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.SalesPersonQuotaHistoryRowChanging != null)) {
                    this.SalesPersonQuotaHistoryRowChanging(this, new SalesPersonQuotaHistoryRowChangeEvent(((SalesPersonQuotaHistoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.SalesPersonQuotaHistoryRowDeleted != null)) {
                    this.SalesPersonQuotaHistoryRowDeleted(this, new SalesPersonQuotaHistoryRowChangeEvent(((SalesPersonQuotaHistoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.SalesPersonQuotaHistoryRowDeleting != null)) {
                    this.SalesPersonQuotaHistoryRowDeleting(this, new SalesPersonQuotaHistoryRowChangeEvent(((SalesPersonQuotaHistoryRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveSalesPersonQuotaHistoryRow(SalesPersonQuotaHistoryRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "SalesPersonQuotaHistoryDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class SalesReasonDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnSalesReasonID;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnReasonType;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public SalesReasonDataTable() {
                this.TableName = "SalesReason";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal SalesReasonDataTable(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;
            }
            
            protected SalesReasonDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn SalesReasonIDColumn {
                get {
                    return this.columnSalesReasonID;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn ReasonTypeColumn {
                get {
                    return this.columnReasonType;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public SalesReasonRow this[int index] {
                get {
                    return ((SalesReasonRow)(this.Rows[index]));
                }
            }
            
            public event SalesReasonRowChangeEventHandler SalesReasonRowChanged;
            
            public event SalesReasonRowChangeEventHandler SalesReasonRowChanging;
            
            public event SalesReasonRowChangeEventHandler SalesReasonRowDeleted;
            
            public event SalesReasonRowChangeEventHandler SalesReasonRowDeleting;
            
            public void AddSalesReasonRow(SalesReasonRow row) {
                this.Rows.Add(row);
            }
            
            public SalesReasonRow AddSalesReasonRow(string Name, string ReasonType, System.DateTime ModifiedDate) {
                SalesReasonRow rowSalesReasonRow = ((SalesReasonRow)(this.NewRow()));
                rowSalesReasonRow.ItemArray = new object[] {
                        null,
                        Name,
                        ReasonType,
                        ModifiedDate};
                this.Rows.Add(rowSalesReasonRow);
                return rowSalesReasonRow;
            }
            
            public SalesReasonRow FindBySalesReasonID(int SalesReasonID) {
                return ((SalesReasonRow)(this.Rows.Find(new object[] {
                            SalesReasonID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                SalesReasonDataTable cln = ((SalesReasonDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new SalesReasonDataTable();
            }
            
            internal void InitVars() {
                this.columnSalesReasonID = base.Columns["SalesReasonID"];
                this.columnName = base.Columns["Name"];
                this.columnReasonType = base.Columns["ReasonType"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnSalesReasonID = new System.Data.DataColumn("SalesReasonID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesReasonID);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnReasonType = new System.Data.DataColumn("ReasonType", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnReasonType);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnSalesReasonID}, true));
                this.columnSalesReasonID.AutoIncrement = true;
                this.columnSalesReasonID.AllowDBNull = false;
                this.columnSalesReasonID.ReadOnly = true;
                this.columnSalesReasonID.Unique = true;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnReasonType.AllowDBNull = false;
                this.columnReasonType.MaxLength = 50;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public SalesReasonRow NewSalesReasonRow() {
                return ((SalesReasonRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new SalesReasonRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(SalesReasonRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.SalesReasonRowChanged != null)) {
                    this.SalesReasonRowChanged(this, new SalesReasonRowChangeEvent(((SalesReasonRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.SalesReasonRowChanging != null)) {
                    this.SalesReasonRowChanging(this, new SalesReasonRowChangeEvent(((SalesReasonRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.SalesReasonRowDeleted != null)) {
                    this.SalesReasonRowDeleted(this, new SalesReasonRowChangeEvent(((SalesReasonRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.SalesReasonRowDeleting != null)) {
                    this.SalesReasonRowDeleting(this, new SalesReasonRowChangeEvent(((SalesReasonRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveSalesReasonRow(SalesReasonRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "SalesReasonDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class SalesTaxRateDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnSalesTaxRateID;
            
            private System.Data.DataColumn columnStateProvinceID;
            
            private System.Data.DataColumn columnTaxType;
            
            private System.Data.DataColumn columnTaxRate;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public SalesTaxRateDataTable() {
                this.TableName = "SalesTaxRate";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal SalesTaxRateDataTable(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;
            }
            
            protected SalesTaxRateDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn SalesTaxRateIDColumn {
                get {
                    return this.columnSalesTaxRateID;
                }
            }
            
            public System.Data.DataColumn StateProvinceIDColumn {
                get {
                    return this.columnStateProvinceID;
                }
            }
            
            public System.Data.DataColumn TaxTypeColumn {
                get {
                    return this.columnTaxType;
                }
            }
            
            public System.Data.DataColumn TaxRateColumn {
                get {
                    return this.columnTaxRate;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public SalesTaxRateRow this[int index] {
                get {
                    return ((SalesTaxRateRow)(this.Rows[index]));
                }
            }
            
            public event SalesTaxRateRowChangeEventHandler SalesTaxRateRowChanged;
            
            public event SalesTaxRateRowChangeEventHandler SalesTaxRateRowChanging;
            
            public event SalesTaxRateRowChangeEventHandler SalesTaxRateRowDeleted;
            
            public event SalesTaxRateRowChangeEventHandler SalesTaxRateRowDeleting;
            
            public void AddSalesTaxRateRow(SalesTaxRateRow row) {
                this.Rows.Add(row);
            }
            
            public SalesTaxRateRow AddSalesTaxRateRow(StateProvinceRow parentStateProvinceRowByFK_SalesTaxRate_StateProvince_StateProvinceID, byte TaxType, decimal TaxRate, string Name, System.Guid rowguid, System.DateTime ModifiedDate) {
                SalesTaxRateRow rowSalesTaxRateRow = ((SalesTaxRateRow)(this.NewRow()));
                rowSalesTaxRateRow.ItemArray = new object[] {
                        null,
                        parentStateProvinceRowByFK_SalesTaxRate_StateProvince_StateProvinceID[0],
                        TaxType,
                        TaxRate,
                        Name,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowSalesTaxRateRow);
                return rowSalesTaxRateRow;
            }
            
            public SalesTaxRateRow FindBySalesTaxRateID(int SalesTaxRateID) {
                return ((SalesTaxRateRow)(this.Rows.Find(new object[] {
                            SalesTaxRateID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                SalesTaxRateDataTable cln = ((SalesTaxRateDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new SalesTaxRateDataTable();
            }
            
            internal void InitVars() {
                this.columnSalesTaxRateID = base.Columns["SalesTaxRateID"];
                this.columnStateProvinceID = base.Columns["StateProvinceID"];
                this.columnTaxType = base.Columns["TaxType"];
                this.columnTaxRate = base.Columns["TaxRate"];
                this.columnName = base.Columns["Name"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnSalesTaxRateID = new System.Data.DataColumn("SalesTaxRateID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesTaxRateID);
                this.columnStateProvinceID = new System.Data.DataColumn("StateProvinceID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStateProvinceID);
                this.columnTaxType = new System.Data.DataColumn("TaxType", typeof(byte), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTaxType);
                this.columnTaxRate = new System.Data.DataColumn("TaxRate", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTaxRate);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnSalesTaxRateID}, true));
                this.columnSalesTaxRateID.AutoIncrement = true;
                this.columnSalesTaxRateID.AllowDBNull = false;
                this.columnSalesTaxRateID.ReadOnly = true;
                this.columnSalesTaxRateID.Unique = true;
                this.columnStateProvinceID.AllowDBNull = false;
                this.columnTaxType.AllowDBNull = false;
                this.columnTaxRate.AllowDBNull = false;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public SalesTaxRateRow NewSalesTaxRateRow() {
                return ((SalesTaxRateRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new SalesTaxRateRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(SalesTaxRateRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.SalesTaxRateRowChanged != null)) {
                    this.SalesTaxRateRowChanged(this, new SalesTaxRateRowChangeEvent(((SalesTaxRateRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.SalesTaxRateRowChanging != null)) {
                    this.SalesTaxRateRowChanging(this, new SalesTaxRateRowChangeEvent(((SalesTaxRateRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.SalesTaxRateRowDeleted != null)) {
                    this.SalesTaxRateRowDeleted(this, new SalesTaxRateRowChangeEvent(((SalesTaxRateRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.SalesTaxRateRowDeleting != null)) {
                    this.SalesTaxRateRowDeleting(this, new SalesTaxRateRowChangeEvent(((SalesTaxRateRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveSalesTaxRateRow(SalesTaxRateRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "SalesTaxRateDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class SalesTerritoryDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnTerritoryID;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnCountryRegionCode;
            
            private System.Data.DataColumn columnGroup;
            
            private System.Data.DataColumn columnSalesYTD;
            
            private System.Data.DataColumn columnSalesLastYear;
            
            private System.Data.DataColumn columnCostYTD;
            
            private System.Data.DataColumn columnCostLastYear;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public SalesTerritoryDataTable() {
                this.TableName = "SalesTerritory";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal SalesTerritoryDataTable(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;
            }
            
            protected SalesTerritoryDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn TerritoryIDColumn {
                get {
                    return this.columnTerritoryID;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn CountryRegionCodeColumn {
                get {
                    return this.columnCountryRegionCode;
                }
            }
            
            public System.Data.DataColumn GroupColumn {
                get {
                    return this.columnGroup;
                }
            }
            
            public System.Data.DataColumn SalesYTDColumn {
                get {
                    return this.columnSalesYTD;
                }
            }
            
            public System.Data.DataColumn SalesLastYearColumn {
                get {
                    return this.columnSalesLastYear;
                }
            }
            
            public System.Data.DataColumn CostYTDColumn {
                get {
                    return this.columnCostYTD;
                }
            }
            
            public System.Data.DataColumn CostLastYearColumn {
                get {
                    return this.columnCostLastYear;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public SalesTerritoryRow this[int index] {
                get {
                    return ((SalesTerritoryRow)(this.Rows[index]));
                }
            }
            
            public event SalesTerritoryRowChangeEventHandler SalesTerritoryRowChanged;
            
            public event SalesTerritoryRowChangeEventHandler SalesTerritoryRowChanging;
            
            public event SalesTerritoryRowChangeEventHandler SalesTerritoryRowDeleted;
            
            public event SalesTerritoryRowChangeEventHandler SalesTerritoryRowDeleting;
            
            public void AddSalesTerritoryRow(SalesTerritoryRow row) {
                this.Rows.Add(row);
            }
            
            public SalesTerritoryRow AddSalesTerritoryRow(string Name, string CountryRegionCode, string Group, decimal SalesYTD, decimal SalesLastYear, decimal CostYTD, decimal CostLastYear, System.Guid rowguid, System.DateTime ModifiedDate) {
                SalesTerritoryRow rowSalesTerritoryRow = ((SalesTerritoryRow)(this.NewRow()));
                rowSalesTerritoryRow.ItemArray = new object[] {
                        null,
                        Name,
                        CountryRegionCode,
                        Group,
                        SalesYTD,
                        SalesLastYear,
                        CostYTD,
                        CostLastYear,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowSalesTerritoryRow);
                return rowSalesTerritoryRow;
            }
            
            public SalesTerritoryRow FindByTerritoryID(int TerritoryID) {
                return ((SalesTerritoryRow)(this.Rows.Find(new object[] {
                            TerritoryID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                SalesTerritoryDataTable cln = ((SalesTerritoryDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new SalesTerritoryDataTable();
            }
            
            internal void InitVars() {
                this.columnTerritoryID = base.Columns["TerritoryID"];
                this.columnName = base.Columns["Name"];
                this.columnCountryRegionCode = base.Columns["CountryRegionCode"];
                this.columnGroup = base.Columns["Group"];
                this.columnSalesYTD = base.Columns["SalesYTD"];
                this.columnSalesLastYear = base.Columns["SalesLastYear"];
                this.columnCostYTD = base.Columns["CostYTD"];
                this.columnCostLastYear = base.Columns["CostLastYear"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnTerritoryID = new System.Data.DataColumn("TerritoryID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTerritoryID);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnCountryRegionCode = new System.Data.DataColumn("CountryRegionCode", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCountryRegionCode);
                this.columnGroup = new System.Data.DataColumn("Group", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnGroup);
                this.columnSalesYTD = new System.Data.DataColumn("SalesYTD", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesYTD);
                this.columnSalesLastYear = new System.Data.DataColumn("SalesLastYear", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesLastYear);
                this.columnCostYTD = new System.Data.DataColumn("CostYTD", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCostYTD);
                this.columnCostLastYear = new System.Data.DataColumn("CostLastYear", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCostLastYear);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnTerritoryID}, true));
                this.columnTerritoryID.AutoIncrement = true;
                this.columnTerritoryID.AllowDBNull = false;
                this.columnTerritoryID.ReadOnly = true;
                this.columnTerritoryID.Unique = true;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnCountryRegionCode.AllowDBNull = false;
                this.columnCountryRegionCode.MaxLength = 3;
                this.columnGroup.AllowDBNull = false;
                this.columnGroup.MaxLength = 50;
                this.columnSalesYTD.AllowDBNull = false;
                this.columnSalesLastYear.AllowDBNull = false;
                this.columnCostYTD.AllowDBNull = false;
                this.columnCostLastYear.AllowDBNull = false;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public SalesTerritoryRow NewSalesTerritoryRow() {
                return ((SalesTerritoryRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new SalesTerritoryRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(SalesTerritoryRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.SalesTerritoryRowChanged != null)) {
                    this.SalesTerritoryRowChanged(this, new SalesTerritoryRowChangeEvent(((SalesTerritoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.SalesTerritoryRowChanging != null)) {
                    this.SalesTerritoryRowChanging(this, new SalesTerritoryRowChangeEvent(((SalesTerritoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.SalesTerritoryRowDeleted != null)) {
                    this.SalesTerritoryRowDeleted(this, new SalesTerritoryRowChangeEvent(((SalesTerritoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.SalesTerritoryRowDeleting != null)) {
                    this.SalesTerritoryRowDeleting(this, new SalesTerritoryRowChangeEvent(((SalesTerritoryRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveSalesTerritoryRow(SalesTerritoryRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "SalesTerritoryDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class SalesTerritoryHistoryDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnSalesPersonID;
            
            private System.Data.DataColumn columnTerritoryID;
            
            private System.Data.DataColumn columnStartDate;
            
            private System.Data.DataColumn columnEndDate;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public SalesTerritoryHistoryDataTable() {
                this.TableName = "SalesTerritoryHistory";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal SalesTerritoryHistoryDataTable(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;
            }
            
            protected SalesTerritoryHistoryDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn SalesPersonIDColumn {
                get {
                    return this.columnSalesPersonID;
                }
            }
            
            public System.Data.DataColumn TerritoryIDColumn {
                get {
                    return this.columnTerritoryID;
                }
            }
            
            public System.Data.DataColumn StartDateColumn {
                get {
                    return this.columnStartDate;
                }
            }
            
            public System.Data.DataColumn EndDateColumn {
                get {
                    return this.columnEndDate;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public SalesTerritoryHistoryRow this[int index] {
                get {
                    return ((SalesTerritoryHistoryRow)(this.Rows[index]));
                }
            }
            
            public event SalesTerritoryHistoryRowChangeEventHandler SalesTerritoryHistoryRowChanged;
            
            public event SalesTerritoryHistoryRowChangeEventHandler SalesTerritoryHistoryRowChanging;
            
            public event SalesTerritoryHistoryRowChangeEventHandler SalesTerritoryHistoryRowDeleted;
            
            public event SalesTerritoryHistoryRowChangeEventHandler SalesTerritoryHistoryRowDeleting;
            
            public void AddSalesTerritoryHistoryRow(SalesTerritoryHistoryRow row) {
                this.Rows.Add(row);
            }
            
            public SalesTerritoryHistoryRow AddSalesTerritoryHistoryRow(SalesPersonRow parentSalesPersonRowByFK_SalesTerritoryHistory_SalesPerson_SalesPersonID, SalesTerritoryRow parentSalesTerritoryRowByFK_SalesTerritoryHistory_SalesTerritory_TerritoryID, System.DateTime StartDate, System.DateTime EndDate, System.Guid rowguid, System.DateTime ModifiedDate) {
                SalesTerritoryHistoryRow rowSalesTerritoryHistoryRow = ((SalesTerritoryHistoryRow)(this.NewRow()));
                rowSalesTerritoryHistoryRow.ItemArray = new object[] {
                        parentSalesPersonRowByFK_SalesTerritoryHistory_SalesPerson_SalesPersonID[0],
                        parentSalesTerritoryRowByFK_SalesTerritoryHistory_SalesTerritory_TerritoryID[0],
                        StartDate,
                        EndDate,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowSalesTerritoryHistoryRow);
                return rowSalesTerritoryHistoryRow;
            }
            
            public SalesTerritoryHistoryRow FindBySalesPersonIDTerritoryIDStartDate(int SalesPersonID, int TerritoryID, System.DateTime StartDate) {
                return ((SalesTerritoryHistoryRow)(this.Rows.Find(new object[] {
                            SalesPersonID,
                            TerritoryID,
                            StartDate})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                SalesTerritoryHistoryDataTable cln = ((SalesTerritoryHistoryDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new SalesTerritoryHistoryDataTable();
            }
            
            internal void InitVars() {
                this.columnSalesPersonID = base.Columns["SalesPersonID"];
                this.columnTerritoryID = base.Columns["TerritoryID"];
                this.columnStartDate = base.Columns["StartDate"];
                this.columnEndDate = base.Columns["EndDate"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnSalesPersonID = new System.Data.DataColumn("SalesPersonID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesPersonID);
                this.columnTerritoryID = new System.Data.DataColumn("TerritoryID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTerritoryID);
                this.columnStartDate = new System.Data.DataColumn("StartDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStartDate);
                this.columnEndDate = new System.Data.DataColumn("EndDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEndDate);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnSalesPersonID,
                                this.columnTerritoryID,
                                this.columnStartDate}, true));
                this.columnSalesPersonID.AllowDBNull = false;
                this.columnTerritoryID.AllowDBNull = false;
                this.columnStartDate.AllowDBNull = false;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public SalesTerritoryHistoryRow NewSalesTerritoryHistoryRow() {
                return ((SalesTerritoryHistoryRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new SalesTerritoryHistoryRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(SalesTerritoryHistoryRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.SalesTerritoryHistoryRowChanged != null)) {
                    this.SalesTerritoryHistoryRowChanged(this, new SalesTerritoryHistoryRowChangeEvent(((SalesTerritoryHistoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.SalesTerritoryHistoryRowChanging != null)) {
                    this.SalesTerritoryHistoryRowChanging(this, new SalesTerritoryHistoryRowChangeEvent(((SalesTerritoryHistoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.SalesTerritoryHistoryRowDeleted != null)) {
                    this.SalesTerritoryHistoryRowDeleted(this, new SalesTerritoryHistoryRowChangeEvent(((SalesTerritoryHistoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.SalesTerritoryHistoryRowDeleting != null)) {
                    this.SalesTerritoryHistoryRowDeleting(this, new SalesTerritoryHistoryRowChangeEvent(((SalesTerritoryHistoryRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveSalesTerritoryHistoryRow(SalesTerritoryHistoryRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "SalesTerritoryHistoryDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ShoppingCartItemDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnShoppingCartItemID;
            
            private System.Data.DataColumn columnShoppingCartID;
            
            private System.Data.DataColumn columnQuantity;
            
            private System.Data.DataColumn columnProductID;
            
            private System.Data.DataColumn columnDateCreated;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public ShoppingCartItemDataTable() {
                this.TableName = "ShoppingCartItem";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal ShoppingCartItemDataTable(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;
            }
            
            protected ShoppingCartItemDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ShoppingCartItemIDColumn {
                get {
                    return this.columnShoppingCartItemID;
                }
            }
            
            public System.Data.DataColumn ShoppingCartIDColumn {
                get {
                    return this.columnShoppingCartID;
                }
            }
            
            public System.Data.DataColumn QuantityColumn {
                get {
                    return this.columnQuantity;
                }
            }
            
            public System.Data.DataColumn ProductIDColumn {
                get {
                    return this.columnProductID;
                }
            }
            
            public System.Data.DataColumn DateCreatedColumn {
                get {
                    return this.columnDateCreated;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public ShoppingCartItemRow this[int index] {
                get {
                    return ((ShoppingCartItemRow)(this.Rows[index]));
                }
            }
            
            public event ShoppingCartItemRowChangeEventHandler ShoppingCartItemRowChanged;
            
            public event ShoppingCartItemRowChangeEventHandler ShoppingCartItemRowChanging;
            
            public event ShoppingCartItemRowChangeEventHandler ShoppingCartItemRowDeleted;
            
            public event ShoppingCartItemRowChangeEventHandler ShoppingCartItemRowDeleting;
            
            public void AddShoppingCartItemRow(ShoppingCartItemRow row) {
                this.Rows.Add(row);
            }
            
            public ShoppingCartItemRow AddShoppingCartItemRow(string ShoppingCartID, int Quantity, ProductRow parentProductRowByFK_ShoppingCartItem_Product_ProductID, System.DateTime DateCreated, System.DateTime ModifiedDate) {
                ShoppingCartItemRow rowShoppingCartItemRow = ((ShoppingCartItemRow)(this.NewRow()));
                rowShoppingCartItemRow.ItemArray = new object[] {
                        null,
                        ShoppingCartID,
                        Quantity,
                        parentProductRowByFK_ShoppingCartItem_Product_ProductID[0],
                        DateCreated,
                        ModifiedDate};
                this.Rows.Add(rowShoppingCartItemRow);
                return rowShoppingCartItemRow;
            }
            
            public ShoppingCartItemRow FindByShoppingCartItemID(int ShoppingCartItemID) {
                return ((ShoppingCartItemRow)(this.Rows.Find(new object[] {
                            ShoppingCartItemID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                ShoppingCartItemDataTable cln = ((ShoppingCartItemDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new ShoppingCartItemDataTable();
            }
            
            internal void InitVars() {
                this.columnShoppingCartItemID = base.Columns["ShoppingCartItemID"];
                this.columnShoppingCartID = base.Columns["ShoppingCartID"];
                this.columnQuantity = base.Columns["Quantity"];
                this.columnProductID = base.Columns["ProductID"];
                this.columnDateCreated = base.Columns["DateCreated"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnShoppingCartItemID = new System.Data.DataColumn("ShoppingCartItemID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnShoppingCartItemID);
                this.columnShoppingCartID = new System.Data.DataColumn("ShoppingCartID", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnShoppingCartID);
                this.columnQuantity = new System.Data.DataColumn("Quantity", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnQuantity);
                this.columnProductID = new System.Data.DataColumn("ProductID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductID);
                this.columnDateCreated = new System.Data.DataColumn("DateCreated", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDateCreated);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnShoppingCartItemID}, true));
                this.columnShoppingCartItemID.AutoIncrement = true;
                this.columnShoppingCartItemID.AllowDBNull = false;
                this.columnShoppingCartItemID.ReadOnly = true;
                this.columnShoppingCartItemID.Unique = true;
                this.columnShoppingCartID.AllowDBNull = false;
                this.columnShoppingCartID.MaxLength = 50;
                this.columnQuantity.AllowDBNull = false;
                this.columnProductID.AllowDBNull = false;
                this.columnDateCreated.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public ShoppingCartItemRow NewShoppingCartItemRow() {
                return ((ShoppingCartItemRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ShoppingCartItemRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ShoppingCartItemRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ShoppingCartItemRowChanged != null)) {
                    this.ShoppingCartItemRowChanged(this, new ShoppingCartItemRowChangeEvent(((ShoppingCartItemRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ShoppingCartItemRowChanging != null)) {
                    this.ShoppingCartItemRowChanging(this, new ShoppingCartItemRowChangeEvent(((ShoppingCartItemRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ShoppingCartItemRowDeleted != null)) {
                    this.ShoppingCartItemRowDeleted(this, new ShoppingCartItemRowChangeEvent(((ShoppingCartItemRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ShoppingCartItemRowDeleting != null)) {
                    this.ShoppingCartItemRowDeleting(this, new ShoppingCartItemRowChangeEvent(((ShoppingCartItemRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveShoppingCartItemRow(ShoppingCartItemRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "ShoppingCartItemDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class SpecialOfferDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnSpecialOfferID;
            
            private System.Data.DataColumn columnDescription;
            
            private System.Data.DataColumn columnDiscountPct;
            
            private System.Data.DataColumn columnType;
            
            private System.Data.DataColumn columnCategory;
            
            private System.Data.DataColumn columnStartDate;
            
            private System.Data.DataColumn columnEndDate;
            
            private System.Data.DataColumn columnMinQty;
            
            private System.Data.DataColumn columnMaxQty;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public SpecialOfferDataTable() {
                this.TableName = "SpecialOffer";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal SpecialOfferDataTable(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;
            }
            
            protected SpecialOfferDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn SpecialOfferIDColumn {
                get {
                    return this.columnSpecialOfferID;
                }
            }
            
            public System.Data.DataColumn DescriptionColumn {
                get {
                    return this.columnDescription;
                }
            }
            
            public System.Data.DataColumn DiscountPctColumn {
                get {
                    return this.columnDiscountPct;
                }
            }
            
            public System.Data.DataColumn TypeColumn {
                get {
                    return this.columnType;
                }
            }
            
            public System.Data.DataColumn CategoryColumn {
                get {
                    return this.columnCategory;
                }
            }
            
            public System.Data.DataColumn StartDateColumn {
                get {
                    return this.columnStartDate;
                }
            }
            
            public System.Data.DataColumn EndDateColumn {
                get {
                    return this.columnEndDate;
                }
            }
            
            public System.Data.DataColumn MinQtyColumn {
                get {
                    return this.columnMinQty;
                }
            }
            
            public System.Data.DataColumn MaxQtyColumn {
                get {
                    return this.columnMaxQty;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public SpecialOfferRow this[int index] {
                get {
                    return ((SpecialOfferRow)(this.Rows[index]));
                }
            }
            
            public event SpecialOfferRowChangeEventHandler SpecialOfferRowChanged;
            
            public event SpecialOfferRowChangeEventHandler SpecialOfferRowChanging;
            
            public event SpecialOfferRowChangeEventHandler SpecialOfferRowDeleted;
            
            public event SpecialOfferRowChangeEventHandler SpecialOfferRowDeleting;
            
            public void AddSpecialOfferRow(SpecialOfferRow row) {
                this.Rows.Add(row);
            }
            
            public SpecialOfferRow AddSpecialOfferRow(string Description, decimal DiscountPct, string Type, string Category, System.DateTime StartDate, System.DateTime EndDate, int MinQty, int MaxQty, System.Guid rowguid, System.DateTime ModifiedDate) {
                SpecialOfferRow rowSpecialOfferRow = ((SpecialOfferRow)(this.NewRow()));
                rowSpecialOfferRow.ItemArray = new object[] {
                        null,
                        Description,
                        DiscountPct,
                        Type,
                        Category,
                        StartDate,
                        EndDate,
                        MinQty,
                        MaxQty,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowSpecialOfferRow);
                return rowSpecialOfferRow;
            }
            
            public SpecialOfferRow FindBySpecialOfferID(int SpecialOfferID) {
                return ((SpecialOfferRow)(this.Rows.Find(new object[] {
                            SpecialOfferID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                SpecialOfferDataTable cln = ((SpecialOfferDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new SpecialOfferDataTable();
            }
            
            internal void InitVars() {
                this.columnSpecialOfferID = base.Columns["SpecialOfferID"];
                this.columnDescription = base.Columns["Description"];
                this.columnDiscountPct = base.Columns["DiscountPct"];
                this.columnType = base.Columns["Type"];
                this.columnCategory = base.Columns["Category"];
                this.columnStartDate = base.Columns["StartDate"];
                this.columnEndDate = base.Columns["EndDate"];
                this.columnMinQty = base.Columns["MinQty"];
                this.columnMaxQty = base.Columns["MaxQty"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnSpecialOfferID = new System.Data.DataColumn("SpecialOfferID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSpecialOfferID);
                this.columnDescription = new System.Data.DataColumn("Description", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDescription);
                this.columnDiscountPct = new System.Data.DataColumn("DiscountPct", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDiscountPct);
                this.columnType = new System.Data.DataColumn("Type", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnType);
                this.columnCategory = new System.Data.DataColumn("Category", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCategory);
                this.columnStartDate = new System.Data.DataColumn("StartDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStartDate);
                this.columnEndDate = new System.Data.DataColumn("EndDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEndDate);
                this.columnMinQty = new System.Data.DataColumn("MinQty", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnMinQty);
                this.columnMaxQty = new System.Data.DataColumn("MaxQty", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnMaxQty);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnSpecialOfferID}, true));
                this.columnSpecialOfferID.AutoIncrement = true;
                this.columnSpecialOfferID.AllowDBNull = false;
                this.columnSpecialOfferID.ReadOnly = true;
                this.columnSpecialOfferID.Unique = true;
                this.columnDescription.AllowDBNull = false;
                this.columnDescription.MaxLength = 255;
                this.columnDiscountPct.AllowDBNull = false;
                this.columnType.AllowDBNull = false;
                this.columnType.MaxLength = 50;
                this.columnCategory.AllowDBNull = false;
                this.columnCategory.MaxLength = 50;
                this.columnStartDate.AllowDBNull = false;
                this.columnEndDate.AllowDBNull = false;
                this.columnMinQty.AllowDBNull = false;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public SpecialOfferRow NewSpecialOfferRow() {
                return ((SpecialOfferRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new SpecialOfferRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(SpecialOfferRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.SpecialOfferRowChanged != null)) {
                    this.SpecialOfferRowChanged(this, new SpecialOfferRowChangeEvent(((SpecialOfferRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.SpecialOfferRowChanging != null)) {
                    this.SpecialOfferRowChanging(this, new SpecialOfferRowChangeEvent(((SpecialOfferRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.SpecialOfferRowDeleted != null)) {
                    this.SpecialOfferRowDeleted(this, new SpecialOfferRowChangeEvent(((SpecialOfferRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.SpecialOfferRowDeleting != null)) {
                    this.SpecialOfferRowDeleting(this, new SpecialOfferRowChangeEvent(((SpecialOfferRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveSpecialOfferRow(SpecialOfferRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "SpecialOfferDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class SpecialOfferProductDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnSpecialOfferID;
            
            private System.Data.DataColumn columnProductID;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public SpecialOfferProductDataTable() {
                this.TableName = "SpecialOfferProduct";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal SpecialOfferProductDataTable(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;
            }
            
            protected SpecialOfferProductDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn SpecialOfferIDColumn {
                get {
                    return this.columnSpecialOfferID;
                }
            }
            
            public System.Data.DataColumn ProductIDColumn {
                get {
                    return this.columnProductID;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public SpecialOfferProductRow this[int index] {
                get {
                    return ((SpecialOfferProductRow)(this.Rows[index]));
                }
            }
            
            public event SpecialOfferProductRowChangeEventHandler SpecialOfferProductRowChanged;
            
            public event SpecialOfferProductRowChangeEventHandler SpecialOfferProductRowChanging;
            
            public event SpecialOfferProductRowChangeEventHandler SpecialOfferProductRowDeleted;
            
            public event SpecialOfferProductRowChangeEventHandler SpecialOfferProductRowDeleting;
            
            public void AddSpecialOfferProductRow(SpecialOfferProductRow row) {
                this.Rows.Add(row);
            }
            
            public SpecialOfferProductRow AddSpecialOfferProductRow(SpecialOfferRow parentSpecialOfferRowByFK_SpecialOfferProduct_SpecialOffer_SpecialOfferID, ProductRow parentProductRowByFK_SpecialOfferProduct_Product_ProductID, System.Guid rowguid, System.DateTime ModifiedDate) {
                SpecialOfferProductRow rowSpecialOfferProductRow = ((SpecialOfferProductRow)(this.NewRow()));
                rowSpecialOfferProductRow.ItemArray = new object[] {
                        parentSpecialOfferRowByFK_SpecialOfferProduct_SpecialOffer_SpecialOfferID[0],
                        parentProductRowByFK_SpecialOfferProduct_Product_ProductID[0],
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowSpecialOfferProductRow);
                return rowSpecialOfferProductRow;
            }
            
            public SpecialOfferProductRow FindBySpecialOfferIDProductID(int SpecialOfferID, int ProductID) {
                return ((SpecialOfferProductRow)(this.Rows.Find(new object[] {
                            SpecialOfferID,
                            ProductID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                SpecialOfferProductDataTable cln = ((SpecialOfferProductDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new SpecialOfferProductDataTable();
            }
            
            internal void InitVars() {
                this.columnSpecialOfferID = base.Columns["SpecialOfferID"];
                this.columnProductID = base.Columns["ProductID"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnSpecialOfferID = new System.Data.DataColumn("SpecialOfferID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSpecialOfferID);
                this.columnProductID = new System.Data.DataColumn("ProductID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductID);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnSpecialOfferID,
                                this.columnProductID}, true));
                this.columnSpecialOfferID.AllowDBNull = false;
                this.columnProductID.AllowDBNull = false;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public SpecialOfferProductRow NewSpecialOfferProductRow() {
                return ((SpecialOfferProductRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new SpecialOfferProductRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(SpecialOfferProductRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.SpecialOfferProductRowChanged != null)) {
                    this.SpecialOfferProductRowChanged(this, new SpecialOfferProductRowChangeEvent(((SpecialOfferProductRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.SpecialOfferProductRowChanging != null)) {
                    this.SpecialOfferProductRowChanging(this, new SpecialOfferProductRowChangeEvent(((SpecialOfferProductRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.SpecialOfferProductRowDeleted != null)) {
                    this.SpecialOfferProductRowDeleted(this, new SpecialOfferProductRowChangeEvent(((SpecialOfferProductRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.SpecialOfferProductRowDeleting != null)) {
                    this.SpecialOfferProductRowDeleting(this, new SpecialOfferProductRowChangeEvent(((SpecialOfferProductRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveSpecialOfferProductRow(SpecialOfferProductRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "SpecialOfferProductDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class StoreDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnCustomerID;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnSalesPersonID;
            
            private System.Data.DataColumn columnDemographics;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public StoreDataTable() {
                this.TableName = "Store";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal StoreDataTable(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;
            }
            
            protected StoreDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn CustomerIDColumn {
                get {
                    return this.columnCustomerID;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn SalesPersonIDColumn {
                get {
                    return this.columnSalesPersonID;
                }
            }
            
            public System.Data.DataColumn DemographicsColumn {
                get {
                    return this.columnDemographics;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public StoreRow this[int index] {
                get {
                    return ((StoreRow)(this.Rows[index]));
                }
            }
            
            public event StoreRowChangeEventHandler StoreRowChanged;
            
            public event StoreRowChangeEventHandler StoreRowChanging;
            
            public event StoreRowChangeEventHandler StoreRowDeleted;
            
            public event StoreRowChangeEventHandler StoreRowDeleting;
            
            public void AddStoreRow(StoreRow row) {
                this.Rows.Add(row);
            }
            
            public StoreRow AddStoreRow(CustomerRow parentCustomerRowByFK_Store_Customer_CustomerID, string Name, SalesPersonRow parentSalesPersonRowByFK_Store_SalesPerson_SalesPersonID, string Demographics, System.Guid rowguid, System.DateTime ModifiedDate) {
                StoreRow rowStoreRow = ((StoreRow)(this.NewRow()));
                rowStoreRow.ItemArray = new object[] {
                        parentCustomerRowByFK_Store_Customer_CustomerID[0],
                        Name,
                        parentSalesPersonRowByFK_Store_SalesPerson_SalesPersonID[0],
                        Demographics,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowStoreRow);
                return rowStoreRow;
            }
            
            public StoreRow FindByCustomerID(int CustomerID) {
                return ((StoreRow)(this.Rows.Find(new object[] {
                            CustomerID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                StoreDataTable cln = ((StoreDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new StoreDataTable();
            }
            
            internal void InitVars() {
                this.columnCustomerID = base.Columns["CustomerID"];
                this.columnName = base.Columns["Name"];
                this.columnSalesPersonID = base.Columns["SalesPersonID"];
                this.columnDemographics = base.Columns["Demographics"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnCustomerID = new System.Data.DataColumn("CustomerID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCustomerID);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnSalesPersonID = new System.Data.DataColumn("SalesPersonID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesPersonID);
                this.columnDemographics = new System.Data.DataColumn("Demographics", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDemographics);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnCustomerID}, true));
                this.columnCustomerID.AllowDBNull = false;
                this.columnCustomerID.Unique = true;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnDemographics.MaxLength = 2147483647;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public StoreRow NewStoreRow() {
                return ((StoreRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new StoreRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(StoreRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.StoreRowChanged != null)) {
                    this.StoreRowChanged(this, new StoreRowChangeEvent(((StoreRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.StoreRowChanging != null)) {
                    this.StoreRowChanging(this, new StoreRowChangeEvent(((StoreRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.StoreRowDeleted != null)) {
                    this.StoreRowDeleted(this, new StoreRowChangeEvent(((StoreRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.StoreRowDeleting != null)) {
                    this.StoreRowDeleting(this, new StoreRowChangeEvent(((StoreRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveStoreRow(StoreRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "StoreDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class StoreContactDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnCustomerID;
            
            private System.Data.DataColumn columnContactID;
            
            private System.Data.DataColumn columnContactTypeID;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public StoreContactDataTable() {
                this.TableName = "StoreContact";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal StoreContactDataTable(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;
            }
            
            protected StoreContactDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn CustomerIDColumn {
                get {
                    return this.columnCustomerID;
                }
            }
            
            public System.Data.DataColumn ContactIDColumn {
                get {
                    return this.columnContactID;
                }
            }
            
            public System.Data.DataColumn ContactTypeIDColumn {
                get {
                    return this.columnContactTypeID;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public StoreContactRow this[int index] {
                get {
                    return ((StoreContactRow)(this.Rows[index]));
                }
            }
            
            public event StoreContactRowChangeEventHandler StoreContactRowChanged;
            
            public event StoreContactRowChangeEventHandler StoreContactRowChanging;
            
            public event StoreContactRowChangeEventHandler StoreContactRowDeleted;
            
            public event StoreContactRowChangeEventHandler StoreContactRowDeleting;
            
            public void AddStoreContactRow(StoreContactRow row) {
                this.Rows.Add(row);
            }
            
            public StoreContactRow AddStoreContactRow(StoreRow parentStoreRowByFK_StoreContact_Store_CustomerID, ContactRow parentContactRowByFK_StoreContact_Contact_ContactID, ContactTypeRow parentContactTypeRowByFK_StoreContact_ContactType_ContactTypeID, System.Guid rowguid, System.DateTime ModifiedDate) {
                StoreContactRow rowStoreContactRow = ((StoreContactRow)(this.NewRow()));
                rowStoreContactRow.ItemArray = new object[] {
                        parentStoreRowByFK_StoreContact_Store_CustomerID[0],
                        parentContactRowByFK_StoreContact_Contact_ContactID[0],
                        parentContactTypeRowByFK_StoreContact_ContactType_ContactTypeID[0],
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowStoreContactRow);
                return rowStoreContactRow;
            }
            
            public StoreContactRow FindByCustomerIDContactID(int CustomerID, int ContactID) {
                return ((StoreContactRow)(this.Rows.Find(new object[] {
                            CustomerID,
                            ContactID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                StoreContactDataTable cln = ((StoreContactDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new StoreContactDataTable();
            }
            
            internal void InitVars() {
                this.columnCustomerID = base.Columns["CustomerID"];
                this.columnContactID = base.Columns["ContactID"];
                this.columnContactTypeID = base.Columns["ContactTypeID"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnCustomerID = new System.Data.DataColumn("CustomerID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCustomerID);
                this.columnContactID = new System.Data.DataColumn("ContactID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnContactID);
                this.columnContactTypeID = new System.Data.DataColumn("ContactTypeID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnContactTypeID);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnCustomerID,
                                this.columnContactID}, true));
                this.columnCustomerID.AllowDBNull = false;
                this.columnContactID.AllowDBNull = false;
                this.columnContactTypeID.AllowDBNull = false;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public StoreContactRow NewStoreContactRow() {
                return ((StoreContactRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new StoreContactRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(StoreContactRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.StoreContactRowChanged != null)) {
                    this.StoreContactRowChanged(this, new StoreContactRowChangeEvent(((StoreContactRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.StoreContactRowChanging != null)) {
                    this.StoreContactRowChanging(this, new StoreContactRowChangeEvent(((StoreContactRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.StoreContactRowDeleted != null)) {
                    this.StoreContactRowDeleted(this, new StoreContactRowChangeEvent(((StoreContactRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.StoreContactRowDeleting != null)) {
                    this.StoreContactRowDeleting(this, new StoreContactRowChangeEvent(((StoreContactRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveStoreContactRow(StoreContactRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "StoreContactDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class vEmployeeDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnEmployeeID;
            
            private System.Data.DataColumn columnTitle;
            
            private System.Data.DataColumn columnFirstName;
            
            private System.Data.DataColumn columnMiddleName;
            
            private System.Data.DataColumn columnLastName;
            
            private System.Data.DataColumn columnSuffix;
            
            private System.Data.DataColumn columnJobTitle;
            
            private System.Data.DataColumn columnPhone;
            
            private System.Data.DataColumn columnEmailAddress;
            
            private System.Data.DataColumn columnEmailPromotion;
            
            private System.Data.DataColumn columnAddressLine1;
            
            private System.Data.DataColumn columnAddressLine2;
            
            private System.Data.DataColumn columnCity;
            
            private System.Data.DataColumn columnStateProvinceName;
            
            private System.Data.DataColumn columnPostalCode;
            
            private System.Data.DataColumn columnCountryRegionName;
            
            private System.Data.DataColumn columnAdditionalContactInfo;
            
            public vEmployeeDataTable() {
                this.TableName = "vEmployee";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal vEmployeeDataTable(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;
            }
            
            protected vEmployeeDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn EmployeeIDColumn {
                get {
                    return this.columnEmployeeID;
                }
            }
            
            public System.Data.DataColumn TitleColumn {
                get {
                    return this.columnTitle;
                }
            }
            
            public System.Data.DataColumn FirstNameColumn {
                get {
                    return this.columnFirstName;
                }
            }
            
            public System.Data.DataColumn MiddleNameColumn {
                get {
                    return this.columnMiddleName;
                }
            }
            
            public System.Data.DataColumn LastNameColumn {
                get {
                    return this.columnLastName;
                }
            }
            
            public System.Data.DataColumn SuffixColumn {
                get {
                    return this.columnSuffix;
                }
            }
            
            public System.Data.DataColumn JobTitleColumn {
                get {
                    return this.columnJobTitle;
                }
            }
            
            public System.Data.DataColumn PhoneColumn {
                get {
                    return this.columnPhone;
                }
            }
            
            public System.Data.DataColumn EmailAddressColumn {
                get {
                    return this.columnEmailAddress;
                }
            }
            
            public System.Data.DataColumn EmailPromotionColumn {
                get {
                    return this.columnEmailPromotion;
                }
            }
            
            public System.Data.DataColumn AddressLine1Column {
                get {
                    return this.columnAddressLine1;
                }
            }
            
            public System.Data.DataColumn AddressLine2Column {
                get {
                    return this.columnAddressLine2;
                }
            }
            
            public System.Data.DataColumn CityColumn {
                get {
                    return this.columnCity;
                }
            }
            
            public System.Data.DataColumn StateProvinceNameColumn {
                get {
                    return this.columnStateProvinceName;
                }
            }
            
            public System.Data.DataColumn PostalCodeColumn {
                get {
                    return this.columnPostalCode;
                }
            }
            
            public System.Data.DataColumn CountryRegionNameColumn {
                get {
                    return this.columnCountryRegionName;
                }
            }
            
            public System.Data.DataColumn AdditionalContactInfoColumn {
                get {
                    return this.columnAdditionalContactInfo;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public vEmployeeRow this[int index] {
                get {
                    return ((vEmployeeRow)(this.Rows[index]));
                }
            }
            
            public event vEmployeeRowChangeEventHandler vEmployeeRowChanged;
            
            public event vEmployeeRowChangeEventHandler vEmployeeRowChanging;
            
            public event vEmployeeRowChangeEventHandler vEmployeeRowDeleted;
            
            public event vEmployeeRowChangeEventHandler vEmployeeRowDeleting;
            
            public void AddvEmployeeRow(vEmployeeRow row) {
                this.Rows.Add(row);
            }
            
            public vEmployeeRow AddvEmployeeRow(
                        int EmployeeID, 
                        string Title, 
                        string FirstName, 
                        string MiddleName, 
                        string LastName, 
                        string Suffix, 
                        string JobTitle, 
                        string Phone, 
                        string EmailAddress, 
                        int EmailPromotion, 
                        string AddressLine1, 
                        string AddressLine2, 
                        string City, 
                        string StateProvinceName, 
                        string PostalCode, 
                        string CountryRegionName, 
                        string AdditionalContactInfo) {
                vEmployeeRow rowvEmployeeRow = ((vEmployeeRow)(this.NewRow()));
                rowvEmployeeRow.ItemArray = new object[] {
                        EmployeeID,
                        Title,
                        FirstName,
                        MiddleName,
                        LastName,
                        Suffix,
                        JobTitle,
                        Phone,
                        EmailAddress,
                        EmailPromotion,
                        AddressLine1,
                        AddressLine2,
                        City,
                        StateProvinceName,
                        PostalCode,
                        CountryRegionName,
                        AdditionalContactInfo};
                this.Rows.Add(rowvEmployeeRow);
                return rowvEmployeeRow;
            }
            
            public vEmployeeRow FindByEmployeeID(int EmployeeID) {
                return ((vEmployeeRow)(this.Rows.Find(new object[] {
                            EmployeeID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                vEmployeeDataTable cln = ((vEmployeeDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new vEmployeeDataTable();
            }
            
            internal void InitVars() {
                this.columnEmployeeID = base.Columns["EmployeeID"];
                this.columnTitle = base.Columns["Title"];
                this.columnFirstName = base.Columns["FirstName"];
                this.columnMiddleName = base.Columns["MiddleName"];
                this.columnLastName = base.Columns["LastName"];
                this.columnSuffix = base.Columns["Suffix"];
                this.columnJobTitle = base.Columns["JobTitle"];
                this.columnPhone = base.Columns["Phone"];
                this.columnEmailAddress = base.Columns["EmailAddress"];
                this.columnEmailPromotion = base.Columns["EmailPromotion"];
                this.columnAddressLine1 = base.Columns["AddressLine1"];
                this.columnAddressLine2 = base.Columns["AddressLine2"];
                this.columnCity = base.Columns["City"];
                this.columnStateProvinceName = base.Columns["StateProvinceName"];
                this.columnPostalCode = base.Columns["PostalCode"];
                this.columnCountryRegionName = base.Columns["CountryRegionName"];
                this.columnAdditionalContactInfo = base.Columns["AdditionalContactInfo"];
            }
            
            private void InitClass() {
                this.columnEmployeeID = new System.Data.DataColumn("EmployeeID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmployeeID);
                this.columnTitle = new System.Data.DataColumn("Title", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTitle);
                this.columnFirstName = new System.Data.DataColumn("FirstName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnFirstName);
                this.columnMiddleName = new System.Data.DataColumn("MiddleName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnMiddleName);
                this.columnLastName = new System.Data.DataColumn("LastName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLastName);
                this.columnSuffix = new System.Data.DataColumn("Suffix", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSuffix);
                this.columnJobTitle = new System.Data.DataColumn("JobTitle", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnJobTitle);
                this.columnPhone = new System.Data.DataColumn("Phone", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPhone);
                this.columnEmailAddress = new System.Data.DataColumn("EmailAddress", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmailAddress);
                this.columnEmailPromotion = new System.Data.DataColumn("EmailPromotion", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmailPromotion);
                this.columnAddressLine1 = new System.Data.DataColumn("AddressLine1", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAddressLine1);
                this.columnAddressLine2 = new System.Data.DataColumn("AddressLine2", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAddressLine2);
                this.columnCity = new System.Data.DataColumn("City", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCity);
                this.columnStateProvinceName = new System.Data.DataColumn("StateProvinceName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStateProvinceName);
                this.columnPostalCode = new System.Data.DataColumn("PostalCode", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPostalCode);
                this.columnCountryRegionName = new System.Data.DataColumn("CountryRegionName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCountryRegionName);
                this.columnAdditionalContactInfo = new System.Data.DataColumn("AdditionalContactInfo", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAdditionalContactInfo);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnEmployeeID}, true));
                this.columnEmployeeID.AllowDBNull = false;
                this.columnEmployeeID.Unique = true;
                this.columnTitle.MaxLength = 8;
                this.columnFirstName.AllowDBNull = false;
                this.columnFirstName.MaxLength = 50;
                this.columnMiddleName.MaxLength = 50;
                this.columnLastName.AllowDBNull = false;
                this.columnLastName.MaxLength = 50;
                this.columnSuffix.MaxLength = 10;
                this.columnJobTitle.AllowDBNull = false;
                this.columnJobTitle.MaxLength = 50;
                this.columnPhone.MaxLength = 25;
                this.columnEmailAddress.MaxLength = 50;
                this.columnEmailPromotion.AllowDBNull = false;
                this.columnAddressLine1.AllowDBNull = false;
                this.columnAddressLine1.MaxLength = 60;
                this.columnAddressLine2.MaxLength = 60;
                this.columnCity.AllowDBNull = false;
                this.columnCity.MaxLength = 30;
                this.columnStateProvinceName.AllowDBNull = false;
                this.columnStateProvinceName.MaxLength = 50;
                this.columnPostalCode.AllowDBNull = false;
                this.columnPostalCode.MaxLength = 15;
                this.columnCountryRegionName.AllowDBNull = false;
                this.columnCountryRegionName.MaxLength = 50;
                this.columnAdditionalContactInfo.MaxLength = 2147483647;
            }
            
            public vEmployeeRow NewvEmployeeRow() {
                return ((vEmployeeRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new vEmployeeRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(vEmployeeRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.vEmployeeRowChanged != null)) {
                    this.vEmployeeRowChanged(this, new vEmployeeRowChangeEvent(((vEmployeeRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.vEmployeeRowChanging != null)) {
                    this.vEmployeeRowChanging(this, new vEmployeeRowChangeEvent(((vEmployeeRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.vEmployeeRowDeleted != null)) {
                    this.vEmployeeRowDeleted(this, new vEmployeeRowChangeEvent(((vEmployeeRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.vEmployeeRowDeleting != null)) {
                    this.vEmployeeRowDeleting(this, new vEmployeeRowChangeEvent(((vEmployeeRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovevEmployeeRow(vEmployeeRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "vEmployeeDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class vEmployeeDepartmentDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnEmployeeID;
            
            private System.Data.DataColumn columnTitle;
            
            private System.Data.DataColumn columnFirstName;
            
            private System.Data.DataColumn columnMiddleName;
            
            private System.Data.DataColumn columnLastName;
            
            private System.Data.DataColumn columnSuffix;
            
            private System.Data.DataColumn columnJobTitle;
            
            private System.Data.DataColumn columnDepartment;
            
            private System.Data.DataColumn columnGroupName;
            
            private System.Data.DataColumn columnStartDate;
            
            public vEmployeeDepartmentDataTable() {
                this.TableName = "vEmployeeDepartment";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal vEmployeeDepartmentDataTable(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;
            }
            
            protected vEmployeeDepartmentDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn EmployeeIDColumn {
                get {
                    return this.columnEmployeeID;
                }
            }
            
            public System.Data.DataColumn TitleColumn {
                get {
                    return this.columnTitle;
                }
            }
            
            public System.Data.DataColumn FirstNameColumn {
                get {
                    return this.columnFirstName;
                }
            }
            
            public System.Data.DataColumn MiddleNameColumn {
                get {
                    return this.columnMiddleName;
                }
            }
            
            public System.Data.DataColumn LastNameColumn {
                get {
                    return this.columnLastName;
                }
            }
            
            public System.Data.DataColumn SuffixColumn {
                get {
                    return this.columnSuffix;
                }
            }
            
            public System.Data.DataColumn JobTitleColumn {
                get {
                    return this.columnJobTitle;
                }
            }
            
            public System.Data.DataColumn DepartmentColumn {
                get {
                    return this.columnDepartment;
                }
            }
            
            public System.Data.DataColumn GroupNameColumn {
                get {
                    return this.columnGroupName;
                }
            }
            
            public System.Data.DataColumn StartDateColumn {
                get {
                    return this.columnStartDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public vEmployeeDepartmentRow this[int index] {
                get {
                    return ((vEmployeeDepartmentRow)(this.Rows[index]));
                }
            }
            
            public event vEmployeeDepartmentRowChangeEventHandler vEmployeeDepartmentRowChanged;
            
            public event vEmployeeDepartmentRowChangeEventHandler vEmployeeDepartmentRowChanging;
            
            public event vEmployeeDepartmentRowChangeEventHandler vEmployeeDepartmentRowDeleted;
            
            public event vEmployeeDepartmentRowChangeEventHandler vEmployeeDepartmentRowDeleting;
            
            public void AddvEmployeeDepartmentRow(vEmployeeDepartmentRow row) {
                this.Rows.Add(row);
            }
            
            public vEmployeeDepartmentRow AddvEmployeeDepartmentRow(int EmployeeID, string Title, string FirstName, string MiddleName, string LastName, string Suffix, string JobTitle, string Department, string GroupName, System.DateTime StartDate) {
                vEmployeeDepartmentRow rowvEmployeeDepartmentRow = ((vEmployeeDepartmentRow)(this.NewRow()));
                rowvEmployeeDepartmentRow.ItemArray = new object[] {
                        EmployeeID,
                        Title,
                        FirstName,
                        MiddleName,
                        LastName,
                        Suffix,
                        JobTitle,
                        Department,
                        GroupName,
                        StartDate};
                this.Rows.Add(rowvEmployeeDepartmentRow);
                return rowvEmployeeDepartmentRow;
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                vEmployeeDepartmentDataTable cln = ((vEmployeeDepartmentDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new vEmployeeDepartmentDataTable();
            }
            
            internal void InitVars() {
                this.columnEmployeeID = base.Columns["EmployeeID"];
                this.columnTitle = base.Columns["Title"];
                this.columnFirstName = base.Columns["FirstName"];
                this.columnMiddleName = base.Columns["MiddleName"];
                this.columnLastName = base.Columns["LastName"];
                this.columnSuffix = base.Columns["Suffix"];
                this.columnJobTitle = base.Columns["JobTitle"];
                this.columnDepartment = base.Columns["Department"];
                this.columnGroupName = base.Columns["GroupName"];
                this.columnStartDate = base.Columns["StartDate"];
            }
            
            private void InitClass() {
                this.columnEmployeeID = new System.Data.DataColumn("EmployeeID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmployeeID);
                this.columnTitle = new System.Data.DataColumn("Title", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTitle);
                this.columnFirstName = new System.Data.DataColumn("FirstName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnFirstName);
                this.columnMiddleName = new System.Data.DataColumn("MiddleName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnMiddleName);
                this.columnLastName = new System.Data.DataColumn("LastName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLastName);
                this.columnSuffix = new System.Data.DataColumn("Suffix", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSuffix);
                this.columnJobTitle = new System.Data.DataColumn("JobTitle", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnJobTitle);
                this.columnDepartment = new System.Data.DataColumn("Department", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDepartment);
                this.columnGroupName = new System.Data.DataColumn("GroupName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnGroupName);
                this.columnStartDate = new System.Data.DataColumn("StartDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStartDate);
                this.columnEmployeeID.AllowDBNull = false;
                this.columnTitle.MaxLength = 8;
                this.columnFirstName.AllowDBNull = false;
                this.columnFirstName.MaxLength = 50;
                this.columnMiddleName.MaxLength = 50;
                this.columnLastName.AllowDBNull = false;
                this.columnLastName.MaxLength = 50;
                this.columnSuffix.MaxLength = 10;
                this.columnJobTitle.AllowDBNull = false;
                this.columnJobTitle.MaxLength = 50;
                this.columnDepartment.AllowDBNull = false;
                this.columnDepartment.MaxLength = 50;
                this.columnGroupName.AllowDBNull = false;
                this.columnGroupName.MaxLength = 50;
                this.columnStartDate.AllowDBNull = false;
            }
            
            public vEmployeeDepartmentRow NewvEmployeeDepartmentRow() {
                return ((vEmployeeDepartmentRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new vEmployeeDepartmentRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(vEmployeeDepartmentRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.vEmployeeDepartmentRowChanged != null)) {
                    this.vEmployeeDepartmentRowChanged(this, new vEmployeeDepartmentRowChangeEvent(((vEmployeeDepartmentRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.vEmployeeDepartmentRowChanging != null)) {
                    this.vEmployeeDepartmentRowChanging(this, new vEmployeeDepartmentRowChangeEvent(((vEmployeeDepartmentRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.vEmployeeDepartmentRowDeleted != null)) {
                    this.vEmployeeDepartmentRowDeleted(this, new vEmployeeDepartmentRowChangeEvent(((vEmployeeDepartmentRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.vEmployeeDepartmentRowDeleting != null)) {
                    this.vEmployeeDepartmentRowDeleting(this, new vEmployeeDepartmentRowChangeEvent(((vEmployeeDepartmentRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovevEmployeeDepartmentRow(vEmployeeDepartmentRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "vEmployeeDepartmentDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class vEmployeeDepartmentHistoryDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnEmployeeID;
            
            private System.Data.DataColumn columnTitle;
            
            private System.Data.DataColumn columnFirstName;
            
            private System.Data.DataColumn columnMiddleName;
            
            private System.Data.DataColumn columnLastName;
            
            private System.Data.DataColumn columnSuffix;
            
            private System.Data.DataColumn columnShift;
            
            private System.Data.DataColumn columnDepartment;
            
            private System.Data.DataColumn columnGroupName;
            
            private System.Data.DataColumn columnStartDate;
            
            private System.Data.DataColumn columnEndDate;
            
            public vEmployeeDepartmentHistoryDataTable() {
                this.TableName = "vEmployeeDepartmentHistory";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal vEmployeeDepartmentHistoryDataTable(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;
            }
            
            protected vEmployeeDepartmentHistoryDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn EmployeeIDColumn {
                get {
                    return this.columnEmployeeID;
                }
            }
            
            public System.Data.DataColumn TitleColumn {
                get {
                    return this.columnTitle;
                }
            }
            
            public System.Data.DataColumn FirstNameColumn {
                get {
                    return this.columnFirstName;
                }
            }
            
            public System.Data.DataColumn MiddleNameColumn {
                get {
                    return this.columnMiddleName;
                }
            }
            
            public System.Data.DataColumn LastNameColumn {
                get {
                    return this.columnLastName;
                }
            }
            
            public System.Data.DataColumn SuffixColumn {
                get {
                    return this.columnSuffix;
                }
            }
            
            public System.Data.DataColumn ShiftColumn {
                get {
                    return this.columnShift;
                }
            }
            
            public System.Data.DataColumn DepartmentColumn {
                get {
                    return this.columnDepartment;
                }
            }
            
            public System.Data.DataColumn GroupNameColumn {
                get {
                    return this.columnGroupName;
                }
            }
            
            public System.Data.DataColumn StartDateColumn {
                get {
                    return this.columnStartDate;
                }
            }
            
            public System.Data.DataColumn EndDateColumn {
                get {
                    return this.columnEndDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public vEmployeeDepartmentHistoryRow this[int index] {
                get {
                    return ((vEmployeeDepartmentHistoryRow)(this.Rows[index]));
                }
            }
            
            public event vEmployeeDepartmentHistoryRowChangeEventHandler vEmployeeDepartmentHistoryRowChanged;
            
            public event vEmployeeDepartmentHistoryRowChangeEventHandler vEmployeeDepartmentHistoryRowChanging;
            
            public event vEmployeeDepartmentHistoryRowChangeEventHandler vEmployeeDepartmentHistoryRowDeleted;
            
            public event vEmployeeDepartmentHistoryRowChangeEventHandler vEmployeeDepartmentHistoryRowDeleting;
            
            public void AddvEmployeeDepartmentHistoryRow(vEmployeeDepartmentHistoryRow row) {
                this.Rows.Add(row);
            }
            
            public vEmployeeDepartmentHistoryRow AddvEmployeeDepartmentHistoryRow(int EmployeeID, string Title, string FirstName, string MiddleName, string LastName, string Suffix, string Shift, string Department, string GroupName, System.DateTime StartDate, System.DateTime EndDate) {
                vEmployeeDepartmentHistoryRow rowvEmployeeDepartmentHistoryRow = ((vEmployeeDepartmentHistoryRow)(this.NewRow()));
                rowvEmployeeDepartmentHistoryRow.ItemArray = new object[] {
                        EmployeeID,
                        Title,
                        FirstName,
                        MiddleName,
                        LastName,
                        Suffix,
                        Shift,
                        Department,
                        GroupName,
                        StartDate,
                        EndDate};
                this.Rows.Add(rowvEmployeeDepartmentHistoryRow);
                return rowvEmployeeDepartmentHistoryRow;
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                vEmployeeDepartmentHistoryDataTable cln = ((vEmployeeDepartmentHistoryDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new vEmployeeDepartmentHistoryDataTable();
            }
            
            internal void InitVars() {
                this.columnEmployeeID = base.Columns["EmployeeID"];
                this.columnTitle = base.Columns["Title"];
                this.columnFirstName = base.Columns["FirstName"];
                this.columnMiddleName = base.Columns["MiddleName"];
                this.columnLastName = base.Columns["LastName"];
                this.columnSuffix = base.Columns["Suffix"];
                this.columnShift = base.Columns["Shift"];
                this.columnDepartment = base.Columns["Department"];
                this.columnGroupName = base.Columns["GroupName"];
                this.columnStartDate = base.Columns["StartDate"];
                this.columnEndDate = base.Columns["EndDate"];
            }
            
            private void InitClass() {
                this.columnEmployeeID = new System.Data.DataColumn("EmployeeID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmployeeID);
                this.columnTitle = new System.Data.DataColumn("Title", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTitle);
                this.columnFirstName = new System.Data.DataColumn("FirstName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnFirstName);
                this.columnMiddleName = new System.Data.DataColumn("MiddleName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnMiddleName);
                this.columnLastName = new System.Data.DataColumn("LastName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLastName);
                this.columnSuffix = new System.Data.DataColumn("Suffix", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSuffix);
                this.columnShift = new System.Data.DataColumn("Shift", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnShift);
                this.columnDepartment = new System.Data.DataColumn("Department", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDepartment);
                this.columnGroupName = new System.Data.DataColumn("GroupName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnGroupName);
                this.columnStartDate = new System.Data.DataColumn("StartDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStartDate);
                this.columnEndDate = new System.Data.DataColumn("EndDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEndDate);
                this.columnEmployeeID.AllowDBNull = false;
                this.columnTitle.MaxLength = 8;
                this.columnFirstName.AllowDBNull = false;
                this.columnFirstName.MaxLength = 50;
                this.columnMiddleName.MaxLength = 50;
                this.columnLastName.AllowDBNull = false;
                this.columnLastName.MaxLength = 50;
                this.columnSuffix.MaxLength = 10;
                this.columnShift.AllowDBNull = false;
                this.columnShift.MaxLength = 50;
                this.columnDepartment.AllowDBNull = false;
                this.columnDepartment.MaxLength = 50;
                this.columnGroupName.AllowDBNull = false;
                this.columnGroupName.MaxLength = 50;
                this.columnStartDate.AllowDBNull = false;
            }
            
            public vEmployeeDepartmentHistoryRow NewvEmployeeDepartmentHistoryRow() {
                return ((vEmployeeDepartmentHistoryRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new vEmployeeDepartmentHistoryRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(vEmployeeDepartmentHistoryRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.vEmployeeDepartmentHistoryRowChanged != null)) {
                    this.vEmployeeDepartmentHistoryRowChanged(this, new vEmployeeDepartmentHistoryRowChangeEvent(((vEmployeeDepartmentHistoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.vEmployeeDepartmentHistoryRowChanging != null)) {
                    this.vEmployeeDepartmentHistoryRowChanging(this, new vEmployeeDepartmentHistoryRowChangeEvent(((vEmployeeDepartmentHistoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.vEmployeeDepartmentHistoryRowDeleted != null)) {
                    this.vEmployeeDepartmentHistoryRowDeleted(this, new vEmployeeDepartmentHistoryRowChangeEvent(((vEmployeeDepartmentHistoryRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.vEmployeeDepartmentHistoryRowDeleting != null)) {
                    this.vEmployeeDepartmentHistoryRowDeleting(this, new vEmployeeDepartmentHistoryRowChangeEvent(((vEmployeeDepartmentHistoryRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovevEmployeeDepartmentHistoryRow(vEmployeeDepartmentHistoryRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "vEmployeeDepartmentHistoryDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class vJobCandidateDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnJobCandidateID;
            
            private System.Data.DataColumn columnEmployeeID;
            
            private System.Data.DataColumn _columnName_Prefix;
            
            private System.Data.DataColumn _columnName_First;
            
            private System.Data.DataColumn _columnName_Middle;
            
            private System.Data.DataColumn _columnName_Last;
            
            private System.Data.DataColumn _columnName_Suffix;
            
            private System.Data.DataColumn columnSkills;
            
            private System.Data.DataColumn _columnAddr_Type;
            
            private System.Data.DataColumn _columnAddr_Loc_CountryRegion;
            
            private System.Data.DataColumn _columnAddr_Loc_State;
            
            private System.Data.DataColumn _columnAddr_Loc_City;
            
            private System.Data.DataColumn _columnAddr_PostalCode;
            
            private System.Data.DataColumn columnEMail;
            
            private System.Data.DataColumn columnWebSite;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public vJobCandidateDataTable() {
                this.TableName = "vJobCandidate";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal vJobCandidateDataTable(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;
            }
            
            protected vJobCandidateDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn JobCandidateIDColumn {
                get {
                    return this.columnJobCandidateID;
                }
            }
            
            public System.Data.DataColumn EmployeeIDColumn {
                get {
                    return this.columnEmployeeID;
                }
            }
            
            public System.Data.DataColumn _Name_PrefixColumn {
                get {
                    return this._columnName_Prefix;
                }
            }
            
            public System.Data.DataColumn _Name_FirstColumn {
                get {
                    return this._columnName_First;
                }
            }
            
            public System.Data.DataColumn _Name_MiddleColumn {
                get {
                    return this._columnName_Middle;
                }
            }
            
            public System.Data.DataColumn _Name_LastColumn {
                get {
                    return this._columnName_Last;
                }
            }
            
            public System.Data.DataColumn _Name_SuffixColumn {
                get {
                    return this._columnName_Suffix;
                }
            }
            
            public System.Data.DataColumn SkillsColumn {
                get {
                    return this.columnSkills;
                }
            }
            
            public System.Data.DataColumn _Addr_TypeColumn {
                get {
                    return this._columnAddr_Type;
                }
            }
            
            public System.Data.DataColumn _Addr_Loc_CountryRegionColumn {
                get {
                    return this._columnAddr_Loc_CountryRegion;
                }
            }
            
            public System.Data.DataColumn _Addr_Loc_StateColumn {
                get {
                    return this._columnAddr_Loc_State;
                }
            }
            
            public System.Data.DataColumn _Addr_Loc_CityColumn {
                get {
                    return this._columnAddr_Loc_City;
                }
            }
            
            public System.Data.DataColumn _Addr_PostalCodeColumn {
                get {
                    return this._columnAddr_PostalCode;
                }
            }
            
            public System.Data.DataColumn EMailColumn {
                get {
                    return this.columnEMail;
                }
            }
            
            public System.Data.DataColumn WebSiteColumn {
                get {
                    return this.columnWebSite;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public vJobCandidateRow this[int index] {
                get {
                    return ((vJobCandidateRow)(this.Rows[index]));
                }
            }
            
            public event vJobCandidateRowChangeEventHandler vJobCandidateRowChanged;
            
            public event vJobCandidateRowChangeEventHandler vJobCandidateRowChanging;
            
            public event vJobCandidateRowChangeEventHandler vJobCandidateRowDeleted;
            
            public event vJobCandidateRowChangeEventHandler vJobCandidateRowDeleting;
            
            public void AddvJobCandidateRow(vJobCandidateRow row) {
                this.Rows.Add(row);
            }
            
            public vJobCandidateRow AddvJobCandidateRow(int EmployeeID, string _Name_Prefix, string _Name_First, string _Name_Middle, string _Name_Last, string _Name_Suffix, string Skills, string _Addr_Type, string _Addr_Loc_CountryRegion, string _Addr_Loc_State, string _Addr_Loc_City, string _Addr_PostalCode, string EMail, string WebSite, System.DateTime ModifiedDate) {
                vJobCandidateRow rowvJobCandidateRow = ((vJobCandidateRow)(this.NewRow()));
                rowvJobCandidateRow.ItemArray = new object[] {
                        null,
                        EmployeeID,
                        _Name_Prefix,
                        _Name_First,
                        _Name_Middle,
                        _Name_Last,
                        _Name_Suffix,
                        Skills,
                        _Addr_Type,
                        _Addr_Loc_CountryRegion,
                        _Addr_Loc_State,
                        _Addr_Loc_City,
                        _Addr_PostalCode,
                        EMail,
                        WebSite,
                        ModifiedDate};
                this.Rows.Add(rowvJobCandidateRow);
                return rowvJobCandidateRow;
            }
            
            public vJobCandidateRow FindByJobCandidateID(int JobCandidateID) {
                return ((vJobCandidateRow)(this.Rows.Find(new object[] {
                            JobCandidateID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                vJobCandidateDataTable cln = ((vJobCandidateDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new vJobCandidateDataTable();
            }
            
            internal void InitVars() {
                this.columnJobCandidateID = base.Columns["JobCandidateID"];
                this.columnEmployeeID = base.Columns["EmployeeID"];
                this._columnName_Prefix = base.Columns["Name.Prefix"];
                this._columnName_First = base.Columns["Name.First"];
                this._columnName_Middle = base.Columns["Name.Middle"];
                this._columnName_Last = base.Columns["Name.Last"];
                this._columnName_Suffix = base.Columns["Name.Suffix"];
                this.columnSkills = base.Columns["Skills"];
                this._columnAddr_Type = base.Columns["Addr.Type"];
                this._columnAddr_Loc_CountryRegion = base.Columns["Addr.Loc.CountryRegion"];
                this._columnAddr_Loc_State = base.Columns["Addr.Loc.State"];
                this._columnAddr_Loc_City = base.Columns["Addr.Loc.City"];
                this._columnAddr_PostalCode = base.Columns["Addr.PostalCode"];
                this.columnEMail = base.Columns["EMail"];
                this.columnWebSite = base.Columns["WebSite"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnJobCandidateID = new System.Data.DataColumn("JobCandidateID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnJobCandidateID);
                this.columnEmployeeID = new System.Data.DataColumn("EmployeeID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmployeeID);
                this._columnName_Prefix = new System.Data.DataColumn("Name.Prefix", typeof(string), null, System.Data.MappingType.Element);
                this._columnName_Prefix.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Name_Prefix");
                this._columnName_Prefix.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Name_PrefixColumn");
                this._columnName_Prefix.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnName_Prefix");
                this._columnName_Prefix.ExtendedProperties.Add("Generator_UserColumnName", "Name.Prefix");
                base.Columns.Add(this._columnName_Prefix);
                this._columnName_First = new System.Data.DataColumn("Name.First", typeof(string), null, System.Data.MappingType.Element);
                this._columnName_First.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Name_First");
                this._columnName_First.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Name_FirstColumn");
                this._columnName_First.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnName_First");
                this._columnName_First.ExtendedProperties.Add("Generator_UserColumnName", "Name.First");
                base.Columns.Add(this._columnName_First);
                this._columnName_Middle = new System.Data.DataColumn("Name.Middle", typeof(string), null, System.Data.MappingType.Element);
                this._columnName_Middle.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Name_Middle");
                this._columnName_Middle.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Name_MiddleColumn");
                this._columnName_Middle.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnName_Middle");
                this._columnName_Middle.ExtendedProperties.Add("Generator_UserColumnName", "Name.Middle");
                base.Columns.Add(this._columnName_Middle);
                this._columnName_Last = new System.Data.DataColumn("Name.Last", typeof(string), null, System.Data.MappingType.Element);
                this._columnName_Last.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Name_Last");
                this._columnName_Last.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Name_LastColumn");
                this._columnName_Last.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnName_Last");
                this._columnName_Last.ExtendedProperties.Add("Generator_UserColumnName", "Name.Last");
                base.Columns.Add(this._columnName_Last);
                this._columnName_Suffix = new System.Data.DataColumn("Name.Suffix", typeof(string), null, System.Data.MappingType.Element);
                this._columnName_Suffix.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Name_Suffix");
                this._columnName_Suffix.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Name_SuffixColumn");
                this._columnName_Suffix.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnName_Suffix");
                this._columnName_Suffix.ExtendedProperties.Add("Generator_UserColumnName", "Name.Suffix");
                base.Columns.Add(this._columnName_Suffix);
                this.columnSkills = new System.Data.DataColumn("Skills", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSkills);
                this._columnAddr_Type = new System.Data.DataColumn("Addr.Type", typeof(string), null, System.Data.MappingType.Element);
                this._columnAddr_Type.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Addr_Type");
                this._columnAddr_Type.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Addr_TypeColumn");
                this._columnAddr_Type.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnAddr_Type");
                this._columnAddr_Type.ExtendedProperties.Add("Generator_UserColumnName", "Addr.Type");
                base.Columns.Add(this._columnAddr_Type);
                this._columnAddr_Loc_CountryRegion = new System.Data.DataColumn("Addr.Loc.CountryRegion", typeof(string), null, System.Data.MappingType.Element);
                this._columnAddr_Loc_CountryRegion.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Addr_Loc_CountryRegion");
                this._columnAddr_Loc_CountryRegion.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Addr_Loc_CountryRegionColumn");
                this._columnAddr_Loc_CountryRegion.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnAddr_Loc_CountryRegion");
                this._columnAddr_Loc_CountryRegion.ExtendedProperties.Add("Generator_UserColumnName", "Addr.Loc.CountryRegion");
                base.Columns.Add(this._columnAddr_Loc_CountryRegion);
                this._columnAddr_Loc_State = new System.Data.DataColumn("Addr.Loc.State", typeof(string), null, System.Data.MappingType.Element);
                this._columnAddr_Loc_State.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Addr_Loc_State");
                this._columnAddr_Loc_State.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Addr_Loc_StateColumn");
                this._columnAddr_Loc_State.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnAddr_Loc_State");
                this._columnAddr_Loc_State.ExtendedProperties.Add("Generator_UserColumnName", "Addr.Loc.State");
                base.Columns.Add(this._columnAddr_Loc_State);
                this._columnAddr_Loc_City = new System.Data.DataColumn("Addr.Loc.City", typeof(string), null, System.Data.MappingType.Element);
                this._columnAddr_Loc_City.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Addr_Loc_City");
                this._columnAddr_Loc_City.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Addr_Loc_CityColumn");
                this._columnAddr_Loc_City.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnAddr_Loc_City");
                this._columnAddr_Loc_City.ExtendedProperties.Add("Generator_UserColumnName", "Addr.Loc.City");
                base.Columns.Add(this._columnAddr_Loc_City);
                this._columnAddr_PostalCode = new System.Data.DataColumn("Addr.PostalCode", typeof(string), null, System.Data.MappingType.Element);
                this._columnAddr_PostalCode.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Addr_PostalCode");
                this._columnAddr_PostalCode.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Addr_PostalCodeColumn");
                this._columnAddr_PostalCode.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnAddr_PostalCode");
                this._columnAddr_PostalCode.ExtendedProperties.Add("Generator_UserColumnName", "Addr.PostalCode");
                base.Columns.Add(this._columnAddr_PostalCode);
                this.columnEMail = new System.Data.DataColumn("EMail", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEMail);
                this.columnWebSite = new System.Data.DataColumn("WebSite", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnWebSite);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnJobCandidateID}, true));
                this.columnJobCandidateID.AutoIncrement = true;
                this.columnJobCandidateID.AllowDBNull = false;
                this.columnJobCandidateID.ReadOnly = true;
                this.columnJobCandidateID.Unique = true;
                this._columnName_Prefix.ReadOnly = true;
                this._columnName_Prefix.MaxLength = 30;
                this._columnName_First.ReadOnly = true;
                this._columnName_First.MaxLength = 30;
                this._columnName_Middle.ReadOnly = true;
                this._columnName_Middle.MaxLength = 30;
                this._columnName_Last.ReadOnly = true;
                this._columnName_Last.MaxLength = 30;
                this._columnName_Suffix.ReadOnly = true;
                this._columnName_Suffix.MaxLength = 30;
                this.columnSkills.ReadOnly = true;
                this.columnSkills.MaxLength = 2147483647;
                this._columnAddr_Type.ReadOnly = true;
                this._columnAddr_Type.MaxLength = 30;
                this._columnAddr_Loc_CountryRegion.ReadOnly = true;
                this._columnAddr_Loc_CountryRegion.MaxLength = 100;
                this._columnAddr_Loc_State.ReadOnly = true;
                this._columnAddr_Loc_State.MaxLength = 100;
                this._columnAddr_Loc_City.ReadOnly = true;
                this._columnAddr_Loc_City.MaxLength = 100;
                this._columnAddr_PostalCode.ReadOnly = true;
                this._columnAddr_PostalCode.MaxLength = 20;
                this.columnEMail.ReadOnly = true;
                this.columnEMail.MaxLength = 2147483647;
                this.columnWebSite.ReadOnly = true;
                this.columnWebSite.MaxLength = 2147483647;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public vJobCandidateRow NewvJobCandidateRow() {
                return ((vJobCandidateRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new vJobCandidateRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(vJobCandidateRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.vJobCandidateRowChanged != null)) {
                    this.vJobCandidateRowChanged(this, new vJobCandidateRowChangeEvent(((vJobCandidateRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.vJobCandidateRowChanging != null)) {
                    this.vJobCandidateRowChanging(this, new vJobCandidateRowChangeEvent(((vJobCandidateRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.vJobCandidateRowDeleted != null)) {
                    this.vJobCandidateRowDeleted(this, new vJobCandidateRowChangeEvent(((vJobCandidateRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.vJobCandidateRowDeleting != null)) {
                    this.vJobCandidateRowDeleting(this, new vJobCandidateRowChangeEvent(((vJobCandidateRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovevJobCandidateRow(vJobCandidateRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "vJobCandidateDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class vJobCandidateEducationDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnJobCandidateID;
            
            private System.Data.DataColumn _columnEdu_Level;
            
            private System.Data.DataColumn _columnEdu_StartDate;
            
            private System.Data.DataColumn _columnEdu_EndDate;
            
            private System.Data.DataColumn _columnEdu_Degree;
            
            private System.Data.DataColumn _columnEdu_Major;
            
            private System.Data.DataColumn _columnEdu_Minor;
            
            private System.Data.DataColumn _columnEdu_GPA;
            
            private System.Data.DataColumn _columnEdu_GPAScale;
            
            private System.Data.DataColumn _columnEdu_School;
            
            private System.Data.DataColumn _columnEdu_Loc_CountryRegion;
            
            private System.Data.DataColumn _columnEdu_Loc_State;
            
            private System.Data.DataColumn _columnEdu_Loc_City;
            
            public vJobCandidateEducationDataTable() {
                this.TableName = "vJobCandidateEducation";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal vJobCandidateEducationDataTable(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;
            }
            
            protected vJobCandidateEducationDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn JobCandidateIDColumn {
                get {
                    return this.columnJobCandidateID;
                }
            }
            
            public System.Data.DataColumn _Edu_LevelColumn {
                get {
                    return this._columnEdu_Level;
                }
            }
            
            public System.Data.DataColumn _Edu_StartDateColumn {
                get {
                    return this._columnEdu_StartDate;
                }
            }
            
            public System.Data.DataColumn _Edu_EndDateColumn {
                get {
                    return this._columnEdu_EndDate;
                }
            }
            
            public System.Data.DataColumn _Edu_DegreeColumn {
                get {
                    return this._columnEdu_Degree;
                }
            }
            
            public System.Data.DataColumn _Edu_MajorColumn {
                get {
                    return this._columnEdu_Major;
                }
            }
            
            public System.Data.DataColumn _Edu_MinorColumn {
                get {
                    return this._columnEdu_Minor;
                }
            }
            
            public System.Data.DataColumn _Edu_GPAColumn {
                get {
                    return this._columnEdu_GPA;
                }
            }
            
            public System.Data.DataColumn _Edu_GPAScaleColumn {
                get {
                    return this._columnEdu_GPAScale;
                }
            }
            
            public System.Data.DataColumn _Edu_SchoolColumn {
                get {
                    return this._columnEdu_School;
                }
            }
            
            public System.Data.DataColumn _Edu_Loc_CountryRegionColumn {
                get {
                    return this._columnEdu_Loc_CountryRegion;
                }
            }
            
            public System.Data.DataColumn _Edu_Loc_StateColumn {
                get {
                    return this._columnEdu_Loc_State;
                }
            }
            
            public System.Data.DataColumn _Edu_Loc_CityColumn {
                get {
                    return this._columnEdu_Loc_City;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public vJobCandidateEducationRow this[int index] {
                get {
                    return ((vJobCandidateEducationRow)(this.Rows[index]));
                }
            }
            
            public event vJobCandidateEducationRowChangeEventHandler vJobCandidateEducationRowChanged;
            
            public event vJobCandidateEducationRowChangeEventHandler vJobCandidateEducationRowChanging;
            
            public event vJobCandidateEducationRowChangeEventHandler vJobCandidateEducationRowDeleted;
            
            public event vJobCandidateEducationRowChangeEventHandler vJobCandidateEducationRowDeleting;
            
            public void AddvJobCandidateEducationRow(vJobCandidateEducationRow row) {
                this.Rows.Add(row);
            }
            
            public vJobCandidateEducationRow AddvJobCandidateEducationRow(string _Edu_Level, System.DateTime _Edu_StartDate, System.DateTime _Edu_EndDate, string _Edu_Degree, string _Edu_Major, string _Edu_Minor, string _Edu_GPA, string _Edu_GPAScale, string _Edu_School, string _Edu_Loc_CountryRegion, string _Edu_Loc_State, string _Edu_Loc_City) {
                vJobCandidateEducationRow rowvJobCandidateEducationRow = ((vJobCandidateEducationRow)(this.NewRow()));
                rowvJobCandidateEducationRow.ItemArray = new object[] {
                        null,
                        _Edu_Level,
                        _Edu_StartDate,
                        _Edu_EndDate,
                        _Edu_Degree,
                        _Edu_Major,
                        _Edu_Minor,
                        _Edu_GPA,
                        _Edu_GPAScale,
                        _Edu_School,
                        _Edu_Loc_CountryRegion,
                        _Edu_Loc_State,
                        _Edu_Loc_City};
                this.Rows.Add(rowvJobCandidateEducationRow);
                return rowvJobCandidateEducationRow;
            }
            
            public vJobCandidateEducationRow FindByJobCandidateID(int JobCandidateID) {
                return ((vJobCandidateEducationRow)(this.Rows.Find(new object[] {
                            JobCandidateID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                vJobCandidateEducationDataTable cln = ((vJobCandidateEducationDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new vJobCandidateEducationDataTable();
            }
            
            internal void InitVars() {
                this.columnJobCandidateID = base.Columns["JobCandidateID"];
                this._columnEdu_Level = base.Columns["Edu.Level"];
                this._columnEdu_StartDate = base.Columns["Edu.StartDate"];
                this._columnEdu_EndDate = base.Columns["Edu.EndDate"];
                this._columnEdu_Degree = base.Columns["Edu.Degree"];
                this._columnEdu_Major = base.Columns["Edu.Major"];
                this._columnEdu_Minor = base.Columns["Edu.Minor"];
                this._columnEdu_GPA = base.Columns["Edu.GPA"];
                this._columnEdu_GPAScale = base.Columns["Edu.GPAScale"];
                this._columnEdu_School = base.Columns["Edu.School"];
                this._columnEdu_Loc_CountryRegion = base.Columns["Edu.Loc.CountryRegion"];
                this._columnEdu_Loc_State = base.Columns["Edu.Loc.State"];
                this._columnEdu_Loc_City = base.Columns["Edu.Loc.City"];
            }
            
            private void InitClass() {
                this.columnJobCandidateID = new System.Data.DataColumn("JobCandidateID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnJobCandidateID);
                this._columnEdu_Level = new System.Data.DataColumn("Edu.Level", typeof(string), null, System.Data.MappingType.Element);
                this._columnEdu_Level.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Edu_Level");
                this._columnEdu_Level.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Edu_LevelColumn");
                this._columnEdu_Level.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnEdu_Level");
                this._columnEdu_Level.ExtendedProperties.Add("Generator_UserColumnName", "Edu.Level");
                base.Columns.Add(this._columnEdu_Level);
                this._columnEdu_StartDate = new System.Data.DataColumn("Edu.StartDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                this._columnEdu_StartDate.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Edu_StartDate");
                this._columnEdu_StartDate.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Edu_StartDateColumn");
                this._columnEdu_StartDate.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnEdu_StartDate");
                this._columnEdu_StartDate.ExtendedProperties.Add("Generator_UserColumnName", "Edu.StartDate");
                base.Columns.Add(this._columnEdu_StartDate);
                this._columnEdu_EndDate = new System.Data.DataColumn("Edu.EndDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                this._columnEdu_EndDate.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Edu_EndDate");
                this._columnEdu_EndDate.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Edu_EndDateColumn");
                this._columnEdu_EndDate.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnEdu_EndDate");
                this._columnEdu_EndDate.ExtendedProperties.Add("Generator_UserColumnName", "Edu.EndDate");
                base.Columns.Add(this._columnEdu_EndDate);
                this._columnEdu_Degree = new System.Data.DataColumn("Edu.Degree", typeof(string), null, System.Data.MappingType.Element);
                this._columnEdu_Degree.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Edu_Degree");
                this._columnEdu_Degree.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Edu_DegreeColumn");
                this._columnEdu_Degree.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnEdu_Degree");
                this._columnEdu_Degree.ExtendedProperties.Add("Generator_UserColumnName", "Edu.Degree");
                base.Columns.Add(this._columnEdu_Degree);
                this._columnEdu_Major = new System.Data.DataColumn("Edu.Major", typeof(string), null, System.Data.MappingType.Element);
                this._columnEdu_Major.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Edu_Major");
                this._columnEdu_Major.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Edu_MajorColumn");
                this._columnEdu_Major.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnEdu_Major");
                this._columnEdu_Major.ExtendedProperties.Add("Generator_UserColumnName", "Edu.Major");
                base.Columns.Add(this._columnEdu_Major);
                this._columnEdu_Minor = new System.Data.DataColumn("Edu.Minor", typeof(string), null, System.Data.MappingType.Element);
                this._columnEdu_Minor.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Edu_Minor");
                this._columnEdu_Minor.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Edu_MinorColumn");
                this._columnEdu_Minor.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnEdu_Minor");
                this._columnEdu_Minor.ExtendedProperties.Add("Generator_UserColumnName", "Edu.Minor");
                base.Columns.Add(this._columnEdu_Minor);
                this._columnEdu_GPA = new System.Data.DataColumn("Edu.GPA", typeof(string), null, System.Data.MappingType.Element);
                this._columnEdu_GPA.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Edu_GPA");
                this._columnEdu_GPA.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Edu_GPAColumn");
                this._columnEdu_GPA.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnEdu_GPA");
                this._columnEdu_GPA.ExtendedProperties.Add("Generator_UserColumnName", "Edu.GPA");
                base.Columns.Add(this._columnEdu_GPA);
                this._columnEdu_GPAScale = new System.Data.DataColumn("Edu.GPAScale", typeof(string), null, System.Data.MappingType.Element);
                this._columnEdu_GPAScale.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Edu_GPAScale");
                this._columnEdu_GPAScale.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Edu_GPAScaleColumn");
                this._columnEdu_GPAScale.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnEdu_GPAScale");
                this._columnEdu_GPAScale.ExtendedProperties.Add("Generator_UserColumnName", "Edu.GPAScale");
                base.Columns.Add(this._columnEdu_GPAScale);
                this._columnEdu_School = new System.Data.DataColumn("Edu.School", typeof(string), null, System.Data.MappingType.Element);
                this._columnEdu_School.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Edu_School");
                this._columnEdu_School.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Edu_SchoolColumn");
                this._columnEdu_School.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnEdu_School");
                this._columnEdu_School.ExtendedProperties.Add("Generator_UserColumnName", "Edu.School");
                base.Columns.Add(this._columnEdu_School);
                this._columnEdu_Loc_CountryRegion = new System.Data.DataColumn("Edu.Loc.CountryRegion", typeof(string), null, System.Data.MappingType.Element);
                this._columnEdu_Loc_CountryRegion.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Edu_Loc_CountryRegion");
                this._columnEdu_Loc_CountryRegion.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Edu_Loc_CountryRegionColumn");
                this._columnEdu_Loc_CountryRegion.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnEdu_Loc_CountryRegion");
                this._columnEdu_Loc_CountryRegion.ExtendedProperties.Add("Generator_UserColumnName", "Edu.Loc.CountryRegion");
                base.Columns.Add(this._columnEdu_Loc_CountryRegion);
                this._columnEdu_Loc_State = new System.Data.DataColumn("Edu.Loc.State", typeof(string), null, System.Data.MappingType.Element);
                this._columnEdu_Loc_State.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Edu_Loc_State");
                this._columnEdu_Loc_State.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Edu_Loc_StateColumn");
                this._columnEdu_Loc_State.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnEdu_Loc_State");
                this._columnEdu_Loc_State.ExtendedProperties.Add("Generator_UserColumnName", "Edu.Loc.State");
                base.Columns.Add(this._columnEdu_Loc_State);
                this._columnEdu_Loc_City = new System.Data.DataColumn("Edu.Loc.City", typeof(string), null, System.Data.MappingType.Element);
                this._columnEdu_Loc_City.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Edu_Loc_City");
                this._columnEdu_Loc_City.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Edu_Loc_CityColumn");
                this._columnEdu_Loc_City.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnEdu_Loc_City");
                this._columnEdu_Loc_City.ExtendedProperties.Add("Generator_UserColumnName", "Edu.Loc.City");
                base.Columns.Add(this._columnEdu_Loc_City);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnJobCandidateID}, true));
                this.columnJobCandidateID.AutoIncrement = true;
                this.columnJobCandidateID.AllowDBNull = false;
                this.columnJobCandidateID.ReadOnly = true;
                this.columnJobCandidateID.Unique = true;
                this._columnEdu_Level.ReadOnly = true;
                this._columnEdu_Level.MaxLength = 2147483647;
                this._columnEdu_StartDate.ReadOnly = true;
                this._columnEdu_EndDate.ReadOnly = true;
                this._columnEdu_Degree.ReadOnly = true;
                this._columnEdu_Degree.MaxLength = 50;
                this._columnEdu_Major.ReadOnly = true;
                this._columnEdu_Major.MaxLength = 50;
                this._columnEdu_Minor.ReadOnly = true;
                this._columnEdu_Minor.MaxLength = 50;
                this._columnEdu_GPA.ReadOnly = true;
                this._columnEdu_GPA.MaxLength = 5;
                this._columnEdu_GPAScale.ReadOnly = true;
                this._columnEdu_GPAScale.MaxLength = 5;
                this._columnEdu_School.ReadOnly = true;
                this._columnEdu_School.MaxLength = 100;
                this._columnEdu_Loc_CountryRegion.ReadOnly = true;
                this._columnEdu_Loc_CountryRegion.MaxLength = 100;
                this._columnEdu_Loc_State.ReadOnly = true;
                this._columnEdu_Loc_State.MaxLength = 100;
                this._columnEdu_Loc_City.ReadOnly = true;
                this._columnEdu_Loc_City.MaxLength = 100;
            }
            
            public vJobCandidateEducationRow NewvJobCandidateEducationRow() {
                return ((vJobCandidateEducationRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new vJobCandidateEducationRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(vJobCandidateEducationRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.vJobCandidateEducationRowChanged != null)) {
                    this.vJobCandidateEducationRowChanged(this, new vJobCandidateEducationRowChangeEvent(((vJobCandidateEducationRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.vJobCandidateEducationRowChanging != null)) {
                    this.vJobCandidateEducationRowChanging(this, new vJobCandidateEducationRowChangeEvent(((vJobCandidateEducationRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.vJobCandidateEducationRowDeleted != null)) {
                    this.vJobCandidateEducationRowDeleted(this, new vJobCandidateEducationRowChangeEvent(((vJobCandidateEducationRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.vJobCandidateEducationRowDeleting != null)) {
                    this.vJobCandidateEducationRowDeleting(this, new vJobCandidateEducationRowChangeEvent(((vJobCandidateEducationRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovevJobCandidateEducationRow(vJobCandidateEducationRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "vJobCandidateEducationDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class vJobCandidateEmploymentDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnJobCandidateID;
            
            private System.Data.DataColumn _columnEmp_StartDate;
            
            private System.Data.DataColumn _columnEmp_EndDate;
            
            private System.Data.DataColumn _columnEmp_OrgName;
            
            private System.Data.DataColumn _columnEmp_JobTitle;
            
            private System.Data.DataColumn _columnEmp_Responsibility;
            
            private System.Data.DataColumn _columnEmp_FunctionCategory;
            
            private System.Data.DataColumn _columnEmp_IndustryCategory;
            
            private System.Data.DataColumn _columnEmp_Loc_CountryRegion;
            
            private System.Data.DataColumn _columnEmp_Loc_State;
            
            private System.Data.DataColumn _columnEmp_Loc_City;
            
            public vJobCandidateEmploymentDataTable() {
                this.TableName = "vJobCandidateEmployment";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal vJobCandidateEmploymentDataTable(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;
            }
            
            protected vJobCandidateEmploymentDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn JobCandidateIDColumn {
                get {
                    return this.columnJobCandidateID;
                }
            }
            
            public System.Data.DataColumn _Emp_StartDateColumn {
                get {
                    return this._columnEmp_StartDate;
                }
            }
            
            public System.Data.DataColumn _Emp_EndDateColumn {
                get {
                    return this._columnEmp_EndDate;
                }
            }
            
            public System.Data.DataColumn _Emp_OrgNameColumn {
                get {
                    return this._columnEmp_OrgName;
                }
            }
            
            public System.Data.DataColumn _Emp_JobTitleColumn {
                get {
                    return this._columnEmp_JobTitle;
                }
            }
            
            public System.Data.DataColumn _Emp_ResponsibilityColumn {
                get {
                    return this._columnEmp_Responsibility;
                }
            }
            
            public System.Data.DataColumn _Emp_FunctionCategoryColumn {
                get {
                    return this._columnEmp_FunctionCategory;
                }
            }
            
            public System.Data.DataColumn _Emp_IndustryCategoryColumn {
                get {
                    return this._columnEmp_IndustryCategory;
                }
            }
            
            public System.Data.DataColumn _Emp_Loc_CountryRegionColumn {
                get {
                    return this._columnEmp_Loc_CountryRegion;
                }
            }
            
            public System.Data.DataColumn _Emp_Loc_StateColumn {
                get {
                    return this._columnEmp_Loc_State;
                }
            }
            
            public System.Data.DataColumn _Emp_Loc_CityColumn {
                get {
                    return this._columnEmp_Loc_City;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public vJobCandidateEmploymentRow this[int index] {
                get {
                    return ((vJobCandidateEmploymentRow)(this.Rows[index]));
                }
            }
            
            public event vJobCandidateEmploymentRowChangeEventHandler vJobCandidateEmploymentRowChanged;
            
            public event vJobCandidateEmploymentRowChangeEventHandler vJobCandidateEmploymentRowChanging;
            
            public event vJobCandidateEmploymentRowChangeEventHandler vJobCandidateEmploymentRowDeleted;
            
            public event vJobCandidateEmploymentRowChangeEventHandler vJobCandidateEmploymentRowDeleting;
            
            public void AddvJobCandidateEmploymentRow(vJobCandidateEmploymentRow row) {
                this.Rows.Add(row);
            }
            
            public vJobCandidateEmploymentRow AddvJobCandidateEmploymentRow(System.DateTime _Emp_StartDate, System.DateTime _Emp_EndDate, string _Emp_OrgName, string _Emp_JobTitle, string _Emp_Responsibility, string _Emp_FunctionCategory, string _Emp_IndustryCategory, string _Emp_Loc_CountryRegion, string _Emp_Loc_State, string _Emp_Loc_City) {
                vJobCandidateEmploymentRow rowvJobCandidateEmploymentRow = ((vJobCandidateEmploymentRow)(this.NewRow()));
                rowvJobCandidateEmploymentRow.ItemArray = new object[] {
                        null,
                        _Emp_StartDate,
                        _Emp_EndDate,
                        _Emp_OrgName,
                        _Emp_JobTitle,
                        _Emp_Responsibility,
                        _Emp_FunctionCategory,
                        _Emp_IndustryCategory,
                        _Emp_Loc_CountryRegion,
                        _Emp_Loc_State,
                        _Emp_Loc_City};
                this.Rows.Add(rowvJobCandidateEmploymentRow);
                return rowvJobCandidateEmploymentRow;
            }
            
            public vJobCandidateEmploymentRow FindByJobCandidateID(int JobCandidateID) {
                return ((vJobCandidateEmploymentRow)(this.Rows.Find(new object[] {
                            JobCandidateID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                vJobCandidateEmploymentDataTable cln = ((vJobCandidateEmploymentDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new vJobCandidateEmploymentDataTable();
            }
            
            internal void InitVars() {
                this.columnJobCandidateID = base.Columns["JobCandidateID"];
                this._columnEmp_StartDate = base.Columns["Emp.StartDate"];
                this._columnEmp_EndDate = base.Columns["Emp.EndDate"];
                this._columnEmp_OrgName = base.Columns["Emp.OrgName"];
                this._columnEmp_JobTitle = base.Columns["Emp.JobTitle"];
                this._columnEmp_Responsibility = base.Columns["Emp.Responsibility"];
                this._columnEmp_FunctionCategory = base.Columns["Emp.FunctionCategory"];
                this._columnEmp_IndustryCategory = base.Columns["Emp.IndustryCategory"];
                this._columnEmp_Loc_CountryRegion = base.Columns["Emp.Loc.CountryRegion"];
                this._columnEmp_Loc_State = base.Columns["Emp.Loc.State"];
                this._columnEmp_Loc_City = base.Columns["Emp.Loc.City"];
            }
            
            private void InitClass() {
                this.columnJobCandidateID = new System.Data.DataColumn("JobCandidateID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnJobCandidateID);
                this._columnEmp_StartDate = new System.Data.DataColumn("Emp.StartDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                this._columnEmp_StartDate.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Emp_StartDate");
                this._columnEmp_StartDate.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Emp_StartDateColumn");
                this._columnEmp_StartDate.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnEmp_StartDate");
                this._columnEmp_StartDate.ExtendedProperties.Add("Generator_UserColumnName", "Emp.StartDate");
                base.Columns.Add(this._columnEmp_StartDate);
                this._columnEmp_EndDate = new System.Data.DataColumn("Emp.EndDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                this._columnEmp_EndDate.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Emp_EndDate");
                this._columnEmp_EndDate.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Emp_EndDateColumn");
                this._columnEmp_EndDate.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnEmp_EndDate");
                this._columnEmp_EndDate.ExtendedProperties.Add("Generator_UserColumnName", "Emp.EndDate");
                base.Columns.Add(this._columnEmp_EndDate);
                this._columnEmp_OrgName = new System.Data.DataColumn("Emp.OrgName", typeof(string), null, System.Data.MappingType.Element);
                this._columnEmp_OrgName.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Emp_OrgName");
                this._columnEmp_OrgName.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Emp_OrgNameColumn");
                this._columnEmp_OrgName.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnEmp_OrgName");
                this._columnEmp_OrgName.ExtendedProperties.Add("Generator_UserColumnName", "Emp.OrgName");
                base.Columns.Add(this._columnEmp_OrgName);
                this._columnEmp_JobTitle = new System.Data.DataColumn("Emp.JobTitle", typeof(string), null, System.Data.MappingType.Element);
                this._columnEmp_JobTitle.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Emp_JobTitle");
                this._columnEmp_JobTitle.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Emp_JobTitleColumn");
                this._columnEmp_JobTitle.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnEmp_JobTitle");
                this._columnEmp_JobTitle.ExtendedProperties.Add("Generator_UserColumnName", "Emp.JobTitle");
                base.Columns.Add(this._columnEmp_JobTitle);
                this._columnEmp_Responsibility = new System.Data.DataColumn("Emp.Responsibility", typeof(string), null, System.Data.MappingType.Element);
                this._columnEmp_Responsibility.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Emp_Responsibility");
                this._columnEmp_Responsibility.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Emp_ResponsibilityColumn");
                this._columnEmp_Responsibility.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnEmp_Responsibility");
                this._columnEmp_Responsibility.ExtendedProperties.Add("Generator_UserColumnName", "Emp.Responsibility");
                base.Columns.Add(this._columnEmp_Responsibility);
                this._columnEmp_FunctionCategory = new System.Data.DataColumn("Emp.FunctionCategory", typeof(string), null, System.Data.MappingType.Element);
                this._columnEmp_FunctionCategory.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Emp_FunctionCategory");
                this._columnEmp_FunctionCategory.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Emp_FunctionCategoryColumn");
                this._columnEmp_FunctionCategory.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnEmp_FunctionCategory");
                this._columnEmp_FunctionCategory.ExtendedProperties.Add("Generator_UserColumnName", "Emp.FunctionCategory");
                base.Columns.Add(this._columnEmp_FunctionCategory);
                this._columnEmp_IndustryCategory = new System.Data.DataColumn("Emp.IndustryCategory", typeof(string), null, System.Data.MappingType.Element);
                this._columnEmp_IndustryCategory.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Emp_IndustryCategory");
                this._columnEmp_IndustryCategory.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Emp_IndustryCategoryColumn");
                this._columnEmp_IndustryCategory.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnEmp_IndustryCategory");
                this._columnEmp_IndustryCategory.ExtendedProperties.Add("Generator_UserColumnName", "Emp.IndustryCategory");
                base.Columns.Add(this._columnEmp_IndustryCategory);
                this._columnEmp_Loc_CountryRegion = new System.Data.DataColumn("Emp.Loc.CountryRegion", typeof(string), null, System.Data.MappingType.Element);
                this._columnEmp_Loc_CountryRegion.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Emp_Loc_CountryRegion");
                this._columnEmp_Loc_CountryRegion.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Emp_Loc_CountryRegionColumn");
                this._columnEmp_Loc_CountryRegion.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnEmp_Loc_CountryRegion");
                this._columnEmp_Loc_CountryRegion.ExtendedProperties.Add("Generator_UserColumnName", "Emp.Loc.CountryRegion");
                base.Columns.Add(this._columnEmp_Loc_CountryRegion);
                this._columnEmp_Loc_State = new System.Data.DataColumn("Emp.Loc.State", typeof(string), null, System.Data.MappingType.Element);
                this._columnEmp_Loc_State.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Emp_Loc_State");
                this._columnEmp_Loc_State.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Emp_Loc_StateColumn");
                this._columnEmp_Loc_State.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnEmp_Loc_State");
                this._columnEmp_Loc_State.ExtendedProperties.Add("Generator_UserColumnName", "Emp.Loc.State");
                base.Columns.Add(this._columnEmp_Loc_State);
                this._columnEmp_Loc_City = new System.Data.DataColumn("Emp.Loc.City", typeof(string), null, System.Data.MappingType.Element);
                this._columnEmp_Loc_City.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_Emp_Loc_City");
                this._columnEmp_Loc_City.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_Emp_Loc_CityColumn");
                this._columnEmp_Loc_City.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "_columnEmp_Loc_City");
                this._columnEmp_Loc_City.ExtendedProperties.Add("Generator_UserColumnName", "Emp.Loc.City");
                base.Columns.Add(this._columnEmp_Loc_City);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnJobCandidateID}, true));
                this.columnJobCandidateID.AutoIncrement = true;
                this.columnJobCandidateID.AllowDBNull = false;
                this.columnJobCandidateID.ReadOnly = true;
                this.columnJobCandidateID.Unique = true;
                this._columnEmp_StartDate.ReadOnly = true;
                this._columnEmp_EndDate.ReadOnly = true;
                this._columnEmp_OrgName.ReadOnly = true;
                this._columnEmp_OrgName.MaxLength = 100;
                this._columnEmp_JobTitle.ReadOnly = true;
                this._columnEmp_JobTitle.MaxLength = 100;
                this._columnEmp_Responsibility.ReadOnly = true;
                this._columnEmp_Responsibility.MaxLength = 2147483647;
                this._columnEmp_FunctionCategory.ReadOnly = true;
                this._columnEmp_FunctionCategory.MaxLength = 2147483647;
                this._columnEmp_IndustryCategory.ReadOnly = true;
                this._columnEmp_IndustryCategory.MaxLength = 2147483647;
                this._columnEmp_Loc_CountryRegion.ReadOnly = true;
                this._columnEmp_Loc_CountryRegion.MaxLength = 2147483647;
                this._columnEmp_Loc_State.ReadOnly = true;
                this._columnEmp_Loc_State.MaxLength = 2147483647;
                this._columnEmp_Loc_City.ReadOnly = true;
                this._columnEmp_Loc_City.MaxLength = 2147483647;
            }
            
            public vJobCandidateEmploymentRow NewvJobCandidateEmploymentRow() {
                return ((vJobCandidateEmploymentRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new vJobCandidateEmploymentRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(vJobCandidateEmploymentRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.vJobCandidateEmploymentRowChanged != null)) {
                    this.vJobCandidateEmploymentRowChanged(this, new vJobCandidateEmploymentRowChangeEvent(((vJobCandidateEmploymentRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.vJobCandidateEmploymentRowChanging != null)) {
                    this.vJobCandidateEmploymentRowChanging(this, new vJobCandidateEmploymentRowChangeEvent(((vJobCandidateEmploymentRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.vJobCandidateEmploymentRowDeleted != null)) {
                    this.vJobCandidateEmploymentRowDeleted(this, new vJobCandidateEmploymentRowChangeEvent(((vJobCandidateEmploymentRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.vJobCandidateEmploymentRowDeleting != null)) {
                    this.vJobCandidateEmploymentRowDeleting(this, new vJobCandidateEmploymentRowChangeEvent(((vJobCandidateEmploymentRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovevJobCandidateEmploymentRow(vJobCandidateEmploymentRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "vJobCandidateEmploymentDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class vAdditionalContactInfoDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnContactID;
            
            private System.Data.DataColumn columnFirstName;
            
            private System.Data.DataColumn columnMiddleName;
            
            private System.Data.DataColumn columnLastName;
            
            private System.Data.DataColumn columnTelephoneNumber;
            
            private System.Data.DataColumn columnTelephoneSpecialInstructions;
            
            private System.Data.DataColumn columnStreet;
            
            private System.Data.DataColumn columnCity;
            
            private System.Data.DataColumn columnStateProvince;
            
            private System.Data.DataColumn columnPostalCode;
            
            private System.Data.DataColumn columnCountryRegion;
            
            private System.Data.DataColumn columnHomeAddressSpecialInstructions;
            
            private System.Data.DataColumn columnEMailAddress;
            
            private System.Data.DataColumn columnEMailSpecialInstructions;
            
            private System.Data.DataColumn columnEMailTelephoneNumber;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public vAdditionalContactInfoDataTable() {
                this.TableName = "vAdditionalContactInfo";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal vAdditionalContactInfoDataTable(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;
            }
            
            protected vAdditionalContactInfoDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ContactIDColumn {
                get {
                    return this.columnContactID;
                }
            }
            
            public System.Data.DataColumn FirstNameColumn {
                get {
                    return this.columnFirstName;
                }
            }
            
            public System.Data.DataColumn MiddleNameColumn {
                get {
                    return this.columnMiddleName;
                }
            }
            
            public System.Data.DataColumn LastNameColumn {
                get {
                    return this.columnLastName;
                }
            }
            
            public System.Data.DataColumn TelephoneNumberColumn {
                get {
                    return this.columnTelephoneNumber;
                }
            }
            
            public System.Data.DataColumn TelephoneSpecialInstructionsColumn {
                get {
                    return this.columnTelephoneSpecialInstructions;
                }
            }
            
            public System.Data.DataColumn StreetColumn {
                get {
                    return this.columnStreet;
                }
            }
            
            public System.Data.DataColumn CityColumn {
                get {
                    return this.columnCity;
                }
            }
            
            public System.Data.DataColumn StateProvinceColumn {
                get {
                    return this.columnStateProvince;
                }
            }
            
            public System.Data.DataColumn PostalCodeColumn {
                get {
                    return this.columnPostalCode;
                }
            }
            
            public System.Data.DataColumn CountryRegionColumn {
                get {
                    return this.columnCountryRegion;
                }
            }
            
            public System.Data.DataColumn HomeAddressSpecialInstructionsColumn {
                get {
                    return this.columnHomeAddressSpecialInstructions;
                }
            }
            
            public System.Data.DataColumn EMailAddressColumn {
                get {
                    return this.columnEMailAddress;
                }
            }
            
            public System.Data.DataColumn EMailSpecialInstructionsColumn {
                get {
                    return this.columnEMailSpecialInstructions;
                }
            }
            
            public System.Data.DataColumn EMailTelephoneNumberColumn {
                get {
                    return this.columnEMailTelephoneNumber;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public vAdditionalContactInfoRow this[int index] {
                get {
                    return ((vAdditionalContactInfoRow)(this.Rows[index]));
                }
            }
            
            public event vAdditionalContactInfoRowChangeEventHandler vAdditionalContactInfoRowChanged;
            
            public event vAdditionalContactInfoRowChangeEventHandler vAdditionalContactInfoRowChanging;
            
            public event vAdditionalContactInfoRowChangeEventHandler vAdditionalContactInfoRowDeleted;
            
            public event vAdditionalContactInfoRowChangeEventHandler vAdditionalContactInfoRowDeleting;
            
            public void AddvAdditionalContactInfoRow(vAdditionalContactInfoRow row) {
                this.Rows.Add(row);
            }
            
            public vAdditionalContactInfoRow AddvAdditionalContactInfoRow(
                        string FirstName, 
                        string MiddleName, 
                        string LastName, 
                        string TelephoneNumber, 
                        string TelephoneSpecialInstructions, 
                        string Street, 
                        string City, 
                        string StateProvince, 
                        string PostalCode, 
                        string CountryRegion, 
                        string HomeAddressSpecialInstructions, 
                        string EMailAddress, 
                        string EMailSpecialInstructions, 
                        string EMailTelephoneNumber, 
                        System.Guid rowguid, 
                        System.DateTime ModifiedDate) {
                vAdditionalContactInfoRow rowvAdditionalContactInfoRow = ((vAdditionalContactInfoRow)(this.NewRow()));
                rowvAdditionalContactInfoRow.ItemArray = new object[] {
                        null,
                        FirstName,
                        MiddleName,
                        LastName,
                        TelephoneNumber,
                        TelephoneSpecialInstructions,
                        Street,
                        City,
                        StateProvince,
                        PostalCode,
                        CountryRegion,
                        HomeAddressSpecialInstructions,
                        EMailAddress,
                        EMailSpecialInstructions,
                        EMailTelephoneNumber,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowvAdditionalContactInfoRow);
                return rowvAdditionalContactInfoRow;
            }
            
            public vAdditionalContactInfoRow FindByContactID(int ContactID) {
                return ((vAdditionalContactInfoRow)(this.Rows.Find(new object[] {
                            ContactID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                vAdditionalContactInfoDataTable cln = ((vAdditionalContactInfoDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new vAdditionalContactInfoDataTable();
            }
            
            internal void InitVars() {
                this.columnContactID = base.Columns["ContactID"];
                this.columnFirstName = base.Columns["FirstName"];
                this.columnMiddleName = base.Columns["MiddleName"];
                this.columnLastName = base.Columns["LastName"];
                this.columnTelephoneNumber = base.Columns["TelephoneNumber"];
                this.columnTelephoneSpecialInstructions = base.Columns["TelephoneSpecialInstructions"];
                this.columnStreet = base.Columns["Street"];
                this.columnCity = base.Columns["City"];
                this.columnStateProvince = base.Columns["StateProvince"];
                this.columnPostalCode = base.Columns["PostalCode"];
                this.columnCountryRegion = base.Columns["CountryRegion"];
                this.columnHomeAddressSpecialInstructions = base.Columns["HomeAddressSpecialInstructions"];
                this.columnEMailAddress = base.Columns["EMailAddress"];
                this.columnEMailSpecialInstructions = base.Columns["EMailSpecialInstructions"];
                this.columnEMailTelephoneNumber = base.Columns["EMailTelephoneNumber"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnContactID = new System.Data.DataColumn("ContactID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnContactID);
                this.columnFirstName = new System.Data.DataColumn("FirstName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnFirstName);
                this.columnMiddleName = new System.Data.DataColumn("MiddleName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnMiddleName);
                this.columnLastName = new System.Data.DataColumn("LastName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLastName);
                this.columnTelephoneNumber = new System.Data.DataColumn("TelephoneNumber", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTelephoneNumber);
                this.columnTelephoneSpecialInstructions = new System.Data.DataColumn("TelephoneSpecialInstructions", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTelephoneSpecialInstructions);
                this.columnStreet = new System.Data.DataColumn("Street", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStreet);
                this.columnCity = new System.Data.DataColumn("City", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCity);
                this.columnStateProvince = new System.Data.DataColumn("StateProvince", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStateProvince);
                this.columnPostalCode = new System.Data.DataColumn("PostalCode", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPostalCode);
                this.columnCountryRegion = new System.Data.DataColumn("CountryRegion", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCountryRegion);
                this.columnHomeAddressSpecialInstructions = new System.Data.DataColumn("HomeAddressSpecialInstructions", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnHomeAddressSpecialInstructions);
                this.columnEMailAddress = new System.Data.DataColumn("EMailAddress", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEMailAddress);
                this.columnEMailSpecialInstructions = new System.Data.DataColumn("EMailSpecialInstructions", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEMailSpecialInstructions);
                this.columnEMailTelephoneNumber = new System.Data.DataColumn("EMailTelephoneNumber", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEMailTelephoneNumber);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnContactID}, true));
                this.columnContactID.AutoIncrement = true;
                this.columnContactID.AllowDBNull = false;
                this.columnContactID.ReadOnly = true;
                this.columnContactID.Unique = true;
                this.columnFirstName.AllowDBNull = false;
                this.columnFirstName.MaxLength = 50;
                this.columnMiddleName.MaxLength = 50;
                this.columnLastName.AllowDBNull = false;
                this.columnLastName.MaxLength = 50;
                this.columnTelephoneNumber.ReadOnly = true;
                this.columnTelephoneNumber.MaxLength = 50;
                this.columnTelephoneSpecialInstructions.ReadOnly = true;
                this.columnTelephoneSpecialInstructions.MaxLength = 2147483647;
                this.columnStreet.ReadOnly = true;
                this.columnStreet.MaxLength = 50;
                this.columnCity.ReadOnly = true;
                this.columnCity.MaxLength = 50;
                this.columnStateProvince.ReadOnly = true;
                this.columnStateProvince.MaxLength = 50;
                this.columnPostalCode.ReadOnly = true;
                this.columnPostalCode.MaxLength = 50;
                this.columnCountryRegion.ReadOnly = true;
                this.columnCountryRegion.MaxLength = 50;
                this.columnHomeAddressSpecialInstructions.ReadOnly = true;
                this.columnHomeAddressSpecialInstructions.MaxLength = 2147483647;
                this.columnEMailAddress.ReadOnly = true;
                this.columnEMailAddress.MaxLength = 128;
                this.columnEMailSpecialInstructions.ReadOnly = true;
                this.columnEMailSpecialInstructions.MaxLength = 2147483647;
                this.columnEMailTelephoneNumber.ReadOnly = true;
                this.columnEMailTelephoneNumber.MaxLength = 50;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public vAdditionalContactInfoRow NewvAdditionalContactInfoRow() {
                return ((vAdditionalContactInfoRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new vAdditionalContactInfoRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(vAdditionalContactInfoRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.vAdditionalContactInfoRowChanged != null)) {
                    this.vAdditionalContactInfoRowChanged(this, new vAdditionalContactInfoRowChangeEvent(((vAdditionalContactInfoRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.vAdditionalContactInfoRowChanging != null)) {
                    this.vAdditionalContactInfoRowChanging(this, new vAdditionalContactInfoRowChangeEvent(((vAdditionalContactInfoRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.vAdditionalContactInfoRowDeleted != null)) {
                    this.vAdditionalContactInfoRowDeleted(this, new vAdditionalContactInfoRowChangeEvent(((vAdditionalContactInfoRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.vAdditionalContactInfoRowDeleting != null)) {
                    this.vAdditionalContactInfoRowDeleting(this, new vAdditionalContactInfoRowChangeEvent(((vAdditionalContactInfoRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovevAdditionalContactInfoRow(vAdditionalContactInfoRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "vAdditionalContactInfoDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class vStateProvinceCountryRegionDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnStateProvinceID;
            
            private System.Data.DataColumn columnStateProvinceCode;
            
            private System.Data.DataColumn columnIsOnlyStateProvinceFlag;
            
            private System.Data.DataColumn columnStateProvinceName;
            
            private System.Data.DataColumn columnTerritoryID;
            
            private System.Data.DataColumn columnCountryRegionCode;
            
            private System.Data.DataColumn columnCountryRegionName;
            
            public vStateProvinceCountryRegionDataTable() {
                this.TableName = "vStateProvinceCountryRegion";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal vStateProvinceCountryRegionDataTable(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;
            }
            
            protected vStateProvinceCountryRegionDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn StateProvinceIDColumn {
                get {
                    return this.columnStateProvinceID;
                }
            }
            
            public System.Data.DataColumn StateProvinceCodeColumn {
                get {
                    return this.columnStateProvinceCode;
                }
            }
            
            public System.Data.DataColumn IsOnlyStateProvinceFlagColumn {
                get {
                    return this.columnIsOnlyStateProvinceFlag;
                }
            }
            
            public System.Data.DataColumn StateProvinceNameColumn {
                get {
                    return this.columnStateProvinceName;
                }
            }
            
            public System.Data.DataColumn TerritoryIDColumn {
                get {
                    return this.columnTerritoryID;
                }
            }
            
            public System.Data.DataColumn CountryRegionCodeColumn {
                get {
                    return this.columnCountryRegionCode;
                }
            }
            
            public System.Data.DataColumn CountryRegionNameColumn {
                get {
                    return this.columnCountryRegionName;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public vStateProvinceCountryRegionRow this[int index] {
                get {
                    return ((vStateProvinceCountryRegionRow)(this.Rows[index]));
                }
            }
            
            public event vStateProvinceCountryRegionRowChangeEventHandler vStateProvinceCountryRegionRowChanged;
            
            public event vStateProvinceCountryRegionRowChangeEventHandler vStateProvinceCountryRegionRowChanging;
            
            public event vStateProvinceCountryRegionRowChangeEventHandler vStateProvinceCountryRegionRowDeleted;
            
            public event vStateProvinceCountryRegionRowChangeEventHandler vStateProvinceCountryRegionRowDeleting;
            
            public void AddvStateProvinceCountryRegionRow(vStateProvinceCountryRegionRow row) {
                this.Rows.Add(row);
            }
            
            public vStateProvinceCountryRegionRow AddvStateProvinceCountryRegionRow(int StateProvinceID, string StateProvinceCode, bool IsOnlyStateProvinceFlag, string StateProvinceName, int TerritoryID, string CountryRegionCode, string CountryRegionName) {
                vStateProvinceCountryRegionRow rowvStateProvinceCountryRegionRow = ((vStateProvinceCountryRegionRow)(this.NewRow()));
                rowvStateProvinceCountryRegionRow.ItemArray = new object[] {
                        StateProvinceID,
                        StateProvinceCode,
                        IsOnlyStateProvinceFlag,
                        StateProvinceName,
                        TerritoryID,
                        CountryRegionCode,
                        CountryRegionName};
                this.Rows.Add(rowvStateProvinceCountryRegionRow);
                return rowvStateProvinceCountryRegionRow;
            }
            
            public vStateProvinceCountryRegionRow FindByStateProvinceIDCountryRegionCode(int StateProvinceID, string CountryRegionCode) {
                return ((vStateProvinceCountryRegionRow)(this.Rows.Find(new object[] {
                            StateProvinceID,
                            CountryRegionCode})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                vStateProvinceCountryRegionDataTable cln = ((vStateProvinceCountryRegionDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new vStateProvinceCountryRegionDataTable();
            }
            
            internal void InitVars() {
                this.columnStateProvinceID = base.Columns["StateProvinceID"];
                this.columnStateProvinceCode = base.Columns["StateProvinceCode"];
                this.columnIsOnlyStateProvinceFlag = base.Columns["IsOnlyStateProvinceFlag"];
                this.columnStateProvinceName = base.Columns["StateProvinceName"];
                this.columnTerritoryID = base.Columns["TerritoryID"];
                this.columnCountryRegionCode = base.Columns["CountryRegionCode"];
                this.columnCountryRegionName = base.Columns["CountryRegionName"];
            }
            
            private void InitClass() {
                this.columnStateProvinceID = new System.Data.DataColumn("StateProvinceID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStateProvinceID);
                this.columnStateProvinceCode = new System.Data.DataColumn("StateProvinceCode", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStateProvinceCode);
                this.columnIsOnlyStateProvinceFlag = new System.Data.DataColumn("IsOnlyStateProvinceFlag", typeof(bool), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnIsOnlyStateProvinceFlag);
                this.columnStateProvinceName = new System.Data.DataColumn("StateProvinceName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStateProvinceName);
                this.columnTerritoryID = new System.Data.DataColumn("TerritoryID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTerritoryID);
                this.columnCountryRegionCode = new System.Data.DataColumn("CountryRegionCode", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCountryRegionCode);
                this.columnCountryRegionName = new System.Data.DataColumn("CountryRegionName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCountryRegionName);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnStateProvinceID,
                                this.columnCountryRegionCode}, true));
                this.columnStateProvinceID.AllowDBNull = false;
                this.columnStateProvinceCode.AllowDBNull = false;
                this.columnStateProvinceCode.MaxLength = 3;
                this.columnIsOnlyStateProvinceFlag.AllowDBNull = false;
                this.columnStateProvinceName.AllowDBNull = false;
                this.columnStateProvinceName.MaxLength = 50;
                this.columnTerritoryID.AllowDBNull = false;
                this.columnCountryRegionCode.AllowDBNull = false;
                this.columnCountryRegionCode.MaxLength = 3;
                this.columnCountryRegionName.AllowDBNull = false;
                this.columnCountryRegionName.MaxLength = 50;
            }
            
            public vStateProvinceCountryRegionRow NewvStateProvinceCountryRegionRow() {
                return ((vStateProvinceCountryRegionRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new vStateProvinceCountryRegionRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(vStateProvinceCountryRegionRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.vStateProvinceCountryRegionRowChanged != null)) {
                    this.vStateProvinceCountryRegionRowChanged(this, new vStateProvinceCountryRegionRowChangeEvent(((vStateProvinceCountryRegionRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.vStateProvinceCountryRegionRowChanging != null)) {
                    this.vStateProvinceCountryRegionRowChanging(this, new vStateProvinceCountryRegionRowChangeEvent(((vStateProvinceCountryRegionRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.vStateProvinceCountryRegionRowDeleted != null)) {
                    this.vStateProvinceCountryRegionRowDeleted(this, new vStateProvinceCountryRegionRowChangeEvent(((vStateProvinceCountryRegionRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.vStateProvinceCountryRegionRowDeleting != null)) {
                    this.vStateProvinceCountryRegionRowDeleting(this, new vStateProvinceCountryRegionRowChangeEvent(((vStateProvinceCountryRegionRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovevStateProvinceCountryRegionRow(vStateProvinceCountryRegionRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "vStateProvinceCountryRegionDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class vProductAndDescriptionDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnProductID;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnProductModel;
            
            private System.Data.DataColumn columnCultureID;
            
            private System.Data.DataColumn columnDescription;
            
            public vProductAndDescriptionDataTable() {
                this.TableName = "vProductAndDescription";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal vProductAndDescriptionDataTable(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;
            }
            
            protected vProductAndDescriptionDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ProductIDColumn {
                get {
                    return this.columnProductID;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn ProductModelColumn {
                get {
                    return this.columnProductModel;
                }
            }
            
            public System.Data.DataColumn CultureIDColumn {
                get {
                    return this.columnCultureID;
                }
            }
            
            public System.Data.DataColumn DescriptionColumn {
                get {
                    return this.columnDescription;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public vProductAndDescriptionRow this[int index] {
                get {
                    return ((vProductAndDescriptionRow)(this.Rows[index]));
                }
            }
            
            public event vProductAndDescriptionRowChangeEventHandler vProductAndDescriptionRowChanged;
            
            public event vProductAndDescriptionRowChangeEventHandler vProductAndDescriptionRowChanging;
            
            public event vProductAndDescriptionRowChangeEventHandler vProductAndDescriptionRowDeleted;
            
            public event vProductAndDescriptionRowChangeEventHandler vProductAndDescriptionRowDeleting;
            
            public void AddvProductAndDescriptionRow(vProductAndDescriptionRow row) {
                this.Rows.Add(row);
            }
            
            public vProductAndDescriptionRow AddvProductAndDescriptionRow(int ProductID, string Name, string ProductModel, string CultureID, string Description) {
                vProductAndDescriptionRow rowvProductAndDescriptionRow = ((vProductAndDescriptionRow)(this.NewRow()));
                rowvProductAndDescriptionRow.ItemArray = new object[] {
                        ProductID,
                        Name,
                        ProductModel,
                        CultureID,
                        Description};
                this.Rows.Add(rowvProductAndDescriptionRow);
                return rowvProductAndDescriptionRow;
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                vProductAndDescriptionDataTable cln = ((vProductAndDescriptionDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new vProductAndDescriptionDataTable();
            }
            
            internal void InitVars() {
                this.columnProductID = base.Columns["ProductID"];
                this.columnName = base.Columns["Name"];
                this.columnProductModel = base.Columns["ProductModel"];
                this.columnCultureID = base.Columns["CultureID"];
                this.columnDescription = base.Columns["Description"];
            }
            
            private void InitClass() {
                this.columnProductID = new System.Data.DataColumn("ProductID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductID);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnProductModel = new System.Data.DataColumn("ProductModel", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductModel);
                this.columnCultureID = new System.Data.DataColumn("CultureID", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCultureID);
                this.columnDescription = new System.Data.DataColumn("Description", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDescription);
                this.columnProductID.AllowDBNull = false;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnProductModel.AllowDBNull = false;
                this.columnProductModel.MaxLength = 50;
                this.columnCultureID.AllowDBNull = false;
                this.columnCultureID.MaxLength = 6;
                this.columnDescription.AllowDBNull = false;
                this.columnDescription.MaxLength = 400;
            }
            
            public vProductAndDescriptionRow NewvProductAndDescriptionRow() {
                return ((vProductAndDescriptionRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new vProductAndDescriptionRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(vProductAndDescriptionRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.vProductAndDescriptionRowChanged != null)) {
                    this.vProductAndDescriptionRowChanged(this, new vProductAndDescriptionRowChangeEvent(((vProductAndDescriptionRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.vProductAndDescriptionRowChanging != null)) {
                    this.vProductAndDescriptionRowChanging(this, new vProductAndDescriptionRowChangeEvent(((vProductAndDescriptionRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.vProductAndDescriptionRowDeleted != null)) {
                    this.vProductAndDescriptionRowDeleted(this, new vProductAndDescriptionRowChangeEvent(((vProductAndDescriptionRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.vProductAndDescriptionRowDeleting != null)) {
                    this.vProductAndDescriptionRowDeleting(this, new vProductAndDescriptionRowChangeEvent(((vProductAndDescriptionRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovevProductAndDescriptionRow(vProductAndDescriptionRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "vProductAndDescriptionDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class vProductModelCatalogDescriptionDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnProductModelID;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnSummary;
            
            private System.Data.DataColumn columnManufacturer;
            
            private System.Data.DataColumn columnCopyright;
            
            private System.Data.DataColumn columnProductURL;
            
            private System.Data.DataColumn columnWarrantyPeriod;
            
            private System.Data.DataColumn columnWarrantyDescription;
            
            private System.Data.DataColumn columnNoOfYears;
            
            private System.Data.DataColumn columnMaintenanceDescription;
            
            private System.Data.DataColumn columnWheel;
            
            private System.Data.DataColumn columnSaddle;
            
            private System.Data.DataColumn columnPedal;
            
            private System.Data.DataColumn columnBikeFrame;
            
            private System.Data.DataColumn columnCrankset;
            
            private System.Data.DataColumn columnPictureAngle;
            
            private System.Data.DataColumn columnPictureSize;
            
            private System.Data.DataColumn columnProductPhotoID;
            
            private System.Data.DataColumn columnMaterial;
            
            private System.Data.DataColumn columnColor;
            
            private System.Data.DataColumn columnProductLine;
            
            private System.Data.DataColumn columnStyle;
            
            private System.Data.DataColumn columnRiderExperience;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public vProductModelCatalogDescriptionDataTable() {
                this.TableName = "vProductModelCatalogDescription";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal vProductModelCatalogDescriptionDataTable(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;
            }
            
            protected vProductModelCatalogDescriptionDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ProductModelIDColumn {
                get {
                    return this.columnProductModelID;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn SummaryColumn {
                get {
                    return this.columnSummary;
                }
            }
            
            public System.Data.DataColumn ManufacturerColumn {
                get {
                    return this.columnManufacturer;
                }
            }
            
            public System.Data.DataColumn CopyrightColumn {
                get {
                    return this.columnCopyright;
                }
            }
            
            public System.Data.DataColumn ProductURLColumn {
                get {
                    return this.columnProductURL;
                }
            }
            
            public System.Data.DataColumn WarrantyPeriodColumn {
                get {
                    return this.columnWarrantyPeriod;
                }
            }
            
            public System.Data.DataColumn WarrantyDescriptionColumn {
                get {
                    return this.columnWarrantyDescription;
                }
            }
            
            public System.Data.DataColumn NoOfYearsColumn {
                get {
                    return this.columnNoOfYears;
                }
            }
            
            public System.Data.DataColumn MaintenanceDescriptionColumn {
                get {
                    return this.columnMaintenanceDescription;
                }
            }
            
            public System.Data.DataColumn WheelColumn {
                get {
                    return this.columnWheel;
                }
            }
            
            public System.Data.DataColumn SaddleColumn {
                get {
                    return this.columnSaddle;
                }
            }
            
            public System.Data.DataColumn PedalColumn {
                get {
                    return this.columnPedal;
                }
            }
            
            public System.Data.DataColumn BikeFrameColumn {
                get {
                    return this.columnBikeFrame;
                }
            }
            
            public System.Data.DataColumn CranksetColumn {
                get {
                    return this.columnCrankset;
                }
            }
            
            public System.Data.DataColumn PictureAngleColumn {
                get {
                    return this.columnPictureAngle;
                }
            }
            
            public System.Data.DataColumn PictureSizeColumn {
                get {
                    return this.columnPictureSize;
                }
            }
            
            public System.Data.DataColumn ProductPhotoIDColumn {
                get {
                    return this.columnProductPhotoID;
                }
            }
            
            public System.Data.DataColumn MaterialColumn {
                get {
                    return this.columnMaterial;
                }
            }
            
            public System.Data.DataColumn ColorColumn {
                get {
                    return this.columnColor;
                }
            }
            
            public System.Data.DataColumn ProductLineColumn {
                get {
                    return this.columnProductLine;
                }
            }
            
            public System.Data.DataColumn StyleColumn {
                get {
                    return this.columnStyle;
                }
            }
            
            public System.Data.DataColumn RiderExperienceColumn {
                get {
                    return this.columnRiderExperience;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public vProductModelCatalogDescriptionRow this[int index] {
                get {
                    return ((vProductModelCatalogDescriptionRow)(this.Rows[index]));
                }
            }
            
            public event vProductModelCatalogDescriptionRowChangeEventHandler vProductModelCatalogDescriptionRowChanged;
            
            public event vProductModelCatalogDescriptionRowChangeEventHandler vProductModelCatalogDescriptionRowChanging;
            
            public event vProductModelCatalogDescriptionRowChangeEventHandler vProductModelCatalogDescriptionRowDeleted;
            
            public event vProductModelCatalogDescriptionRowChangeEventHandler vProductModelCatalogDescriptionRowDeleting;
            
            public void AddvProductModelCatalogDescriptionRow(vProductModelCatalogDescriptionRow row) {
                this.Rows.Add(row);
            }
            
            public vProductModelCatalogDescriptionRow AddvProductModelCatalogDescriptionRow(
                        string Name, 
                        string Summary, 
                        string Manufacturer, 
                        string Copyright, 
                        string ProductURL, 
                        string WarrantyPeriod, 
                        string WarrantyDescription, 
                        string NoOfYears, 
                        string MaintenanceDescription, 
                        string Wheel, 
                        string Saddle, 
                        string Pedal, 
                        string BikeFrame, 
                        string Crankset, 
                        string PictureAngle, 
                        string PictureSize, 
                        string ProductPhotoID, 
                        string Material, 
                        string Color, 
                        string ProductLine, 
                        string Style, 
                        string RiderExperience, 
                        System.Guid rowguid, 
                        System.DateTime ModifiedDate) {
                vProductModelCatalogDescriptionRow rowvProductModelCatalogDescriptionRow = ((vProductModelCatalogDescriptionRow)(this.NewRow()));
                rowvProductModelCatalogDescriptionRow.ItemArray = new object[] {
                        null,
                        Name,
                        Summary,
                        Manufacturer,
                        Copyright,
                        ProductURL,
                        WarrantyPeriod,
                        WarrantyDescription,
                        NoOfYears,
                        MaintenanceDescription,
                        Wheel,
                        Saddle,
                        Pedal,
                        BikeFrame,
                        Crankset,
                        PictureAngle,
                        PictureSize,
                        ProductPhotoID,
                        Material,
                        Color,
                        ProductLine,
                        Style,
                        RiderExperience,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowvProductModelCatalogDescriptionRow);
                return rowvProductModelCatalogDescriptionRow;
            }
            
            public vProductModelCatalogDescriptionRow FindByProductModelID(int ProductModelID) {
                return ((vProductModelCatalogDescriptionRow)(this.Rows.Find(new object[] {
                            ProductModelID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                vProductModelCatalogDescriptionDataTable cln = ((vProductModelCatalogDescriptionDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new vProductModelCatalogDescriptionDataTable();
            }
            
            internal void InitVars() {
                this.columnProductModelID = base.Columns["ProductModelID"];
                this.columnName = base.Columns["Name"];
                this.columnSummary = base.Columns["Summary"];
                this.columnManufacturer = base.Columns["Manufacturer"];
                this.columnCopyright = base.Columns["Copyright"];
                this.columnProductURL = base.Columns["ProductURL"];
                this.columnWarrantyPeriod = base.Columns["WarrantyPeriod"];
                this.columnWarrantyDescription = base.Columns["WarrantyDescription"];
                this.columnNoOfYears = base.Columns["NoOfYears"];
                this.columnMaintenanceDescription = base.Columns["MaintenanceDescription"];
                this.columnWheel = base.Columns["Wheel"];
                this.columnSaddle = base.Columns["Saddle"];
                this.columnPedal = base.Columns["Pedal"];
                this.columnBikeFrame = base.Columns["BikeFrame"];
                this.columnCrankset = base.Columns["Crankset"];
                this.columnPictureAngle = base.Columns["PictureAngle"];
                this.columnPictureSize = base.Columns["PictureSize"];
                this.columnProductPhotoID = base.Columns["ProductPhotoID"];
                this.columnMaterial = base.Columns["Material"];
                this.columnColor = base.Columns["Color"];
                this.columnProductLine = base.Columns["ProductLine"];
                this.columnStyle = base.Columns["Style"];
                this.columnRiderExperience = base.Columns["RiderExperience"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnProductModelID = new System.Data.DataColumn("ProductModelID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductModelID);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnSummary = new System.Data.DataColumn("Summary", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSummary);
                this.columnManufacturer = new System.Data.DataColumn("Manufacturer", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnManufacturer);
                this.columnCopyright = new System.Data.DataColumn("Copyright", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCopyright);
                this.columnProductURL = new System.Data.DataColumn("ProductURL", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductURL);
                this.columnWarrantyPeriod = new System.Data.DataColumn("WarrantyPeriod", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnWarrantyPeriod);
                this.columnWarrantyDescription = new System.Data.DataColumn("WarrantyDescription", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnWarrantyDescription);
                this.columnNoOfYears = new System.Data.DataColumn("NoOfYears", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnNoOfYears);
                this.columnMaintenanceDescription = new System.Data.DataColumn("MaintenanceDescription", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnMaintenanceDescription);
                this.columnWheel = new System.Data.DataColumn("Wheel", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnWheel);
                this.columnSaddle = new System.Data.DataColumn("Saddle", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSaddle);
                this.columnPedal = new System.Data.DataColumn("Pedal", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPedal);
                this.columnBikeFrame = new System.Data.DataColumn("BikeFrame", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnBikeFrame);
                this.columnCrankset = new System.Data.DataColumn("Crankset", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCrankset);
                this.columnPictureAngle = new System.Data.DataColumn("PictureAngle", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPictureAngle);
                this.columnPictureSize = new System.Data.DataColumn("PictureSize", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPictureSize);
                this.columnProductPhotoID = new System.Data.DataColumn("ProductPhotoID", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductPhotoID);
                this.columnMaterial = new System.Data.DataColumn("Material", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnMaterial);
                this.columnColor = new System.Data.DataColumn("Color", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnColor);
                this.columnProductLine = new System.Data.DataColumn("ProductLine", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductLine);
                this.columnStyle = new System.Data.DataColumn("Style", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStyle);
                this.columnRiderExperience = new System.Data.DataColumn("RiderExperience", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnRiderExperience);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnProductModelID}, true));
                this.columnProductModelID.AutoIncrement = true;
                this.columnProductModelID.AllowDBNull = false;
                this.columnProductModelID.ReadOnly = true;
                this.columnProductModelID.Unique = true;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnSummary.ReadOnly = true;
                this.columnSummary.MaxLength = 2147483647;
                this.columnManufacturer.ReadOnly = true;
                this.columnManufacturer.MaxLength = 2147483647;
                this.columnCopyright.ReadOnly = true;
                this.columnCopyright.MaxLength = 30;
                this.columnProductURL.ReadOnly = true;
                this.columnProductURL.MaxLength = 256;
                this.columnWarrantyPeriod.ReadOnly = true;
                this.columnWarrantyPeriod.MaxLength = 256;
                this.columnWarrantyDescription.ReadOnly = true;
                this.columnWarrantyDescription.MaxLength = 256;
                this.columnNoOfYears.ReadOnly = true;
                this.columnNoOfYears.MaxLength = 256;
                this.columnMaintenanceDescription.ReadOnly = true;
                this.columnMaintenanceDescription.MaxLength = 256;
                this.columnWheel.ReadOnly = true;
                this.columnWheel.MaxLength = 256;
                this.columnSaddle.ReadOnly = true;
                this.columnSaddle.MaxLength = 256;
                this.columnPedal.ReadOnly = true;
                this.columnPedal.MaxLength = 256;
                this.columnBikeFrame.ReadOnly = true;
                this.columnBikeFrame.MaxLength = 2147483647;
                this.columnCrankset.ReadOnly = true;
                this.columnCrankset.MaxLength = 256;
                this.columnPictureAngle.ReadOnly = true;
                this.columnPictureAngle.MaxLength = 256;
                this.columnPictureSize.ReadOnly = true;
                this.columnPictureSize.MaxLength = 256;
                this.columnProductPhotoID.ReadOnly = true;
                this.columnProductPhotoID.MaxLength = 256;
                this.columnMaterial.ReadOnly = true;
                this.columnMaterial.MaxLength = 256;
                this.columnColor.ReadOnly = true;
                this.columnColor.MaxLength = 256;
                this.columnProductLine.ReadOnly = true;
                this.columnProductLine.MaxLength = 256;
                this.columnStyle.ReadOnly = true;
                this.columnStyle.MaxLength = 256;
                this.columnRiderExperience.ReadOnly = true;
                this.columnRiderExperience.MaxLength = 1024;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public vProductModelCatalogDescriptionRow NewvProductModelCatalogDescriptionRow() {
                return ((vProductModelCatalogDescriptionRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new vProductModelCatalogDescriptionRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(vProductModelCatalogDescriptionRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.vProductModelCatalogDescriptionRowChanged != null)) {
                    this.vProductModelCatalogDescriptionRowChanged(this, new vProductModelCatalogDescriptionRowChangeEvent(((vProductModelCatalogDescriptionRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.vProductModelCatalogDescriptionRowChanging != null)) {
                    this.vProductModelCatalogDescriptionRowChanging(this, new vProductModelCatalogDescriptionRowChangeEvent(((vProductModelCatalogDescriptionRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.vProductModelCatalogDescriptionRowDeleted != null)) {
                    this.vProductModelCatalogDescriptionRowDeleted(this, new vProductModelCatalogDescriptionRowChangeEvent(((vProductModelCatalogDescriptionRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.vProductModelCatalogDescriptionRowDeleting != null)) {
                    this.vProductModelCatalogDescriptionRowDeleting(this, new vProductModelCatalogDescriptionRowChangeEvent(((vProductModelCatalogDescriptionRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovevProductModelCatalogDescriptionRow(vProductModelCatalogDescriptionRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "vProductModelCatalogDescriptionDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class vProductModelInstructionsDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnProductModelID;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnInstructions;
            
            private System.Data.DataColumn columnLocationID;
            
            private System.Data.DataColumn columnSetupHours;
            
            private System.Data.DataColumn columnMachineHours;
            
            private System.Data.DataColumn columnLaborHours;
            
            private System.Data.DataColumn columnLotSize;
            
            private System.Data.DataColumn columnStep;
            
            private System.Data.DataColumn columnrowguid;
            
            private System.Data.DataColumn columnModifiedDate;
            
            public vProductModelInstructionsDataTable() {
                this.TableName = "vProductModelInstructions";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal vProductModelInstructionsDataTable(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;
            }
            
            protected vProductModelInstructionsDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ProductModelIDColumn {
                get {
                    return this.columnProductModelID;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn InstructionsColumn {
                get {
                    return this.columnInstructions;
                }
            }
            
            public System.Data.DataColumn LocationIDColumn {
                get {
                    return this.columnLocationID;
                }
            }
            
            public System.Data.DataColumn SetupHoursColumn {
                get {
                    return this.columnSetupHours;
                }
            }
            
            public System.Data.DataColumn MachineHoursColumn {
                get {
                    return this.columnMachineHours;
                }
            }
            
            public System.Data.DataColumn LaborHoursColumn {
                get {
                    return this.columnLaborHours;
                }
            }
            
            public System.Data.DataColumn LotSizeColumn {
                get {
                    return this.columnLotSize;
                }
            }
            
            public System.Data.DataColumn StepColumn {
                get {
                    return this.columnStep;
                }
            }
            
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public vProductModelInstructionsRow this[int index] {
                get {
                    return ((vProductModelInstructionsRow)(this.Rows[index]));
                }
            }
            
            public event vProductModelInstructionsRowChangeEventHandler vProductModelInstructionsRowChanged;
            
            public event vProductModelInstructionsRowChangeEventHandler vProductModelInstructionsRowChanging;
            
            public event vProductModelInstructionsRowChangeEventHandler vProductModelInstructionsRowDeleted;
            
            public event vProductModelInstructionsRowChangeEventHandler vProductModelInstructionsRowDeleting;
            
            public void AddvProductModelInstructionsRow(vProductModelInstructionsRow row) {
                this.Rows.Add(row);
            }
            
            public vProductModelInstructionsRow AddvProductModelInstructionsRow(string Name, string Instructions, int LocationID, decimal SetupHours, decimal MachineHours, decimal LaborHours, int LotSize, string Step, System.Guid rowguid, System.DateTime ModifiedDate) {
                vProductModelInstructionsRow rowvProductModelInstructionsRow = ((vProductModelInstructionsRow)(this.NewRow()));
                rowvProductModelInstructionsRow.ItemArray = new object[] {
                        null,
                        Name,
                        Instructions,
                        LocationID,
                        SetupHours,
                        MachineHours,
                        LaborHours,
                        LotSize,
                        Step,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowvProductModelInstructionsRow);
                return rowvProductModelInstructionsRow;
            }
            
            public vProductModelInstructionsRow FindByProductModelID(int ProductModelID) {
                return ((vProductModelInstructionsRow)(this.Rows.Find(new object[] {
                            ProductModelID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                vProductModelInstructionsDataTable cln = ((vProductModelInstructionsDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new vProductModelInstructionsDataTable();
            }
            
            internal void InitVars() {
                this.columnProductModelID = base.Columns["ProductModelID"];
                this.columnName = base.Columns["Name"];
                this.columnInstructions = base.Columns["Instructions"];
                this.columnLocationID = base.Columns["LocationID"];
                this.columnSetupHours = base.Columns["SetupHours"];
                this.columnMachineHours = base.Columns["MachineHours"];
                this.columnLaborHours = base.Columns["LaborHours"];
                this.columnLotSize = base.Columns["LotSize"];
                this.columnStep = base.Columns["Step"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            private void InitClass() {
                this.columnProductModelID = new System.Data.DataColumn("ProductModelID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductModelID);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnInstructions = new System.Data.DataColumn("Instructions", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnInstructions);
                this.columnLocationID = new System.Data.DataColumn("LocationID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLocationID);
                this.columnSetupHours = new System.Data.DataColumn("SetupHours", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSetupHours);
                this.columnMachineHours = new System.Data.DataColumn("MachineHours", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnMachineHours);
                this.columnLaborHours = new System.Data.DataColumn("LaborHours", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLaborHours);
                this.columnLotSize = new System.Data.DataColumn("LotSize", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLotSize);
                this.columnStep = new System.Data.DataColumn("Step", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStep);
                this.columnrowguid = new System.Data.DataColumn("rowguid", typeof(System.Guid), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnrowguid);
                this.columnModifiedDate = new System.Data.DataColumn("ModifiedDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnModifiedDate);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnProductModelID}, true));
                this.columnProductModelID.AutoIncrement = true;
                this.columnProductModelID.AllowDBNull = false;
                this.columnProductModelID.ReadOnly = true;
                this.columnProductModelID.Unique = true;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnInstructions.ReadOnly = true;
                this.columnInstructions.MaxLength = 2147483647;
                this.columnLocationID.ReadOnly = true;
                this.columnSetupHours.ReadOnly = true;
                this.columnMachineHours.ReadOnly = true;
                this.columnLaborHours.ReadOnly = true;
                this.columnLotSize.ReadOnly = true;
                this.columnStep.ReadOnly = true;
                this.columnStep.MaxLength = 1024;
                this.columnrowguid.AllowDBNull = false;
                this.columnModifiedDate.AllowDBNull = false;
            }
            
            public vProductModelInstructionsRow NewvProductModelInstructionsRow() {
                return ((vProductModelInstructionsRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new vProductModelInstructionsRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(vProductModelInstructionsRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.vProductModelInstructionsRowChanged != null)) {
                    this.vProductModelInstructionsRowChanged(this, new vProductModelInstructionsRowChangeEvent(((vProductModelInstructionsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.vProductModelInstructionsRowChanging != null)) {
                    this.vProductModelInstructionsRowChanging(this, new vProductModelInstructionsRowChangeEvent(((vProductModelInstructionsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.vProductModelInstructionsRowDeleted != null)) {
                    this.vProductModelInstructionsRowDeleted(this, new vProductModelInstructionsRowChangeEvent(((vProductModelInstructionsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.vProductModelInstructionsRowDeleting != null)) {
                    this.vProductModelInstructionsRowDeleting(this, new vProductModelInstructionsRowChangeEvent(((vProductModelInstructionsRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovevProductModelInstructionsRow(vProductModelInstructionsRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "vProductModelInstructionsDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class vVendorDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnVendorID;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnContactType;
            
            private System.Data.DataColumn columnTitle;
            
            private System.Data.DataColumn columnFirstName;
            
            private System.Data.DataColumn columnMiddleName;
            
            private System.Data.DataColumn columnLastName;
            
            private System.Data.DataColumn columnSuffix;
            
            private System.Data.DataColumn columnPhone;
            
            private System.Data.DataColumn columnEmailAddress;
            
            private System.Data.DataColumn columnEmailPromotion;
            
            private System.Data.DataColumn columnAddressLine1;
            
            private System.Data.DataColumn columnAddressLine2;
            
            private System.Data.DataColumn columnCity;
            
            private System.Data.DataColumn columnStateProvinceName;
            
            private System.Data.DataColumn columnPostalCode;
            
            private System.Data.DataColumn columnCountryRegionName;
            
            public vVendorDataTable() {
                this.TableName = "vVendor";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal vVendorDataTable(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;
            }
            
            protected vVendorDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn VendorIDColumn {
                get {
                    return this.columnVendorID;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn ContactTypeColumn {
                get {
                    return this.columnContactType;
                }
            }
            
            public System.Data.DataColumn TitleColumn {
                get {
                    return this.columnTitle;
                }
            }
            
            public System.Data.DataColumn FirstNameColumn {
                get {
                    return this.columnFirstName;
                }
            }
            
            public System.Data.DataColumn MiddleNameColumn {
                get {
                    return this.columnMiddleName;
                }
            }
            
            public System.Data.DataColumn LastNameColumn {
                get {
                    return this.columnLastName;
                }
            }
            
            public System.Data.DataColumn SuffixColumn {
                get {
                    return this.columnSuffix;
                }
            }
            
            public System.Data.DataColumn PhoneColumn {
                get {
                    return this.columnPhone;
                }
            }
            
            public System.Data.DataColumn EmailAddressColumn {
                get {
                    return this.columnEmailAddress;
                }
            }
            
            public System.Data.DataColumn EmailPromotionColumn {
                get {
                    return this.columnEmailPromotion;
                }
            }
            
            public System.Data.DataColumn AddressLine1Column {
                get {
                    return this.columnAddressLine1;
                }
            }
            
            public System.Data.DataColumn AddressLine2Column {
                get {
                    return this.columnAddressLine2;
                }
            }
            
            public System.Data.DataColumn CityColumn {
                get {
                    return this.columnCity;
                }
            }
            
            public System.Data.DataColumn StateProvinceNameColumn {
                get {
                    return this.columnStateProvinceName;
                }
            }
            
            public System.Data.DataColumn PostalCodeColumn {
                get {
                    return this.columnPostalCode;
                }
            }
            
            public System.Data.DataColumn CountryRegionNameColumn {
                get {
                    return this.columnCountryRegionName;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public vVendorRow this[int index] {
                get {
                    return ((vVendorRow)(this.Rows[index]));
                }
            }
            
            public event vVendorRowChangeEventHandler vVendorRowChanged;
            
            public event vVendorRowChangeEventHandler vVendorRowChanging;
            
            public event vVendorRowChangeEventHandler vVendorRowDeleted;
            
            public event vVendorRowChangeEventHandler vVendorRowDeleting;
            
            public void AddvVendorRow(vVendorRow row) {
                this.Rows.Add(row);
            }
            
            public vVendorRow AddvVendorRow(
                        int VendorID, 
                        string Name, 
                        string ContactType, 
                        string Title, 
                        string FirstName, 
                        string MiddleName, 
                        string LastName, 
                        string Suffix, 
                        string Phone, 
                        string EmailAddress, 
                        int EmailPromotion, 
                        string AddressLine1, 
                        string AddressLine2, 
                        string City, 
                        string StateProvinceName, 
                        string PostalCode, 
                        string CountryRegionName) {
                vVendorRow rowvVendorRow = ((vVendorRow)(this.NewRow()));
                rowvVendorRow.ItemArray = new object[] {
                        VendorID,
                        Name,
                        ContactType,
                        Title,
                        FirstName,
                        MiddleName,
                        LastName,
                        Suffix,
                        Phone,
                        EmailAddress,
                        EmailPromotion,
                        AddressLine1,
                        AddressLine2,
                        City,
                        StateProvinceName,
                        PostalCode,
                        CountryRegionName};
                this.Rows.Add(rowvVendorRow);
                return rowvVendorRow;
            }
            
            public vVendorRow FindByVendorID(int VendorID) {
                return ((vVendorRow)(this.Rows.Find(new object[] {
                            VendorID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                vVendorDataTable cln = ((vVendorDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new vVendorDataTable();
            }
            
            internal void InitVars() {
                this.columnVendorID = base.Columns["VendorID"];
                this.columnName = base.Columns["Name"];
                this.columnContactType = base.Columns["ContactType"];
                this.columnTitle = base.Columns["Title"];
                this.columnFirstName = base.Columns["FirstName"];
                this.columnMiddleName = base.Columns["MiddleName"];
                this.columnLastName = base.Columns["LastName"];
                this.columnSuffix = base.Columns["Suffix"];
                this.columnPhone = base.Columns["Phone"];
                this.columnEmailAddress = base.Columns["EmailAddress"];
                this.columnEmailPromotion = base.Columns["EmailPromotion"];
                this.columnAddressLine1 = base.Columns["AddressLine1"];
                this.columnAddressLine2 = base.Columns["AddressLine2"];
                this.columnCity = base.Columns["City"];
                this.columnStateProvinceName = base.Columns["StateProvinceName"];
                this.columnPostalCode = base.Columns["PostalCode"];
                this.columnCountryRegionName = base.Columns["CountryRegionName"];
            }
            
            private void InitClass() {
                this.columnVendorID = new System.Data.DataColumn("VendorID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnVendorID);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnContactType = new System.Data.DataColumn("ContactType", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnContactType);
                this.columnTitle = new System.Data.DataColumn("Title", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTitle);
                this.columnFirstName = new System.Data.DataColumn("FirstName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnFirstName);
                this.columnMiddleName = new System.Data.DataColumn("MiddleName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnMiddleName);
                this.columnLastName = new System.Data.DataColumn("LastName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLastName);
                this.columnSuffix = new System.Data.DataColumn("Suffix", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSuffix);
                this.columnPhone = new System.Data.DataColumn("Phone", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPhone);
                this.columnEmailAddress = new System.Data.DataColumn("EmailAddress", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmailAddress);
                this.columnEmailPromotion = new System.Data.DataColumn("EmailPromotion", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmailPromotion);
                this.columnAddressLine1 = new System.Data.DataColumn("AddressLine1", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAddressLine1);
                this.columnAddressLine2 = new System.Data.DataColumn("AddressLine2", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAddressLine2);
                this.columnCity = new System.Data.DataColumn("City", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCity);
                this.columnStateProvinceName = new System.Data.DataColumn("StateProvinceName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStateProvinceName);
                this.columnPostalCode = new System.Data.DataColumn("PostalCode", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPostalCode);
                this.columnCountryRegionName = new System.Data.DataColumn("CountryRegionName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCountryRegionName);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnVendorID}, true));
                this.columnVendorID.AllowDBNull = false;
                this.columnVendorID.Unique = true;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnContactType.AllowDBNull = false;
                this.columnContactType.MaxLength = 50;
                this.columnTitle.MaxLength = 8;
                this.columnFirstName.AllowDBNull = false;
                this.columnFirstName.MaxLength = 50;
                this.columnMiddleName.MaxLength = 50;
                this.columnLastName.AllowDBNull = false;
                this.columnLastName.MaxLength = 50;
                this.columnSuffix.MaxLength = 10;
                this.columnPhone.MaxLength = 25;
                this.columnEmailAddress.MaxLength = 50;
                this.columnEmailPromotion.AllowDBNull = false;
                this.columnAddressLine1.AllowDBNull = false;
                this.columnAddressLine1.MaxLength = 60;
                this.columnAddressLine2.MaxLength = 60;
                this.columnCity.AllowDBNull = false;
                this.columnCity.MaxLength = 30;
                this.columnStateProvinceName.AllowDBNull = false;
                this.columnStateProvinceName.MaxLength = 50;
                this.columnPostalCode.AllowDBNull = false;
                this.columnPostalCode.MaxLength = 15;
                this.columnCountryRegionName.AllowDBNull = false;
                this.columnCountryRegionName.MaxLength = 50;
            }
            
            public vVendorRow NewvVendorRow() {
                return ((vVendorRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new vVendorRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(vVendorRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.vVendorRowChanged != null)) {
                    this.vVendorRowChanged(this, new vVendorRowChangeEvent(((vVendorRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.vVendorRowChanging != null)) {
                    this.vVendorRowChanging(this, new vVendorRowChangeEvent(((vVendorRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.vVendorRowDeleted != null)) {
                    this.vVendorRowDeleted(this, new vVendorRowChangeEvent(((vVendorRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.vVendorRowDeleting != null)) {
                    this.vVendorRowDeleting(this, new vVendorRowChangeEvent(((vVendorRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovevVendorRow(vVendorRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "vVendorDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class vIndividualDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnCustomerID;
            
            private System.Data.DataColumn columnTitle;
            
            private System.Data.DataColumn columnFirstName;
            
            private System.Data.DataColumn columnMiddleName;
            
            private System.Data.DataColumn columnLastName;
            
            private System.Data.DataColumn columnSuffix;
            
            private System.Data.DataColumn columnPhone;
            
            private System.Data.DataColumn columnEmailAddress;
            
            private System.Data.DataColumn columnEmailPromotion;
            
            private System.Data.DataColumn columnAddressLine1;
            
            private System.Data.DataColumn columnAddressLine2;
            
            private System.Data.DataColumn columnCity;
            
            private System.Data.DataColumn columnStateProvinceName;
            
            private System.Data.DataColumn columnPostalCode;
            
            private System.Data.DataColumn columnCountryRegionName;
            
            private System.Data.DataColumn columnDemographics;
            
            public vIndividualDataTable() {
                this.TableName = "vIndividual";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal vIndividualDataTable(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;
            }
            
            protected vIndividualDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn CustomerIDColumn {
                get {
                    return this.columnCustomerID;
                }
            }
            
            public System.Data.DataColumn TitleColumn {
                get {
                    return this.columnTitle;
                }
            }
            
            public System.Data.DataColumn FirstNameColumn {
                get {
                    return this.columnFirstName;
                }
            }
            
            public System.Data.DataColumn MiddleNameColumn {
                get {
                    return this.columnMiddleName;
                }
            }
            
            public System.Data.DataColumn LastNameColumn {
                get {
                    return this.columnLastName;
                }
            }
            
            public System.Data.DataColumn SuffixColumn {
                get {
                    return this.columnSuffix;
                }
            }
            
            public System.Data.DataColumn PhoneColumn {
                get {
                    return this.columnPhone;
                }
            }
            
            public System.Data.DataColumn EmailAddressColumn {
                get {
                    return this.columnEmailAddress;
                }
            }
            
            public System.Data.DataColumn EmailPromotionColumn {
                get {
                    return this.columnEmailPromotion;
                }
            }
            
            public System.Data.DataColumn AddressLine1Column {
                get {
                    return this.columnAddressLine1;
                }
            }
            
            public System.Data.DataColumn AddressLine2Column {
                get {
                    return this.columnAddressLine2;
                }
            }
            
            public System.Data.DataColumn CityColumn {
                get {
                    return this.columnCity;
                }
            }
            
            public System.Data.DataColumn StateProvinceNameColumn {
                get {
                    return this.columnStateProvinceName;
                }
            }
            
            public System.Data.DataColumn PostalCodeColumn {
                get {
                    return this.columnPostalCode;
                }
            }
            
            public System.Data.DataColumn CountryRegionNameColumn {
                get {
                    return this.columnCountryRegionName;
                }
            }
            
            public System.Data.DataColumn DemographicsColumn {
                get {
                    return this.columnDemographics;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public vIndividualRow this[int index] {
                get {
                    return ((vIndividualRow)(this.Rows[index]));
                }
            }
            
            public event vIndividualRowChangeEventHandler vIndividualRowChanged;
            
            public event vIndividualRowChangeEventHandler vIndividualRowChanging;
            
            public event vIndividualRowChangeEventHandler vIndividualRowDeleted;
            
            public event vIndividualRowChangeEventHandler vIndividualRowDeleting;
            
            public void AddvIndividualRow(vIndividualRow row) {
                this.Rows.Add(row);
            }
            
            public vIndividualRow AddvIndividualRow(
                        int CustomerID, 
                        string Title, 
                        string FirstName, 
                        string MiddleName, 
                        string LastName, 
                        string Suffix, 
                        string Phone, 
                        string EmailAddress, 
                        int EmailPromotion, 
                        string AddressLine1, 
                        string AddressLine2, 
                        string City, 
                        string StateProvinceName, 
                        string PostalCode, 
                        string CountryRegionName, 
                        string Demographics) {
                vIndividualRow rowvIndividualRow = ((vIndividualRow)(this.NewRow()));
                rowvIndividualRow.ItemArray = new object[] {
                        CustomerID,
                        Title,
                        FirstName,
                        MiddleName,
                        LastName,
                        Suffix,
                        Phone,
                        EmailAddress,
                        EmailPromotion,
                        AddressLine1,
                        AddressLine2,
                        City,
                        StateProvinceName,
                        PostalCode,
                        CountryRegionName,
                        Demographics};
                this.Rows.Add(rowvIndividualRow);
                return rowvIndividualRow;
            }
            
            public vIndividualRow FindByCustomerID(int CustomerID) {
                return ((vIndividualRow)(this.Rows.Find(new object[] {
                            CustomerID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                vIndividualDataTable cln = ((vIndividualDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new vIndividualDataTable();
            }
            
            internal void InitVars() {
                this.columnCustomerID = base.Columns["CustomerID"];
                this.columnTitle = base.Columns["Title"];
                this.columnFirstName = base.Columns["FirstName"];
                this.columnMiddleName = base.Columns["MiddleName"];
                this.columnLastName = base.Columns["LastName"];
                this.columnSuffix = base.Columns["Suffix"];
                this.columnPhone = base.Columns["Phone"];
                this.columnEmailAddress = base.Columns["EmailAddress"];
                this.columnEmailPromotion = base.Columns["EmailPromotion"];
                this.columnAddressLine1 = base.Columns["AddressLine1"];
                this.columnAddressLine2 = base.Columns["AddressLine2"];
                this.columnCity = base.Columns["City"];
                this.columnStateProvinceName = base.Columns["StateProvinceName"];
                this.columnPostalCode = base.Columns["PostalCode"];
                this.columnCountryRegionName = base.Columns["CountryRegionName"];
                this.columnDemographics = base.Columns["Demographics"];
            }
            
            private void InitClass() {
                this.columnCustomerID = new System.Data.DataColumn("CustomerID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCustomerID);
                this.columnTitle = new System.Data.DataColumn("Title", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTitle);
                this.columnFirstName = new System.Data.DataColumn("FirstName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnFirstName);
                this.columnMiddleName = new System.Data.DataColumn("MiddleName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnMiddleName);
                this.columnLastName = new System.Data.DataColumn("LastName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLastName);
                this.columnSuffix = new System.Data.DataColumn("Suffix", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSuffix);
                this.columnPhone = new System.Data.DataColumn("Phone", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPhone);
                this.columnEmailAddress = new System.Data.DataColumn("EmailAddress", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmailAddress);
                this.columnEmailPromotion = new System.Data.DataColumn("EmailPromotion", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmailPromotion);
                this.columnAddressLine1 = new System.Data.DataColumn("AddressLine1", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAddressLine1);
                this.columnAddressLine2 = new System.Data.DataColumn("AddressLine2", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAddressLine2);
                this.columnCity = new System.Data.DataColumn("City", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCity);
                this.columnStateProvinceName = new System.Data.DataColumn("StateProvinceName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStateProvinceName);
                this.columnPostalCode = new System.Data.DataColumn("PostalCode", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPostalCode);
                this.columnCountryRegionName = new System.Data.DataColumn("CountryRegionName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCountryRegionName);
                this.columnDemographics = new System.Data.DataColumn("Demographics", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDemographics);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnCustomerID}, true));
                this.columnCustomerID.AllowDBNull = false;
                this.columnCustomerID.Unique = true;
                this.columnTitle.MaxLength = 8;
                this.columnFirstName.AllowDBNull = false;
                this.columnFirstName.MaxLength = 50;
                this.columnMiddleName.MaxLength = 50;
                this.columnLastName.AllowDBNull = false;
                this.columnLastName.MaxLength = 50;
                this.columnSuffix.MaxLength = 10;
                this.columnPhone.MaxLength = 25;
                this.columnEmailAddress.MaxLength = 50;
                this.columnEmailPromotion.AllowDBNull = false;
                this.columnAddressLine1.AllowDBNull = false;
                this.columnAddressLine1.MaxLength = 60;
                this.columnAddressLine2.MaxLength = 60;
                this.columnCity.AllowDBNull = false;
                this.columnCity.MaxLength = 30;
                this.columnStateProvinceName.AllowDBNull = false;
                this.columnStateProvinceName.MaxLength = 50;
                this.columnPostalCode.AllowDBNull = false;
                this.columnPostalCode.MaxLength = 15;
                this.columnCountryRegionName.AllowDBNull = false;
                this.columnCountryRegionName.MaxLength = 50;
                this.columnDemographics.MaxLength = 2147483647;
            }
            
            public vIndividualRow NewvIndividualRow() {
                return ((vIndividualRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new vIndividualRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(vIndividualRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.vIndividualRowChanged != null)) {
                    this.vIndividualRowChanged(this, new vIndividualRowChangeEvent(((vIndividualRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.vIndividualRowChanging != null)) {
                    this.vIndividualRowChanging(this, new vIndividualRowChangeEvent(((vIndividualRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.vIndividualRowDeleted != null)) {
                    this.vIndividualRowDeleted(this, new vIndividualRowChangeEvent(((vIndividualRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.vIndividualRowDeleting != null)) {
                    this.vIndividualRowDeleting(this, new vIndividualRowChangeEvent(((vIndividualRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovevIndividualRow(vIndividualRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "vIndividualDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class vIndividualDemographicsDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnCustomerID;
            
            private System.Data.DataColumn columnTotalPurchaseYTD;
            
            private System.Data.DataColumn columnDateFirstPurchase;
            
            private System.Data.DataColumn columnBirthDate;
            
            private System.Data.DataColumn columnMaritalStatus;
            
            private System.Data.DataColumn columnYearlyIncome;
            
            private System.Data.DataColumn columnGender;
            
            private System.Data.DataColumn columnTotalChildren;
            
            private System.Data.DataColumn columnNumberChildrenAtHome;
            
            private System.Data.DataColumn columnEducation;
            
            private System.Data.DataColumn columnOccupation;
            
            private System.Data.DataColumn columnHomeOwnerFlag;
            
            private System.Data.DataColumn columnNumberCarsOwned;
            
            private System.Data.DataColumn columnHobby;
            
            public vIndividualDemographicsDataTable() {
                this.TableName = "vIndividualDemographics";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal vIndividualDemographicsDataTable(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;
            }
            
            protected vIndividualDemographicsDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn CustomerIDColumn {
                get {
                    return this.columnCustomerID;
                }
            }
            
            public System.Data.DataColumn TotalPurchaseYTDColumn {
                get {
                    return this.columnTotalPurchaseYTD;
                }
            }
            
            public System.Data.DataColumn DateFirstPurchaseColumn {
                get {
                    return this.columnDateFirstPurchase;
                }
            }
            
            public System.Data.DataColumn BirthDateColumn {
                get {
                    return this.columnBirthDate;
                }
            }
            
            public System.Data.DataColumn MaritalStatusColumn {
                get {
                    return this.columnMaritalStatus;
                }
            }
            
            public System.Data.DataColumn YearlyIncomeColumn {
                get {
                    return this.columnYearlyIncome;
                }
            }
            
            public System.Data.DataColumn GenderColumn {
                get {
                    return this.columnGender;
                }
            }
            
            public System.Data.DataColumn TotalChildrenColumn {
                get {
                    return this.columnTotalChildren;
                }
            }
            
            public System.Data.DataColumn NumberChildrenAtHomeColumn {
                get {
                    return this.columnNumberChildrenAtHome;
                }
            }
            
            public System.Data.DataColumn EducationColumn {
                get {
                    return this.columnEducation;
                }
            }
            
            public System.Data.DataColumn OccupationColumn {
                get {
                    return this.columnOccupation;
                }
            }
            
            public System.Data.DataColumn HomeOwnerFlagColumn {
                get {
                    return this.columnHomeOwnerFlag;
                }
            }
            
            public System.Data.DataColumn NumberCarsOwnedColumn {
                get {
                    return this.columnNumberCarsOwned;
                }
            }
            
            public System.Data.DataColumn HobbyColumn {
                get {
                    return this.columnHobby;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public vIndividualDemographicsRow this[int index] {
                get {
                    return ((vIndividualDemographicsRow)(this.Rows[index]));
                }
            }
            
            public event vIndividualDemographicsRowChangeEventHandler vIndividualDemographicsRowChanged;
            
            public event vIndividualDemographicsRowChangeEventHandler vIndividualDemographicsRowChanging;
            
            public event vIndividualDemographicsRowChangeEventHandler vIndividualDemographicsRowDeleted;
            
            public event vIndividualDemographicsRowChangeEventHandler vIndividualDemographicsRowDeleting;
            
            public void AddvIndividualDemographicsRow(vIndividualDemographicsRow row) {
                this.Rows.Add(row);
            }
            
            public vIndividualDemographicsRow AddvIndividualDemographicsRow(int CustomerID, decimal TotalPurchaseYTD, System.DateTime DateFirstPurchase, System.DateTime BirthDate, string MaritalStatus, string YearlyIncome, string Gender, int TotalChildren, int NumberChildrenAtHome, string Education, string Occupation, bool HomeOwnerFlag, int NumberCarsOwned, string Hobby) {
                vIndividualDemographicsRow rowvIndividualDemographicsRow = ((vIndividualDemographicsRow)(this.NewRow()));
                rowvIndividualDemographicsRow.ItemArray = new object[] {
                        CustomerID,
                        TotalPurchaseYTD,
                        DateFirstPurchase,
                        BirthDate,
                        MaritalStatus,
                        YearlyIncome,
                        Gender,
                        TotalChildren,
                        NumberChildrenAtHome,
                        Education,
                        Occupation,
                        HomeOwnerFlag,
                        NumberCarsOwned,
                        Hobby};
                this.Rows.Add(rowvIndividualDemographicsRow);
                return rowvIndividualDemographicsRow;
            }
            
            public vIndividualDemographicsRow FindByCustomerID(int CustomerID) {
                return ((vIndividualDemographicsRow)(this.Rows.Find(new object[] {
                            CustomerID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                vIndividualDemographicsDataTable cln = ((vIndividualDemographicsDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new vIndividualDemographicsDataTable();
            }
            
            internal void InitVars() {
                this.columnCustomerID = base.Columns["CustomerID"];
                this.columnTotalPurchaseYTD = base.Columns["TotalPurchaseYTD"];
                this.columnDateFirstPurchase = base.Columns["DateFirstPurchase"];
                this.columnBirthDate = base.Columns["BirthDate"];
                this.columnMaritalStatus = base.Columns["MaritalStatus"];
                this.columnYearlyIncome = base.Columns["YearlyIncome"];
                this.columnGender = base.Columns["Gender"];
                this.columnTotalChildren = base.Columns["TotalChildren"];
                this.columnNumberChildrenAtHome = base.Columns["NumberChildrenAtHome"];
                this.columnEducation = base.Columns["Education"];
                this.columnOccupation = base.Columns["Occupation"];
                this.columnHomeOwnerFlag = base.Columns["HomeOwnerFlag"];
                this.columnNumberCarsOwned = base.Columns["NumberCarsOwned"];
                this.columnHobby = base.Columns["Hobby"];
            }
            
            private void InitClass() {
                this.columnCustomerID = new System.Data.DataColumn("CustomerID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCustomerID);
                this.columnTotalPurchaseYTD = new System.Data.DataColumn("TotalPurchaseYTD", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTotalPurchaseYTD);
                this.columnDateFirstPurchase = new System.Data.DataColumn("DateFirstPurchase", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnDateFirstPurchase);
                this.columnBirthDate = new System.Data.DataColumn("BirthDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnBirthDate);
                this.columnMaritalStatus = new System.Data.DataColumn("MaritalStatus", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnMaritalStatus);
                this.columnYearlyIncome = new System.Data.DataColumn("YearlyIncome", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnYearlyIncome);
                this.columnGender = new System.Data.DataColumn("Gender", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnGender);
                this.columnTotalChildren = new System.Data.DataColumn("TotalChildren", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTotalChildren);
                this.columnNumberChildrenAtHome = new System.Data.DataColumn("NumberChildrenAtHome", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnNumberChildrenAtHome);
                this.columnEducation = new System.Data.DataColumn("Education", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEducation);
                this.columnOccupation = new System.Data.DataColumn("Occupation", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnOccupation);
                this.columnHomeOwnerFlag = new System.Data.DataColumn("HomeOwnerFlag", typeof(bool), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnHomeOwnerFlag);
                this.columnNumberCarsOwned = new System.Data.DataColumn("NumberCarsOwned", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnNumberCarsOwned);
                this.columnHobby = new System.Data.DataColumn("Hobby", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnHobby);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnCustomerID}, true));
                this.columnCustomerID.AllowDBNull = false;
                this.columnCustomerID.Unique = true;
                this.columnTotalPurchaseYTD.ReadOnly = true;
                this.columnDateFirstPurchase.ReadOnly = true;
                this.columnBirthDate.ReadOnly = true;
                this.columnMaritalStatus.ReadOnly = true;
                this.columnMaritalStatus.MaxLength = 1;
                this.columnYearlyIncome.ReadOnly = true;
                this.columnYearlyIncome.MaxLength = 30;
                this.columnGender.ReadOnly = true;
                this.columnGender.MaxLength = 1;
                this.columnTotalChildren.ReadOnly = true;
                this.columnNumberChildrenAtHome.ReadOnly = true;
                this.columnEducation.ReadOnly = true;
                this.columnEducation.MaxLength = 30;
                this.columnOccupation.ReadOnly = true;
                this.columnOccupation.MaxLength = 30;
                this.columnHomeOwnerFlag.ReadOnly = true;
                this.columnNumberCarsOwned.ReadOnly = true;
                this.columnHobby.ReadOnly = true;
                this.columnHobby.MaxLength = 30;
            }
            
            public vIndividualDemographicsRow NewvIndividualDemographicsRow() {
                return ((vIndividualDemographicsRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new vIndividualDemographicsRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(vIndividualDemographicsRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.vIndividualDemographicsRowChanged != null)) {
                    this.vIndividualDemographicsRowChanged(this, new vIndividualDemographicsRowChangeEvent(((vIndividualDemographicsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.vIndividualDemographicsRowChanging != null)) {
                    this.vIndividualDemographicsRowChanging(this, new vIndividualDemographicsRowChangeEvent(((vIndividualDemographicsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.vIndividualDemographicsRowDeleted != null)) {
                    this.vIndividualDemographicsRowDeleted(this, new vIndividualDemographicsRowChangeEvent(((vIndividualDemographicsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.vIndividualDemographicsRowDeleting != null)) {
                    this.vIndividualDemographicsRowDeleting(this, new vIndividualDemographicsRowChangeEvent(((vIndividualDemographicsRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovevIndividualDemographicsRow(vIndividualDemographicsRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "vIndividualDemographicsDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class vSalesPersonDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnSalesPersonID;
            
            private System.Data.DataColumn columnTitle;
            
            private System.Data.DataColumn columnFirstName;
            
            private System.Data.DataColumn columnMiddleName;
            
            private System.Data.DataColumn columnLastName;
            
            private System.Data.DataColumn columnSuffix;
            
            private System.Data.DataColumn columnJobTitle;
            
            private System.Data.DataColumn columnPhone;
            
            private System.Data.DataColumn columnEmailAddress;
            
            private System.Data.DataColumn columnEmailPromotion;
            
            private System.Data.DataColumn columnAddressLine1;
            
            private System.Data.DataColumn columnAddressLine2;
            
            private System.Data.DataColumn columnCity;
            
            private System.Data.DataColumn columnStateProvinceName;
            
            private System.Data.DataColumn columnPostalCode;
            
            private System.Data.DataColumn columnCountryRegionName;
            
            private System.Data.DataColumn columnTerritoryName;
            
            private System.Data.DataColumn columnTerritoryGroup;
            
            private System.Data.DataColumn columnSalesQuota;
            
            private System.Data.DataColumn columnSalesYTD;
            
            private System.Data.DataColumn columnSalesLastYear;
            
            public vSalesPersonDataTable() {
                this.TableName = "vSalesPerson";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal vSalesPersonDataTable(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;
            }
            
            protected vSalesPersonDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn SalesPersonIDColumn {
                get {
                    return this.columnSalesPersonID;
                }
            }
            
            public System.Data.DataColumn TitleColumn {
                get {
                    return this.columnTitle;
                }
            }
            
            public System.Data.DataColumn FirstNameColumn {
                get {
                    return this.columnFirstName;
                }
            }
            
            public System.Data.DataColumn MiddleNameColumn {
                get {
                    return this.columnMiddleName;
                }
            }
            
            public System.Data.DataColumn LastNameColumn {
                get {
                    return this.columnLastName;
                }
            }
            
            public System.Data.DataColumn SuffixColumn {
                get {
                    return this.columnSuffix;
                }
            }
            
            public System.Data.DataColumn JobTitleColumn {
                get {
                    return this.columnJobTitle;
                }
            }
            
            public System.Data.DataColumn PhoneColumn {
                get {
                    return this.columnPhone;
                }
            }
            
            public System.Data.DataColumn EmailAddressColumn {
                get {
                    return this.columnEmailAddress;
                }
            }
            
            public System.Data.DataColumn EmailPromotionColumn {
                get {
                    return this.columnEmailPromotion;
                }
            }
            
            public System.Data.DataColumn AddressLine1Column {
                get {
                    return this.columnAddressLine1;
                }
            }
            
            public System.Data.DataColumn AddressLine2Column {
                get {
                    return this.columnAddressLine2;
                }
            }
            
            public System.Data.DataColumn CityColumn {
                get {
                    return this.columnCity;
                }
            }
            
            public System.Data.DataColumn StateProvinceNameColumn {
                get {
                    return this.columnStateProvinceName;
                }
            }
            
            public System.Data.DataColumn PostalCodeColumn {
                get {
                    return this.columnPostalCode;
                }
            }
            
            public System.Data.DataColumn CountryRegionNameColumn {
                get {
                    return this.columnCountryRegionName;
                }
            }
            
            public System.Data.DataColumn TerritoryNameColumn {
                get {
                    return this.columnTerritoryName;
                }
            }
            
            public System.Data.DataColumn TerritoryGroupColumn {
                get {
                    return this.columnTerritoryGroup;
                }
            }
            
            public System.Data.DataColumn SalesQuotaColumn {
                get {
                    return this.columnSalesQuota;
                }
            }
            
            public System.Data.DataColumn SalesYTDColumn {
                get {
                    return this.columnSalesYTD;
                }
            }
            
            public System.Data.DataColumn SalesLastYearColumn {
                get {
                    return this.columnSalesLastYear;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public vSalesPersonRow this[int index] {
                get {
                    return ((vSalesPersonRow)(this.Rows[index]));
                }
            }
            
            public event vSalesPersonRowChangeEventHandler vSalesPersonRowChanged;
            
            public event vSalesPersonRowChangeEventHandler vSalesPersonRowChanging;
            
            public event vSalesPersonRowChangeEventHandler vSalesPersonRowDeleted;
            
            public event vSalesPersonRowChangeEventHandler vSalesPersonRowDeleting;
            
            public void AddvSalesPersonRow(vSalesPersonRow row) {
                this.Rows.Add(row);
            }
            
            public vSalesPersonRow AddvSalesPersonRow(
                        int SalesPersonID, 
                        string Title, 
                        string FirstName, 
                        string MiddleName, 
                        string LastName, 
                        string Suffix, 
                        string JobTitle, 
                        string Phone, 
                        string EmailAddress, 
                        int EmailPromotion, 
                        string AddressLine1, 
                        string AddressLine2, 
                        string City, 
                        string StateProvinceName, 
                        string PostalCode, 
                        string CountryRegionName, 
                        string TerritoryName, 
                        string TerritoryGroup, 
                        decimal SalesQuota, 
                        decimal SalesYTD, 
                        decimal SalesLastYear) {
                vSalesPersonRow rowvSalesPersonRow = ((vSalesPersonRow)(this.NewRow()));
                rowvSalesPersonRow.ItemArray = new object[] {
                        SalesPersonID,
                        Title,
                        FirstName,
                        MiddleName,
                        LastName,
                        Suffix,
                        JobTitle,
                        Phone,
                        EmailAddress,
                        EmailPromotion,
                        AddressLine1,
                        AddressLine2,
                        City,
                        StateProvinceName,
                        PostalCode,
                        CountryRegionName,
                        TerritoryName,
                        TerritoryGroup,
                        SalesQuota,
                        SalesYTD,
                        SalesLastYear};
                this.Rows.Add(rowvSalesPersonRow);
                return rowvSalesPersonRow;
            }
            
            public vSalesPersonRow FindBySalesPersonID(int SalesPersonID) {
                return ((vSalesPersonRow)(this.Rows.Find(new object[] {
                            SalesPersonID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                vSalesPersonDataTable cln = ((vSalesPersonDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new vSalesPersonDataTable();
            }
            
            internal void InitVars() {
                this.columnSalesPersonID = base.Columns["SalesPersonID"];
                this.columnTitle = base.Columns["Title"];
                this.columnFirstName = base.Columns["FirstName"];
                this.columnMiddleName = base.Columns["MiddleName"];
                this.columnLastName = base.Columns["LastName"];
                this.columnSuffix = base.Columns["Suffix"];
                this.columnJobTitle = base.Columns["JobTitle"];
                this.columnPhone = base.Columns["Phone"];
                this.columnEmailAddress = base.Columns["EmailAddress"];
                this.columnEmailPromotion = base.Columns["EmailPromotion"];
                this.columnAddressLine1 = base.Columns["AddressLine1"];
                this.columnAddressLine2 = base.Columns["AddressLine2"];
                this.columnCity = base.Columns["City"];
                this.columnStateProvinceName = base.Columns["StateProvinceName"];
                this.columnPostalCode = base.Columns["PostalCode"];
                this.columnCountryRegionName = base.Columns["CountryRegionName"];
                this.columnTerritoryName = base.Columns["TerritoryName"];
                this.columnTerritoryGroup = base.Columns["TerritoryGroup"];
                this.columnSalesQuota = base.Columns["SalesQuota"];
                this.columnSalesYTD = base.Columns["SalesYTD"];
                this.columnSalesLastYear = base.Columns["SalesLastYear"];
            }
            
            private void InitClass() {
                this.columnSalesPersonID = new System.Data.DataColumn("SalesPersonID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesPersonID);
                this.columnTitle = new System.Data.DataColumn("Title", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTitle);
                this.columnFirstName = new System.Data.DataColumn("FirstName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnFirstName);
                this.columnMiddleName = new System.Data.DataColumn("MiddleName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnMiddleName);
                this.columnLastName = new System.Data.DataColumn("LastName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLastName);
                this.columnSuffix = new System.Data.DataColumn("Suffix", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSuffix);
                this.columnJobTitle = new System.Data.DataColumn("JobTitle", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnJobTitle);
                this.columnPhone = new System.Data.DataColumn("Phone", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPhone);
                this.columnEmailAddress = new System.Data.DataColumn("EmailAddress", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmailAddress);
                this.columnEmailPromotion = new System.Data.DataColumn("EmailPromotion", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmailPromotion);
                this.columnAddressLine1 = new System.Data.DataColumn("AddressLine1", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAddressLine1);
                this.columnAddressLine2 = new System.Data.DataColumn("AddressLine2", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAddressLine2);
                this.columnCity = new System.Data.DataColumn("City", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCity);
                this.columnStateProvinceName = new System.Data.DataColumn("StateProvinceName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStateProvinceName);
                this.columnPostalCode = new System.Data.DataColumn("PostalCode", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPostalCode);
                this.columnCountryRegionName = new System.Data.DataColumn("CountryRegionName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCountryRegionName);
                this.columnTerritoryName = new System.Data.DataColumn("TerritoryName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTerritoryName);
                this.columnTerritoryGroup = new System.Data.DataColumn("TerritoryGroup", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTerritoryGroup);
                this.columnSalesQuota = new System.Data.DataColumn("SalesQuota", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesQuota);
                this.columnSalesYTD = new System.Data.DataColumn("SalesYTD", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesYTD);
                this.columnSalesLastYear = new System.Data.DataColumn("SalesLastYear", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesLastYear);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnSalesPersonID}, true));
                this.columnSalesPersonID.AllowDBNull = false;
                this.columnSalesPersonID.Unique = true;
                this.columnTitle.MaxLength = 8;
                this.columnFirstName.AllowDBNull = false;
                this.columnFirstName.MaxLength = 50;
                this.columnMiddleName.MaxLength = 50;
                this.columnLastName.AllowDBNull = false;
                this.columnLastName.MaxLength = 50;
                this.columnSuffix.MaxLength = 10;
                this.columnJobTitle.AllowDBNull = false;
                this.columnJobTitle.MaxLength = 50;
                this.columnPhone.MaxLength = 25;
                this.columnEmailAddress.MaxLength = 50;
                this.columnEmailPromotion.AllowDBNull = false;
                this.columnAddressLine1.AllowDBNull = false;
                this.columnAddressLine1.MaxLength = 60;
                this.columnAddressLine2.MaxLength = 60;
                this.columnCity.AllowDBNull = false;
                this.columnCity.MaxLength = 30;
                this.columnStateProvinceName.AllowDBNull = false;
                this.columnStateProvinceName.MaxLength = 50;
                this.columnPostalCode.AllowDBNull = false;
                this.columnPostalCode.MaxLength = 15;
                this.columnCountryRegionName.AllowDBNull = false;
                this.columnCountryRegionName.MaxLength = 50;
                this.columnTerritoryName.MaxLength = 50;
                this.columnTerritoryGroup.MaxLength = 50;
                this.columnSalesYTD.AllowDBNull = false;
                this.columnSalesLastYear.AllowDBNull = false;
            }
            
            public vSalesPersonRow NewvSalesPersonRow() {
                return ((vSalesPersonRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new vSalesPersonRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(vSalesPersonRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.vSalesPersonRowChanged != null)) {
                    this.vSalesPersonRowChanged(this, new vSalesPersonRowChangeEvent(((vSalesPersonRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.vSalesPersonRowChanging != null)) {
                    this.vSalesPersonRowChanging(this, new vSalesPersonRowChangeEvent(((vSalesPersonRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.vSalesPersonRowDeleted != null)) {
                    this.vSalesPersonRowDeleted(this, new vSalesPersonRowChangeEvent(((vSalesPersonRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.vSalesPersonRowDeleting != null)) {
                    this.vSalesPersonRowDeleting(this, new vSalesPersonRowChangeEvent(((vSalesPersonRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovevSalesPersonRow(vSalesPersonRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "vSalesPersonDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class vSalesPersonSalesByFiscalYearsDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnSalesPersonID;
            
            private System.Data.DataColumn columnFullName;
            
            private System.Data.DataColumn columnTitle;
            
            private System.Data.DataColumn columnSalesTerritory;
            
            private System.Data.DataColumn column2002;
            
            private System.Data.DataColumn column2003;
            
            private System.Data.DataColumn column2004;
            
            public vSalesPersonSalesByFiscalYearsDataTable() {
                this.TableName = "vSalesPersonSalesByFiscalYears";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal vSalesPersonSalesByFiscalYearsDataTable(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;
            }
            
            protected vSalesPersonSalesByFiscalYearsDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn SalesPersonIDColumn {
                get {
                    return this.columnSalesPersonID;
                }
            }
            
            public System.Data.DataColumn FullNameColumn {
                get {
                    return this.columnFullName;
                }
            }
            
            public System.Data.DataColumn TitleColumn {
                get {
                    return this.columnTitle;
                }
            }
            
            public System.Data.DataColumn SalesTerritoryColumn {
                get {
                    return this.columnSalesTerritory;
                }
            }
            
            public System.Data.DataColumn _2002Column {
                get {
                    return this.column2002;
                }
            }
            
            public System.Data.DataColumn _2003Column {
                get {
                    return this.column2003;
                }
            }
            
            public System.Data.DataColumn _2004Column {
                get {
                    return this.column2004;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public vSalesPersonSalesByFiscalYearsRow this[int index] {
                get {
                    return ((vSalesPersonSalesByFiscalYearsRow)(this.Rows[index]));
                }
            }
            
            public event vSalesPersonSalesByFiscalYearsRowChangeEventHandler vSalesPersonSalesByFiscalYearsRowChanged;
            
            public event vSalesPersonSalesByFiscalYearsRowChangeEventHandler vSalesPersonSalesByFiscalYearsRowChanging;
            
            public event vSalesPersonSalesByFiscalYearsRowChangeEventHandler vSalesPersonSalesByFiscalYearsRowDeleted;
            
            public event vSalesPersonSalesByFiscalYearsRowChangeEventHandler vSalesPersonSalesByFiscalYearsRowDeleting;
            
            public void AddvSalesPersonSalesByFiscalYearsRow(vSalesPersonSalesByFiscalYearsRow row) {
                this.Rows.Add(row);
            }
            
            public vSalesPersonSalesByFiscalYearsRow AddvSalesPersonSalesByFiscalYearsRow(int SalesPersonID, string FullName, string Title, string SalesTerritory, decimal _2002, decimal _2003, decimal _2004) {
                vSalesPersonSalesByFiscalYearsRow rowvSalesPersonSalesByFiscalYearsRow = ((vSalesPersonSalesByFiscalYearsRow)(this.NewRow()));
                rowvSalesPersonSalesByFiscalYearsRow.ItemArray = new object[] {
                        SalesPersonID,
                        FullName,
                        Title,
                        SalesTerritory,
                        _2002,
                        _2003,
                        _2004};
                this.Rows.Add(rowvSalesPersonSalesByFiscalYearsRow);
                return rowvSalesPersonSalesByFiscalYearsRow;
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                vSalesPersonSalesByFiscalYearsDataTable cln = ((vSalesPersonSalesByFiscalYearsDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new vSalesPersonSalesByFiscalYearsDataTable();
            }
            
            internal void InitVars() {
                this.columnSalesPersonID = base.Columns["SalesPersonID"];
                this.columnFullName = base.Columns["FullName"];
                this.columnTitle = base.Columns["Title"];
                this.columnSalesTerritory = base.Columns["SalesTerritory"];
                this.column2002 = base.Columns["2002"];
                this.column2003 = base.Columns["2003"];
                this.column2004 = base.Columns["2004"];
            }
            
            private void InitClass() {
                this.columnSalesPersonID = new System.Data.DataColumn("SalesPersonID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesPersonID);
                this.columnFullName = new System.Data.DataColumn("FullName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnFullName);
                this.columnTitle = new System.Data.DataColumn("Title", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTitle);
                this.columnSalesTerritory = new System.Data.DataColumn("SalesTerritory", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSalesTerritory);
                this.column2002 = new System.Data.DataColumn("2002", typeof(decimal), null, System.Data.MappingType.Element);
                this.column2002.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_2002");
                this.column2002.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_2002Column");
                this.column2002.ExtendedProperties.Add("Generator_UserColumnName", "2002");
                base.Columns.Add(this.column2002);
                this.column2003 = new System.Data.DataColumn("2003", typeof(decimal), null, System.Data.MappingType.Element);
                this.column2003.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_2003");
                this.column2003.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_2003Column");
                this.column2003.ExtendedProperties.Add("Generator_UserColumnName", "2003");
                base.Columns.Add(this.column2003);
                this.column2004 = new System.Data.DataColumn("2004", typeof(decimal), null, System.Data.MappingType.Element);
                this.column2004.ExtendedProperties.Add("Generator_ColumnPropNameInRow", "_2004");
                this.column2004.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "_2004Column");
                this.column2004.ExtendedProperties.Add("Generator_UserColumnName", "2004");
                base.Columns.Add(this.column2004);
                this.columnFullName.MaxLength = 152;
                this.columnTitle.AllowDBNull = false;
                this.columnTitle.MaxLength = 50;
                this.columnSalesTerritory.AllowDBNull = false;
                this.columnSalesTerritory.MaxLength = 50;
            }
            
            public vSalesPersonSalesByFiscalYearsRow NewvSalesPersonSalesByFiscalYearsRow() {
                return ((vSalesPersonSalesByFiscalYearsRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new vSalesPersonSalesByFiscalYearsRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(vSalesPersonSalesByFiscalYearsRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.vSalesPersonSalesByFiscalYearsRowChanged != null)) {
                    this.vSalesPersonSalesByFiscalYearsRowChanged(this, new vSalesPersonSalesByFiscalYearsRowChangeEvent(((vSalesPersonSalesByFiscalYearsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.vSalesPersonSalesByFiscalYearsRowChanging != null)) {
                    this.vSalesPersonSalesByFiscalYearsRowChanging(this, new vSalesPersonSalesByFiscalYearsRowChangeEvent(((vSalesPersonSalesByFiscalYearsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.vSalesPersonSalesByFiscalYearsRowDeleted != null)) {
                    this.vSalesPersonSalesByFiscalYearsRowDeleted(this, new vSalesPersonSalesByFiscalYearsRowChangeEvent(((vSalesPersonSalesByFiscalYearsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.vSalesPersonSalesByFiscalYearsRowDeleting != null)) {
                    this.vSalesPersonSalesByFiscalYearsRowDeleting(this, new vSalesPersonSalesByFiscalYearsRowChangeEvent(((vSalesPersonSalesByFiscalYearsRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovevSalesPersonSalesByFiscalYearsRow(vSalesPersonSalesByFiscalYearsRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "vSalesPersonSalesByFiscalYearsDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class vStoreWithDemographicsDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnCustomerID;
            
            private System.Data.DataColumn columnName;
            
            private System.Data.DataColumn columnContactType;
            
            private System.Data.DataColumn columnTitle;
            
            private System.Data.DataColumn columnFirstName;
            
            private System.Data.DataColumn columnMiddleName;
            
            private System.Data.DataColumn columnLastName;
            
            private System.Data.DataColumn columnSuffix;
            
            private System.Data.DataColumn columnPhone;
            
            private System.Data.DataColumn columnEmailAddress;
            
            private System.Data.DataColumn columnEmailPromotion;
            
            private System.Data.DataColumn columnAddressLine1;
            
            private System.Data.DataColumn columnAddressLine2;
            
            private System.Data.DataColumn columnCity;
            
            private System.Data.DataColumn columnStateProvinceName;
            
            private System.Data.DataColumn columnPostalCode;
            
            private System.Data.DataColumn columnCountryRegionName;
            
            private System.Data.DataColumn columnAnnualSales;
            
            private System.Data.DataColumn columnAnnualRevenue;
            
            private System.Data.DataColumn columnBankName;
            
            private System.Data.DataColumn columnBusinessType;
            
            private System.Data.DataColumn columnYearOpened;
            
            private System.Data.DataColumn columnSpecialty;
            
            private System.Data.DataColumn columnSquareFeet;
            
            private System.Data.DataColumn columnBrands;
            
            private System.Data.DataColumn columnInternet;
            
            private System.Data.DataColumn columnNumberEmployees;
            
            public vStoreWithDemographicsDataTable() {
                this.TableName = "vStoreWithDemographics";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal vStoreWithDemographicsDataTable(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;
            }
            
            protected vStoreWithDemographicsDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn CustomerIDColumn {
                get {
                    return this.columnCustomerID;
                }
            }
            
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            public System.Data.DataColumn ContactTypeColumn {
                get {
                    return this.columnContactType;
                }
            }
            
            public System.Data.DataColumn TitleColumn {
                get {
                    return this.columnTitle;
                }
            }
            
            public System.Data.DataColumn FirstNameColumn {
                get {
                    return this.columnFirstName;
                }
            }
            
            public System.Data.DataColumn MiddleNameColumn {
                get {
                    return this.columnMiddleName;
                }
            }
            
            public System.Data.DataColumn LastNameColumn {
                get {
                    return this.columnLastName;
                }
            }
            
            public System.Data.DataColumn SuffixColumn {
                get {
                    return this.columnSuffix;
                }
            }
            
            public System.Data.DataColumn PhoneColumn {
                get {
                    return this.columnPhone;
                }
            }
            
            public System.Data.DataColumn EmailAddressColumn {
                get {
                    return this.columnEmailAddress;
                }
            }
            
            public System.Data.DataColumn EmailPromotionColumn {
                get {
                    return this.columnEmailPromotion;
                }
            }
            
            public System.Data.DataColumn AddressLine1Column {
                get {
                    return this.columnAddressLine1;
                }
            }
            
            public System.Data.DataColumn AddressLine2Column {
                get {
                    return this.columnAddressLine2;
                }
            }
            
            public System.Data.DataColumn CityColumn {
                get {
                    return this.columnCity;
                }
            }
            
            public System.Data.DataColumn StateProvinceNameColumn {
                get {
                    return this.columnStateProvinceName;
                }
            }
            
            public System.Data.DataColumn PostalCodeColumn {
                get {
                    return this.columnPostalCode;
                }
            }
            
            public System.Data.DataColumn CountryRegionNameColumn {
                get {
                    return this.columnCountryRegionName;
                }
            }
            
            public System.Data.DataColumn AnnualSalesColumn {
                get {
                    return this.columnAnnualSales;
                }
            }
            
            public System.Data.DataColumn AnnualRevenueColumn {
                get {
                    return this.columnAnnualRevenue;
                }
            }
            
            public System.Data.DataColumn BankNameColumn {
                get {
                    return this.columnBankName;
                }
            }
            
            public System.Data.DataColumn BusinessTypeColumn {
                get {
                    return this.columnBusinessType;
                }
            }
            
            public System.Data.DataColumn YearOpenedColumn {
                get {
                    return this.columnYearOpened;
                }
            }
            
            public System.Data.DataColumn SpecialtyColumn {
                get {
                    return this.columnSpecialty;
                }
            }
            
            public System.Data.DataColumn SquareFeetColumn {
                get {
                    return this.columnSquareFeet;
                }
            }
            
            public System.Data.DataColumn BrandsColumn {
                get {
                    return this.columnBrands;
                }
            }
            
            public System.Data.DataColumn InternetColumn {
                get {
                    return this.columnInternet;
                }
            }
            
            public System.Data.DataColumn NumberEmployeesColumn {
                get {
                    return this.columnNumberEmployees;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public vStoreWithDemographicsRow this[int index] {
                get {
                    return ((vStoreWithDemographicsRow)(this.Rows[index]));
                }
            }
            
            public event vStoreWithDemographicsRowChangeEventHandler vStoreWithDemographicsRowChanged;
            
            public event vStoreWithDemographicsRowChangeEventHandler vStoreWithDemographicsRowChanging;
            
            public event vStoreWithDemographicsRowChangeEventHandler vStoreWithDemographicsRowDeleted;
            
            public event vStoreWithDemographicsRowChangeEventHandler vStoreWithDemographicsRowDeleting;
            
            public void AddvStoreWithDemographicsRow(vStoreWithDemographicsRow row) {
                this.Rows.Add(row);
            }
            
            public vStoreWithDemographicsRow AddvStoreWithDemographicsRow(
                        int CustomerID, 
                        string Name, 
                        string ContactType, 
                        string Title, 
                        string FirstName, 
                        string MiddleName, 
                        string LastName, 
                        string Suffix, 
                        string Phone, 
                        string EmailAddress, 
                        int EmailPromotion, 
                        string AddressLine1, 
                        string AddressLine2, 
                        string City, 
                        string StateProvinceName, 
                        string PostalCode, 
                        string CountryRegionName, 
                        decimal AnnualSales, 
                        decimal AnnualRevenue, 
                        string BankName, 
                        string BusinessType, 
                        int YearOpened, 
                        string Specialty, 
                        int SquareFeet, 
                        string Brands, 
                        string Internet, 
                        int NumberEmployees) {
                vStoreWithDemographicsRow rowvStoreWithDemographicsRow = ((vStoreWithDemographicsRow)(this.NewRow()));
                rowvStoreWithDemographicsRow.ItemArray = new object[] {
                        CustomerID,
                        Name,
                        ContactType,
                        Title,
                        FirstName,
                        MiddleName,
                        LastName,
                        Suffix,
                        Phone,
                        EmailAddress,
                        EmailPromotion,
                        AddressLine1,
                        AddressLine2,
                        City,
                        StateProvinceName,
                        PostalCode,
                        CountryRegionName,
                        AnnualSales,
                        AnnualRevenue,
                        BankName,
                        BusinessType,
                        YearOpened,
                        Specialty,
                        SquareFeet,
                        Brands,
                        Internet,
                        NumberEmployees};
                this.Rows.Add(rowvStoreWithDemographicsRow);
                return rowvStoreWithDemographicsRow;
            }
            
            public vStoreWithDemographicsRow FindByCustomerID(int CustomerID) {
                return ((vStoreWithDemographicsRow)(this.Rows.Find(new object[] {
                            CustomerID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                vStoreWithDemographicsDataTable cln = ((vStoreWithDemographicsDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new vStoreWithDemographicsDataTable();
            }
            
            internal void InitVars() {
                this.columnCustomerID = base.Columns["CustomerID"];
                this.columnName = base.Columns["Name"];
                this.columnContactType = base.Columns["ContactType"];
                this.columnTitle = base.Columns["Title"];
                this.columnFirstName = base.Columns["FirstName"];
                this.columnMiddleName = base.Columns["MiddleName"];
                this.columnLastName = base.Columns["LastName"];
                this.columnSuffix = base.Columns["Suffix"];
                this.columnPhone = base.Columns["Phone"];
                this.columnEmailAddress = base.Columns["EmailAddress"];
                this.columnEmailPromotion = base.Columns["EmailPromotion"];
                this.columnAddressLine1 = base.Columns["AddressLine1"];
                this.columnAddressLine2 = base.Columns["AddressLine2"];
                this.columnCity = base.Columns["City"];
                this.columnStateProvinceName = base.Columns["StateProvinceName"];
                this.columnPostalCode = base.Columns["PostalCode"];
                this.columnCountryRegionName = base.Columns["CountryRegionName"];
                this.columnAnnualSales = base.Columns["AnnualSales"];
                this.columnAnnualRevenue = base.Columns["AnnualRevenue"];
                this.columnBankName = base.Columns["BankName"];
                this.columnBusinessType = base.Columns["BusinessType"];
                this.columnYearOpened = base.Columns["YearOpened"];
                this.columnSpecialty = base.Columns["Specialty"];
                this.columnSquareFeet = base.Columns["SquareFeet"];
                this.columnBrands = base.Columns["Brands"];
                this.columnInternet = base.Columns["Internet"];
                this.columnNumberEmployees = base.Columns["NumberEmployees"];
            }
            
            private void InitClass() {
                this.columnCustomerID = new System.Data.DataColumn("CustomerID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCustomerID);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.columnContactType = new System.Data.DataColumn("ContactType", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnContactType);
                this.columnTitle = new System.Data.DataColumn("Title", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTitle);
                this.columnFirstName = new System.Data.DataColumn("FirstName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnFirstName);
                this.columnMiddleName = new System.Data.DataColumn("MiddleName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnMiddleName);
                this.columnLastName = new System.Data.DataColumn("LastName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLastName);
                this.columnSuffix = new System.Data.DataColumn("Suffix", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSuffix);
                this.columnPhone = new System.Data.DataColumn("Phone", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPhone);
                this.columnEmailAddress = new System.Data.DataColumn("EmailAddress", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmailAddress);
                this.columnEmailPromotion = new System.Data.DataColumn("EmailPromotion", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmailPromotion);
                this.columnAddressLine1 = new System.Data.DataColumn("AddressLine1", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAddressLine1);
                this.columnAddressLine2 = new System.Data.DataColumn("AddressLine2", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAddressLine2);
                this.columnCity = new System.Data.DataColumn("City", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCity);
                this.columnStateProvinceName = new System.Data.DataColumn("StateProvinceName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStateProvinceName);
                this.columnPostalCode = new System.Data.DataColumn("PostalCode", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPostalCode);
                this.columnCountryRegionName = new System.Data.DataColumn("CountryRegionName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCountryRegionName);
                this.columnAnnualSales = new System.Data.DataColumn("AnnualSales", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAnnualSales);
                this.columnAnnualRevenue = new System.Data.DataColumn("AnnualRevenue", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAnnualRevenue);
                this.columnBankName = new System.Data.DataColumn("BankName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnBankName);
                this.columnBusinessType = new System.Data.DataColumn("BusinessType", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnBusinessType);
                this.columnYearOpened = new System.Data.DataColumn("YearOpened", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnYearOpened);
                this.columnSpecialty = new System.Data.DataColumn("Specialty", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSpecialty);
                this.columnSquareFeet = new System.Data.DataColumn("SquareFeet", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnSquareFeet);
                this.columnBrands = new System.Data.DataColumn("Brands", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnBrands);
                this.columnInternet = new System.Data.DataColumn("Internet", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnInternet);
                this.columnNumberEmployees = new System.Data.DataColumn("NumberEmployees", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnNumberEmployees);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnCustomerID}, true));
                this.columnCustomerID.AllowDBNull = false;
                this.columnCustomerID.Unique = true;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
                this.columnContactType.AllowDBNull = false;
                this.columnContactType.MaxLength = 50;
                this.columnTitle.MaxLength = 8;
                this.columnFirstName.AllowDBNull = false;
                this.columnFirstName.MaxLength = 50;
                this.columnMiddleName.MaxLength = 50;
                this.columnLastName.AllowDBNull = false;
                this.columnLastName.MaxLength = 50;
                this.columnSuffix.MaxLength = 10;
                this.columnPhone.MaxLength = 25;
                this.columnEmailAddress.MaxLength = 50;
                this.columnEmailPromotion.AllowDBNull = false;
                this.columnAddressLine1.AllowDBNull = false;
                this.columnAddressLine1.MaxLength = 60;
                this.columnAddressLine2.MaxLength = 60;
                this.columnCity.AllowDBNull = false;
                this.columnCity.MaxLength = 30;
                this.columnStateProvinceName.AllowDBNull = false;
                this.columnStateProvinceName.MaxLength = 50;
                this.columnPostalCode.AllowDBNull = false;
                this.columnPostalCode.MaxLength = 15;
                this.columnCountryRegionName.AllowDBNull = false;
                this.columnCountryRegionName.MaxLength = 50;
                this.columnAnnualSales.ReadOnly = true;
                this.columnAnnualRevenue.ReadOnly = true;
                this.columnBankName.ReadOnly = true;
                this.columnBankName.MaxLength = 50;
                this.columnBusinessType.ReadOnly = true;
                this.columnBusinessType.MaxLength = 5;
                this.columnYearOpened.ReadOnly = true;
                this.columnSpecialty.ReadOnly = true;
                this.columnSpecialty.MaxLength = 50;
                this.columnSquareFeet.ReadOnly = true;
                this.columnBrands.ReadOnly = true;
                this.columnBrands.MaxLength = 30;
                this.columnInternet.ReadOnly = true;
                this.columnInternet.MaxLength = 30;
                this.columnNumberEmployees.ReadOnly = true;
            }
            
            public vStoreWithDemographicsRow NewvStoreWithDemographicsRow() {
                return ((vStoreWithDemographicsRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new vStoreWithDemographicsRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(vStoreWithDemographicsRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.vStoreWithDemographicsRowChanged != null)) {
                    this.vStoreWithDemographicsRowChanged(this, new vStoreWithDemographicsRowChangeEvent(((vStoreWithDemographicsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.vStoreWithDemographicsRowChanging != null)) {
                    this.vStoreWithDemographicsRowChanging(this, new vStoreWithDemographicsRowChangeEvent(((vStoreWithDemographicsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.vStoreWithDemographicsRowDeleted != null)) {
                    this.vStoreWithDemographicsRowDeleted(this, new vStoreWithDemographicsRowChangeEvent(((vStoreWithDemographicsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.vStoreWithDemographicsRowDeleting != null)) {
                    this.vStoreWithDemographicsRowDeleting(this, new vStoreWithDemographicsRowChangeEvent(((vStoreWithDemographicsRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovevStoreWithDemographicsRow(vStoreWithDemographicsRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "vStoreWithDemographicsDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class uspGetBillOfMaterialsDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnProductAssemblyID;
            
            private System.Data.DataColumn columnComponentID;
            
            private System.Data.DataColumn columnComponentDesc;
            
            private System.Data.DataColumn columnTotalQuantity;
            
            private System.Data.DataColumn columnStandardCost;
            
            private System.Data.DataColumn columnListPrice;
            
            private System.Data.DataColumn columnBOMLevel;
            
            private System.Data.DataColumn columnRecursionLevel;
            
            public uspGetBillOfMaterialsDataTable() {
                this.TableName = "uspGetBillOfMaterials";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal uspGetBillOfMaterialsDataTable(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;
            }
            
            protected uspGetBillOfMaterialsDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ProductAssemblyIDColumn {
                get {
                    return this.columnProductAssemblyID;
                }
            }
            
            public System.Data.DataColumn ComponentIDColumn {
                get {
                    return this.columnComponentID;
                }
            }
            
            public System.Data.DataColumn ComponentDescColumn {
                get {
                    return this.columnComponentDesc;
                }
            }
            
            public System.Data.DataColumn TotalQuantityColumn {
                get {
                    return this.columnTotalQuantity;
                }
            }
            
            public System.Data.DataColumn StandardCostColumn {
                get {
                    return this.columnStandardCost;
                }
            }
            
            public System.Data.DataColumn ListPriceColumn {
                get {
                    return this.columnListPrice;
                }
            }
            
            public System.Data.DataColumn BOMLevelColumn {
                get {
                    return this.columnBOMLevel;
                }
            }
            
            public System.Data.DataColumn RecursionLevelColumn {
                get {
                    return this.columnRecursionLevel;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public uspGetBillOfMaterialsRow this[int index] {
                get {
                    return ((uspGetBillOfMaterialsRow)(this.Rows[index]));
                }
            }
            
            public event uspGetBillOfMaterialsRowChangeEventHandler uspGetBillOfMaterialsRowChanged;
            
            public event uspGetBillOfMaterialsRowChangeEventHandler uspGetBillOfMaterialsRowChanging;
            
            public event uspGetBillOfMaterialsRowChangeEventHandler uspGetBillOfMaterialsRowDeleted;
            
            public event uspGetBillOfMaterialsRowChangeEventHandler uspGetBillOfMaterialsRowDeleting;
            
            public void AdduspGetBillOfMaterialsRow(uspGetBillOfMaterialsRow row) {
                this.Rows.Add(row);
            }
            
            public uspGetBillOfMaterialsRow AdduspGetBillOfMaterialsRow(int ProductAssemblyID, int ComponentID, string ComponentDesc, decimal TotalQuantity, decimal StandardCost, decimal ListPrice, short BOMLevel, int RecursionLevel) {
                uspGetBillOfMaterialsRow rowuspGetBillOfMaterialsRow = ((uspGetBillOfMaterialsRow)(this.NewRow()));
                rowuspGetBillOfMaterialsRow.ItemArray = new object[] {
                        ProductAssemblyID,
                        ComponentID,
                        ComponentDesc,
                        TotalQuantity,
                        StandardCost,
                        ListPrice,
                        BOMLevel,
                        RecursionLevel};
                this.Rows.Add(rowuspGetBillOfMaterialsRow);
                return rowuspGetBillOfMaterialsRow;
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                uspGetBillOfMaterialsDataTable cln = ((uspGetBillOfMaterialsDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new uspGetBillOfMaterialsDataTable();
            }
            
            internal void InitVars() {
                this.columnProductAssemblyID = base.Columns["ProductAssemblyID"];
                this.columnComponentID = base.Columns["ComponentID"];
                this.columnComponentDesc = base.Columns["ComponentDesc"];
                this.columnTotalQuantity = base.Columns["TotalQuantity"];
                this.columnStandardCost = base.Columns["StandardCost"];
                this.columnListPrice = base.Columns["ListPrice"];
                this.columnBOMLevel = base.Columns["BOMLevel"];
                this.columnRecursionLevel = base.Columns["RecursionLevel"];
            }
            
            private void InitClass() {
                this.columnProductAssemblyID = new System.Data.DataColumn("ProductAssemblyID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductAssemblyID);
                this.columnComponentID = new System.Data.DataColumn("ComponentID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnComponentID);
                this.columnComponentDesc = new System.Data.DataColumn("ComponentDesc", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnComponentDesc);
                this.columnTotalQuantity = new System.Data.DataColumn("TotalQuantity", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTotalQuantity);
                this.columnStandardCost = new System.Data.DataColumn("StandardCost", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStandardCost);
                this.columnListPrice = new System.Data.DataColumn("ListPrice", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnListPrice);
                this.columnBOMLevel = new System.Data.DataColumn("BOMLevel", typeof(short), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnBOMLevel);
                this.columnRecursionLevel = new System.Data.DataColumn("RecursionLevel", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnRecursionLevel);
                this.columnProductAssemblyID.ReadOnly = true;
                this.columnComponentID.ReadOnly = true;
                this.columnComponentDesc.ReadOnly = true;
                this.columnComponentDesc.MaxLength = 50;
                this.columnTotalQuantity.ReadOnly = true;
                this.columnStandardCost.ReadOnly = true;
                this.columnListPrice.ReadOnly = true;
                this.columnBOMLevel.ReadOnly = true;
                this.columnRecursionLevel.ReadOnly = true;
            }
            
            public uspGetBillOfMaterialsRow NewuspGetBillOfMaterialsRow() {
                return ((uspGetBillOfMaterialsRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new uspGetBillOfMaterialsRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(uspGetBillOfMaterialsRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.uspGetBillOfMaterialsRowChanged != null)) {
                    this.uspGetBillOfMaterialsRowChanged(this, new uspGetBillOfMaterialsRowChangeEvent(((uspGetBillOfMaterialsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.uspGetBillOfMaterialsRowChanging != null)) {
                    this.uspGetBillOfMaterialsRowChanging(this, new uspGetBillOfMaterialsRowChangeEvent(((uspGetBillOfMaterialsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.uspGetBillOfMaterialsRowDeleted != null)) {
                    this.uspGetBillOfMaterialsRowDeleted(this, new uspGetBillOfMaterialsRowChangeEvent(((uspGetBillOfMaterialsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.uspGetBillOfMaterialsRowDeleting != null)) {
                    this.uspGetBillOfMaterialsRowDeleting(this, new uspGetBillOfMaterialsRowChangeEvent(((uspGetBillOfMaterialsRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveuspGetBillOfMaterialsRow(uspGetBillOfMaterialsRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "uspGetBillOfMaterialsDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class uspGetEmployeeManagersDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnRecursionLevel;
            
            private System.Data.DataColumn columnEmployeeID;
            
            private System.Data.DataColumn columnFirstName;
            
            private System.Data.DataColumn columnLastName;
            
            private System.Data.DataColumn columnManagerID;
            
            private System.Data.DataColumn columnManagerFirstName;
            
            private System.Data.DataColumn columnManagerLastName;
            
            public uspGetEmployeeManagersDataTable() {
                this.TableName = "uspGetEmployeeManagers";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal uspGetEmployeeManagersDataTable(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;
            }
            
            protected uspGetEmployeeManagersDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn RecursionLevelColumn {
                get {
                    return this.columnRecursionLevel;
                }
            }
            
            public System.Data.DataColumn EmployeeIDColumn {
                get {
                    return this.columnEmployeeID;
                }
            }
            
            public System.Data.DataColumn FirstNameColumn {
                get {
                    return this.columnFirstName;
                }
            }
            
            public System.Data.DataColumn LastNameColumn {
                get {
                    return this.columnLastName;
                }
            }
            
            public System.Data.DataColumn ManagerIDColumn {
                get {
                    return this.columnManagerID;
                }
            }
            
            public System.Data.DataColumn ManagerFirstNameColumn {
                get {
                    return this.columnManagerFirstName;
                }
            }
            
            public System.Data.DataColumn ManagerLastNameColumn {
                get {
                    return this.columnManagerLastName;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public uspGetEmployeeManagersRow this[int index] {
                get {
                    return ((uspGetEmployeeManagersRow)(this.Rows[index]));
                }
            }
            
            public event uspGetEmployeeManagersRowChangeEventHandler uspGetEmployeeManagersRowChanged;
            
            public event uspGetEmployeeManagersRowChangeEventHandler uspGetEmployeeManagersRowChanging;
            
            public event uspGetEmployeeManagersRowChangeEventHandler uspGetEmployeeManagersRowDeleted;
            
            public event uspGetEmployeeManagersRowChangeEventHandler uspGetEmployeeManagersRowDeleting;
            
            public void AdduspGetEmployeeManagersRow(uspGetEmployeeManagersRow row) {
                this.Rows.Add(row);
            }
            
            public uspGetEmployeeManagersRow AdduspGetEmployeeManagersRow(int RecursionLevel, int EmployeeID, string FirstName, string LastName, int ManagerID, string ManagerFirstName, string ManagerLastName) {
                uspGetEmployeeManagersRow rowuspGetEmployeeManagersRow = ((uspGetEmployeeManagersRow)(this.NewRow()));
                rowuspGetEmployeeManagersRow.ItemArray = new object[] {
                        RecursionLevel,
                        EmployeeID,
                        FirstName,
                        LastName,
                        ManagerID,
                        ManagerFirstName,
                        ManagerLastName};
                this.Rows.Add(rowuspGetEmployeeManagersRow);
                return rowuspGetEmployeeManagersRow;
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                uspGetEmployeeManagersDataTable cln = ((uspGetEmployeeManagersDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new uspGetEmployeeManagersDataTable();
            }
            
            internal void InitVars() {
                this.columnRecursionLevel = base.Columns["RecursionLevel"];
                this.columnEmployeeID = base.Columns["EmployeeID"];
                this.columnFirstName = base.Columns["FirstName"];
                this.columnLastName = base.Columns["LastName"];
                this.columnManagerID = base.Columns["ManagerID"];
                this.columnManagerFirstName = base.Columns["ManagerFirstName"];
                this.columnManagerLastName = base.Columns["ManagerLastName"];
            }
            
            private void InitClass() {
                this.columnRecursionLevel = new System.Data.DataColumn("RecursionLevel", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnRecursionLevel);
                this.columnEmployeeID = new System.Data.DataColumn("EmployeeID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmployeeID);
                this.columnFirstName = new System.Data.DataColumn("FirstName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnFirstName);
                this.columnLastName = new System.Data.DataColumn("LastName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLastName);
                this.columnManagerID = new System.Data.DataColumn("ManagerID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnManagerID);
                this.columnManagerFirstName = new System.Data.DataColumn("ManagerFirstName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnManagerFirstName);
                this.columnManagerLastName = new System.Data.DataColumn("ManagerLastName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnManagerLastName);
                this.columnRecursionLevel.ReadOnly = true;
                this.columnEmployeeID.ReadOnly = true;
                this.columnFirstName.ReadOnly = true;
                this.columnFirstName.MaxLength = 50;
                this.columnLastName.ReadOnly = true;
                this.columnLastName.MaxLength = 50;
                this.columnManagerID.ReadOnly = true;
                this.columnManagerFirstName.AllowDBNull = false;
                this.columnManagerFirstName.MaxLength = 50;
                this.columnManagerLastName.AllowDBNull = false;
                this.columnManagerLastName.MaxLength = 50;
            }
            
            public uspGetEmployeeManagersRow NewuspGetEmployeeManagersRow() {
                return ((uspGetEmployeeManagersRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new uspGetEmployeeManagersRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(uspGetEmployeeManagersRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.uspGetEmployeeManagersRowChanged != null)) {
                    this.uspGetEmployeeManagersRowChanged(this, new uspGetEmployeeManagersRowChangeEvent(((uspGetEmployeeManagersRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.uspGetEmployeeManagersRowChanging != null)) {
                    this.uspGetEmployeeManagersRowChanging(this, new uspGetEmployeeManagersRowChangeEvent(((uspGetEmployeeManagersRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.uspGetEmployeeManagersRowDeleted != null)) {
                    this.uspGetEmployeeManagersRowDeleted(this, new uspGetEmployeeManagersRowChangeEvent(((uspGetEmployeeManagersRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.uspGetEmployeeManagersRowDeleting != null)) {
                    this.uspGetEmployeeManagersRowDeleting(this, new uspGetEmployeeManagersRowChangeEvent(((uspGetEmployeeManagersRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveuspGetEmployeeManagersRow(uspGetEmployeeManagersRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "uspGetEmployeeManagersDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class uspGetManagerEmployeesDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnRecursionLevel;
            
            private System.Data.DataColumn columnManagerID;
            
            private System.Data.DataColumn columnManagerFirstName;
            
            private System.Data.DataColumn columnManagerLastName;
            
            private System.Data.DataColumn columnEmployeeID;
            
            private System.Data.DataColumn columnFirstName;
            
            private System.Data.DataColumn columnLastName;
            
            public uspGetManagerEmployeesDataTable() {
                this.TableName = "uspGetManagerEmployees";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal uspGetManagerEmployeesDataTable(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;
            }
            
            protected uspGetManagerEmployeesDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn RecursionLevelColumn {
                get {
                    return this.columnRecursionLevel;
                }
            }
            
            public System.Data.DataColumn ManagerIDColumn {
                get {
                    return this.columnManagerID;
                }
            }
            
            public System.Data.DataColumn ManagerFirstNameColumn {
                get {
                    return this.columnManagerFirstName;
                }
            }
            
            public System.Data.DataColumn ManagerLastNameColumn {
                get {
                    return this.columnManagerLastName;
                }
            }
            
            public System.Data.DataColumn EmployeeIDColumn {
                get {
                    return this.columnEmployeeID;
                }
            }
            
            public System.Data.DataColumn FirstNameColumn {
                get {
                    return this.columnFirstName;
                }
            }
            
            public System.Data.DataColumn LastNameColumn {
                get {
                    return this.columnLastName;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public uspGetManagerEmployeesRow this[int index] {
                get {
                    return ((uspGetManagerEmployeesRow)(this.Rows[index]));
                }
            }
            
            public event uspGetManagerEmployeesRowChangeEventHandler uspGetManagerEmployeesRowChanged;
            
            public event uspGetManagerEmployeesRowChangeEventHandler uspGetManagerEmployeesRowChanging;
            
            public event uspGetManagerEmployeesRowChangeEventHandler uspGetManagerEmployeesRowDeleted;
            
            public event uspGetManagerEmployeesRowChangeEventHandler uspGetManagerEmployeesRowDeleting;
            
            public void AdduspGetManagerEmployeesRow(uspGetManagerEmployeesRow row) {
                this.Rows.Add(row);
            }
            
            public uspGetManagerEmployeesRow AdduspGetManagerEmployeesRow(int RecursionLevel, int ManagerID, string ManagerFirstName, string ManagerLastName, int EmployeeID, string FirstName, string LastName) {
                uspGetManagerEmployeesRow rowuspGetManagerEmployeesRow = ((uspGetManagerEmployeesRow)(this.NewRow()));
                rowuspGetManagerEmployeesRow.ItemArray = new object[] {
                        RecursionLevel,
                        ManagerID,
                        ManagerFirstName,
                        ManagerLastName,
                        EmployeeID,
                        FirstName,
                        LastName};
                this.Rows.Add(rowuspGetManagerEmployeesRow);
                return rowuspGetManagerEmployeesRow;
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                uspGetManagerEmployeesDataTable cln = ((uspGetManagerEmployeesDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new uspGetManagerEmployeesDataTable();
            }
            
            internal void InitVars() {
                this.columnRecursionLevel = base.Columns["RecursionLevel"];
                this.columnManagerID = base.Columns["ManagerID"];
                this.columnManagerFirstName = base.Columns["ManagerFirstName"];
                this.columnManagerLastName = base.Columns["ManagerLastName"];
                this.columnEmployeeID = base.Columns["EmployeeID"];
                this.columnFirstName = base.Columns["FirstName"];
                this.columnLastName = base.Columns["LastName"];
            }
            
            private void InitClass() {
                this.columnRecursionLevel = new System.Data.DataColumn("RecursionLevel", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnRecursionLevel);
                this.columnManagerID = new System.Data.DataColumn("ManagerID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnManagerID);
                this.columnManagerFirstName = new System.Data.DataColumn("ManagerFirstName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnManagerFirstName);
                this.columnManagerLastName = new System.Data.DataColumn("ManagerLastName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnManagerLastName);
                this.columnEmployeeID = new System.Data.DataColumn("EmployeeID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnEmployeeID);
                this.columnFirstName = new System.Data.DataColumn("FirstName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnFirstName);
                this.columnLastName = new System.Data.DataColumn("LastName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLastName);
                this.columnRecursionLevel.ReadOnly = true;
                this.columnManagerID.ReadOnly = true;
                this.columnManagerFirstName.AllowDBNull = false;
                this.columnManagerFirstName.MaxLength = 50;
                this.columnManagerLastName.AllowDBNull = false;
                this.columnManagerLastName.MaxLength = 50;
                this.columnEmployeeID.ReadOnly = true;
                this.columnFirstName.ReadOnly = true;
                this.columnFirstName.MaxLength = 50;
                this.columnLastName.ReadOnly = true;
                this.columnLastName.MaxLength = 50;
            }
            
            public uspGetManagerEmployeesRow NewuspGetManagerEmployeesRow() {
                return ((uspGetManagerEmployeesRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new uspGetManagerEmployeesRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(uspGetManagerEmployeesRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.uspGetManagerEmployeesRowChanged != null)) {
                    this.uspGetManagerEmployeesRowChanged(this, new uspGetManagerEmployeesRowChangeEvent(((uspGetManagerEmployeesRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.uspGetManagerEmployeesRowChanging != null)) {
                    this.uspGetManagerEmployeesRowChanging(this, new uspGetManagerEmployeesRowChangeEvent(((uspGetManagerEmployeesRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.uspGetManagerEmployeesRowDeleted != null)) {
                    this.uspGetManagerEmployeesRowDeleted(this, new uspGetManagerEmployeesRowChangeEvent(((uspGetManagerEmployeesRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.uspGetManagerEmployeesRowDeleting != null)) {
                    this.uspGetManagerEmployeesRowDeleting(this, new uspGetManagerEmployeesRowChangeEvent(((uspGetManagerEmployeesRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveuspGetManagerEmployeesRow(uspGetManagerEmployeesRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "uspGetManagerEmployeesDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class uspGetWhereUsedProductIDDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnProductAssemblyID;
            
            private System.Data.DataColumn columnComponentID;
            
            private System.Data.DataColumn columnComponentDesc;
            
            private System.Data.DataColumn columnTotalQuantity;
            
            private System.Data.DataColumn columnStandardCost;
            
            private System.Data.DataColumn columnListPrice;
            
            private System.Data.DataColumn columnBOMLevel;
            
            private System.Data.DataColumn columnRecursionLevel;
            
            public uspGetWhereUsedProductIDDataTable() {
                this.TableName = "uspGetWhereUsedProductID";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal uspGetWhereUsedProductIDDataTable(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;
            }
            
            protected uspGetWhereUsedProductIDDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ProductAssemblyIDColumn {
                get {
                    return this.columnProductAssemblyID;
                }
            }
            
            public System.Data.DataColumn ComponentIDColumn {
                get {
                    return this.columnComponentID;
                }
            }
            
            public System.Data.DataColumn ComponentDescColumn {
                get {
                    return this.columnComponentDesc;
                }
            }
            
            public System.Data.DataColumn TotalQuantityColumn {
                get {
                    return this.columnTotalQuantity;
                }
            }
            
            public System.Data.DataColumn StandardCostColumn {
                get {
                    return this.columnStandardCost;
                }
            }
            
            public System.Data.DataColumn ListPriceColumn {
                get {
                    return this.columnListPrice;
                }
            }
            
            public System.Data.DataColumn BOMLevelColumn {
                get {
                    return this.columnBOMLevel;
                }
            }
            
            public System.Data.DataColumn RecursionLevelColumn {
                get {
                    return this.columnRecursionLevel;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public uspGetWhereUsedProductIDRow this[int index] {
                get {
                    return ((uspGetWhereUsedProductIDRow)(this.Rows[index]));
                }
            }
            
            public event uspGetWhereUsedProductIDRowChangeEventHandler uspGetWhereUsedProductIDRowChanged;
            
            public event uspGetWhereUsedProductIDRowChangeEventHandler uspGetWhereUsedProductIDRowChanging;
            
            public event uspGetWhereUsedProductIDRowChangeEventHandler uspGetWhereUsedProductIDRowDeleted;
            
            public event uspGetWhereUsedProductIDRowChangeEventHandler uspGetWhereUsedProductIDRowDeleting;
            
            public void AdduspGetWhereUsedProductIDRow(uspGetWhereUsedProductIDRow row) {
                this.Rows.Add(row);
            }
            
            public uspGetWhereUsedProductIDRow AdduspGetWhereUsedProductIDRow(int ProductAssemblyID, int ComponentID, string ComponentDesc, decimal TotalQuantity, decimal StandardCost, decimal ListPrice, short BOMLevel, int RecursionLevel) {
                uspGetWhereUsedProductIDRow rowuspGetWhereUsedProductIDRow = ((uspGetWhereUsedProductIDRow)(this.NewRow()));
                rowuspGetWhereUsedProductIDRow.ItemArray = new object[] {
                        ProductAssemblyID,
                        ComponentID,
                        ComponentDesc,
                        TotalQuantity,
                        StandardCost,
                        ListPrice,
                        BOMLevel,
                        RecursionLevel};
                this.Rows.Add(rowuspGetWhereUsedProductIDRow);
                return rowuspGetWhereUsedProductIDRow;
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                uspGetWhereUsedProductIDDataTable cln = ((uspGetWhereUsedProductIDDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new uspGetWhereUsedProductIDDataTable();
            }
            
            internal void InitVars() {
                this.columnProductAssemblyID = base.Columns["ProductAssemblyID"];
                this.columnComponentID = base.Columns["ComponentID"];
                this.columnComponentDesc = base.Columns["ComponentDesc"];
                this.columnTotalQuantity = base.Columns["TotalQuantity"];
                this.columnStandardCost = base.Columns["StandardCost"];
                this.columnListPrice = base.Columns["ListPrice"];
                this.columnBOMLevel = base.Columns["BOMLevel"];
                this.columnRecursionLevel = base.Columns["RecursionLevel"];
            }
            
            private void InitClass() {
                this.columnProductAssemblyID = new System.Data.DataColumn("ProductAssemblyID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductAssemblyID);
                this.columnComponentID = new System.Data.DataColumn("ComponentID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnComponentID);
                this.columnComponentDesc = new System.Data.DataColumn("ComponentDesc", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnComponentDesc);
                this.columnTotalQuantity = new System.Data.DataColumn("TotalQuantity", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTotalQuantity);
                this.columnStandardCost = new System.Data.DataColumn("StandardCost", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStandardCost);
                this.columnListPrice = new System.Data.DataColumn("ListPrice", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnListPrice);
                this.columnBOMLevel = new System.Data.DataColumn("BOMLevel", typeof(short), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnBOMLevel);
                this.columnRecursionLevel = new System.Data.DataColumn("RecursionLevel", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnRecursionLevel);
                this.columnProductAssemblyID.ReadOnly = true;
                this.columnComponentID.ReadOnly = true;
                this.columnComponentDesc.ReadOnly = true;
                this.columnComponentDesc.MaxLength = 50;
                this.columnTotalQuantity.ReadOnly = true;
                this.columnStandardCost.ReadOnly = true;
                this.columnListPrice.ReadOnly = true;
                this.columnBOMLevel.ReadOnly = true;
                this.columnRecursionLevel.ReadOnly = true;
            }
            
            public uspGetWhereUsedProductIDRow NewuspGetWhereUsedProductIDRow() {
                return ((uspGetWhereUsedProductIDRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new uspGetWhereUsedProductIDRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(uspGetWhereUsedProductIDRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.uspGetWhereUsedProductIDRowChanged != null)) {
                    this.uspGetWhereUsedProductIDRowChanged(this, new uspGetWhereUsedProductIDRowChangeEvent(((uspGetWhereUsedProductIDRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.uspGetWhereUsedProductIDRowChanging != null)) {
                    this.uspGetWhereUsedProductIDRowChanging(this, new uspGetWhereUsedProductIDRowChangeEvent(((uspGetWhereUsedProductIDRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.uspGetWhereUsedProductIDRowDeleted != null)) {
                    this.uspGetWhereUsedProductIDRowDeleted(this, new uspGetWhereUsedProductIDRowChangeEvent(((uspGetWhereUsedProductIDRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.uspGetWhereUsedProductIDRowDeleting != null)) {
                    this.uspGetWhereUsedProductIDRowDeleting(this, new uspGetWhereUsedProductIDRowChangeEvent(((uspGetWhereUsedProductIDRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveuspGetWhereUsedProductIDRow(uspGetWhereUsedProductIDRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "uspGetWhereUsedProductIDDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ufnGetContactInformationDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnContactID;
            
            private System.Data.DataColumn columnFirstName;
            
            private System.Data.DataColumn columnLastName;
            
            private System.Data.DataColumn columnJobTitle;
            
            private System.Data.DataColumn columnContactType;
            
            public ufnGetContactInformationDataTable() {
                this.TableName = "ufnGetContactInformation";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal ufnGetContactInformationDataTable(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;
            }
            
            protected ufnGetContactInformationDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn ContactIDColumn {
                get {
                    return this.columnContactID;
                }
            }
            
            public System.Data.DataColumn FirstNameColumn {
                get {
                    return this.columnFirstName;
                }
            }
            
            public System.Data.DataColumn LastNameColumn {
                get {
                    return this.columnLastName;
                }
            }
            
            public System.Data.DataColumn JobTitleColumn {
                get {
                    return this.columnJobTitle;
                }
            }
            
            public System.Data.DataColumn ContactTypeColumn {
                get {
                    return this.columnContactType;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public ufnGetContactInformationRow this[int index] {
                get {
                    return ((ufnGetContactInformationRow)(this.Rows[index]));
                }
            }
            
            public event ufnGetContactInformationRowChangeEventHandler ufnGetContactInformationRowChanged;
            
            public event ufnGetContactInformationRowChangeEventHandler ufnGetContactInformationRowChanging;
            
            public event ufnGetContactInformationRowChangeEventHandler ufnGetContactInformationRowDeleted;
            
            public event ufnGetContactInformationRowChangeEventHandler ufnGetContactInformationRowDeleting;
            
            public void AddufnGetContactInformationRow(ufnGetContactInformationRow row) {
                this.Rows.Add(row);
            }
            
            public ufnGetContactInformationRow AddufnGetContactInformationRow(int ContactID, string FirstName, string LastName, string JobTitle, string ContactType) {
                ufnGetContactInformationRow rowufnGetContactInformationRow = ((ufnGetContactInformationRow)(this.NewRow()));
                rowufnGetContactInformationRow.ItemArray = new object[] {
                        ContactID,
                        FirstName,
                        LastName,
                        JobTitle,
                        ContactType};
                this.Rows.Add(rowufnGetContactInformationRow);
                return rowufnGetContactInformationRow;
            }
            
            public ufnGetContactInformationRow FindByContactID(int ContactID) {
                return ((ufnGetContactInformationRow)(this.Rows.Find(new object[] {
                            ContactID})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                ufnGetContactInformationDataTable cln = ((ufnGetContactInformationDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new ufnGetContactInformationDataTable();
            }
            
            internal void InitVars() {
                this.columnContactID = base.Columns["ContactID"];
                this.columnFirstName = base.Columns["FirstName"];
                this.columnLastName = base.Columns["LastName"];
                this.columnJobTitle = base.Columns["JobTitle"];
                this.columnContactType = base.Columns["ContactType"];
            }
            
            private void InitClass() {
                this.columnContactID = new System.Data.DataColumn("ContactID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnContactID);
                this.columnFirstName = new System.Data.DataColumn("FirstName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnFirstName);
                this.columnLastName = new System.Data.DataColumn("LastName", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnLastName);
                this.columnJobTitle = new System.Data.DataColumn("JobTitle", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnJobTitle);
                this.columnContactType = new System.Data.DataColumn("ContactType", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnContactType);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnContactID}, true));
                this.columnContactID.AllowDBNull = false;
                this.columnContactID.Unique = true;
                this.columnFirstName.MaxLength = 50;
                this.columnLastName.MaxLength = 50;
                this.columnJobTitle.MaxLength = 50;
                this.columnContactType.MaxLength = 50;
            }
            
            public ufnGetContactInformationRow NewufnGetContactInformationRow() {
                return ((ufnGetContactInformationRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ufnGetContactInformationRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ufnGetContactInformationRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ufnGetContactInformationRowChanged != null)) {
                    this.ufnGetContactInformationRowChanged(this, new ufnGetContactInformationRowChangeEvent(((ufnGetContactInformationRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ufnGetContactInformationRowChanging != null)) {
                    this.ufnGetContactInformationRowChanging(this, new ufnGetContactInformationRowChangeEvent(((ufnGetContactInformationRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ufnGetContactInformationRowDeleted != null)) {
                    this.ufnGetContactInformationRowDeleted(this, new ufnGetContactInformationRowChangeEvent(((ufnGetContactInformationRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ufnGetContactInformationRowDeleting != null)) {
                    this.ufnGetContactInformationRowDeleting(this, new ufnGetContactInformationRowChangeEvent(((ufnGetContactInformationRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveufnGetContactInformationRow(ufnGetContactInformationRow row) {
                this.Rows.Remove(row);
            }
            
            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();
                AdventureWorksDataSet ds = new AdventureWorksDataSet();
                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 = "ufnGetContactInformationDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        public partial class AWBuildVersionRow : System.Data.DataRow {
            
            private AWBuildVersionDataTable tableAWBuildVersion;
            
            internal AWBuildVersionRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableAWBuildVersion = ((AWBuildVersionDataTable)(this.Table));
            }
            
            public byte SystemInformationID {
                get {
                    return ((byte)(this[this.tableAWBuildVersion.SystemInformationIDColumn]));
                }
                set {
                    this[this.tableAWBuildVersion.SystemInformationIDColumn] = value;
                }
            }
            
            public string Database_Version {
                get {
                    return ((string)(this[this.tableAWBuildVersion.Database_VersionColumn]));
                }
                set {
                    this[this.tableAWBuildVersion.Database_VersionColumn] = value;
                }
            }
            
            public System.DateTime VersionDate {
                get {
                    return ((System.DateTime)(this[this.tableAWBuildVersion.VersionDateColumn]));
                }
                set {
                    this[this.tableAWBuildVersion.VersionDateColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableAWBuildVersion.ModifiedDateColumn]));
                }
                set {
                    this[this.tableAWBuildVersion.ModifiedDateColumn] = value;
                }
            }
        }
        
        public partial class DatabaseLogRow : System.Data.DataRow {
            
            private DatabaseLogDataTable tableDatabaseLog;
            
            internal DatabaseLogRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableDatabaseLog = ((DatabaseLogDataTable)(this.Table));
            }
            
            public int DatabaseLogID {
                get {
                    return ((int)(this[this.tableDatabaseLog.DatabaseLogIDColumn]));
                }
                set {
                    this[this.tableDatabaseLog.DatabaseLogIDColumn] = value;
                }
            }
            
            public System.DateTime PostTime {
                get {
                    return ((System.DateTime)(this[this.tableDatabaseLog.PostTimeColumn]));
                }
                set {
                    this[this.tableDatabaseLog.PostTimeColumn] = value;
                }
            }
            
            public string DatabaseUser {
                get {
                    return ((string)(this[this.tableDatabaseLog.DatabaseUserColumn]));
                }
                set {
                    this[this.tableDatabaseLog.DatabaseUserColumn] = value;
                }
            }
            
            public string Event {
                get {
                    return ((string)(this[this.tableDatabaseLog.EventColumn]));
                }
                set {
                    this[this.tableDatabaseLog.EventColumn] = value;
                }
            }
            
            public string Schema {
                get {
                    try {
                        return ((string)(this[this.tableDatabaseLog.SchemaColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Schema\' in table \'DatabaseLog\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableDatabaseLog.SchemaColumn] = value;
                }
            }
            
            public string Object {
                get {
                    try {
                        return ((string)(this[this.tableDatabaseLog.ObjectColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Object\' in table \'DatabaseLog\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableDatabaseLog.ObjectColumn] = value;
                }
            }
            
            public string TSQL {
                get {
                    return ((string)(this[this.tableDatabaseLog.TSQLColumn]));
                }
                set {
                    this[this.tableDatabaseLog.TSQLColumn] = value;
                }
            }
            
            public string XmlEvent {
                get {
                    return ((string)(this[this.tableDatabaseLog.XmlEventColumn]));
                }
                set {
                    this[this.tableDatabaseLog.XmlEventColumn] = value;
                }
            }
            
            public bool IsSchemaNull() {
                return this.IsNull(this.tableDatabaseLog.SchemaColumn);
            }
            
            public void SetSchemaNull() {
                this[this.tableDatabaseLog.SchemaColumn] = System.Convert.DBNull;
            }
            
            public bool IsObjectNull() {
                return this.IsNull(this.tableDatabaseLog.ObjectColumn);
            }
            
            public void SetObjectNull() {
                this[this.tableDatabaseLog.ObjectColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class DepartmentRow : System.Data.DataRow {
            
            private DepartmentDataTable tableDepartment;
            
            internal DepartmentRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableDepartment = ((DepartmentDataTable)(this.Table));
            }
            
            public short DepartmentID {
                get {
                    return ((short)(this[this.tableDepartment.DepartmentIDColumn]));
                }
                set {
                    this[this.tableDepartment.DepartmentIDColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tableDepartment.NameColumn]));
                }
                set {
                    this[this.tableDepartment.NameColumn] = value;
                }
            }
            
            public string GroupName {
                get {
                    return ((string)(this[this.tableDepartment.GroupNameColumn]));
                }
                set {
                    this[this.tableDepartment.GroupNameColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableDepartment.ModifiedDateColumn]));
                }
                set {
                    this[this.tableDepartment.ModifiedDateColumn] = value;
                }
            }
            
            public EmployeeDepartmentHistoryRow[] GetEmployeeDepartmentHistoryRows() {
                return ((EmployeeDepartmentHistoryRow[])(base.GetChildRows(this.Table.ChildRelations["FK_EmployeeDepartmentHistory_Department_DepartmentID"])));
            }
        }
        
        public partial class EmployeeRow : System.Data.DataRow {
            
            private EmployeeDataTable tableEmployee;
            
            internal EmployeeRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableEmployee = ((EmployeeDataTable)(this.Table));
            }
            
            public int EmployeeID {
                get {
                    return ((int)(this[this.tableEmployee.EmployeeIDColumn]));
                }
                set {
                    this[this.tableEmployee.EmployeeIDColumn] = value;
                }
            }
            
            public string NationalIDNumber {
                get {
                    return ((string)(this[this.tableEmployee.NationalIDNumberColumn]));
                }
                set {
                    this[this.tableEmployee.NationalIDNumberColumn] = value;
                }
            }
            
            public int ContactID {
                get {
                    return ((int)(this[this.tableEmployee.ContactIDColumn]));
                }
                set {
                    this[this.tableEmployee.ContactIDColumn] = value;
                }
            }
            
            public string LoginID {
                get {
                    return ((string)(this[this.tableEmployee.LoginIDColumn]));
                }
                set {
                    this[this.tableEmployee.LoginIDColumn] = value;
                }
            }
            
            public int ManagerID {
                get {
                    try {
                        return ((int)(this[this.tableEmployee.ManagerIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ManagerID\' in table \'Employee\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableEmployee.ManagerIDColumn] = value;
                }
            }
            
            public string Title {
                get {
                    return ((string)(this[this.tableEmployee.TitleColumn]));
                }
                set {
                    this[this.tableEmployee.TitleColumn] = value;
                }
            }
            
            public System.DateTime BirthDate {
                get {
                    return ((System.DateTime)(this[this.tableEmployee.BirthDateColumn]));
                }
                set {
                    this[this.tableEmployee.BirthDateColumn] = value;
                }
            }
            
            public string MaritalStatus {
                get {
                    return ((string)(this[this.tableEmployee.MaritalStatusColumn]));
                }
                set {
                    this[this.tableEmployee.MaritalStatusColumn] = value;
                }
            }
            
            public string Gender {
                get {
                    return ((string)(this[this.tableEmployee.GenderColumn]));
                }
                set {
                    this[this.tableEmployee.GenderColumn] = value;
                }
            }
            
            public System.DateTime HireDate {
                get {
                    return ((System.DateTime)(this[this.tableEmployee.HireDateColumn]));
                }
                set {
                    this[this.tableEmployee.HireDateColumn] = value;
                }
            }
            
            public bool SalariedFlag {
                get {
                    return ((bool)(this[this.tableEmployee.SalariedFlagColumn]));
                }
                set {
                    this[this.tableEmployee.SalariedFlagColumn] = value;
                }
            }
            
            public short VacationHours {
                get {
                    return ((short)(this[this.tableEmployee.VacationHoursColumn]));
                }
                set {
                    this[this.tableEmployee.VacationHoursColumn] = value;
                }
            }
            
            public short SickLeaveHours {
                get {
                    return ((short)(this[this.tableEmployee.SickLeaveHoursColumn]));
                }
                set {
                    this[this.tableEmployee.SickLeaveHoursColumn] = value;
                }
            }
            
            public bool CurrentFlag {
                get {
                    return ((bool)(this[this.tableEmployee.CurrentFlagColumn]));
                }
                set {
                    this[this.tableEmployee.CurrentFlagColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableEmployee.rowguidColumn]));
                }
                set {
                    this[this.tableEmployee.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableEmployee.ModifiedDateColumn]));
                }
                set {
                    this[this.tableEmployee.ModifiedDateColumn] = value;
                }
            }
            
            public ContactRow ContactRow {
                get {
                    return ((ContactRow)(this.GetParentRow(this.Table.ParentRelations["FK_Employee_Contact_ContactID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_Employee_Contact_ContactID"]);
                }
            }
            
            public EmployeeRow EmployeeRowParent {
                get {
                    return ((EmployeeRow)(this.GetParentRow(this.Table.ParentRelations["FK_Employee_Employee_ManagerID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_Employee_Employee_ManagerID"]);
                }
            }
            
            public bool IsManagerIDNull() {
                return this.IsNull(this.tableEmployee.ManagerIDColumn);
            }
            
            public void SetManagerIDNull() {
                this[this.tableEmployee.ManagerIDColumn] = System.Convert.DBNull;
            }
            
            public EmployeeRow[] GetEmployeeRows() {
                return ((EmployeeRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Employee_Employee_ManagerID"])));
            }
            
            public EmployeeAddressRow[] GetEmployeeAddressRows() {
                return ((EmployeeAddressRow[])(base.GetChildRows(this.Table.ChildRelations["FK_EmployeeAddress_Employee_EmployeeID"])));
            }
            
            public EmployeeDepartmentHistoryRow[] GetEmployeeDepartmentHistoryRows() {
                return ((EmployeeDepartmentHistoryRow[])(base.GetChildRows(this.Table.ChildRelations["FK_EmployeeDepartmentHistory_Employee_EmployeeID"])));
            }
            
            public EmployeePayHistoryRow[] GetEmployeePayHistoryRows() {
                return ((EmployeePayHistoryRow[])(base.GetChildRows(this.Table.ChildRelations["FK_EmployeePayHistory_Employee_EmployeeID"])));
            }
            
            public JobCandidateRow[] GetJobCandidateRows() {
                return ((JobCandidateRow[])(base.GetChildRows(this.Table.ChildRelations["FK_JobCandidate_Employee_EmployeeID"])));
            }
            
            public PurchaseOrderHeaderRow[] GetPurchaseOrderHeaderRows() {
                return ((PurchaseOrderHeaderRow[])(base.GetChildRows(this.Table.ChildRelations["FK_PurchaseOrderHeader_Employee_EmployeeID"])));
            }
            
            public SalesPersonRow[] GetSalesPersonRows() {
                return ((SalesPersonRow[])(base.GetChildRows(this.Table.ChildRelations["FK_SalesPerson_Employee_SalesPersonID"])));
            }
        }
        
        public partial class EmployeeAddressRow : System.Data.DataRow {
            
            private EmployeeAddressDataTable tableEmployeeAddress;
            
            internal EmployeeAddressRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableEmployeeAddress = ((EmployeeAddressDataTable)(this.Table));
            }
            
            public int EmployeeID {
                get {
                    return ((int)(this[this.tableEmployeeAddress.EmployeeIDColumn]));
                }
                set {
                    this[this.tableEmployeeAddress.EmployeeIDColumn] = value;
                }
            }
            
            public int AddressID {
                get {
                    return ((int)(this[this.tableEmployeeAddress.AddressIDColumn]));
                }
                set {
                    this[this.tableEmployeeAddress.AddressIDColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableEmployeeAddress.rowguidColumn]));
                }
                set {
                    this[this.tableEmployeeAddress.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableEmployeeAddress.ModifiedDateColumn]));
                }
                set {
                    this[this.tableEmployeeAddress.ModifiedDateColumn] = value;
                }
            }
            
            public AddressRow AddressRow {
                get {
                    return ((AddressRow)(this.GetParentRow(this.Table.ParentRelations["FK_EmployeeAddress_Address_AddressID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_EmployeeAddress_Address_AddressID"]);
                }
            }
            
            public EmployeeRow EmployeeRow {
                get {
                    return ((EmployeeRow)(this.GetParentRow(this.Table.ParentRelations["FK_EmployeeAddress_Employee_EmployeeID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_EmployeeAddress_Employee_EmployeeID"]);
                }
            }
        }
        
        public partial class EmployeeDepartmentHistoryRow : System.Data.DataRow {
            
            private EmployeeDepartmentHistoryDataTable tableEmployeeDepartmentHistory;
            
            internal EmployeeDepartmentHistoryRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableEmployeeDepartmentHistory = ((EmployeeDepartmentHistoryDataTable)(this.Table));
            }
            
            public int EmployeeID {
                get {
                    return ((int)(this[this.tableEmployeeDepartmentHistory.EmployeeIDColumn]));
                }
                set {
                    this[this.tableEmployeeDepartmentHistory.EmployeeIDColumn] = value;
                }
            }
            
            public short DepartmentID {
                get {
                    return ((short)(this[this.tableEmployeeDepartmentHistory.DepartmentIDColumn]));
                }
                set {
                    this[this.tableEmployeeDepartmentHistory.DepartmentIDColumn] = value;
                }
            }
            
            public byte ShiftID {
                get {
                    return ((byte)(this[this.tableEmployeeDepartmentHistory.ShiftIDColumn]));
                }
                set {
                    this[this.tableEmployeeDepartmentHistory.ShiftIDColumn] = value;
                }
            }
            
            public System.DateTime StartDate {
                get {
                    return ((System.DateTime)(this[this.tableEmployeeDepartmentHistory.StartDateColumn]));
                }
                set {
                    this[this.tableEmployeeDepartmentHistory.StartDateColumn] = value;
                }
            }
            
            public System.DateTime EndDate {
                get {
                    try {
                        return ((System.DateTime)(this[this.tableEmployeeDepartmentHistory.EndDateColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'EndDate\' in table \'EmployeeDepartmentHistory\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableEmployeeDepartmentHistory.EndDateColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableEmployeeDepartmentHistory.ModifiedDateColumn]));
                }
                set {
                    this[this.tableEmployeeDepartmentHistory.ModifiedDateColumn] = value;
                }
            }
            
            public DepartmentRow DepartmentRow {
                get {
                    return ((DepartmentRow)(this.GetParentRow(this.Table.ParentRelations["FK_EmployeeDepartmentHistory_Department_DepartmentID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_EmployeeDepartmentHistory_Department_DepartmentID"]);
                }
            }
            
            public EmployeeRow EmployeeRow {
                get {
                    return ((EmployeeRow)(this.GetParentRow(this.Table.ParentRelations["FK_EmployeeDepartmentHistory_Employee_EmployeeID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_EmployeeDepartmentHistory_Employee_EmployeeID"]);
                }
            }
            
            public ShiftRow ShiftRow {
                get {
                    return ((ShiftRow)(this.GetParentRow(this.Table.ParentRelations["FK_EmployeeDepartmentHistory_Shift_ShiftID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_EmployeeDepartmentHistory_Shift_ShiftID"]);
                }
            }
            
            public bool IsEndDateNull() {
                return this.IsNull(this.tableEmployeeDepartmentHistory.EndDateColumn);
            }
            
            public void SetEndDateNull() {
                this[this.tableEmployeeDepartmentHistory.EndDateColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class EmployeePayHistoryRow : System.Data.DataRow {
            
            private EmployeePayHistoryDataTable tableEmployeePayHistory;
            
            internal EmployeePayHistoryRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableEmployeePayHistory = ((EmployeePayHistoryDataTable)(this.Table));
            }
            
            public int EmployeeID {
                get {
                    return ((int)(this[this.tableEmployeePayHistory.EmployeeIDColumn]));
                }
                set {
                    this[this.tableEmployeePayHistory.EmployeeIDColumn] = value;
                }
            }
            
            public System.DateTime RateChangeDate {
                get {
                    return ((System.DateTime)(this[this.tableEmployeePayHistory.RateChangeDateColumn]));
                }
                set {
                    this[this.tableEmployeePayHistory.RateChangeDateColumn] = value;
                }
            }
            
            public decimal Rate {
                get {
                    return ((decimal)(this[this.tableEmployeePayHistory.RateColumn]));
                }
                set {
                    this[this.tableEmployeePayHistory.RateColumn] = value;
                }
            }
            
            public byte PayFrequency {
                get {
                    return ((byte)(this[this.tableEmployeePayHistory.PayFrequencyColumn]));
                }
                set {
                    this[this.tableEmployeePayHistory.PayFrequencyColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableEmployeePayHistory.ModifiedDateColumn]));
                }
                set {
                    this[this.tableEmployeePayHistory.ModifiedDateColumn] = value;
                }
            }
            
            public EmployeeRow EmployeeRow {
                get {
                    return ((EmployeeRow)(this.GetParentRow(this.Table.ParentRelations["FK_EmployeePayHistory_Employee_EmployeeID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_EmployeePayHistory_Employee_EmployeeID"]);
                }
            }
        }
        
        public partial class JobCandidateRow : System.Data.DataRow {
            
            private JobCandidateDataTable tableJobCandidate;
            
            internal JobCandidateRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableJobCandidate = ((JobCandidateDataTable)(this.Table));
            }
            
            public int JobCandidateID {
                get {
                    return ((int)(this[this.tableJobCandidate.JobCandidateIDColumn]));
                }
                set {
                    this[this.tableJobCandidate.JobCandidateIDColumn] = value;
                }
            }
            
            public int EmployeeID {
                get {
                    try {
                        return ((int)(this[this.tableJobCandidate.EmployeeIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'EmployeeID\' in table \'JobCandidate\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableJobCandidate.EmployeeIDColumn] = value;
                }
            }
            
            public string Resume {
                get {
                    try {
                        return ((string)(this[this.tableJobCandidate.ResumeColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Resume\' in table \'JobCandidate\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableJobCandidate.ResumeColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableJobCandidate.ModifiedDateColumn]));
                }
                set {
                    this[this.tableJobCandidate.ModifiedDateColumn] = value;
                }
            }
            
            public EmployeeRow EmployeeRow {
                get {
                    return ((EmployeeRow)(this.GetParentRow(this.Table.ParentRelations["FK_JobCandidate_Employee_EmployeeID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_JobCandidate_Employee_EmployeeID"]);
                }
            }
            
            public bool IsEmployeeIDNull() {
                return this.IsNull(this.tableJobCandidate.EmployeeIDColumn);
            }
            
            public void SetEmployeeIDNull() {
                this[this.tableJobCandidate.EmployeeIDColumn] = System.Convert.DBNull;
            }
            
            public bool IsResumeNull() {
                return this.IsNull(this.tableJobCandidate.ResumeColumn);
            }
            
            public void SetResumeNull() {
                this[this.tableJobCandidate.ResumeColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class ShiftRow : System.Data.DataRow {
            
            private ShiftDataTable tableShift;
            
            internal ShiftRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableShift = ((ShiftDataTable)(this.Table));
            }
            
            public byte ShiftID {
                get {
                    return ((byte)(this[this.tableShift.ShiftIDColumn]));
                }
                set {
                    this[this.tableShift.ShiftIDColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tableShift.NameColumn]));
                }
                set {
                    this[this.tableShift.NameColumn] = value;
                }
            }
            
            public System.DateTime StartTime {
                get {
                    return ((System.DateTime)(this[this.tableShift.StartTimeColumn]));
                }
                set {
                    this[this.tableShift.StartTimeColumn] = value;
                }
            }
            
            public System.DateTime EndTime {
                get {
                    return ((System.DateTime)(this[this.tableShift.EndTimeColumn]));
                }
                set {
                    this[this.tableShift.EndTimeColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableShift.ModifiedDateColumn]));
                }
                set {
                    this[this.tableShift.ModifiedDateColumn] = value;
                }
            }
            
            public EmployeeDepartmentHistoryRow[] GetEmployeeDepartmentHistoryRows() {
                return ((EmployeeDepartmentHistoryRow[])(base.GetChildRows(this.Table.ChildRelations["FK_EmployeeDepartmentHistory_Shift_ShiftID"])));
            }
        }
        
        public partial class AddressRow : System.Data.DataRow {
            
            private AddressDataTable tableAddress;
            
            internal AddressRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableAddress = ((AddressDataTable)(this.Table));
            }
            
            public int AddressID {
                get {
                    return ((int)(this[this.tableAddress.AddressIDColumn]));
                }
                set {
                    this[this.tableAddress.AddressIDColumn] = value;
                }
            }
            
            public string AddressLine1 {
                get {
                    return ((string)(this[this.tableAddress.AddressLine1Column]));
                }
                set {
                    this[this.tableAddress.AddressLine1Column] = value;
                }
            }
            
            public string AddressLine2 {
                get {
                    try {
                        return ((string)(this[this.tableAddress.AddressLine2Column]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'AddressLine2\' in table \'Address\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableAddress.AddressLine2Column] = value;
                }
            }
            
            public string City {
                get {
                    return ((string)(this[this.tableAddress.CityColumn]));
                }
                set {
                    this[this.tableAddress.CityColumn] = value;
                }
            }
            
            public int StateProvinceID {
                get {
                    return ((int)(this[this.tableAddress.StateProvinceIDColumn]));
                }
                set {
                    this[this.tableAddress.StateProvinceIDColumn] = value;
                }
            }
            
            public string PostalCode {
                get {
                    return ((string)(this[this.tableAddress.PostalCodeColumn]));
                }
                set {
                    this[this.tableAddress.PostalCodeColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableAddress.rowguidColumn]));
                }
                set {
                    this[this.tableAddress.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableAddress.ModifiedDateColumn]));
                }
                set {
                    this[this.tableAddress.ModifiedDateColumn] = value;
                }
            }
            
            public StateProvinceRow StateProvinceRow {
                get {
                    return ((StateProvinceRow)(this.GetParentRow(this.Table.ParentRelations["FK_Address_StateProvince_StateProvinceID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_Address_StateProvince_StateProvinceID"]);
                }
            }
            
            public bool IsAddressLine2Null() {
                return this.IsNull(this.tableAddress.AddressLine2Column);
            }
            
            public void SetAddressLine2Null() {
                this[this.tableAddress.AddressLine2Column] = System.Convert.DBNull;
            }
            
            public EmployeeAddressRow[] GetEmployeeAddressRows() {
                return ((EmployeeAddressRow[])(base.GetChildRows(this.Table.ChildRelations["FK_EmployeeAddress_Address_AddressID"])));
            }
            
            public VendorAddressRow[] GetVendorAddressRows() {
                return ((VendorAddressRow[])(base.GetChildRows(this.Table.ChildRelations["FK_VendorAddress_Address_AddressID"])));
            }
            
            public CustomerAddressRow[] GetCustomerAddressRows() {
                return ((CustomerAddressRow[])(base.GetChildRows(this.Table.ChildRelations["FK_CustomerAddress_Address_AddressID"])));
            }
            
            public SalesOrderHeaderRow[] GetSalesOrderHeaderRowsByFK_SalesOrderHeader_Address_BillToAddressID() {
                return ((SalesOrderHeaderRow[])(base.GetChildRows(this.Table.ChildRelations["FK_SalesOrderHeader_Address_BillToAddressID"])));
            }
            
            public SalesOrderHeaderRow[] GetSalesOrderHeaderRowsByFK_SalesOrderHeader_Address_ShipToAddressID() {
                return ((SalesOrderHeaderRow[])(base.GetChildRows(this.Table.ChildRelations["FK_SalesOrderHeader_Address_ShipToAddressID"])));
            }
        }
        
        public partial class AddressTypeRow : System.Data.DataRow {
            
            private AddressTypeDataTable tableAddressType;
            
            internal AddressTypeRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableAddressType = ((AddressTypeDataTable)(this.Table));
            }
            
            public int AddressTypeID {
                get {
                    return ((int)(this[this.tableAddressType.AddressTypeIDColumn]));
                }
                set {
                    this[this.tableAddressType.AddressTypeIDColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tableAddressType.NameColumn]));
                }
                set {
                    this[this.tableAddressType.NameColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableAddressType.rowguidColumn]));
                }
                set {
                    this[this.tableAddressType.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableAddressType.ModifiedDateColumn]));
                }
                set {
                    this[this.tableAddressType.ModifiedDateColumn] = value;
                }
            }
            
            public VendorAddressRow[] GetVendorAddressRows() {
                return ((VendorAddressRow[])(base.GetChildRows(this.Table.ChildRelations["FK_VendorAddress_AddressType_AddressTypeID"])));
            }
            
            public CustomerAddressRow[] GetCustomerAddressRows() {
                return ((CustomerAddressRow[])(base.GetChildRows(this.Table.ChildRelations["FK_CustomerAddress_AddressType_AddressTypeID"])));
            }
        }
        
        public partial class ContactRow : System.Data.DataRow {
            
            private ContactDataTable tableContact;
            
            internal ContactRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableContact = ((ContactDataTable)(this.Table));
            }
            
            public int ContactID {
                get {
                    return ((int)(this[this.tableContact.ContactIDColumn]));
                }
                set {
                    this[this.tableContact.ContactIDColumn] = value;
                }
            }
            
            public bool NameStyle {
                get {
                    return ((bool)(this[this.tableContact.NameStyleColumn]));
                }
                set {
                    this[this.tableContact.NameStyleColumn] = value;
                }
            }
            
            public string Title {
                get {
                    try {
                        return ((string)(this[this.tableContact.TitleColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Title\' in table \'Contact\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableContact.TitleColumn] = value;
                }
            }
            
            public string FirstName {
                get {
                    return ((string)(this[this.tableContact.FirstNameColumn]));
                }
                set {
                    this[this.tableContact.FirstNameColumn] = value;
                }
            }
            
            public string MiddleName {
                get {
                    try {
                        return ((string)(this[this.tableContact.MiddleNameColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'MiddleName\' in table \'Contact\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableContact.MiddleNameColumn] = value;
                }
            }
            
            public string LastName {
                get {
                    return ((string)(this[this.tableContact.LastNameColumn]));
                }
                set {
                    this[this.tableContact.LastNameColumn] = value;
                }
            }
            
            public string Suffix {
                get {
                    try {
                        return ((string)(this[this.tableContact.SuffixColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Suffix\' in table \'Contact\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableContact.SuffixColumn] = value;
                }
            }
            
            public string EmailAddress {
                get {
                    try {
                        return ((string)(this[this.tableContact.EmailAddressColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'EmailAddress\' in table \'Contact\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableContact.EmailAddressColumn] = value;
                }
            }
            
            public int EmailPromotion {
                get {
                    return ((int)(this[this.tableContact.EmailPromotionColumn]));
                }
                set {
                    this[this.tableContact.EmailPromotionColumn] = value;
                }
            }
            
            public string Phone {
                get {
                    try {
                        return ((string)(this[this.tableContact.PhoneColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Phone\' in table \'Contact\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableContact.PhoneColumn] = value;
                }
            }
            
            public string PasswordHash {
                get {
                    return ((string)(this[this.tableContact.PasswordHashColumn]));
                }
                set {
                    this[this.tableContact.PasswordHashColumn] = value;
                }
            }
            
            public string PasswordSalt {
                get {
                    return ((string)(this[this.tableContact.PasswordSaltColumn]));
                }
                set {
                    this[this.tableContact.PasswordSaltColumn] = value;
                }
            }
            
            public string AdditionalContactInfo {
                get {
                    try {
                        return ((string)(this[this.tableContact.AdditionalContactInfoColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'AdditionalContactInfo\' in table \'Contact\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableContact.AdditionalContactInfoColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableContact.rowguidColumn]));
                }
                set {
                    this[this.tableContact.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableContact.ModifiedDateColumn]));
                }
                set {
                    this[this.tableContact.ModifiedDateColumn] = value;
                }
            }
            
            public bool IsTitleNull() {
                return this.IsNull(this.tableContact.TitleColumn);
            }
            
            public void SetTitleNull() {
                this[this.tableContact.TitleColumn] = System.Convert.DBNull;
            }
            
            public bool IsMiddleNameNull() {
                return this.IsNull(this.tableContact.MiddleNameColumn);
            }
            
            public void SetMiddleNameNull() {
                this[this.tableContact.MiddleNameColumn] = System.Convert.DBNull;
            }
            
            public bool IsSuffixNull() {
                return this.IsNull(this.tableContact.SuffixColumn);
            }
            
            public void SetSuffixNull() {
                this[this.tableContact.SuffixColumn] = System.Convert.DBNull;
            }
            
            public bool IsEmailAddressNull() {
                return this.IsNull(this.tableContact.EmailAddressColumn);
            }
            
            public void SetEmailAddressNull() {
                this[this.tableContact.EmailAddressColumn] = System.Convert.DBNull;
            }
            
            public bool IsPhoneNull() {
                return this.IsNull(this.tableContact.PhoneColumn);
            }
            
            public void SetPhoneNull() {
                this[this.tableContact.PhoneColumn] = System.Convert.DBNull;
            }
            
            public bool IsAdditionalContactInfoNull() {
                return this.IsNull(this.tableContact.AdditionalContactInfoColumn);
            }
            
            public void SetAdditionalContactInfoNull() {
                this[this.tableContact.AdditionalContactInfoColumn] = System.Convert.DBNull;
            }
            
            public EmployeeRow[] GetEmployeeRows() {
                return ((EmployeeRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Employee_Contact_ContactID"])));
            }
            
            public VendorContactRow[] GetVendorContactRows() {
                return ((VendorContactRow[])(base.GetChildRows(this.Table.ChildRelations["FK_VendorContact_Contact_ContactID"])));
            }
            
            public ContactCreditCardRow[] GetContactCreditCardRows() {
                return ((ContactCreditCardRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ContactCreditCard_Contact_ContactID"])));
            }
            
            public IndividualRow[] GetIndividualRows() {
                return ((IndividualRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Individual_Contact_ContactID"])));
            }
            
            public SalesOrderHeaderRow[] GetSalesOrderHeaderRows() {
                return ((SalesOrderHeaderRow[])(base.GetChildRows(this.Table.ChildRelations["FK_SalesOrderHeader_Contact_ContactID"])));
            }
            
            public StoreContactRow[] GetStoreContactRows() {
                return ((StoreContactRow[])(base.GetChildRows(this.Table.ChildRelations["FK_StoreContact_Contact_ContactID"])));
            }
        }
        
        public partial class ContactTypeRow : System.Data.DataRow {
            
            private ContactTypeDataTable tableContactType;
            
            internal ContactTypeRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableContactType = ((ContactTypeDataTable)(this.Table));
            }
            
            public int ContactTypeID {
                get {
                    return ((int)(this[this.tableContactType.ContactTypeIDColumn]));
                }
                set {
                    this[this.tableContactType.ContactTypeIDColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tableContactType.NameColumn]));
                }
                set {
                    this[this.tableContactType.NameColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableContactType.ModifiedDateColumn]));
                }
                set {
                    this[this.tableContactType.ModifiedDateColumn] = value;
                }
            }
            
            public VendorContactRow[] GetVendorContactRows() {
                return ((VendorContactRow[])(base.GetChildRows(this.Table.ChildRelations["FK_VendorContact_ContactType_ContactTypeID"])));
            }
            
            public StoreContactRow[] GetStoreContactRows() {
                return ((StoreContactRow[])(base.GetChildRows(this.Table.ChildRelations["FK_StoreContact_ContactType_ContactTypeID"])));
            }
        }
        
        public partial class CountryRegionRow : System.Data.DataRow {
            
            private CountryRegionDataTable tableCountryRegion;
            
            internal CountryRegionRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableCountryRegion = ((CountryRegionDataTable)(this.Table));
            }
            
            public string CountryRegionCode {
                get {
                    return ((string)(this[this.tableCountryRegion.CountryRegionCodeColumn]));
                }
                set {
                    this[this.tableCountryRegion.CountryRegionCodeColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tableCountryRegion.NameColumn]));
                }
                set {
                    this[this.tableCountryRegion.NameColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableCountryRegion.ModifiedDateColumn]));
                }
                set {
                    this[this.tableCountryRegion.ModifiedDateColumn] = value;
                }
            }
            
            public StateProvinceRow[] GetStateProvinceRows() {
                return ((StateProvinceRow[])(base.GetChildRows(this.Table.ChildRelations["FK_StateProvince_CountryRegion_CountryRegionCode"])));
            }
            
            public CountryRegionCurrencyRow[] GetCountryRegionCurrencyRows() {
                return ((CountryRegionCurrencyRow[])(base.GetChildRows(this.Table.ChildRelations["FK_CountryRegionCurrency_CountryRegion_CountryRegionCode"])));
            }
        }
        
        public partial class StateProvinceRow : System.Data.DataRow {
            
            private StateProvinceDataTable tableStateProvince;
            
            internal StateProvinceRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableStateProvince = ((StateProvinceDataTable)(this.Table));
            }
            
            public int StateProvinceID {
                get {
                    return ((int)(this[this.tableStateProvince.StateProvinceIDColumn]));
                }
                set {
                    this[this.tableStateProvince.StateProvinceIDColumn] = value;
                }
            }
            
            public string StateProvinceCode {
                get {
                    return ((string)(this[this.tableStateProvince.StateProvinceCodeColumn]));
                }
                set {
                    this[this.tableStateProvince.StateProvinceCodeColumn] = value;
                }
            }
            
            public string CountryRegionCode {
                get {
                    return ((string)(this[this.tableStateProvince.CountryRegionCodeColumn]));
                }
                set {
                    this[this.tableStateProvince.CountryRegionCodeColumn] = value;
                }
            }
            
            public bool IsOnlyStateProvinceFlag {
                get {
                    return ((bool)(this[this.tableStateProvince.IsOnlyStateProvinceFlagColumn]));
                }
                set {
                    this[this.tableStateProvince.IsOnlyStateProvinceFlagColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tableStateProvince.NameColumn]));
                }
                set {
                    this[this.tableStateProvince.NameColumn] = value;
                }
            }
            
            public int TerritoryID {
                get {
                    return ((int)(this[this.tableStateProvince.TerritoryIDColumn]));
                }
                set {
                    this[this.tableStateProvince.TerritoryIDColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableStateProvince.rowguidColumn]));
                }
                set {
                    this[this.tableStateProvince.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableStateProvince.ModifiedDateColumn]));
                }
                set {
                    this[this.tableStateProvince.ModifiedDateColumn] = value;
                }
            }
            
            public CountryRegionRow CountryRegionRow {
                get {
                    return ((CountryRegionRow)(this.GetParentRow(this.Table.ParentRelations["FK_StateProvince_CountryRegion_CountryRegionCode"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_StateProvince_CountryRegion_CountryRegionCode"]);
                }
            }
            
            public SalesTerritoryRow SalesTerritoryRow {
                get {
                    return ((SalesTerritoryRow)(this.GetParentRow(this.Table.ParentRelations["FK_StateProvince_SalesTerritory_TerritoryID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_StateProvince_SalesTerritory_TerritoryID"]);
                }
            }
            
            public AddressRow[] GetAddressRows() {
                return ((AddressRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Address_StateProvince_StateProvinceID"])));
            }
            
            public SalesTaxRateRow[] GetSalesTaxRateRows() {
                return ((SalesTaxRateRow[])(base.GetChildRows(this.Table.ChildRelations["FK_SalesTaxRate_StateProvince_StateProvinceID"])));
            }
        }
        
        public partial class BillOfMaterialsRow : System.Data.DataRow {
            
            private BillOfMaterialsDataTable tableBillOfMaterials;
            
            internal BillOfMaterialsRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableBillOfMaterials = ((BillOfMaterialsDataTable)(this.Table));
            }
            
            public int BillOfMaterialsID {
                get {
                    return ((int)(this[this.tableBillOfMaterials.BillOfMaterialsIDColumn]));
                }
                set {
                    this[this.tableBillOfMaterials.BillOfMaterialsIDColumn] = value;
                }
            }
            
            public int ProductAssemblyID {
                get {
                    try {
                        return ((int)(this[this.tableBillOfMaterials.ProductAssemblyIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ProductAssemblyID\' in table \'BillOfMaterials\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableBillOfMaterials.ProductAssemblyIDColumn] = value;
                }
            }
            
            public int ComponentID {
                get {
                    return ((int)(this[this.tableBillOfMaterials.ComponentIDColumn]));
                }
                set {
                    this[this.tableBillOfMaterials.ComponentIDColumn] = value;
                }
            }
            
            public System.DateTime StartDate {
                get {
                    return ((System.DateTime)(this[this.tableBillOfMaterials.StartDateColumn]));
                }
                set {
                    this[this.tableBillOfMaterials.StartDateColumn] = value;
                }
            }
            
            public System.DateTime EndDate {
                get {
                    try {
                        return ((System.DateTime)(this[this.tableBillOfMaterials.EndDateColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'EndDate\' in table \'BillOfMaterials\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableBillOfMaterials.EndDateColumn] = value;
                }
            }
            
            public string UnitMeasureCode {
                get {
                    return ((string)(this[this.tableBillOfMaterials.UnitMeasureCodeColumn]));
                }
                set {
                    this[this.tableBillOfMaterials.UnitMeasureCodeColumn] = value;
                }
            }
            
            public short BOMLevel {
                get {
                    return ((short)(this[this.tableBillOfMaterials.BOMLevelColumn]));
                }
                set {
                    this[this.tableBillOfMaterials.BOMLevelColumn] = value;
                }
            }
            
            public decimal PerAssemblyQty {
                get {
                    return ((decimal)(this[this.tableBillOfMaterials.PerAssemblyQtyColumn]));
                }
                set {
                    this[this.tableBillOfMaterials.PerAssemblyQtyColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableBillOfMaterials.ModifiedDateColumn]));
                }
                set {
                    this[this.tableBillOfMaterials.ModifiedDateColumn] = value;
                }
            }
            
            public ProductRow ProductRowByFK_BillOfMaterials_Product_ComponentID {
                get {
                    return ((ProductRow)(this.GetParentRow(this.Table.ParentRelations["FK_BillOfMaterials_Product_ComponentID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_BillOfMaterials_Product_ComponentID"]);
                }
            }
            
            public ProductRow ProductRowByFK_BillOfMaterials_Product_ProductAssemblyID {
                get {
                    return ((ProductRow)(this.GetParentRow(this.Table.ParentRelations["FK_BillOfMaterials_Product_ProductAssemblyID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_BillOfMaterials_Product_ProductAssemblyID"]);
                }
            }
            
            public UnitMeasureRow UnitMeasureRow {
                get {
                    return ((UnitMeasureRow)(this.GetParentRow(this.Table.ParentRelations["FK_BillOfMaterials_UnitMeasure_UnitMeasureCode"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_BillOfMaterials_UnitMeasure_UnitMeasureCode"]);
                }
            }
            
            public bool IsProductAssemblyIDNull() {
                return this.IsNull(this.tableBillOfMaterials.ProductAssemblyIDColumn);
            }
            
            public void SetProductAssemblyIDNull() {
                this[this.tableBillOfMaterials.ProductAssemblyIDColumn] = System.Convert.DBNull;
            }
            
            public bool IsEndDateNull() {
                return this.IsNull(this.tableBillOfMaterials.EndDateColumn);
            }
            
            public void SetEndDateNull() {
                this[this.tableBillOfMaterials.EndDateColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class CultureRow : System.Data.DataRow {
            
            private CultureDataTable tableCulture;
            
            internal CultureRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableCulture = ((CultureDataTable)(this.Table));
            }
            
            public string CultureID {
                get {
                    return ((string)(this[this.tableCulture.CultureIDColumn]));
                }
                set {
                    this[this.tableCulture.CultureIDColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tableCulture.NameColumn]));
                }
                set {
                    this[this.tableCulture.NameColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableCulture.ModifiedDateColumn]));
                }
                set {
                    this[this.tableCulture.ModifiedDateColumn] = value;
                }
            }
            
            public ProductModelProductDescriptionCultureRow[] GetProductModelProductDescriptionCultureRows() {
                return ((ProductModelProductDescriptionCultureRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductModelProductDescriptionCulture_Culture_CultureID"])));
            }
        }
        
        public partial class DocumentRow : System.Data.DataRow {
            
            private DocumentDataTable tableDocument;
            
            internal DocumentRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableDocument = ((DocumentDataTable)(this.Table));
            }
            
            public int DocumentID {
                get {
                    return ((int)(this[this.tableDocument.DocumentIDColumn]));
                }
                set {
                    this[this.tableDocument.DocumentIDColumn] = value;
                }
            }
            
            public string Title {
                get {
                    return ((string)(this[this.tableDocument.TitleColumn]));
                }
                set {
                    this[this.tableDocument.TitleColumn] = value;
                }
            }
            
            public string FileName {
                get {
                    return ((string)(this[this.tableDocument.FileNameColumn]));
                }
                set {
                    this[this.tableDocument.FileNameColumn] = value;
                }
            }
            
            public string FileExtension {
                get {
                    return ((string)(this[this.tableDocument.FileExtensionColumn]));
                }
                set {
                    this[this.tableDocument.FileExtensionColumn] = value;
                }
            }
            
            public string Revision {
                get {
                    return ((string)(this[this.tableDocument.RevisionColumn]));
                }
                set {
                    this[this.tableDocument.RevisionColumn] = value;
                }
            }
            
            public int ChangeNumber {
                get {
                    return ((int)(this[this.tableDocument.ChangeNumberColumn]));
                }
                set {
                    this[this.tableDocument.ChangeNumberColumn] = value;
                }
            }
            
            public byte Status {
                get {
                    return ((byte)(this[this.tableDocument.StatusColumn]));
                }
                set {
                    this[this.tableDocument.StatusColumn] = value;
                }
            }
            
            public string DocumentSummary {
                get {
                    try {
                        return ((string)(this[this.tableDocument.DocumentSummaryColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'DocumentSummary\' in table \'Document\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableDocument.DocumentSummaryColumn] = value;
                }
            }
            
            public byte[] Document {
                get {
                    try {
                        return ((byte[])(this[this.tableDocument.DocumentColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Document\' in table \'Document\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableDocument.DocumentColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableDocument.ModifiedDateColumn]));
                }
                set {
                    this[this.tableDocument.ModifiedDateColumn] = value;
                }
            }
            
            public bool IsDocumentSummaryNull() {
                return this.IsNull(this.tableDocument.DocumentSummaryColumn);
            }
            
            public void SetDocumentSummaryNull() {
                this[this.tableDocument.DocumentSummaryColumn] = System.Convert.DBNull;
            }
            
            public bool IsDocumentNull() {
                return this.IsNull(this.tableDocument.DocumentColumn);
            }
            
            public void SetDocumentNull() {
                this[this.tableDocument.DocumentColumn] = System.Convert.DBNull;
            }
            
            public ProductDocumentRow[] GetProductDocumentRows() {
                return ((ProductDocumentRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductDocument_Document_DocumentID"])));
            }
        }
        
        public partial class IllustrationRow : System.Data.DataRow {
            
            private IllustrationDataTable tableIllustration;
            
            internal IllustrationRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableIllustration = ((IllustrationDataTable)(this.Table));
            }
            
            public int IllustrationID {
                get {
                    return ((int)(this[this.tableIllustration.IllustrationIDColumn]));
                }
                set {
                    this[this.tableIllustration.IllustrationIDColumn] = value;
                }
            }
            
            public string Diagram {
                get {
                    try {
                        return ((string)(this[this.tableIllustration.DiagramColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Diagram\' in table \'Illustration\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableIllustration.DiagramColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableIllustration.ModifiedDateColumn]));
                }
                set {
                    this[this.tableIllustration.ModifiedDateColumn] = value;
                }
            }
            
            public bool IsDiagramNull() {
                return this.IsNull(this.tableIllustration.DiagramColumn);
            }
            
            public void SetDiagramNull() {
                this[this.tableIllustration.DiagramColumn] = System.Convert.DBNull;
            }
            
            public ProductModelIllustrationRow[] GetProductModelIllustrationRows() {
                return ((ProductModelIllustrationRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductModelIllustration_Illustration_IllustrationID"])));
            }
        }
        
        public partial class LocationRow : System.Data.DataRow {
            
            private LocationDataTable tableLocation;
            
            internal LocationRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableLocation = ((LocationDataTable)(this.Table));
            }
            
            public short LocationID {
                get {
                    return ((short)(this[this.tableLocation.LocationIDColumn]));
                }
                set {
                    this[this.tableLocation.LocationIDColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tableLocation.NameColumn]));
                }
                set {
                    this[this.tableLocation.NameColumn] = value;
                }
            }
            
            public decimal CostRate {
                get {
                    return ((decimal)(this[this.tableLocation.CostRateColumn]));
                }
                set {
                    this[this.tableLocation.CostRateColumn] = value;
                }
            }
            
            public decimal Availability {
                get {
                    return ((decimal)(this[this.tableLocation.AvailabilityColumn]));
                }
                set {
                    this[this.tableLocation.AvailabilityColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableLocation.ModifiedDateColumn]));
                }
                set {
                    this[this.tableLocation.ModifiedDateColumn] = value;
                }
            }
            
            public ProductInventoryRow[] GetProductInventoryRows() {
                return ((ProductInventoryRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductInventory_Location_LocationID"])));
            }
            
            public WorkOrderRoutingRow[] GetWorkOrderRoutingRows() {
                return ((WorkOrderRoutingRow[])(base.GetChildRows(this.Table.ChildRelations["FK_WorkOrderRouting_Location_LocationID"])));
            }
        }
        
        public partial class ProductRow : System.Data.DataRow {
            
            private ProductDataTable tableProduct;
            
            internal ProductRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableProduct = ((ProductDataTable)(this.Table));
            }
            
            public int ProductID {
                get {
                    return ((int)(this[this.tableProduct.ProductIDColumn]));
                }
                set {
                    this[this.tableProduct.ProductIDColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tableProduct.NameColumn]));
                }
                set {
                    this[this.tableProduct.NameColumn] = value;
                }
            }
            
            public string ProductNumber {
                get {
                    return ((string)(this[this.tableProduct.ProductNumberColumn]));
                }
                set {
                    this[this.tableProduct.ProductNumberColumn] = value;
                }
            }
            
            public bool MakeFlag {
                get {
                    return ((bool)(this[this.tableProduct.MakeFlagColumn]));
                }
                set {
                    this[this.tableProduct.MakeFlagColumn] = value;
                }
            }
            
            public bool FinishedGoodsFlag {
                get {
                    return ((bool)(this[this.tableProduct.FinishedGoodsFlagColumn]));
                }
                set {
                    this[this.tableProduct.FinishedGoodsFlagColumn] = value;
                }
            }
            
            public string Color {
                get {
                    try {
                        return ((string)(this[this.tableProduct.ColorColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Color\' in table \'Product\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProduct.ColorColumn] = value;
                }
            }
            
            public short SafetyStockLevel {
                get {
                    return ((short)(this[this.tableProduct.SafetyStockLevelColumn]));
                }
                set {
                    this[this.tableProduct.SafetyStockLevelColumn] = value;
                }
            }
            
            public short ReorderPoint {
                get {
                    return ((short)(this[this.tableProduct.ReorderPointColumn]));
                }
                set {
                    this[this.tableProduct.ReorderPointColumn] = value;
                }
            }
            
            public decimal StandardCost {
                get {
                    return ((decimal)(this[this.tableProduct.StandardCostColumn]));
                }
                set {
                    this[this.tableProduct.StandardCostColumn] = value;
                }
            }
            
            public decimal ListPrice {
                get {
                    return ((decimal)(this[this.tableProduct.ListPriceColumn]));
                }
                set {
                    this[this.tableProduct.ListPriceColumn] = value;
                }
            }
            
            public string Size {
                get {
                    try {
                        return ((string)(this[this.tableProduct.SizeColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Size\' in table \'Product\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProduct.SizeColumn] = value;
                }
            }
            
            public string SizeUnitMeasureCode {
                get {
                    try {
                        return ((string)(this[this.tableProduct.SizeUnitMeasureCodeColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'SizeUnitMeasureCode\' in table \'Product\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProduct.SizeUnitMeasureCodeColumn] = value;
                }
            }
            
            public string WeightUnitMeasureCode {
                get {
                    try {
                        return ((string)(this[this.tableProduct.WeightUnitMeasureCodeColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'WeightUnitMeasureCode\' in table \'Product\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProduct.WeightUnitMeasureCodeColumn] = value;
                }
            }
            
            public decimal Weight {
                get {
                    try {
                        return ((decimal)(this[this.tableProduct.WeightColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Weight\' in table \'Product\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProduct.WeightColumn] = value;
                }
            }
            
            public int DaysToManufacture {
                get {
                    return ((int)(this[this.tableProduct.DaysToManufactureColumn]));
                }
                set {
                    this[this.tableProduct.DaysToManufactureColumn] = value;
                }
            }
            
            public string ProductLine {
                get {
                    try {
                        return ((string)(this[this.tableProduct.ProductLineColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ProductLine\' in table \'Product\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProduct.ProductLineColumn] = value;
                }
            }
            
            public string Class {
                get {
                    try {
                        return ((string)(this[this.tableProduct.ClassColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Class\' in table \'Product\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProduct.ClassColumn] = value;
                }
            }
            
            public string Style {
                get {
                    try {
                        return ((string)(this[this.tableProduct.StyleColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Style\' in table \'Product\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProduct.StyleColumn] = value;
                }
            }
            
            public int ProductSubcategoryID {
                get {
                    try {
                        return ((int)(this[this.tableProduct.ProductSubcategoryIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ProductSubcategoryID\' in table \'Product\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProduct.ProductSubcategoryIDColumn] = value;
                }
            }
            
            public int ProductModelID {
                get {
                    try {
                        return ((int)(this[this.tableProduct.ProductModelIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ProductModelID\' in table \'Product\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProduct.ProductModelIDColumn] = value;
                }
            }
            
            public System.DateTime SellStartDate {
                get {
                    return ((System.DateTime)(this[this.tableProduct.SellStartDateColumn]));
                }
                set {
                    this[this.tableProduct.SellStartDateColumn] = value;
                }
            }
            
            public System.DateTime SellEndDate {
                get {
                    try {
                        return ((System.DateTime)(this[this.tableProduct.SellEndDateColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'SellEndDate\' in table \'Product\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProduct.SellEndDateColumn] = value;
                }
            }
            
            public System.DateTime DiscontinuedDate {
                get {
                    try {
                        return ((System.DateTime)(this[this.tableProduct.DiscontinuedDateColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'DiscontinuedDate\' in table \'Product\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProduct.DiscontinuedDateColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableProduct.rowguidColumn]));
                }
                set {
                    this[this.tableProduct.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableProduct.ModifiedDateColumn]));
                }
                set {
                    this[this.tableProduct.ModifiedDateColumn] = value;
                }
            }
            
            public ProductModelRow ProductModelRow {
                get {
                    return ((ProductModelRow)(this.GetParentRow(this.Table.ParentRelations["FK_Product_ProductModel_ProductModelID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_Product_ProductModel_ProductModelID"]);
                }
            }
            
            public ProductSubcategoryRow ProductSubcategoryRow {
                get {
                    return ((ProductSubcategoryRow)(this.GetParentRow(this.Table.ParentRelations["FK_Product_ProductSubcategory_ProductSubcategoryID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_Product_ProductSubcategory_ProductSubcategoryID"]);
                }
            }
            
            public UnitMeasureRow UnitMeasureRowByFK_Product_UnitMeasure_SizeUnitMeasureCode {
                get {
                    return ((UnitMeasureRow)(this.GetParentRow(this.Table.ParentRelations["FK_Product_UnitMeasure_SizeUnitMeasureCode"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_Product_UnitMeasure_SizeUnitMeasureCode"]);
                }
            }
            
            public UnitMeasureRow UnitMeasureRowByFK_Product_UnitMeasure_WeightUnitMeasureCode {
                get {
                    return ((UnitMeasureRow)(this.GetParentRow(this.Table.ParentRelations["FK_Product_UnitMeasure_WeightUnitMeasureCode"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_Product_UnitMeasure_WeightUnitMeasureCode"]);
                }
            }
            
            public bool IsColorNull() {
                return this.IsNull(this.tableProduct.ColorColumn);
            }
            
            public void SetColorNull() {
                this[this.tableProduct.ColorColumn] = System.Convert.DBNull;
            }
            
            public bool IsSizeNull() {
                return this.IsNull(this.tableProduct.SizeColumn);
            }
            
            public void SetSizeNull() {
                this[this.tableProduct.SizeColumn] = System.Convert.DBNull;
            }
            
            public bool IsSizeUnitMeasureCodeNull() {
                return this.IsNull(this.tableProduct.SizeUnitMeasureCodeColumn);
            }
            
            public void SetSizeUnitMeasureCodeNull() {
                this[this.tableProduct.SizeUnitMeasureCodeColumn] = System.Convert.DBNull;
            }
            
            public bool IsWeightUnitMeasureCodeNull() {
                return this.IsNull(this.tableProduct.WeightUnitMeasureCodeColumn);
            }
            
            public void SetWeightUnitMeasureCodeNull() {
                this[this.tableProduct.WeightUnitMeasureCodeColumn] = System.Convert.DBNull;
            }
            
            public bool IsWeightNull() {
                return this.IsNull(this.tableProduct.WeightColumn);
            }
            
            public void SetWeightNull() {
                this[this.tableProduct.WeightColumn] = System.Convert.DBNull;
            }
            
            public bool IsProductLineNull() {
                return this.IsNull(this.tableProduct.ProductLineColumn);
            }
            
            public void SetProductLineNull() {
                this[this.tableProduct.ProductLineColumn] = System.Convert.DBNull;
            }
            
            public bool IsClassNull() {
                return this.IsNull(this.tableProduct.ClassColumn);
            }
            
            public void SetClassNull() {
                this[this.tableProduct.ClassColumn] = System.Convert.DBNull;
            }
            
            public bool IsStyleNull() {
                return this.IsNull(this.tableProduct.StyleColumn);
            }
            
            public void SetStyleNull() {
                this[this.tableProduct.StyleColumn] = System.Convert.DBNull;
            }
            
            public bool IsProductSubcategoryIDNull() {
                return this.IsNull(this.tableProduct.ProductSubcategoryIDColumn);
            }
            
            public void SetProductSubcategoryIDNull() {
                this[this.tableProduct.ProductSubcategoryIDColumn] = System.Convert.DBNull;
            }
            
            public bool IsProductModelIDNull() {
                return this.IsNull(this.tableProduct.ProductModelIDColumn);
            }
            
            public void SetProductModelIDNull() {
                this[this.tableProduct.ProductModelIDColumn] = System.Convert.DBNull;
            }
            
            public bool IsSellEndDateNull() {
                return this.IsNull(this.tableProduct.SellEndDateColumn);
            }
            
            public void SetSellEndDateNull() {
                this[this.tableProduct.SellEndDateColumn] = System.Convert.DBNull;
            }
            
            public bool IsDiscontinuedDateNull() {
                return this.IsNull(this.tableProduct.DiscontinuedDateColumn);
            }
            
            public void SetDiscontinuedDateNull() {
                this[this.tableProduct.DiscontinuedDateColumn] = System.Convert.DBNull;
            }
            
            public BillOfMaterialsRow[] GetBillOfMaterialsRowsByFK_BillOfMaterials_Product_ComponentID() {
                return ((BillOfMaterialsRow[])(base.GetChildRows(this.Table.ChildRelations["FK_BillOfMaterials_Product_ComponentID"])));
            }
            
            public BillOfMaterialsRow[] GetBillOfMaterialsRowsByFK_BillOfMaterials_Product_ProductAssemblyID() {
                return ((BillOfMaterialsRow[])(base.GetChildRows(this.Table.ChildRelations["FK_BillOfMaterials_Product_ProductAssemblyID"])));
            }
            
            public ProductCostHistoryRow[] GetProductCostHistoryRows() {
                return ((ProductCostHistoryRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductCostHistory_Product_ProductID"])));
            }
            
            public ProductDocumentRow[] GetProductDocumentRows() {
                return ((ProductDocumentRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductDocument_Product_ProductID"])));
            }
            
            public ProductInventoryRow[] GetProductInventoryRows() {
                return ((ProductInventoryRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductInventory_Product_ProductID"])));
            }
            
            public ProductListPriceHistoryRow[] GetProductListPriceHistoryRows() {
                return ((ProductListPriceHistoryRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductListPriceHistory_Product_ProductID"])));
            }
            
            public ProductProductPhotoRow[] GetProductProductPhotoRows() {
                return ((ProductProductPhotoRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductProductPhoto_Product_ProductID"])));
            }
            
            public ProductReviewRow[] GetProductReviewRows() {
                return ((ProductReviewRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductReview_Product_ProductID"])));
            }
            
            public TransactionHistoryRow[] GetTransactionHistoryRows() {
                return ((TransactionHistoryRow[])(base.GetChildRows(this.Table.ChildRelations["FK_TransactionHistory_Product_ProductID"])));
            }
            
            public WorkOrderRow[] GetWorkOrderRows() {
                return ((WorkOrderRow[])(base.GetChildRows(this.Table.ChildRelations["FK_WorkOrder_Product_ProductID"])));
            }
            
            public ProductVendorRow[] GetProductVendorRows() {
                return ((ProductVendorRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductVendor_Product_ProductID"])));
            }
            
            public PurchaseOrderDetailRow[] GetPurchaseOrderDetailRows() {
                return ((PurchaseOrderDetailRow[])(base.GetChildRows(this.Table.ChildRelations["FK_PurchaseOrderDetail_Product_ProductID"])));
            }
            
            public ShoppingCartItemRow[] GetShoppingCartItemRows() {
                return ((ShoppingCartItemRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ShoppingCartItem_Product_ProductID"])));
            }
            
            public SpecialOfferProductRow[] GetSpecialOfferProductRows() {
                return ((SpecialOfferProductRow[])(base.GetChildRows(this.Table.ChildRelations["FK_SpecialOfferProduct_Product_ProductID"])));
            }
        }
        
        public partial class ProductCategoryRow : System.Data.DataRow {
            
            private ProductCategoryDataTable tableProductCategory;
            
            internal ProductCategoryRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableProductCategory = ((ProductCategoryDataTable)(this.Table));
            }
            
            public int ProductCategoryID {
                get {
                    return ((int)(this[this.tableProductCategory.ProductCategoryIDColumn]));
                }
                set {
                    this[this.tableProductCategory.ProductCategoryIDColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tableProductCategory.NameColumn]));
                }
                set {
                    this[this.tableProductCategory.NameColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableProductCategory.rowguidColumn]));
                }
                set {
                    this[this.tableProductCategory.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableProductCategory.ModifiedDateColumn]));
                }
                set {
                    this[this.tableProductCategory.ModifiedDateColumn] = value;
                }
            }
            
            public ProductSubcategoryRow[] GetProductSubcategoryRows() {
                return ((ProductSubcategoryRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductSubcategory_ProductCategory_ProductCategoryID"])));
            }
        }
        
        public partial class ProductCostHistoryRow : System.Data.DataRow {
            
            private ProductCostHistoryDataTable tableProductCostHistory;
            
            internal ProductCostHistoryRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableProductCostHistory = ((ProductCostHistoryDataTable)(this.Table));
            }
            
            public int ProductID {
                get {
                    return ((int)(this[this.tableProductCostHistory.ProductIDColumn]));
                }
                set {
                    this[this.tableProductCostHistory.ProductIDColumn] = value;
                }
            }
            
            public System.DateTime StartDate {
                get {
                    return ((System.DateTime)(this[this.tableProductCostHistory.StartDateColumn]));
                }
                set {
                    this[this.tableProductCostHistory.StartDateColumn] = value;
                }
            }
            
            public System.DateTime EndDate {
                get {
                    try {
                        return ((System.DateTime)(this[this.tableProductCostHistory.EndDateColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'EndDate\' in table \'ProductCostHistory\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProductCostHistory.EndDateColumn] = value;
                }
            }
            
            public decimal StandardCost {
                get {
                    return ((decimal)(this[this.tableProductCostHistory.StandardCostColumn]));
                }
                set {
                    this[this.tableProductCostHistory.StandardCostColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableProductCostHistory.ModifiedDateColumn]));
                }
                set {
                    this[this.tableProductCostHistory.ModifiedDateColumn] = value;
                }
            }
            
            public ProductRow ProductRow {
                get {
                    return ((ProductRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductCostHistory_Product_ProductID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_ProductCostHistory_Product_ProductID"]);
                }
            }
            
            public bool IsEndDateNull() {
                return this.IsNull(this.tableProductCostHistory.EndDateColumn);
            }
            
            public void SetEndDateNull() {
                this[this.tableProductCostHistory.EndDateColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class ProductDescriptionRow : System.Data.DataRow {
            
            private ProductDescriptionDataTable tableProductDescription;
            
            internal ProductDescriptionRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableProductDescription = ((ProductDescriptionDataTable)(this.Table));
            }
            
            public int ProductDescriptionID {
                get {
                    return ((int)(this[this.tableProductDescription.ProductDescriptionIDColumn]));
                }
                set {
                    this[this.tableProductDescription.ProductDescriptionIDColumn] = value;
                }
            }
            
            public string Description {
                get {
                    return ((string)(this[this.tableProductDescription.DescriptionColumn]));
                }
                set {
                    this[this.tableProductDescription.DescriptionColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableProductDescription.rowguidColumn]));
                }
                set {
                    this[this.tableProductDescription.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableProductDescription.ModifiedDateColumn]));
                }
                set {
                    this[this.tableProductDescription.ModifiedDateColumn] = value;
                }
            }
            
            public ProductModelProductDescriptionCultureRow[] GetProductModelProductDescriptionCultureRows() {
                return ((ProductModelProductDescriptionCultureRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductModelProductDescriptionCulture_ProductDescription_ProductDescriptionID"])));
            }
        }
        
        public partial class ProductDocumentRow : System.Data.DataRow {
            
            private ProductDocumentDataTable tableProductDocument;
            
            internal ProductDocumentRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableProductDocument = ((ProductDocumentDataTable)(this.Table));
            }
            
            public int ProductID {
                get {
                    return ((int)(this[this.tableProductDocument.ProductIDColumn]));
                }
                set {
                    this[this.tableProductDocument.ProductIDColumn] = value;
                }
            }
            
            public int DocumentID {
                get {
                    return ((int)(this[this.tableProductDocument.DocumentIDColumn]));
                }
                set {
                    this[this.tableProductDocument.DocumentIDColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableProductDocument.ModifiedDateColumn]));
                }
                set {
                    this[this.tableProductDocument.ModifiedDateColumn] = value;
                }
            }
            
            public DocumentRow DocumentRow {
                get {
                    return ((DocumentRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductDocument_Document_DocumentID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_ProductDocument_Document_DocumentID"]);
                }
            }
            
            public ProductRow ProductRow {
                get {
                    return ((ProductRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductDocument_Product_ProductID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_ProductDocument_Product_ProductID"]);
                }
            }
        }
        
        public partial class ProductInventoryRow : System.Data.DataRow {
            
            private ProductInventoryDataTable tableProductInventory;
            
            internal ProductInventoryRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableProductInventory = ((ProductInventoryDataTable)(this.Table));
            }
            
            public int ProductID {
                get {
                    return ((int)(this[this.tableProductInventory.ProductIDColumn]));
                }
                set {
                    this[this.tableProductInventory.ProductIDColumn] = value;
                }
            }
            
            public short LocationID {
                get {
                    return ((short)(this[this.tableProductInventory.LocationIDColumn]));
                }
                set {
                    this[this.tableProductInventory.LocationIDColumn] = value;
                }
            }
            
            public string Shelf {
                get {
                    return ((string)(this[this.tableProductInventory.ShelfColumn]));
                }
                set {
                    this[this.tableProductInventory.ShelfColumn] = value;
                }
            }
            
            public byte Bin {
                get {
                    return ((byte)(this[this.tableProductInventory.BinColumn]));
                }
                set {
                    this[this.tableProductInventory.BinColumn] = value;
                }
            }
            
            public short Quantity {
                get {
                    return ((short)(this[this.tableProductInventory.QuantityColumn]));
                }
                set {
                    this[this.tableProductInventory.QuantityColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableProductInventory.rowguidColumn]));
                }
                set {
                    this[this.tableProductInventory.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableProductInventory.ModifiedDateColumn]));
                }
                set {
                    this[this.tableProductInventory.ModifiedDateColumn] = value;
                }
            }
            
            public LocationRow LocationRow {
                get {
                    return ((LocationRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductInventory_Location_LocationID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_ProductInventory_Location_LocationID"]);
                }
            }
            
            public ProductRow ProductRow {
                get {
                    return ((ProductRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductInventory_Product_ProductID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_ProductInventory_Product_ProductID"]);
                }
            }
        }
        
        public partial class ProductListPriceHistoryRow : System.Data.DataRow {
            
            private ProductListPriceHistoryDataTable tableProductListPriceHistory;
            
            internal ProductListPriceHistoryRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableProductListPriceHistory = ((ProductListPriceHistoryDataTable)(this.Table));
            }
            
            public int ProductID {
                get {
                    return ((int)(this[this.tableProductListPriceHistory.ProductIDColumn]));
                }
                set {
                    this[this.tableProductListPriceHistory.ProductIDColumn] = value;
                }
            }
            
            public System.DateTime StartDate {
                get {
                    return ((System.DateTime)(this[this.tableProductListPriceHistory.StartDateColumn]));
                }
                set {
                    this[this.tableProductListPriceHistory.StartDateColumn] = value;
                }
            }
            
            public System.DateTime EndDate {
                get {
                    try {
                        return ((System.DateTime)(this[this.tableProductListPriceHistory.EndDateColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'EndDate\' in table \'ProductListPriceHistory\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProductListPriceHistory.EndDateColumn] = value;
                }
            }
            
            public decimal ListPrice {
                get {
                    return ((decimal)(this[this.tableProductListPriceHistory.ListPriceColumn]));
                }
                set {
                    this[this.tableProductListPriceHistory.ListPriceColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableProductListPriceHistory.ModifiedDateColumn]));
                }
                set {
                    this[this.tableProductListPriceHistory.ModifiedDateColumn] = value;
                }
            }
            
            public ProductRow ProductRow {
                get {
                    return ((ProductRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductListPriceHistory_Product_ProductID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_ProductListPriceHistory_Product_ProductID"]);
                }
            }
            
            public bool IsEndDateNull() {
                return this.IsNull(this.tableProductListPriceHistory.EndDateColumn);
            }
            
            public void SetEndDateNull() {
                this[this.tableProductListPriceHistory.EndDateColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class ProductModelRow : System.Data.DataRow {
            
            private ProductModelDataTable tableProductModel;
            
            internal ProductModelRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableProductModel = ((ProductModelDataTable)(this.Table));
            }
            
            public int ProductModelID {
                get {
                    return ((int)(this[this.tableProductModel.ProductModelIDColumn]));
                }
                set {
                    this[this.tableProductModel.ProductModelIDColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tableProductModel.NameColumn]));
                }
                set {
                    this[this.tableProductModel.NameColumn] = value;
                }
            }
            
            public string CatalogDescription {
                get {
                    try {
                        return ((string)(this[this.tableProductModel.CatalogDescriptionColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'CatalogDescription\' in table \'ProductModel\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProductModel.CatalogDescriptionColumn] = value;
                }
            }
            
            public string Instructions {
                get {
                    try {
                        return ((string)(this[this.tableProductModel.InstructionsColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Instructions\' in table \'ProductModel\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProductModel.InstructionsColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableProductModel.rowguidColumn]));
                }
                set {
                    this[this.tableProductModel.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableProductModel.ModifiedDateColumn]));
                }
                set {
                    this[this.tableProductModel.ModifiedDateColumn] = value;
                }
            }
            
            public bool IsCatalogDescriptionNull() {
                return this.IsNull(this.tableProductModel.CatalogDescriptionColumn);
            }
            
            public void SetCatalogDescriptionNull() {
                this[this.tableProductModel.CatalogDescriptionColumn] = System.Convert.DBNull;
            }
            
            public bool IsInstructionsNull() {
                return this.IsNull(this.tableProductModel.InstructionsColumn);
            }
            
            public void SetInstructionsNull() {
                this[this.tableProductModel.InstructionsColumn] = System.Convert.DBNull;
            }
            
            public ProductRow[] GetProductRows() {
                return ((ProductRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Product_ProductModel_ProductModelID"])));
            }
            
            public ProductModelIllustrationRow[] GetProductModelIllustrationRows() {
                return ((ProductModelIllustrationRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductModelIllustration_ProductModel_ProductModelID"])));
            }
            
            public ProductModelProductDescriptionCultureRow[] GetProductModelProductDescriptionCultureRows() {
                return ((ProductModelProductDescriptionCultureRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductModelProductDescriptionCulture_ProductModel_ProductModelID"])));
            }
        }
        
        public partial class ProductModelIllustrationRow : System.Data.DataRow {
            
            private ProductModelIllustrationDataTable tableProductModelIllustration;
            
            internal ProductModelIllustrationRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableProductModelIllustration = ((ProductModelIllustrationDataTable)(this.Table));
            }
            
            public int ProductModelID {
                get {
                    return ((int)(this[this.tableProductModelIllustration.ProductModelIDColumn]));
                }
                set {
                    this[this.tableProductModelIllustration.ProductModelIDColumn] = value;
                }
            }
            
            public int IllustrationID {
                get {
                    return ((int)(this[this.tableProductModelIllustration.IllustrationIDColumn]));
                }
                set {
                    this[this.tableProductModelIllustration.IllustrationIDColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableProductModelIllustration.ModifiedDateColumn]));
                }
                set {
                    this[this.tableProductModelIllustration.ModifiedDateColumn] = value;
                }
            }
            
            public IllustrationRow IllustrationRow {
                get {
                    return ((IllustrationRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductModelIllustration_Illustration_IllustrationID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_ProductModelIllustration_Illustration_IllustrationID"]);
                }
            }
            
            public ProductModelRow ProductModelRow {
                get {
                    return ((ProductModelRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductModelIllustration_ProductModel_ProductModelID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_ProductModelIllustration_ProductModel_ProductModelID"]);
                }
            }
        }
        
        public partial class ProductModelProductDescriptionCultureRow : System.Data.DataRow {
            
            private ProductModelProductDescriptionCultureDataTable tableProductModelProductDescriptionCulture;
            
            internal ProductModelProductDescriptionCultureRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableProductModelProductDescriptionCulture = ((ProductModelProductDescriptionCultureDataTable)(this.Table));
            }
            
            public int ProductModelID {
                get {
                    return ((int)(this[this.tableProductModelProductDescriptionCulture.ProductModelIDColumn]));
                }
                set {
                    this[this.tableProductModelProductDescriptionCulture.ProductModelIDColumn] = value;
                }
            }
            
            public int ProductDescriptionID {
                get {
                    return ((int)(this[this.tableProductModelProductDescriptionCulture.ProductDescriptionIDColumn]));
                }
                set {
                    this[this.tableProductModelProductDescriptionCulture.ProductDescriptionIDColumn] = value;
                }
            }
            
            public string CultureID {
                get {
                    return ((string)(this[this.tableProductModelProductDescriptionCulture.CultureIDColumn]));
                }
                set {
                    this[this.tableProductModelProductDescriptionCulture.CultureIDColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableProductModelProductDescriptionCulture.ModifiedDateColumn]));
                }
                set {
                    this[this.tableProductModelProductDescriptionCulture.ModifiedDateColumn] = value;
                }
            }
            
            public CultureRow CultureRow {
                get {
                    return ((CultureRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductModelProductDescriptionCulture_Culture_CultureID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_ProductModelProductDescriptionCulture_Culture_CultureID"]);
                }
            }
            
            public ProductDescriptionRow ProductDescriptionRow {
                get {
                    return ((ProductDescriptionRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductModelProductDescriptionCulture_ProductDescription_ProductDescriptionID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_ProductModelProductDescriptionCulture_ProductDescription_ProductDescriptionID"]);
                }
            }
            
            public ProductModelRow ProductModelRow {
                get {
                    return ((ProductModelRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductModelProductDescriptionCulture_ProductModel_ProductModelID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_ProductModelProductDescriptionCulture_ProductModel_ProductModelID"]);
                }
            }
        }
        
        public partial class ProductPhotoRow : System.Data.DataRow {
            
            private ProductPhotoDataTable tableProductPhoto;
            
            internal ProductPhotoRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableProductPhoto = ((ProductPhotoDataTable)(this.Table));
            }
            
            public int ProductPhotoID {
                get {
                    return ((int)(this[this.tableProductPhoto.ProductPhotoIDColumn]));
                }
                set {
                    this[this.tableProductPhoto.ProductPhotoIDColumn] = value;
                }
            }
            
            public byte[] ThumbNailPhoto {
                get {
                    try {
                        return ((byte[])(this[this.tableProductPhoto.ThumbNailPhotoColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ThumbNailPhoto\' in table \'ProductPhoto\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProductPhoto.ThumbNailPhotoColumn] = value;
                }
            }
            
            public string ThumbnailPhotoFileName {
                get {
                    try {
                        return ((string)(this[this.tableProductPhoto.ThumbnailPhotoFileNameColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ThumbnailPhotoFileName\' in table \'ProductPhoto\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProductPhoto.ThumbnailPhotoFileNameColumn] = value;
                }
            }
            
            public byte[] LargePhoto {
                get {
                    try {
                        return ((byte[])(this[this.tableProductPhoto.LargePhotoColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'LargePhoto\' in table \'ProductPhoto\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProductPhoto.LargePhotoColumn] = value;
                }
            }
            
            public string LargePhotoFileName {
                get {
                    try {
                        return ((string)(this[this.tableProductPhoto.LargePhotoFileNameColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'LargePhotoFileName\' in table \'ProductPhoto\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProductPhoto.LargePhotoFileNameColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableProductPhoto.ModifiedDateColumn]));
                }
                set {
                    this[this.tableProductPhoto.ModifiedDateColumn] = value;
                }
            }
            
            public bool IsThumbNailPhotoNull() {
                return this.IsNull(this.tableProductPhoto.ThumbNailPhotoColumn);
            }
            
            public void SetThumbNailPhotoNull() {
                this[this.tableProductPhoto.ThumbNailPhotoColumn] = System.Convert.DBNull;
            }
            
            public bool IsThumbnailPhotoFileNameNull() {
                return this.IsNull(this.tableProductPhoto.ThumbnailPhotoFileNameColumn);
            }
            
            public void SetThumbnailPhotoFileNameNull() {
                this[this.tableProductPhoto.ThumbnailPhotoFileNameColumn] = System.Convert.DBNull;
            }
            
            public bool IsLargePhotoNull() {
                return this.IsNull(this.tableProductPhoto.LargePhotoColumn);
            }
            
            public void SetLargePhotoNull() {
                this[this.tableProductPhoto.LargePhotoColumn] = System.Convert.DBNull;
            }
            
            public bool IsLargePhotoFileNameNull() {
                return this.IsNull(this.tableProductPhoto.LargePhotoFileNameColumn);
            }
            
            public void SetLargePhotoFileNameNull() {
                this[this.tableProductPhoto.LargePhotoFileNameColumn] = System.Convert.DBNull;
            }
            
            public ProductProductPhotoRow[] GetProductProductPhotoRows() {
                return ((ProductProductPhotoRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductProductPhoto_ProductPhoto_ProductPhotoID"])));
            }
        }
        
        public partial class ProductProductPhotoRow : System.Data.DataRow {
            
            private ProductProductPhotoDataTable tableProductProductPhoto;
            
            internal ProductProductPhotoRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableProductProductPhoto = ((ProductProductPhotoDataTable)(this.Table));
            }
            
            public int ProductID {
                get {
                    return ((int)(this[this.tableProductProductPhoto.ProductIDColumn]));
                }
                set {
                    this[this.tableProductProductPhoto.ProductIDColumn] = value;
                }
            }
            
            public int ProductPhotoID {
                get {
                    return ((int)(this[this.tableProductProductPhoto.ProductPhotoIDColumn]));
                }
                set {
                    this[this.tableProductProductPhoto.ProductPhotoIDColumn] = value;
                }
            }
            
            public bool Primary {
                get {
                    return ((bool)(this[this.tableProductProductPhoto.PrimaryColumn]));
                }
                set {
                    this[this.tableProductProductPhoto.PrimaryColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableProductProductPhoto.ModifiedDateColumn]));
                }
                set {
                    this[this.tableProductProductPhoto.ModifiedDateColumn] = value;
                }
            }
            
            public ProductRow ProductRow {
                get {
                    return ((ProductRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductProductPhoto_Product_ProductID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_ProductProductPhoto_Product_ProductID"]);
                }
            }
            
            public ProductPhotoRow ProductPhotoRow {
                get {
                    return ((ProductPhotoRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductProductPhoto_ProductPhoto_ProductPhotoID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_ProductProductPhoto_ProductPhoto_ProductPhotoID"]);
                }
            }
        }
        
        public partial class ProductReviewRow : System.Data.DataRow {
            
            private ProductReviewDataTable tableProductReview;
            
            internal ProductReviewRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableProductReview = ((ProductReviewDataTable)(this.Table));
            }
            
            public int ProductReviewID {
                get {
                    return ((int)(this[this.tableProductReview.ProductReviewIDColumn]));
                }
                set {
                    this[this.tableProductReview.ProductReviewIDColumn] = value;
                }
            }
            
            public int ProductID {
                get {
                    return ((int)(this[this.tableProductReview.ProductIDColumn]));
                }
                set {
                    this[this.tableProductReview.ProductIDColumn] = value;
                }
            }
            
            public string ReviewerName {
                get {
                    return ((string)(this[this.tableProductReview.ReviewerNameColumn]));
                }
                set {
                    this[this.tableProductReview.ReviewerNameColumn] = value;
                }
            }
            
            public System.DateTime ReviewDate {
                get {
                    return ((System.DateTime)(this[this.tableProductReview.ReviewDateColumn]));
                }
                set {
                    this[this.tableProductReview.ReviewDateColumn] = value;
                }
            }
            
            public string EmailAddress {
                get {
                    return ((string)(this[this.tableProductReview.EmailAddressColumn]));
                }
                set {
                    this[this.tableProductReview.EmailAddressColumn] = value;
                }
            }
            
            public int Rating {
                get {
                    return ((int)(this[this.tableProductReview.RatingColumn]));
                }
                set {
                    this[this.tableProductReview.RatingColumn] = value;
                }
            }
            
            public string Comments {
                get {
                    try {
                        return ((string)(this[this.tableProductReview.CommentsColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Comments\' in table \'ProductReview\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProductReview.CommentsColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableProductReview.ModifiedDateColumn]));
                }
                set {
                    this[this.tableProductReview.ModifiedDateColumn] = value;
                }
            }
            
            public ProductRow ProductRow {
                get {
                    return ((ProductRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductReview_Product_ProductID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_ProductReview_Product_ProductID"]);
                }
            }
            
            public bool IsCommentsNull() {
                return this.IsNull(this.tableProductReview.CommentsColumn);
            }
            
            public void SetCommentsNull() {
                this[this.tableProductReview.CommentsColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class ProductSubcategoryRow : System.Data.DataRow {
            
            private ProductSubcategoryDataTable tableProductSubcategory;
            
            internal ProductSubcategoryRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableProductSubcategory = ((ProductSubcategoryDataTable)(this.Table));
            }
            
            public int ProductSubcategoryID {
                get {
                    return ((int)(this[this.tableProductSubcategory.ProductSubcategoryIDColumn]));
                }
                set {
                    this[this.tableProductSubcategory.ProductSubcategoryIDColumn] = value;
                }
            }
            
            public int ProductCategoryID {
                get {
                    return ((int)(this[this.tableProductSubcategory.ProductCategoryIDColumn]));
                }
                set {
                    this[this.tableProductSubcategory.ProductCategoryIDColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tableProductSubcategory.NameColumn]));
                }
                set {
                    this[this.tableProductSubcategory.NameColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableProductSubcategory.rowguidColumn]));
                }
                set {
                    this[this.tableProductSubcategory.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableProductSubcategory.ModifiedDateColumn]));
                }
                set {
                    this[this.tableProductSubcategory.ModifiedDateColumn] = value;
                }
            }
            
            public ProductCategoryRow ProductCategoryRow {
                get {
                    return ((ProductCategoryRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductSubcategory_ProductCategory_ProductCategoryID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_ProductSubcategory_ProductCategory_ProductCategoryID"]);
                }
            }
            
            public ProductRow[] GetProductRows() {
                return ((ProductRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Product_ProductSubcategory_ProductSubcategoryID"])));
            }
        }
        
        public partial class ScrapReasonRow : System.Data.DataRow {
            
            private ScrapReasonDataTable tableScrapReason;
            
            internal ScrapReasonRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableScrapReason = ((ScrapReasonDataTable)(this.Table));
            }
            
            public short ScrapReasonID {
                get {
                    return ((short)(this[this.tableScrapReason.ScrapReasonIDColumn]));
                }
                set {
                    this[this.tableScrapReason.ScrapReasonIDColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tableScrapReason.NameColumn]));
                }
                set {
                    this[this.tableScrapReason.NameColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableScrapReason.ModifiedDateColumn]));
                }
                set {
                    this[this.tableScrapReason.ModifiedDateColumn] = value;
                }
            }
            
            public WorkOrderRow[] GetWorkOrderRows() {
                return ((WorkOrderRow[])(base.GetChildRows(this.Table.ChildRelations["FK_WorkOrder_ScrapReason_ScrapReasonID"])));
            }
        }
        
        public partial class TransactionHistoryRow : System.Data.DataRow {
            
            private TransactionHistoryDataTable tableTransactionHistory;
            
            internal TransactionHistoryRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableTransactionHistory = ((TransactionHistoryDataTable)(this.Table));
            }
            
            public int TransactionID {
                get {
                    return ((int)(this[this.tableTransactionHistory.TransactionIDColumn]));
                }
                set {
                    this[this.tableTransactionHistory.TransactionIDColumn] = value;
                }
            }
            
            public int ProductID {
                get {
                    return ((int)(this[this.tableTransactionHistory.ProductIDColumn]));
                }
                set {
                    this[this.tableTransactionHistory.ProductIDColumn] = value;
                }
            }
            
            public int ReferenceOrderID {
                get {
                    return ((int)(this[this.tableTransactionHistory.ReferenceOrderIDColumn]));
                }
                set {
                    this[this.tableTransactionHistory.ReferenceOrderIDColumn] = value;
                }
            }
            
            public int ReferenceOrderLineID {
                get {
                    return ((int)(this[this.tableTransactionHistory.ReferenceOrderLineIDColumn]));
                }
                set {
                    this[this.tableTransactionHistory.ReferenceOrderLineIDColumn] = value;
                }
            }
            
            public System.DateTime TransactionDate {
                get {
                    return ((System.DateTime)(this[this.tableTransactionHistory.TransactionDateColumn]));
                }
                set {
                    this[this.tableTransactionHistory.TransactionDateColumn] = value;
                }
            }
            
            public string TransactionType {
                get {
                    return ((string)(this[this.tableTransactionHistory.TransactionTypeColumn]));
                }
                set {
                    this[this.tableTransactionHistory.TransactionTypeColumn] = value;
                }
            }
            
            public int Quantity {
                get {
                    return ((int)(this[this.tableTransactionHistory.QuantityColumn]));
                }
                set {
                    this[this.tableTransactionHistory.QuantityColumn] = value;
                }
            }
            
            public decimal ActualCost {
                get {
                    return ((decimal)(this[this.tableTransactionHistory.ActualCostColumn]));
                }
                set {
                    this[this.tableTransactionHistory.ActualCostColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableTransactionHistory.ModifiedDateColumn]));
                }
                set {
                    this[this.tableTransactionHistory.ModifiedDateColumn] = value;
                }
            }
            
            public ProductRow ProductRow {
                get {
                    return ((ProductRow)(this.GetParentRow(this.Table.ParentRelations["FK_TransactionHistory_Product_ProductID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_TransactionHistory_Product_ProductID"]);
                }
            }
        }
        
        public partial class TransactionHistoryArchiveRow : System.Data.DataRow {
            
            private TransactionHistoryArchiveDataTable tableTransactionHistoryArchive;
            
            internal TransactionHistoryArchiveRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableTransactionHistoryArchive = ((TransactionHistoryArchiveDataTable)(this.Table));
            }
            
            public int TransactionID {
                get {
                    return ((int)(this[this.tableTransactionHistoryArchive.TransactionIDColumn]));
                }
                set {
                    this[this.tableTransactionHistoryArchive.TransactionIDColumn] = value;
                }
            }
            
            public int ProductID {
                get {
                    return ((int)(this[this.tableTransactionHistoryArchive.ProductIDColumn]));
                }
                set {
                    this[this.tableTransactionHistoryArchive.ProductIDColumn] = value;
                }
            }
            
            public int ReferenceOrderID {
                get {
                    return ((int)(this[this.tableTransactionHistoryArchive.ReferenceOrderIDColumn]));
                }
                set {
                    this[this.tableTransactionHistoryArchive.ReferenceOrderIDColumn] = value;
                }
            }
            
            public int ReferenceOrderLineID {
                get {
                    return ((int)(this[this.tableTransactionHistoryArchive.ReferenceOrderLineIDColumn]));
                }
                set {
                    this[this.tableTransactionHistoryArchive.ReferenceOrderLineIDColumn] = value;
                }
            }
            
            public System.DateTime TransactionDate {
                get {
                    return ((System.DateTime)(this[this.tableTransactionHistoryArchive.TransactionDateColumn]));
                }
                set {
                    this[this.tableTransactionHistoryArchive.TransactionDateColumn] = value;
                }
            }
            
            public string TransactionType {
                get {
                    return ((string)(this[this.tableTransactionHistoryArchive.TransactionTypeColumn]));
                }
                set {
                    this[this.tableTransactionHistoryArchive.TransactionTypeColumn] = value;
                }
            }
            
            public int Quantity {
                get {
                    return ((int)(this[this.tableTransactionHistoryArchive.QuantityColumn]));
                }
                set {
                    this[this.tableTransactionHistoryArchive.QuantityColumn] = value;
                }
            }
            
            public decimal ActualCost {
                get {
                    return ((decimal)(this[this.tableTransactionHistoryArchive.ActualCostColumn]));
                }
                set {
                    this[this.tableTransactionHistoryArchive.ActualCostColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableTransactionHistoryArchive.ModifiedDateColumn]));
                }
                set {
                    this[this.tableTransactionHistoryArchive.ModifiedDateColumn] = value;
                }
            }
        }
        
        public partial class UnitMeasureRow : System.Data.DataRow {
            
            private UnitMeasureDataTable tableUnitMeasure;
            
            internal UnitMeasureRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableUnitMeasure = ((UnitMeasureDataTable)(this.Table));
            }
            
            public string UnitMeasureCode {
                get {
                    return ((string)(this[this.tableUnitMeasure.UnitMeasureCodeColumn]));
                }
                set {
                    this[this.tableUnitMeasure.UnitMeasureCodeColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tableUnitMeasure.NameColumn]));
                }
                set {
                    this[this.tableUnitMeasure.NameColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableUnitMeasure.ModifiedDateColumn]));
                }
                set {
                    this[this.tableUnitMeasure.ModifiedDateColumn] = value;
                }
            }
            
            public BillOfMaterialsRow[] GetBillOfMaterialsRows() {
                return ((BillOfMaterialsRow[])(base.GetChildRows(this.Table.ChildRelations["FK_BillOfMaterials_UnitMeasure_UnitMeasureCode"])));
            }
            
            public ProductRow[] GetProductRowsByFK_Product_UnitMeasure_SizeUnitMeasureCode() {
                return ((ProductRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Product_UnitMeasure_SizeUnitMeasureCode"])));
            }
            
            public ProductRow[] GetProductRowsByFK_Product_UnitMeasure_WeightUnitMeasureCode() {
                return ((ProductRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Product_UnitMeasure_WeightUnitMeasureCode"])));
            }
            
            public ProductVendorRow[] GetProductVendorRows() {
                return ((ProductVendorRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductVendor_UnitMeasure_UnitMeasureCode"])));
            }
        }
        
        public partial class WorkOrderRow : System.Data.DataRow {
            
            private WorkOrderDataTable tableWorkOrder;
            
            internal WorkOrderRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableWorkOrder = ((WorkOrderDataTable)(this.Table));
            }
            
            public int WorkOrderID {
                get {
                    return ((int)(this[this.tableWorkOrder.WorkOrderIDColumn]));
                }
                set {
                    this[this.tableWorkOrder.WorkOrderIDColumn] = value;
                }
            }
            
            public int ProductID {
                get {
                    return ((int)(this[this.tableWorkOrder.ProductIDColumn]));
                }
                set {
                    this[this.tableWorkOrder.ProductIDColumn] = value;
                }
            }
            
            public int OrderQty {
                get {
                    return ((int)(this[this.tableWorkOrder.OrderQtyColumn]));
                }
                set {
                    this[this.tableWorkOrder.OrderQtyColumn] = value;
                }
            }
            
            public int StockedQty {
                get {
                    try {
                        return ((int)(this[this.tableWorkOrder.StockedQtyColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'StockedQty\' in table \'WorkOrder\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableWorkOrder.StockedQtyColumn] = value;
                }
            }
            
            public short ScrappedQty {
                get {
                    return ((short)(this[this.tableWorkOrder.ScrappedQtyColumn]));
                }
                set {
                    this[this.tableWorkOrder.ScrappedQtyColumn] = value;
                }
            }
            
            public System.DateTime StartDate {
                get {
                    return ((System.DateTime)(this[this.tableWorkOrder.StartDateColumn]));
                }
                set {
                    this[this.tableWorkOrder.StartDateColumn] = value;
                }
            }
            
            public System.DateTime EndDate {
                get {
                    try {
                        return ((System.DateTime)(this[this.tableWorkOrder.EndDateColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'EndDate\' in table \'WorkOrder\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableWorkOrder.EndDateColumn] = value;
                }
            }
            
            public System.DateTime DueDate {
                get {
                    return ((System.DateTime)(this[this.tableWorkOrder.DueDateColumn]));
                }
                set {
                    this[this.tableWorkOrder.DueDateColumn] = value;
                }
            }
            
            public short ScrapReasonID {
                get {
                    try {
                        return ((short)(this[this.tableWorkOrder.ScrapReasonIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ScrapReasonID\' in table \'WorkOrder\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableWorkOrder.ScrapReasonIDColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableWorkOrder.ModifiedDateColumn]));
                }
                set {
                    this[this.tableWorkOrder.ModifiedDateColumn] = value;
                }
            }
            
            public ProductRow ProductRow {
                get {
                    return ((ProductRow)(this.GetParentRow(this.Table.ParentRelations["FK_WorkOrder_Product_ProductID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_WorkOrder_Product_ProductID"]);
                }
            }
            
            public ScrapReasonRow ScrapReasonRow {
                get {
                    return ((ScrapReasonRow)(this.GetParentRow(this.Table.ParentRelations["FK_WorkOrder_ScrapReason_ScrapReasonID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_WorkOrder_ScrapReason_ScrapReasonID"]);
                }
            }
            
            public bool IsStockedQtyNull() {
                return this.IsNull(this.tableWorkOrder.StockedQtyColumn);
            }
            
            public void SetStockedQtyNull() {
                this[this.tableWorkOrder.StockedQtyColumn] = System.Convert.DBNull;
            }
            
            public bool IsEndDateNull() {
                return this.IsNull(this.tableWorkOrder.EndDateColumn);
            }
            
            public void SetEndDateNull() {
                this[this.tableWorkOrder.EndDateColumn] = System.Convert.DBNull;
            }
            
            public bool IsScrapReasonIDNull() {
                return this.IsNull(this.tableWorkOrder.ScrapReasonIDColumn);
            }
            
            public void SetScrapReasonIDNull() {
                this[this.tableWorkOrder.ScrapReasonIDColumn] = System.Convert.DBNull;
            }
            
            public WorkOrderRoutingRow[] GetWorkOrderRoutingRows() {
                return ((WorkOrderRoutingRow[])(base.GetChildRows(this.Table.ChildRelations["FK_WorkOrderRouting_WorkOrder_WorkOrderID"])));
            }
        }
        
        public partial class WorkOrderRoutingRow : System.Data.DataRow {
            
            private WorkOrderRoutingDataTable tableWorkOrderRouting;
            
            internal WorkOrderRoutingRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableWorkOrderRouting = ((WorkOrderRoutingDataTable)(this.Table));
            }
            
            public int WorkOrderID {
                get {
                    return ((int)(this[this.tableWorkOrderRouting.WorkOrderIDColumn]));
                }
                set {
                    this[this.tableWorkOrderRouting.WorkOrderIDColumn] = value;
                }
            }
            
            public int ProductID {
                get {
                    return ((int)(this[this.tableWorkOrderRouting.ProductIDColumn]));
                }
                set {
                    this[this.tableWorkOrderRouting.ProductIDColumn] = value;
                }
            }
            
            public short OperationSequence {
                get {
                    return ((short)(this[this.tableWorkOrderRouting.OperationSequenceColumn]));
                }
                set {
                    this[this.tableWorkOrderRouting.OperationSequenceColumn] = value;
                }
            }
            
            public short LocationID {
                get {
                    return ((short)(this[this.tableWorkOrderRouting.LocationIDColumn]));
                }
                set {
                    this[this.tableWorkOrderRouting.LocationIDColumn] = value;
                }
            }
            
            public System.DateTime ScheduledStartDate {
                get {
                    return ((System.DateTime)(this[this.tableWorkOrderRouting.ScheduledStartDateColumn]));
                }
                set {
                    this[this.tableWorkOrderRouting.ScheduledStartDateColumn] = value;
                }
            }
            
            public System.DateTime ScheduledEndDate {
                get {
                    return ((System.DateTime)(this[this.tableWorkOrderRouting.ScheduledEndDateColumn]));
                }
                set {
                    this[this.tableWorkOrderRouting.ScheduledEndDateColumn] = value;
                }
            }
            
            public System.DateTime ActualStartDate {
                get {
                    try {
                        return ((System.DateTime)(this[this.tableWorkOrderRouting.ActualStartDateColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ActualStartDate\' in table \'WorkOrderRouting\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableWorkOrderRouting.ActualStartDateColumn] = value;
                }
            }
            
            public System.DateTime ActualEndDate {
                get {
                    try {
                        return ((System.DateTime)(this[this.tableWorkOrderRouting.ActualEndDateColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ActualEndDate\' in table \'WorkOrderRouting\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableWorkOrderRouting.ActualEndDateColumn] = value;
                }
            }
            
            public decimal ActualResourceHrs {
                get {
                    try {
                        return ((decimal)(this[this.tableWorkOrderRouting.ActualResourceHrsColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ActualResourceHrs\' in table \'WorkOrderRouting\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableWorkOrderRouting.ActualResourceHrsColumn] = value;
                }
            }
            
            public decimal PlannedCost {
                get {
                    return ((decimal)(this[this.tableWorkOrderRouting.PlannedCostColumn]));
                }
                set {
                    this[this.tableWorkOrderRouting.PlannedCostColumn] = value;
                }
            }
            
            public decimal ActualCost {
                get {
                    try {
                        return ((decimal)(this[this.tableWorkOrderRouting.ActualCostColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ActualCost\' in table \'WorkOrderRouting\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableWorkOrderRouting.ActualCostColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableWorkOrderRouting.ModifiedDateColumn]));
                }
                set {
                    this[this.tableWorkOrderRouting.ModifiedDateColumn] = value;
                }
            }
            
            public LocationRow LocationRow {
                get {
                    return ((LocationRow)(this.GetParentRow(this.Table.ParentRelations["FK_WorkOrderRouting_Location_LocationID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_WorkOrderRouting_Location_LocationID"]);
                }
            }
            
            public WorkOrderRow WorkOrderRow {
                get {
                    return ((WorkOrderRow)(this.GetParentRow(this.Table.ParentRelations["FK_WorkOrderRouting_WorkOrder_WorkOrderID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_WorkOrderRouting_WorkOrder_WorkOrderID"]);
                }
            }
            
            public bool IsActualStartDateNull() {
                return this.IsNull(this.tableWorkOrderRouting.ActualStartDateColumn);
            }
            
            public void SetActualStartDateNull() {
                this[this.tableWorkOrderRouting.ActualStartDateColumn] = System.Convert.DBNull;
            }
            
            public bool IsActualEndDateNull() {
                return this.IsNull(this.tableWorkOrderRouting.ActualEndDateColumn);
            }
            
            public void SetActualEndDateNull() {
                this[this.tableWorkOrderRouting.ActualEndDateColumn] = System.Convert.DBNull;
            }
            
            public bool IsActualResourceHrsNull() {
                return this.IsNull(this.tableWorkOrderRouting.ActualResourceHrsColumn);
            }
            
            public void SetActualResourceHrsNull() {
                this[this.tableWorkOrderRouting.ActualResourceHrsColumn] = System.Convert.DBNull;
            }
            
            public bool IsActualCostNull() {
                return this.IsNull(this.tableWorkOrderRouting.ActualCostColumn);
            }
            
            public void SetActualCostNull() {
                this[this.tableWorkOrderRouting.ActualCostColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class ProductVendorRow : System.Data.DataRow {
            
            private ProductVendorDataTable tableProductVendor;
            
            internal ProductVendorRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableProductVendor = ((ProductVendorDataTable)(this.Table));
            }
            
            public int ProductID {
                get {
                    return ((int)(this[this.tableProductVendor.ProductIDColumn]));
                }
                set {
                    this[this.tableProductVendor.ProductIDColumn] = value;
                }
            }
            
            public int VendorID {
                get {
                    return ((int)(this[this.tableProductVendor.VendorIDColumn]));
                }
                set {
                    this[this.tableProductVendor.VendorIDColumn] = value;
                }
            }
            
            public int AverageLeadTime {
                get {
                    return ((int)(this[this.tableProductVendor.AverageLeadTimeColumn]));
                }
                set {
                    this[this.tableProductVendor.AverageLeadTimeColumn] = value;
                }
            }
            
            public decimal StandardPrice {
                get {
                    return ((decimal)(this[this.tableProductVendor.StandardPriceColumn]));
                }
                set {
                    this[this.tableProductVendor.StandardPriceColumn] = value;
                }
            }
            
            public decimal LastReceiptCost {
                get {
                    try {
                        return ((decimal)(this[this.tableProductVendor.LastReceiptCostColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'LastReceiptCost\' in table \'ProductVendor\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProductVendor.LastReceiptCostColumn] = value;
                }
            }
            
            public System.DateTime LastReceiptDate {
                get {
                    try {
                        return ((System.DateTime)(this[this.tableProductVendor.LastReceiptDateColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'LastReceiptDate\' in table \'ProductVendor\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProductVendor.LastReceiptDateColumn] = value;
                }
            }
            
            public int MinOrderQty {
                get {
                    return ((int)(this[this.tableProductVendor.MinOrderQtyColumn]));
                }
                set {
                    this[this.tableProductVendor.MinOrderQtyColumn] = value;
                }
            }
            
            public int MaxOrderQty {
                get {
                    return ((int)(this[this.tableProductVendor.MaxOrderQtyColumn]));
                }
                set {
                    this[this.tableProductVendor.MaxOrderQtyColumn] = value;
                }
            }
            
            public int OnOrderQty {
                get {
                    try {
                        return ((int)(this[this.tableProductVendor.OnOrderQtyColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'OnOrderQty\' in table \'ProductVendor\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProductVendor.OnOrderQtyColumn] = value;
                }
            }
            
            public string UnitMeasureCode {
                get {
                    return ((string)(this[this.tableProductVendor.UnitMeasureCodeColumn]));
                }
                set {
                    this[this.tableProductVendor.UnitMeasureCodeColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableProductVendor.ModifiedDateColumn]));
                }
                set {
                    this[this.tableProductVendor.ModifiedDateColumn] = value;
                }
            }
            
            public ProductRow ProductRow {
                get {
                    return ((ProductRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductVendor_Product_ProductID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_ProductVendor_Product_ProductID"]);
                }
            }
            
            public UnitMeasureRow UnitMeasureRow {
                get {
                    return ((UnitMeasureRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductVendor_UnitMeasure_UnitMeasureCode"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_ProductVendor_UnitMeasure_UnitMeasureCode"]);
                }
            }
            
            public VendorRow VendorRow {
                get {
                    return ((VendorRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductVendor_Vendor_VendorID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_ProductVendor_Vendor_VendorID"]);
                }
            }
            
            public bool IsLastReceiptCostNull() {
                return this.IsNull(this.tableProductVendor.LastReceiptCostColumn);
            }
            
            public void SetLastReceiptCostNull() {
                this[this.tableProductVendor.LastReceiptCostColumn] = System.Convert.DBNull;
            }
            
            public bool IsLastReceiptDateNull() {
                return this.IsNull(this.tableProductVendor.LastReceiptDateColumn);
            }
            
            public void SetLastReceiptDateNull() {
                this[this.tableProductVendor.LastReceiptDateColumn] = System.Convert.DBNull;
            }
            
            public bool IsOnOrderQtyNull() {
                return this.IsNull(this.tableProductVendor.OnOrderQtyColumn);
            }
            
            public void SetOnOrderQtyNull() {
                this[this.tableProductVendor.OnOrderQtyColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class PurchaseOrderDetailRow : System.Data.DataRow {
            
            private PurchaseOrderDetailDataTable tablePurchaseOrderDetail;
            
            internal PurchaseOrderDetailRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tablePurchaseOrderDetail = ((PurchaseOrderDetailDataTable)(this.Table));
            }
            
            public int PurchaseOrderID {
                get {
                    return ((int)(this[this.tablePurchaseOrderDetail.PurchaseOrderIDColumn]));
                }
                set {
                    this[this.tablePurchaseOrderDetail.PurchaseOrderIDColumn] = value;
                }
            }
            
            public int PurchaseOrderDetailID {
                get {
                    return ((int)(this[this.tablePurchaseOrderDetail.PurchaseOrderDetailIDColumn]));
                }
                set {
                    this[this.tablePurchaseOrderDetail.PurchaseOrderDetailIDColumn] = value;
                }
            }
            
            public System.DateTime DueDate {
                get {
                    return ((System.DateTime)(this[this.tablePurchaseOrderDetail.DueDateColumn]));
                }
                set {
                    this[this.tablePurchaseOrderDetail.DueDateColumn] = value;
                }
            }
            
            public short OrderQty {
                get {
                    return ((short)(this[this.tablePurchaseOrderDetail.OrderQtyColumn]));
                }
                set {
                    this[this.tablePurchaseOrderDetail.OrderQtyColumn] = value;
                }
            }
            
            public int ProductID {
                get {
                    return ((int)(this[this.tablePurchaseOrderDetail.ProductIDColumn]));
                }
                set {
                    this[this.tablePurchaseOrderDetail.ProductIDColumn] = value;
                }
            }
            
            public decimal UnitPrice {
                get {
                    return ((decimal)(this[this.tablePurchaseOrderDetail.UnitPriceColumn]));
                }
                set {
                    this[this.tablePurchaseOrderDetail.UnitPriceColumn] = value;
                }
            }
            
            public decimal LineTotal {
                get {
                    try {
                        return ((decimal)(this[this.tablePurchaseOrderDetail.LineTotalColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'LineTotal\' in table \'PurchaseOrderDetail\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablePurchaseOrderDetail.LineTotalColumn] = value;
                }
            }
            
            public decimal ReceivedQty {
                get {
                    return ((decimal)(this[this.tablePurchaseOrderDetail.ReceivedQtyColumn]));
                }
                set {
                    this[this.tablePurchaseOrderDetail.ReceivedQtyColumn] = value;
                }
            }
            
            public decimal RejectedQty {
                get {
                    return ((decimal)(this[this.tablePurchaseOrderDetail.RejectedQtyColumn]));
                }
                set {
                    this[this.tablePurchaseOrderDetail.RejectedQtyColumn] = value;
                }
            }
            
            public decimal StockedQty {
                get {
                    try {
                        return ((decimal)(this[this.tablePurchaseOrderDetail.StockedQtyColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'StockedQty\' in table \'PurchaseOrderDetail\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablePurchaseOrderDetail.StockedQtyColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tablePurchaseOrderDetail.ModifiedDateColumn]));
                }
                set {
                    this[this.tablePurchaseOrderDetail.ModifiedDateColumn] = value;
                }
            }
            
            public ProductRow ProductRow {
                get {
                    return ((ProductRow)(this.GetParentRow(this.Table.ParentRelations["FK_PurchaseOrderDetail_Product_ProductID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_PurchaseOrderDetail_Product_ProductID"]);
                }
            }
            
            public PurchaseOrderHeaderRow PurchaseOrderHeaderRow {
                get {
                    return ((PurchaseOrderHeaderRow)(this.GetParentRow(this.Table.ParentRelations["FK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID"]);
                }
            }
            
            public bool IsLineTotalNull() {
                return this.IsNull(this.tablePurchaseOrderDetail.LineTotalColumn);
            }
            
            public void SetLineTotalNull() {
                this[this.tablePurchaseOrderDetail.LineTotalColumn] = System.Convert.DBNull;
            }
            
            public bool IsStockedQtyNull() {
                return this.IsNull(this.tablePurchaseOrderDetail.StockedQtyColumn);
            }
            
            public void SetStockedQtyNull() {
                this[this.tablePurchaseOrderDetail.StockedQtyColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class PurchaseOrderHeaderRow : System.Data.DataRow {
            
            private PurchaseOrderHeaderDataTable tablePurchaseOrderHeader;
            
            internal PurchaseOrderHeaderRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tablePurchaseOrderHeader = ((PurchaseOrderHeaderDataTable)(this.Table));
            }
            
            public int PurchaseOrderID {
                get {
                    return ((int)(this[this.tablePurchaseOrderHeader.PurchaseOrderIDColumn]));
                }
                set {
                    this[this.tablePurchaseOrderHeader.PurchaseOrderIDColumn] = value;
                }
            }
            
            public byte RevisionNumber {
                get {
                    return ((byte)(this[this.tablePurchaseOrderHeader.RevisionNumberColumn]));
                }
                set {
                    this[this.tablePurchaseOrderHeader.RevisionNumberColumn] = value;
                }
            }
            
            public byte Status {
                get {
                    return ((byte)(this[this.tablePurchaseOrderHeader.StatusColumn]));
                }
                set {
                    this[this.tablePurchaseOrderHeader.StatusColumn] = value;
                }
            }
            
            public int EmployeeID {
                get {
                    return ((int)(this[this.tablePurchaseOrderHeader.EmployeeIDColumn]));
                }
                set {
                    this[this.tablePurchaseOrderHeader.EmployeeIDColumn] = value;
                }
            }
            
            public int VendorID {
                get {
                    return ((int)(this[this.tablePurchaseOrderHeader.VendorIDColumn]));
                }
                set {
                    this[this.tablePurchaseOrderHeader.VendorIDColumn] = value;
                }
            }
            
            public int ShipMethodID {
                get {
                    return ((int)(this[this.tablePurchaseOrderHeader.ShipMethodIDColumn]));
                }
                set {
                    this[this.tablePurchaseOrderHeader.ShipMethodIDColumn] = value;
                }
            }
            
            public System.DateTime OrderDate {
                get {
                    return ((System.DateTime)(this[this.tablePurchaseOrderHeader.OrderDateColumn]));
                }
                set {
                    this[this.tablePurchaseOrderHeader.OrderDateColumn] = value;
                }
            }
            
            public System.DateTime ShipDate {
                get {
                    try {
                        return ((System.DateTime)(this[this.tablePurchaseOrderHeader.ShipDateColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ShipDate\' in table \'PurchaseOrderHeader\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablePurchaseOrderHeader.ShipDateColumn] = value;
                }
            }
            
            public decimal SubTotal {
                get {
                    return ((decimal)(this[this.tablePurchaseOrderHeader.SubTotalColumn]));
                }
                set {
                    this[this.tablePurchaseOrderHeader.SubTotalColumn] = value;
                }
            }
            
            public decimal TaxAmt {
                get {
                    return ((decimal)(this[this.tablePurchaseOrderHeader.TaxAmtColumn]));
                }
                set {
                    this[this.tablePurchaseOrderHeader.TaxAmtColumn] = value;
                }
            }
            
            public decimal Freight {
                get {
                    return ((decimal)(this[this.tablePurchaseOrderHeader.FreightColumn]));
                }
                set {
                    this[this.tablePurchaseOrderHeader.FreightColumn] = value;
                }
            }
            
            public decimal TotalDue {
                get {
                    try {
                        return ((decimal)(this[this.tablePurchaseOrderHeader.TotalDueColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'TotalDue\' in table \'PurchaseOrderHeader\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablePurchaseOrderHeader.TotalDueColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tablePurchaseOrderHeader.ModifiedDateColumn]));
                }
                set {
                    this[this.tablePurchaseOrderHeader.ModifiedDateColumn] = value;
                }
            }
            
            public EmployeeRow EmployeeRow {
                get {
                    return ((EmployeeRow)(this.GetParentRow(this.Table.ParentRelations["FK_PurchaseOrderHeader_Employee_EmployeeID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_PurchaseOrderHeader_Employee_EmployeeID"]);
                }
            }
            
            public ShipMethodRow ShipMethodRow {
                get {
                    return ((ShipMethodRow)(this.GetParentRow(this.Table.ParentRelations["FK_PurchaseOrderHeader_ShipMethod_ShipMethodID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_PurchaseOrderHeader_ShipMethod_ShipMethodID"]);
                }
            }
            
            public VendorRow VendorRow {
                get {
                    return ((VendorRow)(this.GetParentRow(this.Table.ParentRelations["FK_PurchaseOrderHeader_Vendor_VendorID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_PurchaseOrderHeader_Vendor_VendorID"]);
                }
            }
            
            public bool IsShipDateNull() {
                return this.IsNull(this.tablePurchaseOrderHeader.ShipDateColumn);
            }
            
            public void SetShipDateNull() {
                this[this.tablePurchaseOrderHeader.ShipDateColumn] = System.Convert.DBNull;
            }
            
            public bool IsTotalDueNull() {
                return this.IsNull(this.tablePurchaseOrderHeader.TotalDueColumn);
            }
            
            public void SetTotalDueNull() {
                this[this.tablePurchaseOrderHeader.TotalDueColumn] = System.Convert.DBNull;
            }
            
            public PurchaseOrderDetailRow[] GetPurchaseOrderDetailRows() {
                return ((PurchaseOrderDetailRow[])(base.GetChildRows(this.Table.ChildRelations["FK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID"])));
            }
        }
        
        public partial class ShipMethodRow : System.Data.DataRow {
            
            private ShipMethodDataTable tableShipMethod;
            
            internal ShipMethodRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableShipMethod = ((ShipMethodDataTable)(this.Table));
            }
            
            public int ShipMethodID {
                get {
                    return ((int)(this[this.tableShipMethod.ShipMethodIDColumn]));
                }
                set {
                    this[this.tableShipMethod.ShipMethodIDColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tableShipMethod.NameColumn]));
                }
                set {
                    this[this.tableShipMethod.NameColumn] = value;
                }
            }
            
            public decimal ShipBase {
                get {
                    return ((decimal)(this[this.tableShipMethod.ShipBaseColumn]));
                }
                set {
                    this[this.tableShipMethod.ShipBaseColumn] = value;
                }
            }
            
            public decimal ShipRate {
                get {
                    return ((decimal)(this[this.tableShipMethod.ShipRateColumn]));
                }
                set {
                    this[this.tableShipMethod.ShipRateColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableShipMethod.rowguidColumn]));
                }
                set {
                    this[this.tableShipMethod.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableShipMethod.ModifiedDateColumn]));
                }
                set {
                    this[this.tableShipMethod.ModifiedDateColumn] = value;
                }
            }
            
            public PurchaseOrderHeaderRow[] GetPurchaseOrderHeaderRows() {
                return ((PurchaseOrderHeaderRow[])(base.GetChildRows(this.Table.ChildRelations["FK_PurchaseOrderHeader_ShipMethod_ShipMethodID"])));
            }
            
            public SalesOrderHeaderRow[] GetSalesOrderHeaderRows() {
                return ((SalesOrderHeaderRow[])(base.GetChildRows(this.Table.ChildRelations["FK_SalesOrderHeader_ShipMethod_ShipMethodID"])));
            }
        }
        
        public partial class VendorRow : System.Data.DataRow {
            
            private VendorDataTable tableVendor;
            
            internal VendorRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableVendor = ((VendorDataTable)(this.Table));
            }
            
            public int VendorID {
                get {
                    return ((int)(this[this.tableVendor.VendorIDColumn]));
                }
                set {
                    this[this.tableVendor.VendorIDColumn] = value;
                }
            }
            
            public string AccountNumber {
                get {
                    return ((string)(this[this.tableVendor.AccountNumberColumn]));
                }
                set {
                    this[this.tableVendor.AccountNumberColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tableVendor.NameColumn]));
                }
                set {
                    this[this.tableVendor.NameColumn] = value;
                }
            }
            
            public byte CreditRating {
                get {
                    return ((byte)(this[this.tableVendor.CreditRatingColumn]));
                }
                set {
                    this[this.tableVendor.CreditRatingColumn] = value;
                }
            }
            
            public bool PreferredVendorStatus {
                get {
                    return ((bool)(this[this.tableVendor.PreferredVendorStatusColumn]));
                }
                set {
                    this[this.tableVendor.PreferredVendorStatusColumn] = value;
                }
            }
            
            public bool ActiveFlag {
                get {
                    return ((bool)(this[this.tableVendor.ActiveFlagColumn]));
                }
                set {
                    this[this.tableVendor.ActiveFlagColumn] = value;
                }
            }
            
            public string PurchasingWebServiceURL {
                get {
                    try {
                        return ((string)(this[this.tableVendor.PurchasingWebServiceURLColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'PurchasingWebServiceURL\' in table \'Vendor\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableVendor.PurchasingWebServiceURLColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableVendor.ModifiedDateColumn]));
                }
                set {
                    this[this.tableVendor.ModifiedDateColumn] = value;
                }
            }
            
            public bool IsPurchasingWebServiceURLNull() {
                return this.IsNull(this.tableVendor.PurchasingWebServiceURLColumn);
            }
            
            public void SetPurchasingWebServiceURLNull() {
                this[this.tableVendor.PurchasingWebServiceURLColumn] = System.Convert.DBNull;
            }
            
            public ProductVendorRow[] GetProductVendorRows() {
                return ((ProductVendorRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductVendor_Vendor_VendorID"])));
            }
            
            public PurchaseOrderHeaderRow[] GetPurchaseOrderHeaderRows() {
                return ((PurchaseOrderHeaderRow[])(base.GetChildRows(this.Table.ChildRelations["FK_PurchaseOrderHeader_Vendor_VendorID"])));
            }
            
            public VendorAddressRow[] GetVendorAddressRows() {
                return ((VendorAddressRow[])(base.GetChildRows(this.Table.ChildRelations["FK_VendorAddress_Vendor_VendorID"])));
            }
            
            public VendorContactRow[] GetVendorContactRows() {
                return ((VendorContactRow[])(base.GetChildRows(this.Table.ChildRelations["FK_VendorContact_Vendor_VendorID"])));
            }
        }
        
        public partial class VendorAddressRow : System.Data.DataRow {
            
            private VendorAddressDataTable tableVendorAddress;
            
            internal VendorAddressRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableVendorAddress = ((VendorAddressDataTable)(this.Table));
            }
            
            public int VendorID {
                get {
                    return ((int)(this[this.tableVendorAddress.VendorIDColumn]));
                }
                set {
                    this[this.tableVendorAddress.VendorIDColumn] = value;
                }
            }
            
            public int AddressID {
                get {
                    return ((int)(this[this.tableVendorAddress.AddressIDColumn]));
                }
                set {
                    this[this.tableVendorAddress.AddressIDColumn] = value;
                }
            }
            
            public int AddressTypeID {
                get {
                    return ((int)(this[this.tableVendorAddress.AddressTypeIDColumn]));
                }
                set {
                    this[this.tableVendorAddress.AddressTypeIDColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableVendorAddress.ModifiedDateColumn]));
                }
                set {
                    this[this.tableVendorAddress.ModifiedDateColumn] = value;
                }
            }
            
            public AddressRow AddressRow {
                get {
                    return ((AddressRow)(this.GetParentRow(this.Table.ParentRelations["FK_VendorAddress_Address_AddressID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_VendorAddress_Address_AddressID"]);
                }
            }
            
            public AddressTypeRow AddressTypeRow {
                get {
                    return ((AddressTypeRow)(this.GetParentRow(this.Table.ParentRelations["FK_VendorAddress_AddressType_AddressTypeID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_VendorAddress_AddressType_AddressTypeID"]);
                }
            }
            
            public VendorRow VendorRow {
                get {
                    return ((VendorRow)(this.GetParentRow(this.Table.ParentRelations["FK_VendorAddress_Vendor_VendorID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_VendorAddress_Vendor_VendorID"]);
                }
            }
        }
        
        public partial class VendorContactRow : System.Data.DataRow {
            
            private VendorContactDataTable tableVendorContact;
            
            internal VendorContactRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableVendorContact = ((VendorContactDataTable)(this.Table));
            }
            
            public int VendorID {
                get {
                    return ((int)(this[this.tableVendorContact.VendorIDColumn]));
                }
                set {
                    this[this.tableVendorContact.VendorIDColumn] = value;
                }
            }
            
            public int ContactID {
                get {
                    return ((int)(this[this.tableVendorContact.ContactIDColumn]));
                }
                set {
                    this[this.tableVendorContact.ContactIDColumn] = value;
                }
            }
            
            public int ContactTypeID {
                get {
                    return ((int)(this[this.tableVendorContact.ContactTypeIDColumn]));
                }
                set {
                    this[this.tableVendorContact.ContactTypeIDColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableVendorContact.ModifiedDateColumn]));
                }
                set {
                    this[this.tableVendorContact.ModifiedDateColumn] = value;
                }
            }
            
            public ContactRow ContactRow {
                get {
                    return ((ContactRow)(this.GetParentRow(this.Table.ParentRelations["FK_VendorContact_Contact_ContactID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_VendorContact_Contact_ContactID"]);
                }
            }
            
            public ContactTypeRow ContactTypeRow {
                get {
                    return ((ContactTypeRow)(this.GetParentRow(this.Table.ParentRelations["FK_VendorContact_ContactType_ContactTypeID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_VendorContact_ContactType_ContactTypeID"]);
                }
            }
            
            public VendorRow VendorRow {
                get {
                    return ((VendorRow)(this.GetParentRow(this.Table.ParentRelations["FK_VendorContact_Vendor_VendorID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_VendorContact_Vendor_VendorID"]);
                }
            }
        }
        
        public partial class ContactCreditCardRow : System.Data.DataRow {
            
            private ContactCreditCardDataTable tableContactCreditCard;
            
            internal ContactCreditCardRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableContactCreditCard = ((ContactCreditCardDataTable)(this.Table));
            }
            
            public int ContactID {
                get {
                    return ((int)(this[this.tableContactCreditCard.ContactIDColumn]));
                }
                set {
                    this[this.tableContactCreditCard.ContactIDColumn] = value;
                }
            }
            
            public int CreditCardID {
                get {
                    return ((int)(this[this.tableContactCreditCard.CreditCardIDColumn]));
                }
                set {
                    this[this.tableContactCreditCard.CreditCardIDColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableContactCreditCard.ModifiedDateColumn]));
                }
                set {
                    this[this.tableContactCreditCard.ModifiedDateColumn] = value;
                }
            }
            
            public ContactRow ContactRow {
                get {
                    return ((ContactRow)(this.GetParentRow(this.Table.ParentRelations["FK_ContactCreditCard_Contact_ContactID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_ContactCreditCard_Contact_ContactID"]);
                }
            }
            
            public CreditCardRow CreditCardRow {
                get {
                    return ((CreditCardRow)(this.GetParentRow(this.Table.ParentRelations["FK_ContactCreditCard_CreditCard_CreditCardID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_ContactCreditCard_CreditCard_CreditCardID"]);
                }
            }
        }
        
        public partial class CountryRegionCurrencyRow : System.Data.DataRow {
            
            private CountryRegionCurrencyDataTable tableCountryRegionCurrency;
            
            internal CountryRegionCurrencyRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableCountryRegionCurrency = ((CountryRegionCurrencyDataTable)(this.Table));
            }
            
            public string CountryRegionCode {
                get {
                    return ((string)(this[this.tableCountryRegionCurrency.CountryRegionCodeColumn]));
                }
                set {
                    this[this.tableCountryRegionCurrency.CountryRegionCodeColumn] = value;
                }
            }
            
            public string CurrencyCode {
                get {
                    return ((string)(this[this.tableCountryRegionCurrency.CurrencyCodeColumn]));
                }
                set {
                    this[this.tableCountryRegionCurrency.CurrencyCodeColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableCountryRegionCurrency.ModifiedDateColumn]));
                }
                set {
                    this[this.tableCountryRegionCurrency.ModifiedDateColumn] = value;
                }
            }
            
            public CountryRegionRow CountryRegionRow {
                get {
                    return ((CountryRegionRow)(this.GetParentRow(this.Table.ParentRelations["FK_CountryRegionCurrency_CountryRegion_CountryRegionCode"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_CountryRegionCurrency_CountryRegion_CountryRegionCode"]);
                }
            }
            
            public CurrencyRow CurrencyRow {
                get {
                    return ((CurrencyRow)(this.GetParentRow(this.Table.ParentRelations["FK_CountryRegionCurrency_Currency_CurrencyCode"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_CountryRegionCurrency_Currency_CurrencyCode"]);
                }
            }
        }
        
        public partial class CreditCardRow : System.Data.DataRow {
            
            private CreditCardDataTable tableCreditCard;
            
            internal CreditCardRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableCreditCard = ((CreditCardDataTable)(this.Table));
            }
            
            public int CreditCardID {
                get {
                    return ((int)(this[this.tableCreditCard.CreditCardIDColumn]));
                }
                set {
                    this[this.tableCreditCard.CreditCardIDColumn] = value;
                }
            }
            
            public string CardType {
                get {
                    return ((string)(this[this.tableCreditCard.CardTypeColumn]));
                }
                set {
                    this[this.tableCreditCard.CardTypeColumn] = value;
                }
            }
            
            public string CardNumber {
                get {
                    return ((string)(this[this.tableCreditCard.CardNumberColumn]));
                }
                set {
                    this[this.tableCreditCard.CardNumberColumn] = value;
                }
            }
            
            public byte ExpMonth {
                get {
                    return ((byte)(this[this.tableCreditCard.ExpMonthColumn]));
                }
                set {
                    this[this.tableCreditCard.ExpMonthColumn] = value;
                }
            }
            
            public short ExpYear {
                get {
                    return ((short)(this[this.tableCreditCard.ExpYearColumn]));
                }
                set {
                    this[this.tableCreditCard.ExpYearColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableCreditCard.ModifiedDateColumn]));
                }
                set {
                    this[this.tableCreditCard.ModifiedDateColumn] = value;
                }
            }
            
            public ContactCreditCardRow[] GetContactCreditCardRows() {
                return ((ContactCreditCardRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ContactCreditCard_CreditCard_CreditCardID"])));
            }
            
            public SalesOrderHeaderRow[] GetSalesOrderHeaderRows() {
                return ((SalesOrderHeaderRow[])(base.GetChildRows(this.Table.ChildRelations["FK_SalesOrderHeader_CreditCard_CreditCardID"])));
            }
        }
        
        public partial class CurrencyRow : System.Data.DataRow {
            
            private CurrencyDataTable tableCurrency;
            
            internal CurrencyRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableCurrency = ((CurrencyDataTable)(this.Table));
            }
            
            public string CurrencyCode {
                get {
                    return ((string)(this[this.tableCurrency.CurrencyCodeColumn]));
                }
                set {
                    this[this.tableCurrency.CurrencyCodeColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tableCurrency.NameColumn]));
                }
                set {
                    this[this.tableCurrency.NameColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableCurrency.ModifiedDateColumn]));
                }
                set {
                    this[this.tableCurrency.ModifiedDateColumn] = value;
                }
            }
            
            public CountryRegionCurrencyRow[] GetCountryRegionCurrencyRows() {
                return ((CountryRegionCurrencyRow[])(base.GetChildRows(this.Table.ChildRelations["FK_CountryRegionCurrency_Currency_CurrencyCode"])));
            }
            
            public CurrencyRateRow[] GetCurrencyRateRowsByFK_CurrencyRate_Currency_FromCurrencyCode() {
                return ((CurrencyRateRow[])(base.GetChildRows(this.Table.ChildRelations["FK_CurrencyRate_Currency_FromCurrencyCode"])));
            }
            
            public CurrencyRateRow[] GetCurrencyRateRowsByFK_CurrencyRate_Currency_ToCurrencyCode() {
                return ((CurrencyRateRow[])(base.GetChildRows(this.Table.ChildRelations["FK_CurrencyRate_Currency_ToCurrencyCode"])));
            }
        }
        
        public partial class CurrencyRateRow : System.Data.DataRow {
            
            private CurrencyRateDataTable tableCurrencyRate;
            
            internal CurrencyRateRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableCurrencyRate = ((CurrencyRateDataTable)(this.Table));
            }
            
            public int CurrencyRateID {
                get {
                    return ((int)(this[this.tableCurrencyRate.CurrencyRateIDColumn]));
                }
                set {
                    this[this.tableCurrencyRate.CurrencyRateIDColumn] = value;
                }
            }
            
            public System.DateTime CurrencyRateDate {
                get {
                    return ((System.DateTime)(this[this.tableCurrencyRate.CurrencyRateDateColumn]));
                }
                set {
                    this[this.tableCurrencyRate.CurrencyRateDateColumn] = value;
                }
            }
            
            public string FromCurrencyCode {
                get {
                    return ((string)(this[this.tableCurrencyRate.FromCurrencyCodeColumn]));
                }
                set {
                    this[this.tableCurrencyRate.FromCurrencyCodeColumn] = value;
                }
            }
            
            public string ToCurrencyCode {
                get {
                    return ((string)(this[this.tableCurrencyRate.ToCurrencyCodeColumn]));
                }
                set {
                    this[this.tableCurrencyRate.ToCurrencyCodeColumn] = value;
                }
            }
            
            public decimal AverageRate {
                get {
                    return ((decimal)(this[this.tableCurrencyRate.AverageRateColumn]));
                }
                set {
                    this[this.tableCurrencyRate.AverageRateColumn] = value;
                }
            }
            
            public decimal EndOfDayRate {
                get {
                    return ((decimal)(this[this.tableCurrencyRate.EndOfDayRateColumn]));
                }
                set {
                    this[this.tableCurrencyRate.EndOfDayRateColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableCurrencyRate.ModifiedDateColumn]));
                }
                set {
                    this[this.tableCurrencyRate.ModifiedDateColumn] = value;
                }
            }
            
            public CurrencyRow CurrencyRowByFK_CurrencyRate_Currency_FromCurrencyCode {
                get {
                    return ((CurrencyRow)(this.GetParentRow(this.Table.ParentRelations["FK_CurrencyRate_Currency_FromCurrencyCode"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_CurrencyRate_Currency_FromCurrencyCode"]);
                }
            }
            
            public CurrencyRow CurrencyRowByFK_CurrencyRate_Currency_ToCurrencyCode {
                get {
                    return ((CurrencyRow)(this.GetParentRow(this.Table.ParentRelations["FK_CurrencyRate_Currency_ToCurrencyCode"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_CurrencyRate_Currency_ToCurrencyCode"]);
                }
            }
            
            public SalesOrderHeaderRow[] GetSalesOrderHeaderRows() {
                return ((SalesOrderHeaderRow[])(base.GetChildRows(this.Table.ChildRelations["FK_SalesOrderHeader_CurrencyRate_CurrencyRateID"])));
            }
        }
        
        public partial class CustomerRow : System.Data.DataRow {
            
            private CustomerDataTable tableCustomer;
            
            internal CustomerRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableCustomer = ((CustomerDataTable)(this.Table));
            }
            
            public int CustomerID {
                get {
                    return ((int)(this[this.tableCustomer.CustomerIDColumn]));
                }
                set {
                    this[this.tableCustomer.CustomerIDColumn] = value;
                }
            }
            
            public int TerritoryID {
                get {
                    try {
                        return ((int)(this[this.tableCustomer.TerritoryIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'TerritoryID\' in table \'Customer\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableCustomer.TerritoryIDColumn] = value;
                }
            }
            
            public string AccountNumber {
                get {
                    try {
                        return ((string)(this[this.tableCustomer.AccountNumberColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'AccountNumber\' in table \'Customer\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableCustomer.AccountNumberColumn] = value;
                }
            }
            
            public string CustomerType {
                get {
                    return ((string)(this[this.tableCustomer.CustomerTypeColumn]));
                }
                set {
                    this[this.tableCustomer.CustomerTypeColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableCustomer.rowguidColumn]));
                }
                set {
                    this[this.tableCustomer.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableCustomer.ModifiedDateColumn]));
                }
                set {
                    this[this.tableCustomer.ModifiedDateColumn] = value;
                }
            }
            
            public SalesTerritoryRow SalesTerritoryRow {
                get {
                    return ((SalesTerritoryRow)(this.GetParentRow(this.Table.ParentRelations["FK_Customer_SalesTerritory_TerritoryID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_Customer_SalesTerritory_TerritoryID"]);
                }
            }
            
            public bool IsTerritoryIDNull() {
                return this.IsNull(this.tableCustomer.TerritoryIDColumn);
            }
            
            public void SetTerritoryIDNull() {
                this[this.tableCustomer.TerritoryIDColumn] = System.Convert.DBNull;
            }
            
            public bool IsAccountNumberNull() {
                return this.IsNull(this.tableCustomer.AccountNumberColumn);
            }
            
            public void SetAccountNumberNull() {
                this[this.tableCustomer.AccountNumberColumn] = System.Convert.DBNull;
            }
            
            public CustomerAddressRow[] GetCustomerAddressRows() {
                return ((CustomerAddressRow[])(base.GetChildRows(this.Table.ChildRelations["FK_CustomerAddress_Customer_CustomerID"])));
            }
            
            public IndividualRow[] GetIndividualRows() {
                return ((IndividualRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Individual_Customer_CustomerID"])));
            }
            
            public SalesOrderHeaderRow[] GetSalesOrderHeaderRows() {
                return ((SalesOrderHeaderRow[])(base.GetChildRows(this.Table.ChildRelations["FK_SalesOrderHeader_Customer_CustomerID"])));
            }
            
            public StoreRow[] GetStoreRows() {
                return ((StoreRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Store_Customer_CustomerID"])));
            }
        }
        
        public partial class CustomerAddressRow : System.Data.DataRow {
            
            private CustomerAddressDataTable tableCustomerAddress;
            
            internal CustomerAddressRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableCustomerAddress = ((CustomerAddressDataTable)(this.Table));
            }
            
            public int CustomerID {
                get {
                    return ((int)(this[this.tableCustomerAddress.CustomerIDColumn]));
                }
                set {
                    this[this.tableCustomerAddress.CustomerIDColumn] = value;
                }
            }
            
            public int AddressID {
                get {
                    return ((int)(this[this.tableCustomerAddress.AddressIDColumn]));
                }
                set {
                    this[this.tableCustomerAddress.AddressIDColumn] = value;
                }
            }
            
            public int AddressTypeID {
                get {
                    return ((int)(this[this.tableCustomerAddress.AddressTypeIDColumn]));
                }
                set {
                    this[this.tableCustomerAddress.AddressTypeIDColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableCustomerAddress.rowguidColumn]));
                }
                set {
                    this[this.tableCustomerAddress.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableCustomerAddress.ModifiedDateColumn]));
                }
                set {
                    this[this.tableCustomerAddress.ModifiedDateColumn] = value;
                }
            }
            
            public AddressRow AddressRow {
                get {
                    return ((AddressRow)(this.GetParentRow(this.Table.ParentRelations["FK_CustomerAddress_Address_AddressID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_CustomerAddress_Address_AddressID"]);
                }
            }
            
            public AddressTypeRow AddressTypeRow {
                get {
                    return ((AddressTypeRow)(this.GetParentRow(this.Table.ParentRelations["FK_CustomerAddress_AddressType_AddressTypeID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_CustomerAddress_AddressType_AddressTypeID"]);
                }
            }
            
            public CustomerRow CustomerRow {
                get {
                    return ((CustomerRow)(this.GetParentRow(this.Table.ParentRelations["FK_CustomerAddress_Customer_CustomerID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_CustomerAddress_Customer_CustomerID"]);
                }
            }
        }
        
        public partial class IndividualRow : System.Data.DataRow {
            
            private IndividualDataTable tableIndividual;
            
            internal IndividualRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableIndividual = ((IndividualDataTable)(this.Table));
            }
            
            public int CustomerID {
                get {
                    return ((int)(this[this.tableIndividual.CustomerIDColumn]));
                }
                set {
                    this[this.tableIndividual.CustomerIDColumn] = value;
                }
            }
            
            public int ContactID {
                get {
                    return ((int)(this[this.tableIndividual.ContactIDColumn]));
                }
                set {
                    this[this.tableIndividual.ContactIDColumn] = value;
                }
            }
            
            public string Demographics {
                get {
                    try {
                        return ((string)(this[this.tableIndividual.DemographicsColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Demographics\' in table \'Individual\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableIndividual.DemographicsColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableIndividual.ModifiedDateColumn]));
                }
                set {
                    this[this.tableIndividual.ModifiedDateColumn] = value;
                }
            }
            
            public ContactRow ContactRow {
                get {
                    return ((ContactRow)(this.GetParentRow(this.Table.ParentRelations["FK_Individual_Contact_ContactID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_Individual_Contact_ContactID"]);
                }
            }
            
            public CustomerRow CustomerRow {
                get {
                    return ((CustomerRow)(this.GetParentRow(this.Table.ParentRelations["FK_Individual_Customer_CustomerID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_Individual_Customer_CustomerID"]);
                }
            }
            
            public bool IsDemographicsNull() {
                return this.IsNull(this.tableIndividual.DemographicsColumn);
            }
            
            public void SetDemographicsNull() {
                this[this.tableIndividual.DemographicsColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class SalesOrderDetailRow : System.Data.DataRow {
            
            private SalesOrderDetailDataTable tableSalesOrderDetail;
            
            internal SalesOrderDetailRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableSalesOrderDetail = ((SalesOrderDetailDataTable)(this.Table));
            }
            
            public int SalesOrderID {
                get {
                    return ((int)(this[this.tableSalesOrderDetail.SalesOrderIDColumn]));
                }
                set {
                    this[this.tableSalesOrderDetail.SalesOrderIDColumn] = value;
                }
            }
            
            public int SalesOrderDetailID {
                get {
                    return ((int)(this[this.tableSalesOrderDetail.SalesOrderDetailIDColumn]));
                }
                set {
                    this[this.tableSalesOrderDetail.SalesOrderDetailIDColumn] = value;
                }
            }
            
            public string CarrierTrackingNumber {
                get {
                    try {
                        return ((string)(this[this.tableSalesOrderDetail.CarrierTrackingNumberColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'CarrierTrackingNumber\' in table \'SalesOrderDetail\' is DBNul" +
                                "l.", e);
                    }
                }
                set {
                    this[this.tableSalesOrderDetail.CarrierTrackingNumberColumn] = value;
                }
            }
            
            public short OrderQty {
                get {
                    return ((short)(this[this.tableSalesOrderDetail.OrderQtyColumn]));
                }
                set {
                    this[this.tableSalesOrderDetail.OrderQtyColumn] = value;
                }
            }
            
            public int ProductID {
                get {
                    return ((int)(this[this.tableSalesOrderDetail.ProductIDColumn]));
                }
                set {
                    this[this.tableSalesOrderDetail.ProductIDColumn] = value;
                }
            }
            
            public int SpecialOfferID {
                get {
                    return ((int)(this[this.tableSalesOrderDetail.SpecialOfferIDColumn]));
                }
                set {
                    this[this.tableSalesOrderDetail.SpecialOfferIDColumn] = value;
                }
            }
            
            public decimal UnitPrice {
                get {
                    return ((decimal)(this[this.tableSalesOrderDetail.UnitPriceColumn]));
                }
                set {
                    this[this.tableSalesOrderDetail.UnitPriceColumn] = value;
                }
            }
            
            public decimal UnitPriceDiscount {
                get {
                    return ((decimal)(this[this.tableSalesOrderDetail.UnitPriceDiscountColumn]));
                }
                set {
                    this[this.tableSalesOrderDetail.UnitPriceDiscountColumn] = value;
                }
            }
            
            public decimal LineTotal {
                get {
                    try {
                        return ((decimal)(this[this.tableSalesOrderDetail.LineTotalColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'LineTotal\' in table \'SalesOrderDetail\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableSalesOrderDetail.LineTotalColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableSalesOrderDetail.rowguidColumn]));
                }
                set {
                    this[this.tableSalesOrderDetail.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableSalesOrderDetail.ModifiedDateColumn]));
                }
                set {
                    this[this.tableSalesOrderDetail.ModifiedDateColumn] = value;
                }
            }
            
            public SalesOrderHeaderRow SalesOrderHeaderRow {
                get {
                    return ((SalesOrderHeaderRow)(this.GetParentRow(this.Table.ParentRelations["FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID"]);
                }
            }
            
            public SpecialOfferProductRow SpecialOfferProductRowParent {
                get {
                    return ((SpecialOfferProductRow)(this.GetParentRow(this.Table.ParentRelations["FK_SalesOrderDetail_SpecialOfferProduct_SpecialOfferIDProductID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_SalesOrderDetail_SpecialOfferProduct_SpecialOfferIDProductID"]);
                }
            }
            
            public bool IsCarrierTrackingNumberNull() {
                return this.IsNull(this.tableSalesOrderDetail.CarrierTrackingNumberColumn);
            }
            
            public void SetCarrierTrackingNumberNull() {
                this[this.tableSalesOrderDetail.CarrierTrackingNumberColumn] = System.Convert.DBNull;
            }
            
            public bool IsLineTotalNull() {
                return this.IsNull(this.tableSalesOrderDetail.LineTotalColumn);
            }
            
            public void SetLineTotalNull() {
                this[this.tableSalesOrderDetail.LineTotalColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class SalesOrderHeaderRow : System.Data.DataRow {
            
            private SalesOrderHeaderDataTable tableSalesOrderHeader;
            
            internal SalesOrderHeaderRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableSalesOrderHeader = ((SalesOrderHeaderDataTable)(this.Table));
            }
            
            public int SalesOrderID {
                get {
                    return ((int)(this[this.tableSalesOrderHeader.SalesOrderIDColumn]));
                }
                set {
                    this[this.tableSalesOrderHeader.SalesOrderIDColumn] = value;
                }
            }
            
            public byte RevisionNumber {
                get {
                    return ((byte)(this[this.tableSalesOrderHeader.RevisionNumberColumn]));
                }
                set {
                    this[this.tableSalesOrderHeader.RevisionNumberColumn] = value;
                }
            }
            
            public System.DateTime OrderDate {
                get {
                    return ((System.DateTime)(this[this.tableSalesOrderHeader.OrderDateColumn]));
                }
                set {
                    this[this.tableSalesOrderHeader.OrderDateColumn] = value;
                }
            }
            
            public System.DateTime DueDate {
                get {
                    return ((System.DateTime)(this[this.tableSalesOrderHeader.DueDateColumn]));
                }
                set {
                    this[this.tableSalesOrderHeader.DueDateColumn] = value;
                }
            }
            
            public System.DateTime ShipDate {
                get {
                    try {
                        return ((System.DateTime)(this[this.tableSalesOrderHeader.ShipDateColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ShipDate\' in table \'SalesOrderHeader\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableSalesOrderHeader.ShipDateColumn] = value;
                }
            }
            
            public byte Status {
                get {
                    return ((byte)(this[this.tableSalesOrderHeader.StatusColumn]));
                }
                set {
                    this[this.tableSalesOrderHeader.StatusColumn] = value;
                }
            }
            
            public bool OnlineOrderFlag {
                get {
                    return ((bool)(this[this.tableSalesOrderHeader.OnlineOrderFlagColumn]));
                }
                set {
                    this[this.tableSalesOrderHeader.OnlineOrderFlagColumn] = value;
                }
            }
            
            public string SalesOrderNumber {
                get {
                    try {
                        return ((string)(this[this.tableSalesOrderHeader.SalesOrderNumberColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'SalesOrderNumber\' in table \'SalesOrderHeader\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableSalesOrderHeader.SalesOrderNumberColumn] = value;
                }
            }
            
            public string PurchaseOrderNumber {
                get {
                    try {
                        return ((string)(this[this.tableSalesOrderHeader.PurchaseOrderNumberColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'PurchaseOrderNumber\' in table \'SalesOrderHeader\' is DBNull." +
                                "", e);
                    }
                }
                set {
                    this[this.tableSalesOrderHeader.PurchaseOrderNumberColumn] = value;
                }
            }
            
            public string AccountNumber {
                get {
                    try {
                        return ((string)(this[this.tableSalesOrderHeader.AccountNumberColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'AccountNumber\' in table \'SalesOrderHeader\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableSalesOrderHeader.AccountNumberColumn] = value;
                }
            }
            
            public int CustomerID {
                get {
                    return ((int)(this[this.tableSalesOrderHeader.CustomerIDColumn]));
                }
                set {
                    this[this.tableSalesOrderHeader.CustomerIDColumn] = value;
                }
            }
            
            public int ContactID {
                get {
                    return ((int)(this[this.tableSalesOrderHeader.ContactIDColumn]));
                }
                set {
                    this[this.tableSalesOrderHeader.ContactIDColumn] = value;
                }
            }
            
            public int SalesPersonID {
                get {
                    try {
                        return ((int)(this[this.tableSalesOrderHeader.SalesPersonIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'SalesPersonID\' in table \'SalesOrderHeader\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableSalesOrderHeader.SalesPersonIDColumn] = value;
                }
            }
            
            public int TerritoryID {
                get {
                    try {
                        return ((int)(this[this.tableSalesOrderHeader.TerritoryIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'TerritoryID\' in table \'SalesOrderHeader\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableSalesOrderHeader.TerritoryIDColumn] = value;
                }
            }
            
            public int BillToAddressID {
                get {
                    return ((int)(this[this.tableSalesOrderHeader.BillToAddressIDColumn]));
                }
                set {
                    this[this.tableSalesOrderHeader.BillToAddressIDColumn] = value;
                }
            }
            
            public int ShipToAddressID {
                get {
                    return ((int)(this[this.tableSalesOrderHeader.ShipToAddressIDColumn]));
                }
                set {
                    this[this.tableSalesOrderHeader.ShipToAddressIDColumn] = value;
                }
            }
            
            public int ShipMethodID {
                get {
                    return ((int)(this[this.tableSalesOrderHeader.ShipMethodIDColumn]));
                }
                set {
                    this[this.tableSalesOrderHeader.ShipMethodIDColumn] = value;
                }
            }
            
            public int CreditCardID {
                get {
                    try {
                        return ((int)(this[this.tableSalesOrderHeader.CreditCardIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'CreditCardID\' in table \'SalesOrderHeader\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableSalesOrderHeader.CreditCardIDColumn] = value;
                }
            }
            
            public string CreditCardApprovalCode {
                get {
                    try {
                        return ((string)(this[this.tableSalesOrderHeader.CreditCardApprovalCodeColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'CreditCardApprovalCode\' in table \'SalesOrderHeader\' is DBNu" +
                                "ll.", e);
                    }
                }
                set {
                    this[this.tableSalesOrderHeader.CreditCardApprovalCodeColumn] = value;
                }
            }
            
            public int CurrencyRateID {
                get {
                    try {
                        return ((int)(this[this.tableSalesOrderHeader.CurrencyRateIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'CurrencyRateID\' in table \'SalesOrderHeader\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableSalesOrderHeader.CurrencyRateIDColumn] = value;
                }
            }
            
            public decimal SubTotal {
                get {
                    return ((decimal)(this[this.tableSalesOrderHeader.SubTotalColumn]));
                }
                set {
                    this[this.tableSalesOrderHeader.SubTotalColumn] = value;
                }
            }
            
            public decimal TaxAmt {
                get {
                    return ((decimal)(this[this.tableSalesOrderHeader.TaxAmtColumn]));
                }
                set {
                    this[this.tableSalesOrderHeader.TaxAmtColumn] = value;
                }
            }
            
            public decimal Freight {
                get {
                    return ((decimal)(this[this.tableSalesOrderHeader.FreightColumn]));
                }
                set {
                    this[this.tableSalesOrderHeader.FreightColumn] = value;
                }
            }
            
            public decimal TotalDue {
                get {
                    try {
                        return ((decimal)(this[this.tableSalesOrderHeader.TotalDueColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'TotalDue\' in table \'SalesOrderHeader\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableSalesOrderHeader.TotalDueColumn] = value;
                }
            }
            
            public string Comment {
                get {
                    try {
                        return ((string)(this[this.tableSalesOrderHeader.CommentColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Comment\' in table \'SalesOrderHeader\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableSalesOrderHeader.CommentColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableSalesOrderHeader.rowguidColumn]));
                }
                set {
                    this[this.tableSalesOrderHeader.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableSalesOrderHeader.ModifiedDateColumn]));
                }
                set {
                    this[this.tableSalesOrderHeader.ModifiedDateColumn] = value;
                }
            }
            
            public AddressRow AddressRowByFK_SalesOrderHeader_Address_BillToAddressID {
                get {
                    return ((AddressRow)(this.GetParentRow(this.Table.ParentRelations["FK_SalesOrderHeader_Address_BillToAddressID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_SalesOrderHeader_Address_BillToAddressID"]);
                }
            }
            
            public AddressRow AddressRowByFK_SalesOrderHeader_Address_ShipToAddressID {
                get {
                    return ((AddressRow)(this.GetParentRow(this.Table.ParentRelations["FK_SalesOrderHeader_Address_ShipToAddressID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_SalesOrderHeader_Address_ShipToAddressID"]);
                }
            }
            
            public ContactRow ContactRow {
                get {
                    return ((ContactRow)(this.GetParentRow(this.Table.ParentRelations["FK_SalesOrderHeader_Contact_ContactID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_SalesOrderHeader_Contact_ContactID"]);
                }
            }
            
            public CreditCardRow CreditCardRow {
                get {
                    return ((CreditCardRow)(this.GetParentRow(this.Table.ParentRelations["FK_SalesOrderHeader_CreditCard_CreditCardID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_SalesOrderHeader_CreditCard_CreditCardID"]);
                }
            }
            
            public CurrencyRateRow CurrencyRateRow {
                get {
                    return ((CurrencyRateRow)(this.GetParentRow(this.Table.ParentRelations["FK_SalesOrderHeader_CurrencyRate_CurrencyRateID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_SalesOrderHeader_CurrencyRate_CurrencyRateID"]);
                }
            }
            
            public CustomerRow CustomerRow {
                get {
                    return ((CustomerRow)(this.GetParentRow(this.Table.ParentRelations["FK_SalesOrderHeader_Customer_CustomerID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_SalesOrderHeader_Customer_CustomerID"]);
                }
            }
            
            public SalesPersonRow SalesPersonRow {
                get {
                    return ((SalesPersonRow)(this.GetParentRow(this.Table.ParentRelations["FK_SalesOrderHeader_SalesPerson_SalesPersonID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_SalesOrderHeader_SalesPerson_SalesPersonID"]);
                }
            }
            
            public SalesTerritoryRow SalesTerritoryRow {
                get {
                    return ((SalesTerritoryRow)(this.GetParentRow(this.Table.ParentRelations["FK_SalesOrderHeader_SalesTerritory_TerritoryID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_SalesOrderHeader_SalesTerritory_TerritoryID"]);
                }
            }
            
            public ShipMethodRow ShipMethodRow {
                get {
                    return ((ShipMethodRow)(this.GetParentRow(this.Table.ParentRelations["FK_SalesOrderHeader_ShipMethod_ShipMethodID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_SalesOrderHeader_ShipMethod_ShipMethodID"]);
                }
            }
            
            public bool IsShipDateNull() {
                return this.IsNull(this.tableSalesOrderHeader.ShipDateColumn);
            }
            
            public void SetShipDateNull() {
                this[this.tableSalesOrderHeader.ShipDateColumn] = System.Convert.DBNull;
            }
            
            public bool IsSalesOrderNumberNull() {
                return this.IsNull(this.tableSalesOrderHeader.SalesOrderNumberColumn);
            }
            
            public void SetSalesOrderNumberNull() {
                this[this.tableSalesOrderHeader.SalesOrderNumberColumn] = System.Convert.DBNull;
            }
            
            public bool IsPurchaseOrderNumberNull() {
                return this.IsNull(this.tableSalesOrderHeader.PurchaseOrderNumberColumn);
            }
            
            public void SetPurchaseOrderNumberNull() {
                this[this.tableSalesOrderHeader.PurchaseOrderNumberColumn] = System.Convert.DBNull;
            }
            
            public bool IsAccountNumberNull() {
                return this.IsNull(this.tableSalesOrderHeader.AccountNumberColumn);
            }
            
            public void SetAccountNumberNull() {
                this[this.tableSalesOrderHeader.AccountNumberColumn] = System.Convert.DBNull;
            }
            
            public bool IsSalesPersonIDNull() {
                return this.IsNull(this.tableSalesOrderHeader.SalesPersonIDColumn);
            }
            
            public void SetSalesPersonIDNull() {
                this[this.tableSalesOrderHeader.SalesPersonIDColumn] = System.Convert.DBNull;
            }
            
            public bool IsTerritoryIDNull() {
                return this.IsNull(this.tableSalesOrderHeader.TerritoryIDColumn);
            }
            
            public void SetTerritoryIDNull() {
                this[this.tableSalesOrderHeader.TerritoryIDColumn] = System.Convert.DBNull;
            }
            
            public bool IsCreditCardIDNull() {
                return this.IsNull(this.tableSalesOrderHeader.CreditCardIDColumn);
            }
            
            public void SetCreditCardIDNull() {
                this[this.tableSalesOrderHeader.CreditCardIDColumn] = System.Convert.DBNull;
            }
            
            public bool IsCreditCardApprovalCodeNull() {
                return this.IsNull(this.tableSalesOrderHeader.CreditCardApprovalCodeColumn);
            }
            
            public void SetCreditCardApprovalCodeNull() {
                this[this.tableSalesOrderHeader.CreditCardApprovalCodeColumn] = System.Convert.DBNull;
            }
            
            public bool IsCurrencyRateIDNull() {
                return this.IsNull(this.tableSalesOrderHeader.CurrencyRateIDColumn);
            }
            
            public void SetCurrencyRateIDNull() {
                this[this.tableSalesOrderHeader.CurrencyRateIDColumn] = System.Convert.DBNull;
            }
            
            public bool IsTotalDueNull() {
                return this.IsNull(this.tableSalesOrderHeader.TotalDueColumn);
            }
            
            public void SetTotalDueNull() {
                this[this.tableSalesOrderHeader.TotalDueColumn] = System.Convert.DBNull;
            }
            
            public bool IsCommentNull() {
                return this.IsNull(this.tableSalesOrderHeader.CommentColumn);
            }
            
            public void SetCommentNull() {
                this[this.tableSalesOrderHeader.CommentColumn] = System.Convert.DBNull;
            }
            
            public SalesOrderDetailRow[] GetSalesOrderDetailRows() {
                return ((SalesOrderDetailRow[])(base.GetChildRows(this.Table.ChildRelations["FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID"])));
            }
            
            public SalesOrderHeaderSalesReasonRow[] GetSalesOrderHeaderSalesReasonRows() {
                return ((SalesOrderHeaderSalesReasonRow[])(base.GetChildRows(this.Table.ChildRelations["FK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderID"])));
            }
        }
        
        public partial class SalesOrderHeaderSalesReasonRow : System.Data.DataRow {
            
            private SalesOrderHeaderSalesReasonDataTable tableSalesOrderHeaderSalesReason;
            
            internal SalesOrderHeaderSalesReasonRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableSalesOrderHeaderSalesReason = ((SalesOrderHeaderSalesReasonDataTable)(this.Table));
            }
            
            public int SalesOrderID {
                get {
                    return ((int)(this[this.tableSalesOrderHeaderSalesReason.SalesOrderIDColumn]));
                }
                set {
                    this[this.tableSalesOrderHeaderSalesReason.SalesOrderIDColumn] = value;
                }
            }
            
            public int SalesReasonID {
                get {
                    return ((int)(this[this.tableSalesOrderHeaderSalesReason.SalesReasonIDColumn]));
                }
                set {
                    this[this.tableSalesOrderHeaderSalesReason.SalesReasonIDColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableSalesOrderHeaderSalesReason.ModifiedDateColumn]));
                }
                set {
                    this[this.tableSalesOrderHeaderSalesReason.ModifiedDateColumn] = value;
                }
            }
            
            public SalesOrderHeaderRow SalesOrderHeaderRow {
                get {
                    return ((SalesOrderHeaderRow)(this.GetParentRow(this.Table.ParentRelations["FK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderID"]);
                }
            }
            
            public SalesReasonRow SalesReasonRow {
                get {
                    return ((SalesReasonRow)(this.GetParentRow(this.Table.ParentRelations["FK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID"]);
                }
            }
        }
        
        public partial class SalesPersonRow : System.Data.DataRow {
            
            private SalesPersonDataTable tableSalesPerson;
            
            internal SalesPersonRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableSalesPerson = ((SalesPersonDataTable)(this.Table));
            }
            
            public int SalesPersonID {
                get {
                    return ((int)(this[this.tableSalesPerson.SalesPersonIDColumn]));
                }
                set {
                    this[this.tableSalesPerson.SalesPersonIDColumn] = value;
                }
            }
            
            public int TerritoryID {
                get {
                    try {
                        return ((int)(this[this.tableSalesPerson.TerritoryIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'TerritoryID\' in table \'SalesPerson\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableSalesPerson.TerritoryIDColumn] = value;
                }
            }
            
            public decimal SalesQuota {
                get {
                    try {
                        return ((decimal)(this[this.tableSalesPerson.SalesQuotaColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'SalesQuota\' in table \'SalesPerson\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableSalesPerson.SalesQuotaColumn] = value;
                }
            }
            
            public decimal Bonus {
                get {
                    return ((decimal)(this[this.tableSalesPerson.BonusColumn]));
                }
                set {
                    this[this.tableSalesPerson.BonusColumn] = value;
                }
            }
            
            public decimal CommissionPct {
                get {
                    return ((decimal)(this[this.tableSalesPerson.CommissionPctColumn]));
                }
                set {
                    this[this.tableSalesPerson.CommissionPctColumn] = value;
                }
            }
            
            public decimal SalesYTD {
                get {
                    return ((decimal)(this[this.tableSalesPerson.SalesYTDColumn]));
                }
                set {
                    this[this.tableSalesPerson.SalesYTDColumn] = value;
                }
            }
            
            public decimal SalesLastYear {
                get {
                    return ((decimal)(this[this.tableSalesPerson.SalesLastYearColumn]));
                }
                set {
                    this[this.tableSalesPerson.SalesLastYearColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableSalesPerson.rowguidColumn]));
                }
                set {
                    this[this.tableSalesPerson.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableSalesPerson.ModifiedDateColumn]));
                }
                set {
                    this[this.tableSalesPerson.ModifiedDateColumn] = value;
                }
            }
            
            public EmployeeRow EmployeeRow {
                get {
                    return ((EmployeeRow)(this.GetParentRow(this.Table.ParentRelations["FK_SalesPerson_Employee_SalesPersonID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_SalesPerson_Employee_SalesPersonID"]);
                }
            }
            
            public SalesTerritoryRow SalesTerritoryRow {
                get {
                    return ((SalesTerritoryRow)(this.GetParentRow(this.Table.ParentRelations["FK_SalesPerson_SalesTerritory_TerritoryID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_SalesPerson_SalesTerritory_TerritoryID"]);
                }
            }
            
            public bool IsTerritoryIDNull() {
                return this.IsNull(this.tableSalesPerson.TerritoryIDColumn);
            }
            
            public void SetTerritoryIDNull() {
                this[this.tableSalesPerson.TerritoryIDColumn] = System.Convert.DBNull;
            }
            
            public bool IsSalesQuotaNull() {
                return this.IsNull(this.tableSalesPerson.SalesQuotaColumn);
            }
            
            public void SetSalesQuotaNull() {
                this[this.tableSalesPerson.SalesQuotaColumn] = System.Convert.DBNull;
            }
            
            public SalesOrderHeaderRow[] GetSalesOrderHeaderRows() {
                return ((SalesOrderHeaderRow[])(base.GetChildRows(this.Table.ChildRelations["FK_SalesOrderHeader_SalesPerson_SalesPersonID"])));
            }
            
            public SalesPersonQuotaHistoryRow[] GetSalesPersonQuotaHistoryRows() {
                return ((SalesPersonQuotaHistoryRow[])(base.GetChildRows(this.Table.ChildRelations["FK_SalesPersonQuotaHistory_SalesPerson_SalesPersonID"])));
            }
            
            public SalesTerritoryHistoryRow[] GetSalesTerritoryHistoryRows() {
                return ((SalesTerritoryHistoryRow[])(base.GetChildRows(this.Table.ChildRelations["FK_SalesTerritoryHistory_SalesPerson_SalesPersonID"])));
            }
            
            public StoreRow[] GetStoreRows() {
                return ((StoreRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Store_SalesPerson_SalesPersonID"])));
            }
        }
        
        public partial class SalesPersonQuotaHistoryRow : System.Data.DataRow {
            
            private SalesPersonQuotaHistoryDataTable tableSalesPersonQuotaHistory;
            
            internal SalesPersonQuotaHistoryRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableSalesPersonQuotaHistory = ((SalesPersonQuotaHistoryDataTable)(this.Table));
            }
            
            public int SalesPersonID {
                get {
                    return ((int)(this[this.tableSalesPersonQuotaHistory.SalesPersonIDColumn]));
                }
                set {
                    this[this.tableSalesPersonQuotaHistory.SalesPersonIDColumn] = value;
                }
            }
            
            public System.DateTime QuotaDate {
                get {
                    return ((System.DateTime)(this[this.tableSalesPersonQuotaHistory.QuotaDateColumn]));
                }
                set {
                    this[this.tableSalesPersonQuotaHistory.QuotaDateColumn] = value;
                }
            }
            
            public decimal SalesQuota {
                get {
                    return ((decimal)(this[this.tableSalesPersonQuotaHistory.SalesQuotaColumn]));
                }
                set {
                    this[this.tableSalesPersonQuotaHistory.SalesQuotaColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableSalesPersonQuotaHistory.rowguidColumn]));
                }
                set {
                    this[this.tableSalesPersonQuotaHistory.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableSalesPersonQuotaHistory.ModifiedDateColumn]));
                }
                set {
                    this[this.tableSalesPersonQuotaHistory.ModifiedDateColumn] = value;
                }
            }
            
            public SalesPersonRow SalesPersonRow {
                get {
                    return ((SalesPersonRow)(this.GetParentRow(this.Table.ParentRelations["FK_SalesPersonQuotaHistory_SalesPerson_SalesPersonID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_SalesPersonQuotaHistory_SalesPerson_SalesPersonID"]);
                }
            }
        }
        
        public partial class SalesReasonRow : System.Data.DataRow {
            
            private SalesReasonDataTable tableSalesReason;
            
            internal SalesReasonRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableSalesReason = ((SalesReasonDataTable)(this.Table));
            }
            
            public int SalesReasonID {
                get {
                    return ((int)(this[this.tableSalesReason.SalesReasonIDColumn]));
                }
                set {
                    this[this.tableSalesReason.SalesReasonIDColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tableSalesReason.NameColumn]));
                }
                set {
                    this[this.tableSalesReason.NameColumn] = value;
                }
            }
            
            public string ReasonType {
                get {
                    return ((string)(this[this.tableSalesReason.ReasonTypeColumn]));
                }
                set {
                    this[this.tableSalesReason.ReasonTypeColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableSalesReason.ModifiedDateColumn]));
                }
                set {
                    this[this.tableSalesReason.ModifiedDateColumn] = value;
                }
            }
            
            public SalesOrderHeaderSalesReasonRow[] GetSalesOrderHeaderSalesReasonRows() {
                return ((SalesOrderHeaderSalesReasonRow[])(base.GetChildRows(this.Table.ChildRelations["FK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID"])));
            }
        }
        
        public partial class SalesTaxRateRow : System.Data.DataRow {
            
            private SalesTaxRateDataTable tableSalesTaxRate;
            
            internal SalesTaxRateRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableSalesTaxRate = ((SalesTaxRateDataTable)(this.Table));
            }
            
            public int SalesTaxRateID {
                get {
                    return ((int)(this[this.tableSalesTaxRate.SalesTaxRateIDColumn]));
                }
                set {
                    this[this.tableSalesTaxRate.SalesTaxRateIDColumn] = value;
                }
            }
            
            public int StateProvinceID {
                get {
                    return ((int)(this[this.tableSalesTaxRate.StateProvinceIDColumn]));
                }
                set {
                    this[this.tableSalesTaxRate.StateProvinceIDColumn] = value;
                }
            }
            
            public byte TaxType {
                get {
                    return ((byte)(this[this.tableSalesTaxRate.TaxTypeColumn]));
                }
                set {
                    this[this.tableSalesTaxRate.TaxTypeColumn] = value;
                }
            }
            
            public decimal TaxRate {
                get {
                    return ((decimal)(this[this.tableSalesTaxRate.TaxRateColumn]));
                }
                set {
                    this[this.tableSalesTaxRate.TaxRateColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tableSalesTaxRate.NameColumn]));
                }
                set {
                    this[this.tableSalesTaxRate.NameColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableSalesTaxRate.rowguidColumn]));
                }
                set {
                    this[this.tableSalesTaxRate.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableSalesTaxRate.ModifiedDateColumn]));
                }
                set {
                    this[this.tableSalesTaxRate.ModifiedDateColumn] = value;
                }
            }
            
            public StateProvinceRow StateProvinceRow {
                get {
                    return ((StateProvinceRow)(this.GetParentRow(this.Table.ParentRelations["FK_SalesTaxRate_StateProvince_StateProvinceID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_SalesTaxRate_StateProvince_StateProvinceID"]);
                }
            }
        }
        
        public partial class SalesTerritoryRow : System.Data.DataRow {
            
            private SalesTerritoryDataTable tableSalesTerritory;
            
            internal SalesTerritoryRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableSalesTerritory = ((SalesTerritoryDataTable)(this.Table));
            }
            
            public int TerritoryID {
                get {
                    return ((int)(this[this.tableSalesTerritory.TerritoryIDColumn]));
                }
                set {
                    this[this.tableSalesTerritory.TerritoryIDColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tableSalesTerritory.NameColumn]));
                }
                set {
                    this[this.tableSalesTerritory.NameColumn] = value;
                }
            }
            
            public string CountryRegionCode {
                get {
                    return ((string)(this[this.tableSalesTerritory.CountryRegionCodeColumn]));
                }
                set {
                    this[this.tableSalesTerritory.CountryRegionCodeColumn] = value;
                }
            }
            
            public string Group {
                get {
                    return ((string)(this[this.tableSalesTerritory.GroupColumn]));
                }
                set {
                    this[this.tableSalesTerritory.GroupColumn] = value;
                }
            }
            
            public decimal SalesYTD {
                get {
                    return ((decimal)(this[this.tableSalesTerritory.SalesYTDColumn]));
                }
                set {
                    this[this.tableSalesTerritory.SalesYTDColumn] = value;
                }
            }
            
            public decimal SalesLastYear {
                get {
                    return ((decimal)(this[this.tableSalesTerritory.SalesLastYearColumn]));
                }
                set {
                    this[this.tableSalesTerritory.SalesLastYearColumn] = value;
                }
            }
            
            public decimal CostYTD {
                get {
                    return ((decimal)(this[this.tableSalesTerritory.CostYTDColumn]));
                }
                set {
                    this[this.tableSalesTerritory.CostYTDColumn] = value;
                }
            }
            
            public decimal CostLastYear {
                get {
                    return ((decimal)(this[this.tableSalesTerritory.CostLastYearColumn]));
                }
                set {
                    this[this.tableSalesTerritory.CostLastYearColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableSalesTerritory.rowguidColumn]));
                }
                set {
                    this[this.tableSalesTerritory.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableSalesTerritory.ModifiedDateColumn]));
                }
                set {
                    this[this.tableSalesTerritory.ModifiedDateColumn] = value;
                }
            }
            
            public StateProvinceRow[] GetStateProvinceRows() {
                return ((StateProvinceRow[])(base.GetChildRows(this.Table.ChildRelations["FK_StateProvince_SalesTerritory_TerritoryID"])));
            }
            
            public CustomerRow[] GetCustomerRows() {
                return ((CustomerRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Customer_SalesTerritory_TerritoryID"])));
            }
            
            public SalesOrderHeaderRow[] GetSalesOrderHeaderRows() {
                return ((SalesOrderHeaderRow[])(base.GetChildRows(this.Table.ChildRelations["FK_SalesOrderHeader_SalesTerritory_TerritoryID"])));
            }
            
            public SalesPersonRow[] GetSalesPersonRows() {
                return ((SalesPersonRow[])(base.GetChildRows(this.Table.ChildRelations["FK_SalesPerson_SalesTerritory_TerritoryID"])));
            }
            
            public SalesTerritoryHistoryRow[] GetSalesTerritoryHistoryRows() {
                return ((SalesTerritoryHistoryRow[])(base.GetChildRows(this.Table.ChildRelations["FK_SalesTerritoryHistory_SalesTerritory_TerritoryID"])));
            }
        }
        
        public partial class SalesTerritoryHistoryRow : System.Data.DataRow {
            
            private SalesTerritoryHistoryDataTable tableSalesTerritoryHistory;
            
            internal SalesTerritoryHistoryRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableSalesTerritoryHistory = ((SalesTerritoryHistoryDataTable)(this.Table));
            }
            
            public int SalesPersonID {
                get {
                    return ((int)(this[this.tableSalesTerritoryHistory.SalesPersonIDColumn]));
                }
                set {
                    this[this.tableSalesTerritoryHistory.SalesPersonIDColumn] = value;
                }
            }
            
            public int TerritoryID {
                get {
                    return ((int)(this[this.tableSalesTerritoryHistory.TerritoryIDColumn]));
                }
                set {
                    this[this.tableSalesTerritoryHistory.TerritoryIDColumn] = value;
                }
            }
            
            public System.DateTime StartDate {
                get {
                    return ((System.DateTime)(this[this.tableSalesTerritoryHistory.StartDateColumn]));
                }
                set {
                    this[this.tableSalesTerritoryHistory.StartDateColumn] = value;
                }
            }
            
            public System.DateTime EndDate {
                get {
                    try {
                        return ((System.DateTime)(this[this.tableSalesTerritoryHistory.EndDateColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'EndDate\' in table \'SalesTerritoryHistory\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableSalesTerritoryHistory.EndDateColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableSalesTerritoryHistory.rowguidColumn]));
                }
                set {
                    this[this.tableSalesTerritoryHistory.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableSalesTerritoryHistory.ModifiedDateColumn]));
                }
                set {
                    this[this.tableSalesTerritoryHistory.ModifiedDateColumn] = value;
                }
            }
            
            public SalesPersonRow SalesPersonRow {
                get {
                    return ((SalesPersonRow)(this.GetParentRow(this.Table.ParentRelations["FK_SalesTerritoryHistory_SalesPerson_SalesPersonID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_SalesTerritoryHistory_SalesPerson_SalesPersonID"]);
                }
            }
            
            public SalesTerritoryRow SalesTerritoryRow {
                get {
                    return ((SalesTerritoryRow)(this.GetParentRow(this.Table.ParentRelations["FK_SalesTerritoryHistory_SalesTerritory_TerritoryID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_SalesTerritoryHistory_SalesTerritory_TerritoryID"]);
                }
            }
            
            public bool IsEndDateNull() {
                return this.IsNull(this.tableSalesTerritoryHistory.EndDateColumn);
            }
            
            public void SetEndDateNull() {
                this[this.tableSalesTerritoryHistory.EndDateColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class ShoppingCartItemRow : System.Data.DataRow {
            
            private ShoppingCartItemDataTable tableShoppingCartItem;
            
            internal ShoppingCartItemRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableShoppingCartItem = ((ShoppingCartItemDataTable)(this.Table));
            }
            
            public int ShoppingCartItemID {
                get {
                    return ((int)(this[this.tableShoppingCartItem.ShoppingCartItemIDColumn]));
                }
                set {
                    this[this.tableShoppingCartItem.ShoppingCartItemIDColumn] = value;
                }
            }
            
            public string ShoppingCartID {
                get {
                    return ((string)(this[this.tableShoppingCartItem.ShoppingCartIDColumn]));
                }
                set {
                    this[this.tableShoppingCartItem.ShoppingCartIDColumn] = value;
                }
            }
            
            public int Quantity {
                get {
                    return ((int)(this[this.tableShoppingCartItem.QuantityColumn]));
                }
                set {
                    this[this.tableShoppingCartItem.QuantityColumn] = value;
                }
            }
            
            public int ProductID {
                get {
                    return ((int)(this[this.tableShoppingCartItem.ProductIDColumn]));
                }
                set {
                    this[this.tableShoppingCartItem.ProductIDColumn] = value;
                }
            }
            
            public System.DateTime DateCreated {
                get {
                    return ((System.DateTime)(this[this.tableShoppingCartItem.DateCreatedColumn]));
                }
                set {
                    this[this.tableShoppingCartItem.DateCreatedColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableShoppingCartItem.ModifiedDateColumn]));
                }
                set {
                    this[this.tableShoppingCartItem.ModifiedDateColumn] = value;
                }
            }
            
            public ProductRow ProductRow {
                get {
                    return ((ProductRow)(this.GetParentRow(this.Table.ParentRelations["FK_ShoppingCartItem_Product_ProductID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_ShoppingCartItem_Product_ProductID"]);
                }
            }
        }
        
        public partial class SpecialOfferRow : System.Data.DataRow {
            
            private SpecialOfferDataTable tableSpecialOffer;
            
            internal SpecialOfferRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableSpecialOffer = ((SpecialOfferDataTable)(this.Table));
            }
            
            public int SpecialOfferID {
                get {
                    return ((int)(this[this.tableSpecialOffer.SpecialOfferIDColumn]));
                }
                set {
                    this[this.tableSpecialOffer.SpecialOfferIDColumn] = value;
                }
            }
            
            public string Description {
                get {
                    return ((string)(this[this.tableSpecialOffer.DescriptionColumn]));
                }
                set {
                    this[this.tableSpecialOffer.DescriptionColumn] = value;
                }
            }
            
            public decimal DiscountPct {
                get {
                    return ((decimal)(this[this.tableSpecialOffer.DiscountPctColumn]));
                }
                set {
                    this[this.tableSpecialOffer.DiscountPctColumn] = value;
                }
            }
            
            public string Type {
                get {
                    return ((string)(this[this.tableSpecialOffer.TypeColumn]));
                }
                set {
                    this[this.tableSpecialOffer.TypeColumn] = value;
                }
            }
            
            public string Category {
                get {
                    return ((string)(this[this.tableSpecialOffer.CategoryColumn]));
                }
                set {
                    this[this.tableSpecialOffer.CategoryColumn] = value;
                }
            }
            
            public System.DateTime StartDate {
                get {
                    return ((System.DateTime)(this[this.tableSpecialOffer.StartDateColumn]));
                }
                set {
                    this[this.tableSpecialOffer.StartDateColumn] = value;
                }
            }
            
            public System.DateTime EndDate {
                get {
                    return ((System.DateTime)(this[this.tableSpecialOffer.EndDateColumn]));
                }
                set {
                    this[this.tableSpecialOffer.EndDateColumn] = value;
                }
            }
            
            public int MinQty {
                get {
                    return ((int)(this[this.tableSpecialOffer.MinQtyColumn]));
                }
                set {
                    this[this.tableSpecialOffer.MinQtyColumn] = value;
                }
            }
            
            public int MaxQty {
                get {
                    try {
                        return ((int)(this[this.tableSpecialOffer.MaxQtyColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'MaxQty\' in table \'SpecialOffer\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableSpecialOffer.MaxQtyColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableSpecialOffer.rowguidColumn]));
                }
                set {
                    this[this.tableSpecialOffer.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableSpecialOffer.ModifiedDateColumn]));
                }
                set {
                    this[this.tableSpecialOffer.ModifiedDateColumn] = value;
                }
            }
            
            public bool IsMaxQtyNull() {
                return this.IsNull(this.tableSpecialOffer.MaxQtyColumn);
            }
            
            public void SetMaxQtyNull() {
                this[this.tableSpecialOffer.MaxQtyColumn] = System.Convert.DBNull;
            }
            
            public SpecialOfferProductRow[] GetSpecialOfferProductRows() {
                return ((SpecialOfferProductRow[])(base.GetChildRows(this.Table.ChildRelations["FK_SpecialOfferProduct_SpecialOffer_SpecialOfferID"])));
            }
        }
        
        public partial class SpecialOfferProductRow : System.Data.DataRow {
            
            private SpecialOfferProductDataTable tableSpecialOfferProduct;
            
            internal SpecialOfferProductRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableSpecialOfferProduct = ((SpecialOfferProductDataTable)(this.Table));
            }
            
            public int SpecialOfferID {
                get {
                    return ((int)(this[this.tableSpecialOfferProduct.SpecialOfferIDColumn]));
                }
                set {
                    this[this.tableSpecialOfferProduct.SpecialOfferIDColumn] = value;
                }
            }
            
            public int ProductID {
                get {
                    return ((int)(this[this.tableSpecialOfferProduct.ProductIDColumn]));
                }
                set {
                    this[this.tableSpecialOfferProduct.ProductIDColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableSpecialOfferProduct.rowguidColumn]));
                }
                set {
                    this[this.tableSpecialOfferProduct.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableSpecialOfferProduct.ModifiedDateColumn]));
                }
                set {
                    this[this.tableSpecialOfferProduct.ModifiedDateColumn] = value;
                }
            }
            
            public ProductRow ProductRow {
                get {
                    return ((ProductRow)(this.GetParentRow(this.Table.ParentRelations["FK_SpecialOfferProduct_Product_ProductID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_SpecialOfferProduct_Product_ProductID"]);
                }
            }
            
            public SpecialOfferRow SpecialOfferRow {
                get {
                    return ((SpecialOfferRow)(this.GetParentRow(this.Table.ParentRelations["FK_SpecialOfferProduct_SpecialOffer_SpecialOfferID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_SpecialOfferProduct_SpecialOffer_SpecialOfferID"]);
                }
            }
            
            public SalesOrderDetailRow[] GetSalesOrderDetailRows() {
                return ((SalesOrderDetailRow[])(base.GetChildRows(this.Table.ChildRelations["FK_SalesOrderDetail_SpecialOfferProduct_SpecialOfferIDProductID"])));
            }
        }
        
        public partial class StoreRow : System.Data.DataRow {
            
            private StoreDataTable tableStore;
            
            internal StoreRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableStore = ((StoreDataTable)(this.Table));
            }
            
            public int CustomerID {
                get {
                    return ((int)(this[this.tableStore.CustomerIDColumn]));
                }
                set {
                    this[this.tableStore.CustomerIDColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tableStore.NameColumn]));
                }
                set {
                    this[this.tableStore.NameColumn] = value;
                }
            }
            
            public int SalesPersonID {
                get {
                    try {
                        return ((int)(this[this.tableStore.SalesPersonIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'SalesPersonID\' in table \'Store\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableStore.SalesPersonIDColumn] = value;
                }
            }
            
            public string Demographics {
                get {
                    try {
                        return ((string)(this[this.tableStore.DemographicsColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Demographics\' in table \'Store\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableStore.DemographicsColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableStore.rowguidColumn]));
                }
                set {
                    this[this.tableStore.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableStore.ModifiedDateColumn]));
                }
                set {
                    this[this.tableStore.ModifiedDateColumn] = value;
                }
            }
            
            public CustomerRow CustomerRow {
                get {
                    return ((CustomerRow)(this.GetParentRow(this.Table.ParentRelations["FK_Store_Customer_CustomerID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_Store_Customer_CustomerID"]);
                }
            }
            
            public SalesPersonRow SalesPersonRow {
                get {
                    return ((SalesPersonRow)(this.GetParentRow(this.Table.ParentRelations["FK_Store_SalesPerson_SalesPersonID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_Store_SalesPerson_SalesPersonID"]);
                }
            }
            
            public bool IsSalesPersonIDNull() {
                return this.IsNull(this.tableStore.SalesPersonIDColumn);
            }
            
            public void SetSalesPersonIDNull() {
                this[this.tableStore.SalesPersonIDColumn] = System.Convert.DBNull;
            }
            
            public bool IsDemographicsNull() {
                return this.IsNull(this.tableStore.DemographicsColumn);
            }
            
            public void SetDemographicsNull() {
                this[this.tableStore.DemographicsColumn] = System.Convert.DBNull;
            }
            
            public StoreContactRow[] GetStoreContactRows() {
                return ((StoreContactRow[])(base.GetChildRows(this.Table.ChildRelations["FK_StoreContact_Store_CustomerID"])));
            }
        }
        
        public partial class StoreContactRow : System.Data.DataRow {
            
            private StoreContactDataTable tableStoreContact;
            
            internal StoreContactRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableStoreContact = ((StoreContactDataTable)(this.Table));
            }
            
            public int CustomerID {
                get {
                    return ((int)(this[this.tableStoreContact.CustomerIDColumn]));
                }
                set {
                    this[this.tableStoreContact.CustomerIDColumn] = value;
                }
            }
            
            public int ContactID {
                get {
                    return ((int)(this[this.tableStoreContact.ContactIDColumn]));
                }
                set {
                    this[this.tableStoreContact.ContactIDColumn] = value;
                }
            }
            
            public int ContactTypeID {
                get {
                    return ((int)(this[this.tableStoreContact.ContactTypeIDColumn]));
                }
                set {
                    this[this.tableStoreContact.ContactTypeIDColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableStoreContact.rowguidColumn]));
                }
                set {
                    this[this.tableStoreContact.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableStoreContact.ModifiedDateColumn]));
                }
                set {
                    this[this.tableStoreContact.ModifiedDateColumn] = value;
                }
            }
            
            public ContactRow ContactRow {
                get {
                    return ((ContactRow)(this.GetParentRow(this.Table.ParentRelations["FK_StoreContact_Contact_ContactID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_StoreContact_Contact_ContactID"]);
                }
            }
            
            public ContactTypeRow ContactTypeRow {
                get {
                    return ((ContactTypeRow)(this.GetParentRow(this.Table.ParentRelations["FK_StoreContact_ContactType_ContactTypeID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_StoreContact_ContactType_ContactTypeID"]);
                }
            }
            
            public StoreRow StoreRow {
                get {
                    return ((StoreRow)(this.GetParentRow(this.Table.ParentRelations["FK_StoreContact_Store_CustomerID"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_StoreContact_Store_CustomerID"]);
                }
            }
        }
        
        public partial class vEmployeeRow : System.Data.DataRow {
            
            private vEmployeeDataTable tablevEmployee;
            
            internal vEmployeeRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tablevEmployee = ((vEmployeeDataTable)(this.Table));
            }
            
            public int EmployeeID {
                get {
                    return ((int)(this[this.tablevEmployee.EmployeeIDColumn]));
                }
                set {
                    this[this.tablevEmployee.EmployeeIDColumn] = value;
                }
            }
            
            public string Title {
                get {
                    try {
                        return ((string)(this[this.tablevEmployee.TitleColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Title\' in table \'vEmployee\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevEmployee.TitleColumn] = value;
                }
            }
            
            public string FirstName {
                get {
                    return ((string)(this[this.tablevEmployee.FirstNameColumn]));
                }
                set {
                    this[this.tablevEmployee.FirstNameColumn] = value;
                }
            }
            
            public string MiddleName {
                get {
                    try {
                        return ((string)(this[this.tablevEmployee.MiddleNameColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'MiddleName\' in table \'vEmployee\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevEmployee.MiddleNameColumn] = value;
                }
            }
            
            public string LastName {
                get {
                    return ((string)(this[this.tablevEmployee.LastNameColumn]));
                }
                set {
                    this[this.tablevEmployee.LastNameColumn] = value;
                }
            }
            
            public string Suffix {
                get {
                    try {
                        return ((string)(this[this.tablevEmployee.SuffixColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Suffix\' in table \'vEmployee\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevEmployee.SuffixColumn] = value;
                }
            }
            
            public string JobTitle {
                get {
                    return ((string)(this[this.tablevEmployee.JobTitleColumn]));
                }
                set {
                    this[this.tablevEmployee.JobTitleColumn] = value;
                }
            }
            
            public string Phone {
                get {
                    try {
                        return ((string)(this[this.tablevEmployee.PhoneColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Phone\' in table \'vEmployee\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevEmployee.PhoneColumn] = value;
                }
            }
            
            public string EmailAddress {
                get {
                    try {
                        return ((string)(this[this.tablevEmployee.EmailAddressColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'EmailAddress\' in table \'vEmployee\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevEmployee.EmailAddressColumn] = value;
                }
            }
            
            public int EmailPromotion {
                get {
                    return ((int)(this[this.tablevEmployee.EmailPromotionColumn]));
                }
                set {
                    this[this.tablevEmployee.EmailPromotionColumn] = value;
                }
            }
            
            public string AddressLine1 {
                get {
                    return ((string)(this[this.tablevEmployee.AddressLine1Column]));
                }
                set {
                    this[this.tablevEmployee.AddressLine1Column] = value;
                }
            }
            
            public string AddressLine2 {
                get {
                    try {
                        return ((string)(this[this.tablevEmployee.AddressLine2Column]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'AddressLine2\' in table \'vEmployee\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevEmployee.AddressLine2Column] = value;
                }
            }
            
            public string City {
                get {
                    return ((string)(this[this.tablevEmployee.CityColumn]));
                }
                set {
                    this[this.tablevEmployee.CityColumn] = value;
                }
            }
            
            public string StateProvinceName {
                get {
                    return ((string)(this[this.tablevEmployee.StateProvinceNameColumn]));
                }
                set {
                    this[this.tablevEmployee.StateProvinceNameColumn] = value;
                }
            }
            
            public string PostalCode {
                get {
                    return ((string)(this[this.tablevEmployee.PostalCodeColumn]));
                }
                set {
                    this[this.tablevEmployee.PostalCodeColumn] = value;
                }
            }
            
            public string CountryRegionName {
                get {
                    return ((string)(this[this.tablevEmployee.CountryRegionNameColumn]));
                }
                set {
                    this[this.tablevEmployee.CountryRegionNameColumn] = value;
                }
            }
            
            public string AdditionalContactInfo {
                get {
                    try {
                        return ((string)(this[this.tablevEmployee.AdditionalContactInfoColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'AdditionalContactInfo\' in table \'vEmployee\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevEmployee.AdditionalContactInfoColumn] = value;
                }
            }
            
            public bool IsTitleNull() {
                return this.IsNull(this.tablevEmployee.TitleColumn);
            }
            
            public void SetTitleNull() {
                this[this.tablevEmployee.TitleColumn] = System.Convert.DBNull;
            }
            
            public bool IsMiddleNameNull() {
                return this.IsNull(this.tablevEmployee.MiddleNameColumn);
            }
            
            public void SetMiddleNameNull() {
                this[this.tablevEmployee.MiddleNameColumn] = System.Convert.DBNull;
            }
            
            public bool IsSuffixNull() {
                return this.IsNull(this.tablevEmployee.SuffixColumn);
            }
            
            public void SetSuffixNull() {
                this[this.tablevEmployee.SuffixColumn] = System.Convert.DBNull;
            }
            
            public bool IsPhoneNull() {
                return this.IsNull(this.tablevEmployee.PhoneColumn);
            }
            
            public void SetPhoneNull() {
                this[this.tablevEmployee.PhoneColumn] = System.Convert.DBNull;
            }
            
            public bool IsEmailAddressNull() {
                return this.IsNull(this.tablevEmployee.EmailAddressColumn);
            }
            
            public void SetEmailAddressNull() {
                this[this.tablevEmployee.EmailAddressColumn] = System.Convert.DBNull;
            }
            
            public bool IsAddressLine2Null() {
                return this.IsNull(this.tablevEmployee.AddressLine2Column);
            }
            
            public void SetAddressLine2Null() {
                this[this.tablevEmployee.AddressLine2Column] = System.Convert.DBNull;
            }
            
            public bool IsAdditionalContactInfoNull() {
                return this.IsNull(this.tablevEmployee.AdditionalContactInfoColumn);
            }
            
            public void SetAdditionalContactInfoNull() {
                this[this.tablevEmployee.AdditionalContactInfoColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class vEmployeeDepartmentRow : System.Data.DataRow {
            
            private vEmployeeDepartmentDataTable tablevEmployeeDepartment;
            
            internal vEmployeeDepartmentRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tablevEmployeeDepartment = ((vEmployeeDepartmentDataTable)(this.Table));
            }
            
            public int EmployeeID {
                get {
                    return ((int)(this[this.tablevEmployeeDepartment.EmployeeIDColumn]));
                }
                set {
                    this[this.tablevEmployeeDepartment.EmployeeIDColumn] = value;
                }
            }
            
            public string Title {
                get {
                    try {
                        return ((string)(this[this.tablevEmployeeDepartment.TitleColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Title\' in table \'vEmployeeDepartment\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevEmployeeDepartment.TitleColumn] = value;
                }
            }
            
            public string FirstName {
                get {
                    return ((string)(this[this.tablevEmployeeDepartment.FirstNameColumn]));
                }
                set {
                    this[this.tablevEmployeeDepartment.FirstNameColumn] = value;
                }
            }
            
            public string MiddleName {
                get {
                    try {
                        return ((string)(this[this.tablevEmployeeDepartment.MiddleNameColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'MiddleName\' in table \'vEmployeeDepartment\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevEmployeeDepartment.MiddleNameColumn] = value;
                }
            }
            
            public string LastName {
                get {
                    return ((string)(this[this.tablevEmployeeDepartment.LastNameColumn]));
                }
                set {
                    this[this.tablevEmployeeDepartment.LastNameColumn] = value;
                }
            }
            
            public string Suffix {
                get {
                    try {
                        return ((string)(this[this.tablevEmployeeDepartment.SuffixColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Suffix\' in table \'vEmployeeDepartment\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevEmployeeDepartment.SuffixColumn] = value;
                }
            }
            
            public string JobTitle {
                get {
                    return ((string)(this[this.tablevEmployeeDepartment.JobTitleColumn]));
                }
                set {
                    this[this.tablevEmployeeDepartment.JobTitleColumn] = value;
                }
            }
            
            public string Department {
                get {
                    return ((string)(this[this.tablevEmployeeDepartment.DepartmentColumn]));
                }
                set {
                    this[this.tablevEmployeeDepartment.DepartmentColumn] = value;
                }
            }
            
            public string GroupName {
                get {
                    return ((string)(this[this.tablevEmployeeDepartment.GroupNameColumn]));
                }
                set {
                    this[this.tablevEmployeeDepartment.GroupNameColumn] = value;
                }
            }
            
            public System.DateTime StartDate {
                get {
                    return ((System.DateTime)(this[this.tablevEmployeeDepartment.StartDateColumn]));
                }
                set {
                    this[this.tablevEmployeeDepartment.StartDateColumn] = value;
                }
            }
            
            public bool IsTitleNull() {
                return this.IsNull(this.tablevEmployeeDepartment.TitleColumn);
            }
            
            public void SetTitleNull() {
                this[this.tablevEmployeeDepartment.TitleColumn] = System.Convert.DBNull;
            }
            
            public bool IsMiddleNameNull() {
                return this.IsNull(this.tablevEmployeeDepartment.MiddleNameColumn);
            }
            
            public void SetMiddleNameNull() {
                this[this.tablevEmployeeDepartment.MiddleNameColumn] = System.Convert.DBNull;
            }
            
            public bool IsSuffixNull() {
                return this.IsNull(this.tablevEmployeeDepartment.SuffixColumn);
            }
            
            public void SetSuffixNull() {
                this[this.tablevEmployeeDepartment.SuffixColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class vEmployeeDepartmentHistoryRow : System.Data.DataRow {
            
            private vEmployeeDepartmentHistoryDataTable tablevEmployeeDepartmentHistory;
            
            internal vEmployeeDepartmentHistoryRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tablevEmployeeDepartmentHistory = ((vEmployeeDepartmentHistoryDataTable)(this.Table));
            }
            
            public int EmployeeID {
                get {
                    return ((int)(this[this.tablevEmployeeDepartmentHistory.EmployeeIDColumn]));
                }
                set {
                    this[this.tablevEmployeeDepartmentHistory.EmployeeIDColumn] = value;
                }
            }
            
            public string Title {
                get {
                    try {
                        return ((string)(this[this.tablevEmployeeDepartmentHistory.TitleColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Title\' in table \'vEmployeeDepartmentHistory\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevEmployeeDepartmentHistory.TitleColumn] = value;
                }
            }
            
            public string FirstName {
                get {
                    return ((string)(this[this.tablevEmployeeDepartmentHistory.FirstNameColumn]));
                }
                set {
                    this[this.tablevEmployeeDepartmentHistory.FirstNameColumn] = value;
                }
            }
            
            public string MiddleName {
                get {
                    try {
                        return ((string)(this[this.tablevEmployeeDepartmentHistory.MiddleNameColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'MiddleName\' in table \'vEmployeeDepartmentHistory\' is DBNull" +
                                ".", e);
                    }
                }
                set {
                    this[this.tablevEmployeeDepartmentHistory.MiddleNameColumn] = value;
                }
            }
            
            public string LastName {
                get {
                    return ((string)(this[this.tablevEmployeeDepartmentHistory.LastNameColumn]));
                }
                set {
                    this[this.tablevEmployeeDepartmentHistory.LastNameColumn] = value;
                }
            }
            
            public string Suffix {
                get {
                    try {
                        return ((string)(this[this.tablevEmployeeDepartmentHistory.SuffixColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Suffix\' in table \'vEmployeeDepartmentHistory\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevEmployeeDepartmentHistory.SuffixColumn] = value;
                }
            }
            
            public string Shift {
                get {
                    return ((string)(this[this.tablevEmployeeDepartmentHistory.ShiftColumn]));
                }
                set {
                    this[this.tablevEmployeeDepartmentHistory.ShiftColumn] = value;
                }
            }
            
            public string Department {
                get {
                    return ((string)(this[this.tablevEmployeeDepartmentHistory.DepartmentColumn]));
                }
                set {
                    this[this.tablevEmployeeDepartmentHistory.DepartmentColumn] = value;
                }
            }
            
            public string GroupName {
                get {
                    return ((string)(this[this.tablevEmployeeDepartmentHistory.GroupNameColumn]));
                }
                set {
                    this[this.tablevEmployeeDepartmentHistory.GroupNameColumn] = value;
                }
            }
            
            public System.DateTime StartDate {
                get {
                    return ((System.DateTime)(this[this.tablevEmployeeDepartmentHistory.StartDateColumn]));
                }
                set {
                    this[this.tablevEmployeeDepartmentHistory.StartDateColumn] = value;
                }
            }
            
            public System.DateTime EndDate {
                get {
                    try {
                        return ((System.DateTime)(this[this.tablevEmployeeDepartmentHistory.EndDateColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'EndDate\' in table \'vEmployeeDepartmentHistory\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevEmployeeDepartmentHistory.EndDateColumn] = value;
                }
            }
            
            public bool IsTitleNull() {
                return this.IsNull(this.tablevEmployeeDepartmentHistory.TitleColumn);
            }
            
            public void SetTitleNull() {
                this[this.tablevEmployeeDepartmentHistory.TitleColumn] = System.Convert.DBNull;
            }
            
            public bool IsMiddleNameNull() {
                return this.IsNull(this.tablevEmployeeDepartmentHistory.MiddleNameColumn);
            }
            
            public void SetMiddleNameNull() {
                this[this.tablevEmployeeDepartmentHistory.MiddleNameColumn] = System.Convert.DBNull;
            }
            
            public bool IsSuffixNull() {
                return this.IsNull(this.tablevEmployeeDepartmentHistory.SuffixColumn);
            }
            
            public void SetSuffixNull() {
                this[this.tablevEmployeeDepartmentHistory.SuffixColumn] = System.Convert.DBNull;
            }
            
            public bool IsEndDateNull() {
                return this.IsNull(this.tablevEmployeeDepartmentHistory.EndDateColumn);
            }
            
            public void SetEndDateNull() {
                this[this.tablevEmployeeDepartmentHistory.EndDateColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class vJobCandidateRow : System.Data.DataRow {
            
            private vJobCandidateDataTable tablevJobCandidate;
            
            internal vJobCandidateRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tablevJobCandidate = ((vJobCandidateDataTable)(this.Table));
            }
            
            public int JobCandidateID {
                get {
                    return ((int)(this[this.tablevJobCandidate.JobCandidateIDColumn]));
                }
                set {
                    this[this.tablevJobCandidate.JobCandidateIDColumn] = value;
                }
            }
            
            public int EmployeeID {
                get {
                    try {
                        return ((int)(this[this.tablevJobCandidate.EmployeeIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'EmployeeID\' in table \'vJobCandidate\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidate.EmployeeIDColumn] = value;
                }
            }
            
            public string _Name_Prefix {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidate._Name_PrefixColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Name.Prefix\' in table \'vJobCandidate\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidate._Name_PrefixColumn] = value;
                }
            }
            
            public string _Name_First {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidate._Name_FirstColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Name.First\' in table \'vJobCandidate\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidate._Name_FirstColumn] = value;
                }
            }
            
            public string _Name_Middle {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidate._Name_MiddleColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Name.Middle\' in table \'vJobCandidate\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidate._Name_MiddleColumn] = value;
                }
            }
            
            public string _Name_Last {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidate._Name_LastColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Name.Last\' in table \'vJobCandidate\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidate._Name_LastColumn] = value;
                }
            }
            
            public string _Name_Suffix {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidate._Name_SuffixColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Name.Suffix\' in table \'vJobCandidate\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidate._Name_SuffixColumn] = value;
                }
            }
            
            public string Skills {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidate.SkillsColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Skills\' in table \'vJobCandidate\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidate.SkillsColumn] = value;
                }
            }
            
            public string _Addr_Type {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidate._Addr_TypeColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Addr.Type\' in table \'vJobCandidate\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidate._Addr_TypeColumn] = value;
                }
            }
            
            public string _Addr_Loc_CountryRegion {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidate._Addr_Loc_CountryRegionColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Addr.Loc.CountryRegion\' in table \'vJobCandidate\' is DBNull." +
                                "", e);
                    }
                }
                set {
                    this[this.tablevJobCandidate._Addr_Loc_CountryRegionColumn] = value;
                }
            }
            
            public string _Addr_Loc_State {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidate._Addr_Loc_StateColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Addr.Loc.State\' in table \'vJobCandidate\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidate._Addr_Loc_StateColumn] = value;
                }
            }
            
            public string _Addr_Loc_City {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidate._Addr_Loc_CityColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Addr.Loc.City\' in table \'vJobCandidate\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidate._Addr_Loc_CityColumn] = value;
                }
            }
            
            public string _Addr_PostalCode {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidate._Addr_PostalCodeColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Addr.PostalCode\' in table \'vJobCandidate\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidate._Addr_PostalCodeColumn] = value;
                }
            }
            
            public string EMail {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidate.EMailColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'EMail\' in table \'vJobCandidate\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidate.EMailColumn] = value;
                }
            }
            
            public string WebSite {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidate.WebSiteColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'WebSite\' in table \'vJobCandidate\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidate.WebSiteColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tablevJobCandidate.ModifiedDateColumn]));
                }
                set {
                    this[this.tablevJobCandidate.ModifiedDateColumn] = value;
                }
            }
            
            public bool IsEmployeeIDNull() {
                return this.IsNull(this.tablevJobCandidate.EmployeeIDColumn);
            }
            
            public void SetEmployeeIDNull() {
                this[this.tablevJobCandidate.EmployeeIDColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Name_PrefixNull() {
                return this.IsNull(this.tablevJobCandidate._Name_PrefixColumn);
            }
            
            public void Set_Name_PrefixNull() {
                this[this.tablevJobCandidate._Name_PrefixColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Name_FirstNull() {
                return this.IsNull(this.tablevJobCandidate._Name_FirstColumn);
            }
            
            public void Set_Name_FirstNull() {
                this[this.tablevJobCandidate._Name_FirstColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Name_MiddleNull() {
                return this.IsNull(this.tablevJobCandidate._Name_MiddleColumn);
            }
            
            public void Set_Name_MiddleNull() {
                this[this.tablevJobCandidate._Name_MiddleColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Name_LastNull() {
                return this.IsNull(this.tablevJobCandidate._Name_LastColumn);
            }
            
            public void Set_Name_LastNull() {
                this[this.tablevJobCandidate._Name_LastColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Name_SuffixNull() {
                return this.IsNull(this.tablevJobCandidate._Name_SuffixColumn);
            }
            
            public void Set_Name_SuffixNull() {
                this[this.tablevJobCandidate._Name_SuffixColumn] = System.Convert.DBNull;
            }
            
            public bool IsSkillsNull() {
                return this.IsNull(this.tablevJobCandidate.SkillsColumn);
            }
            
            public void SetSkillsNull() {
                this[this.tablevJobCandidate.SkillsColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Addr_TypeNull() {
                return this.IsNull(this.tablevJobCandidate._Addr_TypeColumn);
            }
            
            public void Set_Addr_TypeNull() {
                this[this.tablevJobCandidate._Addr_TypeColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Addr_Loc_CountryRegionNull() {
                return this.IsNull(this.tablevJobCandidate._Addr_Loc_CountryRegionColumn);
            }
            
            public void Set_Addr_Loc_CountryRegionNull() {
                this[this.tablevJobCandidate._Addr_Loc_CountryRegionColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Addr_Loc_StateNull() {
                return this.IsNull(this.tablevJobCandidate._Addr_Loc_StateColumn);
            }
            
            public void Set_Addr_Loc_StateNull() {
                this[this.tablevJobCandidate._Addr_Loc_StateColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Addr_Loc_CityNull() {
                return this.IsNull(this.tablevJobCandidate._Addr_Loc_CityColumn);
            }
            
            public void Set_Addr_Loc_CityNull() {
                this[this.tablevJobCandidate._Addr_Loc_CityColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Addr_PostalCodeNull() {
                return this.IsNull(this.tablevJobCandidate._Addr_PostalCodeColumn);
            }
            
            public void Set_Addr_PostalCodeNull() {
                this[this.tablevJobCandidate._Addr_PostalCodeColumn] = System.Convert.DBNull;
            }
            
            public bool IsEMailNull() {
                return this.IsNull(this.tablevJobCandidate.EMailColumn);
            }
            
            public void SetEMailNull() {
                this[this.tablevJobCandidate.EMailColumn] = System.Convert.DBNull;
            }
            
            public bool IsWebSiteNull() {
                return this.IsNull(this.tablevJobCandidate.WebSiteColumn);
            }
            
            public void SetWebSiteNull() {
                this[this.tablevJobCandidate.WebSiteColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class vJobCandidateEducationRow : System.Data.DataRow {
            
            private vJobCandidateEducationDataTable tablevJobCandidateEducation;
            
            internal vJobCandidateEducationRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tablevJobCandidateEducation = ((vJobCandidateEducationDataTable)(this.Table));
            }
            
            public int JobCandidateID {
                get {
                    return ((int)(this[this.tablevJobCandidateEducation.JobCandidateIDColumn]));
                }
                set {
                    this[this.tablevJobCandidateEducation.JobCandidateIDColumn] = value;
                }
            }
            
            public string _Edu_Level {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidateEducation._Edu_LevelColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Edu.Level\' in table \'vJobCandidateEducation\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidateEducation._Edu_LevelColumn] = value;
                }
            }
            
            public System.DateTime _Edu_StartDate {
                get {
                    try {
                        return ((System.DateTime)(this[this.tablevJobCandidateEducation._Edu_StartDateColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Edu.StartDate\' in table \'vJobCandidateEducation\' is DBNull." +
                                "", e);
                    }
                }
                set {
                    this[this.tablevJobCandidateEducation._Edu_StartDateColumn] = value;
                }
            }
            
            public System.DateTime _Edu_EndDate {
                get {
                    try {
                        return ((System.DateTime)(this[this.tablevJobCandidateEducation._Edu_EndDateColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Edu.EndDate\' in table \'vJobCandidateEducation\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidateEducation._Edu_EndDateColumn] = value;
                }
            }
            
            public string _Edu_Degree {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidateEducation._Edu_DegreeColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Edu.Degree\' in table \'vJobCandidateEducation\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidateEducation._Edu_DegreeColumn] = value;
                }
            }
            
            public string _Edu_Major {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidateEducation._Edu_MajorColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Edu.Major\' in table \'vJobCandidateEducation\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidateEducation._Edu_MajorColumn] = value;
                }
            }
            
            public string _Edu_Minor {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidateEducation._Edu_MinorColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Edu.Minor\' in table \'vJobCandidateEducation\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidateEducation._Edu_MinorColumn] = value;
                }
            }
            
            public string _Edu_GPA {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidateEducation._Edu_GPAColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Edu.GPA\' in table \'vJobCandidateEducation\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidateEducation._Edu_GPAColumn] = value;
                }
            }
            
            public string _Edu_GPAScale {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidateEducation._Edu_GPAScaleColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Edu.GPAScale\' in table \'vJobCandidateEducation\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidateEducation._Edu_GPAScaleColumn] = value;
                }
            }
            
            public string _Edu_School {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidateEducation._Edu_SchoolColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Edu.School\' in table \'vJobCandidateEducation\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidateEducation._Edu_SchoolColumn] = value;
                }
            }
            
            public string _Edu_Loc_CountryRegion {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidateEducation._Edu_Loc_CountryRegionColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Edu.Loc.CountryRegion\' in table \'vJobCandidateEducation\' is" +
                                " DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidateEducation._Edu_Loc_CountryRegionColumn] = value;
                }
            }
            
            public string _Edu_Loc_State {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidateEducation._Edu_Loc_StateColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Edu.Loc.State\' in table \'vJobCandidateEducation\' is DBNull." +
                                "", e);
                    }
                }
                set {
                    this[this.tablevJobCandidateEducation._Edu_Loc_StateColumn] = value;
                }
            }
            
            public string _Edu_Loc_City {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidateEducation._Edu_Loc_CityColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Edu.Loc.City\' in table \'vJobCandidateEducation\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidateEducation._Edu_Loc_CityColumn] = value;
                }
            }
            
            public bool Is_Edu_LevelNull() {
                return this.IsNull(this.tablevJobCandidateEducation._Edu_LevelColumn);
            }
            
            public void Set_Edu_LevelNull() {
                this[this.tablevJobCandidateEducation._Edu_LevelColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Edu_StartDateNull() {
                return this.IsNull(this.tablevJobCandidateEducation._Edu_StartDateColumn);
            }
            
            public void Set_Edu_StartDateNull() {
                this[this.tablevJobCandidateEducation._Edu_StartDateColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Edu_EndDateNull() {
                return this.IsNull(this.tablevJobCandidateEducation._Edu_EndDateColumn);
            }
            
            public void Set_Edu_EndDateNull() {
                this[this.tablevJobCandidateEducation._Edu_EndDateColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Edu_DegreeNull() {
                return this.IsNull(this.tablevJobCandidateEducation._Edu_DegreeColumn);
            }
            
            public void Set_Edu_DegreeNull() {
                this[this.tablevJobCandidateEducation._Edu_DegreeColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Edu_MajorNull() {
                return this.IsNull(this.tablevJobCandidateEducation._Edu_MajorColumn);
            }
            
            public void Set_Edu_MajorNull() {
                this[this.tablevJobCandidateEducation._Edu_MajorColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Edu_MinorNull() {
                return this.IsNull(this.tablevJobCandidateEducation._Edu_MinorColumn);
            }
            
            public void Set_Edu_MinorNull() {
                this[this.tablevJobCandidateEducation._Edu_MinorColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Edu_GPANull() {
                return this.IsNull(this.tablevJobCandidateEducation._Edu_GPAColumn);
            }
            
            public void Set_Edu_GPANull() {
                this[this.tablevJobCandidateEducation._Edu_GPAColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Edu_GPAScaleNull() {
                return this.IsNull(this.tablevJobCandidateEducation._Edu_GPAScaleColumn);
            }
            
            public void Set_Edu_GPAScaleNull() {
                this[this.tablevJobCandidateEducation._Edu_GPAScaleColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Edu_SchoolNull() {
                return this.IsNull(this.tablevJobCandidateEducation._Edu_SchoolColumn);
            }
            
            public void Set_Edu_SchoolNull() {
                this[this.tablevJobCandidateEducation._Edu_SchoolColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Edu_Loc_CountryRegionNull() {
                return this.IsNull(this.tablevJobCandidateEducation._Edu_Loc_CountryRegionColumn);
            }
            
            public void Set_Edu_Loc_CountryRegionNull() {
                this[this.tablevJobCandidateEducation._Edu_Loc_CountryRegionColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Edu_Loc_StateNull() {
                return this.IsNull(this.tablevJobCandidateEducation._Edu_Loc_StateColumn);
            }
            
            public void Set_Edu_Loc_StateNull() {
                this[this.tablevJobCandidateEducation._Edu_Loc_StateColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Edu_Loc_CityNull() {
                return this.IsNull(this.tablevJobCandidateEducation._Edu_Loc_CityColumn);
            }
            
            public void Set_Edu_Loc_CityNull() {
                this[this.tablevJobCandidateEducation._Edu_Loc_CityColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class vJobCandidateEmploymentRow : System.Data.DataRow {
            
            private vJobCandidateEmploymentDataTable tablevJobCandidateEmployment;
            
            internal vJobCandidateEmploymentRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tablevJobCandidateEmployment = ((vJobCandidateEmploymentDataTable)(this.Table));
            }
            
            public int JobCandidateID {
                get {
                    return ((int)(this[this.tablevJobCandidateEmployment.JobCandidateIDColumn]));
                }
                set {
                    this[this.tablevJobCandidateEmployment.JobCandidateIDColumn] = value;
                }
            }
            
            public System.DateTime _Emp_StartDate {
                get {
                    try {
                        return ((System.DateTime)(this[this.tablevJobCandidateEmployment._Emp_StartDateColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Emp.StartDate\' in table \'vJobCandidateEmployment\' is DBNull" +
                                ".", e);
                    }
                }
                set {
                    this[this.tablevJobCandidateEmployment._Emp_StartDateColumn] = value;
                }
            }
            
            public System.DateTime _Emp_EndDate {
                get {
                    try {
                        return ((System.DateTime)(this[this.tablevJobCandidateEmployment._Emp_EndDateColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Emp.EndDate\' in table \'vJobCandidateEmployment\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidateEmployment._Emp_EndDateColumn] = value;
                }
            }
            
            public string _Emp_OrgName {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidateEmployment._Emp_OrgNameColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Emp.OrgName\' in table \'vJobCandidateEmployment\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidateEmployment._Emp_OrgNameColumn] = value;
                }
            }
            
            public string _Emp_JobTitle {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidateEmployment._Emp_JobTitleColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Emp.JobTitle\' in table \'vJobCandidateEmployment\' is DBNull." +
                                "", e);
                    }
                }
                set {
                    this[this.tablevJobCandidateEmployment._Emp_JobTitleColumn] = value;
                }
            }
            
            public string _Emp_Responsibility {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidateEmployment._Emp_ResponsibilityColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Emp.Responsibility\' in table \'vJobCandidateEmployment\' is D" +
                                "BNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidateEmployment._Emp_ResponsibilityColumn] = value;
                }
            }
            
            public string _Emp_FunctionCategory {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidateEmployment._Emp_FunctionCategoryColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Emp.FunctionCategory\' in table \'vJobCandidateEmployment\' is" +
                                " DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidateEmployment._Emp_FunctionCategoryColumn] = value;
                }
            }
            
            public string _Emp_IndustryCategory {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidateEmployment._Emp_IndustryCategoryColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Emp.IndustryCategory\' in table \'vJobCandidateEmployment\' is" +
                                " DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidateEmployment._Emp_IndustryCategoryColumn] = value;
                }
            }
            
            public string _Emp_Loc_CountryRegion {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidateEmployment._Emp_Loc_CountryRegionColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Emp.Loc.CountryRegion\' in table \'vJobCandidateEmployment\' i" +
                                "s DBNull.", e);
                    }
                }
                set {
                    this[this.tablevJobCandidateEmployment._Emp_Loc_CountryRegionColumn] = value;
                }
            }
            
            public string _Emp_Loc_State {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidateEmployment._Emp_Loc_StateColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Emp.Loc.State\' in table \'vJobCandidateEmployment\' is DBNull" +
                                ".", e);
                    }
                }
                set {
                    this[this.tablevJobCandidateEmployment._Emp_Loc_StateColumn] = value;
                }
            }
            
            public string _Emp_Loc_City {
                get {
                    try {
                        return ((string)(this[this.tablevJobCandidateEmployment._Emp_Loc_CityColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Emp.Loc.City\' in table \'vJobCandidateEmployment\' is DBNull." +
                                "", e);
                    }
                }
                set {
                    this[this.tablevJobCandidateEmployment._Emp_Loc_CityColumn] = value;
                }
            }
            
            public bool Is_Emp_StartDateNull() {
                return this.IsNull(this.tablevJobCandidateEmployment._Emp_StartDateColumn);
            }
            
            public void Set_Emp_StartDateNull() {
                this[this.tablevJobCandidateEmployment._Emp_StartDateColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Emp_EndDateNull() {
                return this.IsNull(this.tablevJobCandidateEmployment._Emp_EndDateColumn);
            }
            
            public void Set_Emp_EndDateNull() {
                this[this.tablevJobCandidateEmployment._Emp_EndDateColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Emp_OrgNameNull() {
                return this.IsNull(this.tablevJobCandidateEmployment._Emp_OrgNameColumn);
            }
            
            public void Set_Emp_OrgNameNull() {
                this[this.tablevJobCandidateEmployment._Emp_OrgNameColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Emp_JobTitleNull() {
                return this.IsNull(this.tablevJobCandidateEmployment._Emp_JobTitleColumn);
            }
            
            public void Set_Emp_JobTitleNull() {
                this[this.tablevJobCandidateEmployment._Emp_JobTitleColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Emp_ResponsibilityNull() {
                return this.IsNull(this.tablevJobCandidateEmployment._Emp_ResponsibilityColumn);
            }
            
            public void Set_Emp_ResponsibilityNull() {
                this[this.tablevJobCandidateEmployment._Emp_ResponsibilityColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Emp_FunctionCategoryNull() {
                return this.IsNull(this.tablevJobCandidateEmployment._Emp_FunctionCategoryColumn);
            }
            
            public void Set_Emp_FunctionCategoryNull() {
                this[this.tablevJobCandidateEmployment._Emp_FunctionCategoryColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Emp_IndustryCategoryNull() {
                return this.IsNull(this.tablevJobCandidateEmployment._Emp_IndustryCategoryColumn);
            }
            
            public void Set_Emp_IndustryCategoryNull() {
                this[this.tablevJobCandidateEmployment._Emp_IndustryCategoryColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Emp_Loc_CountryRegionNull() {
                return this.IsNull(this.tablevJobCandidateEmployment._Emp_Loc_CountryRegionColumn);
            }
            
            public void Set_Emp_Loc_CountryRegionNull() {
                this[this.tablevJobCandidateEmployment._Emp_Loc_CountryRegionColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Emp_Loc_StateNull() {
                return this.IsNull(this.tablevJobCandidateEmployment._Emp_Loc_StateColumn);
            }
            
            public void Set_Emp_Loc_StateNull() {
                this[this.tablevJobCandidateEmployment._Emp_Loc_StateColumn] = System.Convert.DBNull;
            }
            
            public bool Is_Emp_Loc_CityNull() {
                return this.IsNull(this.tablevJobCandidateEmployment._Emp_Loc_CityColumn);
            }
            
            public void Set_Emp_Loc_CityNull() {
                this[this.tablevJobCandidateEmployment._Emp_Loc_CityColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class vAdditionalContactInfoRow : System.Data.DataRow {
            
            private vAdditionalContactInfoDataTable tablevAdditionalContactInfo;
            
            internal vAdditionalContactInfoRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tablevAdditionalContactInfo = ((vAdditionalContactInfoDataTable)(this.Table));
            }
            
            public int ContactID {
                get {
                    return ((int)(this[this.tablevAdditionalContactInfo.ContactIDColumn]));
                }
                set {
                    this[this.tablevAdditionalContactInfo.ContactIDColumn] = value;
                }
            }
            
            public string FirstName {
                get {
                    return ((string)(this[this.tablevAdditionalContactInfo.FirstNameColumn]));
                }
                set {
                    this[this.tablevAdditionalContactInfo.FirstNameColumn] = value;
                }
            }
            
            public string MiddleName {
                get {
                    try {
                        return ((string)(this[this.tablevAdditionalContactInfo.MiddleNameColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'MiddleName\' in table \'vAdditionalContactInfo\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevAdditionalContactInfo.MiddleNameColumn] = value;
                }
            }
            
            public string LastName {
                get {
                    return ((string)(this[this.tablevAdditionalContactInfo.LastNameColumn]));
                }
                set {
                    this[this.tablevAdditionalContactInfo.LastNameColumn] = value;
                }
            }
            
            public string TelephoneNumber {
                get {
                    try {
                        return ((string)(this[this.tablevAdditionalContactInfo.TelephoneNumberColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'TelephoneNumber\' in table \'vAdditionalContactInfo\' is DBNul" +
                                "l.", e);
                    }
                }
                set {
                    this[this.tablevAdditionalContactInfo.TelephoneNumberColumn] = value;
                }
            }
            
            public string TelephoneSpecialInstructions {
                get {
                    try {
                        return ((string)(this[this.tablevAdditionalContactInfo.TelephoneSpecialInstructionsColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'TelephoneSpecialInstructions\' in table \'vAdditionalContactI" +
                                "nfo\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevAdditionalContactInfo.TelephoneSpecialInstructionsColumn] = value;
                }
            }
            
            public string Street {
                get {
                    try {
                        return ((string)(this[this.tablevAdditionalContactInfo.StreetColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Street\' in table \'vAdditionalContactInfo\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevAdditionalContactInfo.StreetColumn] = value;
                }
            }
            
            public string City {
                get {
                    try {
                        return ((string)(this[this.tablevAdditionalContactInfo.CityColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'City\' in table \'vAdditionalContactInfo\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevAdditionalContactInfo.CityColumn] = value;
                }
            }
            
            public string StateProvince {
                get {
                    try {
                        return ((string)(this[this.tablevAdditionalContactInfo.StateProvinceColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'StateProvince\' in table \'vAdditionalContactInfo\' is DBNull." +
                                "", e);
                    }
                }
                set {
                    this[this.tablevAdditionalContactInfo.StateProvinceColumn] = value;
                }
            }
            
            public string PostalCode {
                get {
                    try {
                        return ((string)(this[this.tablevAdditionalContactInfo.PostalCodeColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'PostalCode\' in table \'vAdditionalContactInfo\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevAdditionalContactInfo.PostalCodeColumn] = value;
                }
            }
            
            public string CountryRegion {
                get {
                    try {
                        return ((string)(this[this.tablevAdditionalContactInfo.CountryRegionColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'CountryRegion\' in table \'vAdditionalContactInfo\' is DBNull." +
                                "", e);
                    }
                }
                set {
                    this[this.tablevAdditionalContactInfo.CountryRegionColumn] = value;
                }
            }
            
            public string HomeAddressSpecialInstructions {
                get {
                    try {
                        return ((string)(this[this.tablevAdditionalContactInfo.HomeAddressSpecialInstructionsColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'HomeAddressSpecialInstructions\' in table \'vAdditionalContac" +
                                "tInfo\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevAdditionalContactInfo.HomeAddressSpecialInstructionsColumn] = value;
                }
            }
            
            public string EMailAddress {
                get {
                    try {
                        return ((string)(this[this.tablevAdditionalContactInfo.EMailAddressColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'EMailAddress\' in table \'vAdditionalContactInfo\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevAdditionalContactInfo.EMailAddressColumn] = value;
                }
            }
            
            public string EMailSpecialInstructions {
                get {
                    try {
                        return ((string)(this[this.tablevAdditionalContactInfo.EMailSpecialInstructionsColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'EMailSpecialInstructions\' in table \'vAdditionalContactInfo\'" +
                                " is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevAdditionalContactInfo.EMailSpecialInstructionsColumn] = value;
                }
            }
            
            public string EMailTelephoneNumber {
                get {
                    try {
                        return ((string)(this[this.tablevAdditionalContactInfo.EMailTelephoneNumberColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'EMailTelephoneNumber\' in table \'vAdditionalContactInfo\' is " +
                                "DBNull.", e);
                    }
                }
                set {
                    this[this.tablevAdditionalContactInfo.EMailTelephoneNumberColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tablevAdditionalContactInfo.rowguidColumn]));
                }
                set {
                    this[this.tablevAdditionalContactInfo.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tablevAdditionalContactInfo.ModifiedDateColumn]));
                }
                set {
                    this[this.tablevAdditionalContactInfo.ModifiedDateColumn] = value;
                }
            }
            
            public bool IsMiddleNameNull() {
                return this.IsNull(this.tablevAdditionalContactInfo.MiddleNameColumn);
            }
            
            public void SetMiddleNameNull() {
                this[this.tablevAdditionalContactInfo.MiddleNameColumn] = System.Convert.DBNull;
            }
            
            public bool IsTelephoneNumberNull() {
                return this.IsNull(this.tablevAdditionalContactInfo.TelephoneNumberColumn);
            }
            
            public void SetTelephoneNumberNull() {
                this[this.tablevAdditionalContactInfo.TelephoneNumberColumn] = System.Convert.DBNull;
            }
            
            public bool IsTelephoneSpecialInstructionsNull() {
                return this.IsNull(this.tablevAdditionalContactInfo.TelephoneSpecialInstructionsColumn);
            }
            
            public void SetTelephoneSpecialInstructionsNull() {
                this[this.tablevAdditionalContactInfo.TelephoneSpecialInstructionsColumn] = System.Convert.DBNull;
            }
            
            public bool IsStreetNull() {
                return this.IsNull(this.tablevAdditionalContactInfo.StreetColumn);
            }
            
            public void SetStreetNull() {
                this[this.tablevAdditionalContactInfo.StreetColumn] = System.Convert.DBNull;
            }
            
            public bool IsCityNull() {
                return this.IsNull(this.tablevAdditionalContactInfo.CityColumn);
            }
            
            public void SetCityNull() {
                this[this.tablevAdditionalContactInfo.CityColumn] = System.Convert.DBNull;
            }
            
            public bool IsStateProvinceNull() {
                return this.IsNull(this.tablevAdditionalContactInfo.StateProvinceColumn);
            }
            
            public void SetStateProvinceNull() {
                this[this.tablevAdditionalContactInfo.StateProvinceColumn] = System.Convert.DBNull;
            }
            
            public bool IsPostalCodeNull() {
                return this.IsNull(this.tablevAdditionalContactInfo.PostalCodeColumn);
            }
            
            public void SetPostalCodeNull() {
                this[this.tablevAdditionalContactInfo.PostalCodeColumn] = System.Convert.DBNull;
            }
            
            public bool IsCountryRegionNull() {
                return this.IsNull(this.tablevAdditionalContactInfo.CountryRegionColumn);
            }
            
            public void SetCountryRegionNull() {
                this[this.tablevAdditionalContactInfo.CountryRegionColumn] = System.Convert.DBNull;
            }
            
            public bool IsHomeAddressSpecialInstructionsNull() {
                return this.IsNull(this.tablevAdditionalContactInfo.HomeAddressSpecialInstructionsColumn);
            }
            
            public void SetHomeAddressSpecialInstructionsNull() {
                this[this.tablevAdditionalContactInfo.HomeAddressSpecialInstructionsColumn] = System.Convert.DBNull;
            }
            
            public bool IsEMailAddressNull() {
                return this.IsNull(this.tablevAdditionalContactInfo.EMailAddressColumn);
            }
            
            public void SetEMailAddressNull() {
                this[this.tablevAdditionalContactInfo.EMailAddressColumn] = System.Convert.DBNull;
            }
            
            public bool IsEMailSpecialInstructionsNull() {
                return this.IsNull(this.tablevAdditionalContactInfo.EMailSpecialInstructionsColumn);
            }
            
            public void SetEMailSpecialInstructionsNull() {
                this[this.tablevAdditionalContactInfo.EMailSpecialInstructionsColumn] = System.Convert.DBNull;
            }
            
            public bool IsEMailTelephoneNumberNull() {
                return this.IsNull(this.tablevAdditionalContactInfo.EMailTelephoneNumberColumn);
            }
            
            public void SetEMailTelephoneNumberNull() {
                this[this.tablevAdditionalContactInfo.EMailTelephoneNumberColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class vStateProvinceCountryRegionRow : System.Data.DataRow {
            
            private vStateProvinceCountryRegionDataTable tablevStateProvinceCountryRegion;
            
            internal vStateProvinceCountryRegionRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tablevStateProvinceCountryRegion = ((vStateProvinceCountryRegionDataTable)(this.Table));
            }
            
            public int StateProvinceID {
                get {
                    return ((int)(this[this.tablevStateProvinceCountryRegion.StateProvinceIDColumn]));
                }
                set {
                    this[this.tablevStateProvinceCountryRegion.StateProvinceIDColumn] = value;
                }
            }
            
            public string StateProvinceCode {
                get {
                    return ((string)(this[this.tablevStateProvinceCountryRegion.StateProvinceCodeColumn]));
                }
                set {
                    this[this.tablevStateProvinceCountryRegion.StateProvinceCodeColumn] = value;
                }
            }
            
            public bool IsOnlyStateProvinceFlag {
                get {
                    return ((bool)(this[this.tablevStateProvinceCountryRegion.IsOnlyStateProvinceFlagColumn]));
                }
                set {
                    this[this.tablevStateProvinceCountryRegion.IsOnlyStateProvinceFlagColumn] = value;
                }
            }
            
            public string StateProvinceName {
                get {
                    return ((string)(this[this.tablevStateProvinceCountryRegion.StateProvinceNameColumn]));
                }
                set {
                    this[this.tablevStateProvinceCountryRegion.StateProvinceNameColumn] = value;
                }
            }
            
            public int TerritoryID {
                get {
                    return ((int)(this[this.tablevStateProvinceCountryRegion.TerritoryIDColumn]));
                }
                set {
                    this[this.tablevStateProvinceCountryRegion.TerritoryIDColumn] = value;
                }
            }
            
            public string CountryRegionCode {
                get {
                    return ((string)(this[this.tablevStateProvinceCountryRegion.CountryRegionCodeColumn]));
                }
                set {
                    this[this.tablevStateProvinceCountryRegion.CountryRegionCodeColumn] = value;
                }
            }
            
            public string CountryRegionName {
                get {
                    return ((string)(this[this.tablevStateProvinceCountryRegion.CountryRegionNameColumn]));
                }
                set {
                    this[this.tablevStateProvinceCountryRegion.CountryRegionNameColumn] = value;
                }
            }
        }
        
        public partial class vProductAndDescriptionRow : System.Data.DataRow {
            
            private vProductAndDescriptionDataTable tablevProductAndDescription;
            
            internal vProductAndDescriptionRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tablevProductAndDescription = ((vProductAndDescriptionDataTable)(this.Table));
            }
            
            public int ProductID {
                get {
                    return ((int)(this[this.tablevProductAndDescription.ProductIDColumn]));
                }
                set {
                    this[this.tablevProductAndDescription.ProductIDColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tablevProductAndDescription.NameColumn]));
                }
                set {
                    this[this.tablevProductAndDescription.NameColumn] = value;
                }
            }
            
            public string ProductModel {
                get {
                    return ((string)(this[this.tablevProductAndDescription.ProductModelColumn]));
                }
                set {
                    this[this.tablevProductAndDescription.ProductModelColumn] = value;
                }
            }
            
            public string CultureID {
                get {
                    return ((string)(this[this.tablevProductAndDescription.CultureIDColumn]));
                }
                set {
                    this[this.tablevProductAndDescription.CultureIDColumn] = value;
                }
            }
            
            public string Description {
                get {
                    return ((string)(this[this.tablevProductAndDescription.DescriptionColumn]));
                }
                set {
                    this[this.tablevProductAndDescription.DescriptionColumn] = value;
                }
            }
        }
        
        public partial class vProductModelCatalogDescriptionRow : System.Data.DataRow {
            
            private vProductModelCatalogDescriptionDataTable tablevProductModelCatalogDescription;
            
            internal vProductModelCatalogDescriptionRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tablevProductModelCatalogDescription = ((vProductModelCatalogDescriptionDataTable)(this.Table));
            }
            
            public int ProductModelID {
                get {
                    return ((int)(this[this.tablevProductModelCatalogDescription.ProductModelIDColumn]));
                }
                set {
                    this[this.tablevProductModelCatalogDescription.ProductModelIDColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tablevProductModelCatalogDescription.NameColumn]));
                }
                set {
                    this[this.tablevProductModelCatalogDescription.NameColumn] = value;
                }
            }
            
            public string Summary {
                get {
                    try {
                        return ((string)(this[this.tablevProductModelCatalogDescription.SummaryColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Summary\' in table \'vProductModelCatalogDescription\' is DBNu" +
                                "ll.", e);
                    }
                }
                set {
                    this[this.tablevProductModelCatalogDescription.SummaryColumn] = value;
                }
            }
            
            public string Manufacturer {
                get {
                    try {
                        return ((string)(this[this.tablevProductModelCatalogDescription.ManufacturerColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Manufacturer\' in table \'vProductModelCatalogDescription\' is" +
                                " DBNull.", e);
                    }
                }
                set {
                    this[this.tablevProductModelCatalogDescription.ManufacturerColumn] = value;
                }
            }
            
            public string Copyright {
                get {
                    try {
                        return ((string)(this[this.tablevProductModelCatalogDescription.CopyrightColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Copyright\' in table \'vProductModelCatalogDescription\' is DB" +
                                "Null.", e);
                    }
                }
                set {
                    this[this.tablevProductModelCatalogDescription.CopyrightColumn] = value;
                }
            }
            
            public string ProductURL {
                get {
                    try {
                        return ((string)(this[this.tablevProductModelCatalogDescription.ProductURLColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ProductURL\' in table \'vProductModelCatalogDescription\' is D" +
                                "BNull.", e);
                    }
                }
                set {
                    this[this.tablevProductModelCatalogDescription.ProductURLColumn] = value;
                }
            }
            
            public string WarrantyPeriod {
                get {
                    try {
                        return ((string)(this[this.tablevProductModelCatalogDescription.WarrantyPeriodColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'WarrantyPeriod\' in table \'vProductModelCatalogDescription\' " +
                                "is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevProductModelCatalogDescription.WarrantyPeriodColumn] = value;
                }
            }
            
            public string WarrantyDescription {
                get {
                    try {
                        return ((string)(this[this.tablevProductModelCatalogDescription.WarrantyDescriptionColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'WarrantyDescription\' in table \'vProductModelCatalogDescript" +
                                "ion\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevProductModelCatalogDescription.WarrantyDescriptionColumn] = value;
                }
            }
            
            public string NoOfYears {
                get {
                    try {
                        return ((string)(this[this.tablevProductModelCatalogDescription.NoOfYearsColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'NoOfYears\' in table \'vProductModelCatalogDescription\' is DB" +
                                "Null.", e);
                    }
                }
                set {
                    this[this.tablevProductModelCatalogDescription.NoOfYearsColumn] = value;
                }
            }
            
            public string MaintenanceDescription {
                get {
                    try {
                        return ((string)(this[this.tablevProductModelCatalogDescription.MaintenanceDescriptionColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'MaintenanceDescription\' in table \'vProductModelCatalogDescr" +
                                "iption\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevProductModelCatalogDescription.MaintenanceDescriptionColumn] = value;
                }
            }
            
            public string Wheel {
                get {
                    try {
                        return ((string)(this[this.tablevProductModelCatalogDescription.WheelColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Wheel\' in table \'vProductModelCatalogDescription\' is DBNull" +
                                ".", e);
                    }
                }
                set {
                    this[this.tablevProductModelCatalogDescription.WheelColumn] = value;
                }
            }
            
            public string Saddle {
                get {
                    try {
                        return ((string)(this[this.tablevProductModelCatalogDescription.SaddleColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Saddle\' in table \'vProductModelCatalogDescription\' is DBNul" +
                                "l.", e);
                    }
                }
                set {
                    this[this.tablevProductModelCatalogDescription.SaddleColumn] = value;
                }
            }
            
            public string Pedal {
                get {
                    try {
                        return ((string)(this[this.tablevProductModelCatalogDescription.PedalColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Pedal\' in table \'vProductModelCatalogDescription\' is DBNull" +
                                ".", e);
                    }
                }
                set {
                    this[this.tablevProductModelCatalogDescription.PedalColumn] = value;
                }
            }
            
            public string BikeFrame {
                get {
                    try {
                        return ((string)(this[this.tablevProductModelCatalogDescription.BikeFrameColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'BikeFrame\' in table \'vProductModelCatalogDescription\' is DB" +
                                "Null.", e);
                    }
                }
                set {
                    this[this.tablevProductModelCatalogDescription.BikeFrameColumn] = value;
                }
            }
            
            public string Crankset {
                get {
                    try {
                        return ((string)(this[this.tablevProductModelCatalogDescription.CranksetColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Crankset\' in table \'vProductModelCatalogDescription\' is DBN" +
                                "ull.", e);
                    }
                }
                set {
                    this[this.tablevProductModelCatalogDescription.CranksetColumn] = value;
                }
            }
            
            public string PictureAngle {
                get {
                    try {
                        return ((string)(this[this.tablevProductModelCatalogDescription.PictureAngleColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'PictureAngle\' in table \'vProductModelCatalogDescription\' is" +
                                " DBNull.", e);
                    }
                }
                set {
                    this[this.tablevProductModelCatalogDescription.PictureAngleColumn] = value;
                }
            }
            
            public string PictureSize {
                get {
                    try {
                        return ((string)(this[this.tablevProductModelCatalogDescription.PictureSizeColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'PictureSize\' in table \'vProductModelCatalogDescription\' is " +
                                "DBNull.", e);
                    }
                }
                set {
                    this[this.tablevProductModelCatalogDescription.PictureSizeColumn] = value;
                }
            }
            
            public string ProductPhotoID {
                get {
                    try {
                        return ((string)(this[this.tablevProductModelCatalogDescription.ProductPhotoIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ProductPhotoID\' in table \'vProductModelCatalogDescription\' " +
                                "is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevProductModelCatalogDescription.ProductPhotoIDColumn] = value;
                }
            }
            
            public string Material {
                get {
                    try {
                        return ((string)(this[this.tablevProductModelCatalogDescription.MaterialColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Material\' in table \'vProductModelCatalogDescription\' is DBN" +
                                "ull.", e);
                    }
                }
                set {
                    this[this.tablevProductModelCatalogDescription.MaterialColumn] = value;
                }
            }
            
            public string Color {
                get {
                    try {
                        return ((string)(this[this.tablevProductModelCatalogDescription.ColorColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Color\' in table \'vProductModelCatalogDescription\' is DBNull" +
                                ".", e);
                    }
                }
                set {
                    this[this.tablevProductModelCatalogDescription.ColorColumn] = value;
                }
            }
            
            public string ProductLine {
                get {
                    try {
                        return ((string)(this[this.tablevProductModelCatalogDescription.ProductLineColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ProductLine\' in table \'vProductModelCatalogDescription\' is " +
                                "DBNull.", e);
                    }
                }
                set {
                    this[this.tablevProductModelCatalogDescription.ProductLineColumn] = value;
                }
            }
            
            public string Style {
                get {
                    try {
                        return ((string)(this[this.tablevProductModelCatalogDescription.StyleColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Style\' in table \'vProductModelCatalogDescription\' is DBNull" +
                                ".", e);
                    }
                }
                set {
                    this[this.tablevProductModelCatalogDescription.StyleColumn] = value;
                }
            }
            
            public string RiderExperience {
                get {
                    try {
                        return ((string)(this[this.tablevProductModelCatalogDescription.RiderExperienceColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'RiderExperience\' in table \'vProductModelCatalogDescription\'" +
                                " is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevProductModelCatalogDescription.RiderExperienceColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tablevProductModelCatalogDescription.rowguidColumn]));
                }
                set {
                    this[this.tablevProductModelCatalogDescription.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tablevProductModelCatalogDescription.ModifiedDateColumn]));
                }
                set {
                    this[this.tablevProductModelCatalogDescription.ModifiedDateColumn] = value;
                }
            }
            
            public bool IsSummaryNull() {
                return this.IsNull(this.tablevProductModelCatalogDescription.SummaryColumn);
            }
            
            public void SetSummaryNull() {
                this[this.tablevProductModelCatalogDescription.SummaryColumn] = System.Convert.DBNull;
            }
            
            public bool IsManufacturerNull() {
                return this.IsNull(this.tablevProductModelCatalogDescription.ManufacturerColumn);
            }
            
            public void SetManufacturerNull() {
                this[this.tablevProductModelCatalogDescription.ManufacturerColumn] = System.Convert.DBNull;
            }
            
            public bool IsCopyrightNull() {
                return this.IsNull(this.tablevProductModelCatalogDescription.CopyrightColumn);
            }
            
            public void SetCopyrightNull() {
                this[this.tablevProductModelCatalogDescription.CopyrightColumn] = System.Convert.DBNull;
            }
            
            public bool IsProductURLNull() {
                return this.IsNull(this.tablevProductModelCatalogDescription.ProductURLColumn);
            }
            
            public void SetProductURLNull() {
                this[this.tablevProductModelCatalogDescription.ProductURLColumn] = System.Convert.DBNull;
            }
            
            public bool IsWarrantyPeriodNull() {
                return this.IsNull(this.tablevProductModelCatalogDescription.WarrantyPeriodColumn);
            }
            
            public void SetWarrantyPeriodNull() {
                this[this.tablevProductModelCatalogDescription.WarrantyPeriodColumn] = System.Convert.DBNull;
            }
            
            public bool IsWarrantyDescriptionNull() {
                return this.IsNull(this.tablevProductModelCatalogDescription.WarrantyDescriptionColumn);
            }
            
            public void SetWarrantyDescriptionNull() {
                this[this.tablevProductModelCatalogDescription.WarrantyDescriptionColumn] = System.Convert.DBNull;
            }
            
            public bool IsNoOfYearsNull() {
                return this.IsNull(this.tablevProductModelCatalogDescription.NoOfYearsColumn);
            }
            
            public void SetNoOfYearsNull() {
                this[this.tablevProductModelCatalogDescription.NoOfYearsColumn] = System.Convert.DBNull;
            }
            
            public bool IsMaintenanceDescriptionNull() {
                return this.IsNull(this.tablevProductModelCatalogDescription.MaintenanceDescriptionColumn);
            }
            
            public void SetMaintenanceDescriptionNull() {
                this[this.tablevProductModelCatalogDescription.MaintenanceDescriptionColumn] = System.Convert.DBNull;
            }
            
            public bool IsWheelNull() {
                return this.IsNull(this.tablevProductModelCatalogDescription.WheelColumn);
            }
            
            public void SetWheelNull() {
                this[this.tablevProductModelCatalogDescription.WheelColumn] = System.Convert.DBNull;
            }
            
            public bool IsSaddleNull() {
                return this.IsNull(this.tablevProductModelCatalogDescription.SaddleColumn);
            }
            
            public void SetSaddleNull() {
                this[this.tablevProductModelCatalogDescription.SaddleColumn] = System.Convert.DBNull;
            }
            
            public bool IsPedalNull() {
                return this.IsNull(this.tablevProductModelCatalogDescription.PedalColumn);
            }
            
            public void SetPedalNull() {
                this[this.tablevProductModelCatalogDescription.PedalColumn] = System.Convert.DBNull;
            }
            
            public bool IsBikeFrameNull() {
                return this.IsNull(this.tablevProductModelCatalogDescription.BikeFrameColumn);
            }
            
            public void SetBikeFrameNull() {
                this[this.tablevProductModelCatalogDescription.BikeFrameColumn] = System.Convert.DBNull;
            }
            
            public bool IsCranksetNull() {
                return this.IsNull(this.tablevProductModelCatalogDescription.CranksetColumn);
            }
            
            public void SetCranksetNull() {
                this[this.tablevProductModelCatalogDescription.CranksetColumn] = System.Convert.DBNull;
            }
            
            public bool IsPictureAngleNull() {
                return this.IsNull(this.tablevProductModelCatalogDescription.PictureAngleColumn);
            }
            
            public void SetPictureAngleNull() {
                this[this.tablevProductModelCatalogDescription.PictureAngleColumn] = System.Convert.DBNull;
            }
            
            public bool IsPictureSizeNull() {
                return this.IsNull(this.tablevProductModelCatalogDescription.PictureSizeColumn);
            }
            
            public void SetPictureSizeNull() {
                this[this.tablevProductModelCatalogDescription.PictureSizeColumn] = System.Convert.DBNull;
            }
            
            public bool IsProductPhotoIDNull() {
                return this.IsNull(this.tablevProductModelCatalogDescription.ProductPhotoIDColumn);
            }
            
            public void SetProductPhotoIDNull() {
                this[this.tablevProductModelCatalogDescription.ProductPhotoIDColumn] = System.Convert.DBNull;
            }
            
            public bool IsMaterialNull() {
                return this.IsNull(this.tablevProductModelCatalogDescription.MaterialColumn);
            }
            
            public void SetMaterialNull() {
                this[this.tablevProductModelCatalogDescription.MaterialColumn] = System.Convert.DBNull;
            }
            
            public bool IsColorNull() {
                return this.IsNull(this.tablevProductModelCatalogDescription.ColorColumn);
            }
            
            public void SetColorNull() {
                this[this.tablevProductModelCatalogDescription.ColorColumn] = System.Convert.DBNull;
            }
            
            public bool IsProductLineNull() {
                return this.IsNull(this.tablevProductModelCatalogDescription.ProductLineColumn);
            }
            
            public void SetProductLineNull() {
                this[this.tablevProductModelCatalogDescription.ProductLineColumn] = System.Convert.DBNull;
            }
            
            public bool IsStyleNull() {
                return this.IsNull(this.tablevProductModelCatalogDescription.StyleColumn);
            }
            
            public void SetStyleNull() {
                this[this.tablevProductModelCatalogDescription.StyleColumn] = System.Convert.DBNull;
            }
            
            public bool IsRiderExperienceNull() {
                return this.IsNull(this.tablevProductModelCatalogDescription.RiderExperienceColumn);
            }
            
            public void SetRiderExperienceNull() {
                this[this.tablevProductModelCatalogDescription.RiderExperienceColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class vProductModelInstructionsRow : System.Data.DataRow {
            
            private vProductModelInstructionsDataTable tablevProductModelInstructions;
            
            internal vProductModelInstructionsRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tablevProductModelInstructions = ((vProductModelInstructionsDataTable)(this.Table));
            }
            
            public int ProductModelID {
                get {
                    return ((int)(this[this.tablevProductModelInstructions.ProductModelIDColumn]));
                }
                set {
                    this[this.tablevProductModelInstructions.ProductModelIDColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tablevProductModelInstructions.NameColumn]));
                }
                set {
                    this[this.tablevProductModelInstructions.NameColumn] = value;
                }
            }
            
            public string Instructions {
                get {
                    try {
                        return ((string)(this[this.tablevProductModelInstructions.InstructionsColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Instructions\' in table \'vProductModelInstructions\' is DBNul" +
                                "l.", e);
                    }
                }
                set {
                    this[this.tablevProductModelInstructions.InstructionsColumn] = value;
                }
            }
            
            public int LocationID {
                get {
                    try {
                        return ((int)(this[this.tablevProductModelInstructions.LocationIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'LocationID\' in table \'vProductModelInstructions\' is DBNull." +
                                "", e);
                    }
                }
                set {
                    this[this.tablevProductModelInstructions.LocationIDColumn] = value;
                }
            }
            
            public decimal SetupHours {
                get {
                    try {
                        return ((decimal)(this[this.tablevProductModelInstructions.SetupHoursColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'SetupHours\' in table \'vProductModelInstructions\' is DBNull." +
                                "", e);
                    }
                }
                set {
                    this[this.tablevProductModelInstructions.SetupHoursColumn] = value;
                }
            }
            
            public decimal MachineHours {
                get {
                    try {
                        return ((decimal)(this[this.tablevProductModelInstructions.MachineHoursColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'MachineHours\' in table \'vProductModelInstructions\' is DBNul" +
                                "l.", e);
                    }
                }
                set {
                    this[this.tablevProductModelInstructions.MachineHoursColumn] = value;
                }
            }
            
            public decimal LaborHours {
                get {
                    try {
                        return ((decimal)(this[this.tablevProductModelInstructions.LaborHoursColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'LaborHours\' in table \'vProductModelInstructions\' is DBNull." +
                                "", e);
                    }
                }
                set {
                    this[this.tablevProductModelInstructions.LaborHoursColumn] = value;
                }
            }
            
            public int LotSize {
                get {
                    try {
                        return ((int)(this[this.tablevProductModelInstructions.LotSizeColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'LotSize\' in table \'vProductModelInstructions\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevProductModelInstructions.LotSizeColumn] = value;
                }
            }
            
            public string Step {
                get {
                    try {
                        return ((string)(this[this.tablevProductModelInstructions.StepColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Step\' in table \'vProductModelInstructions\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevProductModelInstructions.StepColumn] = value;
                }
            }
            
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tablevProductModelInstructions.rowguidColumn]));
                }
                set {
                    this[this.tablevProductModelInstructions.rowguidColumn] = value;
                }
            }
            
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tablevProductModelInstructions.ModifiedDateColumn]));
                }
                set {
                    this[this.tablevProductModelInstructions.ModifiedDateColumn] = value;
                }
            }
            
            public bool IsInstructionsNull() {
                return this.IsNull(this.tablevProductModelInstructions.InstructionsColumn);
            }
            
            public void SetInstructionsNull() {
                this[this.tablevProductModelInstructions.InstructionsColumn] = System.Convert.DBNull;
            }
            
            public bool IsLocationIDNull() {
                return this.IsNull(this.tablevProductModelInstructions.LocationIDColumn);
            }
            
            public void SetLocationIDNull() {
                this[this.tablevProductModelInstructions.LocationIDColumn] = System.Convert.DBNull;
            }
            
            public bool IsSetupHoursNull() {
                return this.IsNull(this.tablevProductModelInstructions.SetupHoursColumn);
            }
            
            public void SetSetupHoursNull() {
                this[this.tablevProductModelInstructions.SetupHoursColumn] = System.Convert.DBNull;
            }
            
            public bool IsMachineHoursNull() {
                return this.IsNull(this.tablevProductModelInstructions.MachineHoursColumn);
            }
            
            public void SetMachineHoursNull() {
                this[this.tablevProductModelInstructions.MachineHoursColumn] = System.Convert.DBNull;
            }
            
            public bool IsLaborHoursNull() {
                return this.IsNull(this.tablevProductModelInstructions.LaborHoursColumn);
            }
            
            public void SetLaborHoursNull() {
                this[this.tablevProductModelInstructions.LaborHoursColumn] = System.Convert.DBNull;
            }
            
            public bool IsLotSizeNull() {
                return this.IsNull(this.tablevProductModelInstructions.LotSizeColumn);
            }
            
            public void SetLotSizeNull() {
                this[this.tablevProductModelInstructions.LotSizeColumn] = System.Convert.DBNull;
            }
            
            public bool IsStepNull() {
                return this.IsNull(this.tablevProductModelInstructions.StepColumn);
            }
            
            public void SetStepNull() {
                this[this.tablevProductModelInstructions.StepColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class vVendorRow : System.Data.DataRow {
            
            private vVendorDataTable tablevVendor;
            
            internal vVendorRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tablevVendor = ((vVendorDataTable)(this.Table));
            }
            
            public int VendorID {
                get {
                    return ((int)(this[this.tablevVendor.VendorIDColumn]));
                }
                set {
                    this[this.tablevVendor.VendorIDColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tablevVendor.NameColumn]));
                }
                set {
                    this[this.tablevVendor.NameColumn] = value;
                }
            }
            
            public string ContactType {
                get {
                    return ((string)(this[this.tablevVendor.ContactTypeColumn]));
                }
                set {
                    this[this.tablevVendor.ContactTypeColumn] = value;
                }
            }
            
            public string Title {
                get {
                    try {
                        return ((string)(this[this.tablevVendor.TitleColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Title\' in table \'vVendor\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevVendor.TitleColumn] = value;
                }
            }
            
            public string FirstName {
                get {
                    return ((string)(this[this.tablevVendor.FirstNameColumn]));
                }
                set {
                    this[this.tablevVendor.FirstNameColumn] = value;
                }
            }
            
            public string MiddleName {
                get {
                    try {
                        return ((string)(this[this.tablevVendor.MiddleNameColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'MiddleName\' in table \'vVendor\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevVendor.MiddleNameColumn] = value;
                }
            }
            
            public string LastName {
                get {
                    return ((string)(this[this.tablevVendor.LastNameColumn]));
                }
                set {
                    this[this.tablevVendor.LastNameColumn] = value;
                }
            }
            
            public string Suffix {
                get {
                    try {
                        return ((string)(this[this.tablevVendor.SuffixColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Suffix\' in table \'vVendor\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevVendor.SuffixColumn] = value;
                }
            }
            
            public string Phone {
                get {
                    try {
                        return ((string)(this[this.tablevVendor.PhoneColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Phone\' in table \'vVendor\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevVendor.PhoneColumn] = value;
                }
            }
            
            public string EmailAddress {
                get {
                    try {
                        return ((string)(this[this.tablevVendor.EmailAddressColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'EmailAddress\' in table \'vVendor\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevVendor.EmailAddressColumn] = value;
                }
            }
            
            public int EmailPromotion {
                get {
                    return ((int)(this[this.tablevVendor.EmailPromotionColumn]));
                }
                set {
                    this[this.tablevVendor.EmailPromotionColumn] = value;
                }
            }
            
            public string AddressLine1 {
                get {
                    return ((string)(this[this.tablevVendor.AddressLine1Column]));
                }
                set {
                    this[this.tablevVendor.AddressLine1Column] = value;
                }
            }
            
            public string AddressLine2 {
                get {
                    try {
                        return ((string)(this[this.tablevVendor.AddressLine2Column]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'AddressLine2\' in table \'vVendor\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevVendor.AddressLine2Column] = value;
                }
            }
            
            public string City {
                get {
                    return ((string)(this[this.tablevVendor.CityColumn]));
                }
                set {
                    this[this.tablevVendor.CityColumn] = value;
                }
            }
            
            public string StateProvinceName {
                get {
                    return ((string)(this[this.tablevVendor.StateProvinceNameColumn]));
                }
                set {
                    this[this.tablevVendor.StateProvinceNameColumn] = value;
                }
            }
            
            public string PostalCode {
                get {
                    return ((string)(this[this.tablevVendor.PostalCodeColumn]));
                }
                set {
                    this[this.tablevVendor.PostalCodeColumn] = value;
                }
            }
            
            public string CountryRegionName {
                get {
                    return ((string)(this[this.tablevVendor.CountryRegionNameColumn]));
                }
                set {
                    this[this.tablevVendor.CountryRegionNameColumn] = value;
                }
            }
            
            public bool IsTitleNull() {
                return this.IsNull(this.tablevVendor.TitleColumn);
            }
            
            public void SetTitleNull() {
                this[this.tablevVendor.TitleColumn] = System.Convert.DBNull;
            }
            
            public bool IsMiddleNameNull() {
                return this.IsNull(this.tablevVendor.MiddleNameColumn);
            }
            
            public void SetMiddleNameNull() {
                this[this.tablevVendor.MiddleNameColumn] = System.Convert.DBNull;
            }
            
            public bool IsSuffixNull() {
                return this.IsNull(this.tablevVendor.SuffixColumn);
            }
            
            public void SetSuffixNull() {
                this[this.tablevVendor.SuffixColumn] = System.Convert.DBNull;
            }
            
            public bool IsPhoneNull() {
                return this.IsNull(this.tablevVendor.PhoneColumn);
            }
            
            public void SetPhoneNull() {
                this[this.tablevVendor.PhoneColumn] = System.Convert.DBNull;
            }
            
            public bool IsEmailAddressNull() {
                return this.IsNull(this.tablevVendor.EmailAddressColumn);
            }
            
            public void SetEmailAddressNull() {
                this[this.tablevVendor.EmailAddressColumn] = System.Convert.DBNull;
            }
            
            public bool IsAddressLine2Null() {
                return this.IsNull(this.tablevVendor.AddressLine2Column);
            }
            
            public void SetAddressLine2Null() {
                this[this.tablevVendor.AddressLine2Column] = System.Convert.DBNull;
            }
        }
        
        public partial class vIndividualRow : System.Data.DataRow {
            
            private vIndividualDataTable tablevIndividual;
            
            internal vIndividualRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tablevIndividual = ((vIndividualDataTable)(this.Table));
            }
            
            public int CustomerID {
                get {
                    return ((int)(this[this.tablevIndividual.CustomerIDColumn]));
                }
                set {
                    this[this.tablevIndividual.CustomerIDColumn] = value;
                }
            }
            
            public string Title {
                get {
                    try {
                        return ((string)(this[this.tablevIndividual.TitleColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Title\' in table \'vIndividual\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevIndividual.TitleColumn] = value;
                }
            }
            
            public string FirstName {
                get {
                    return ((string)(this[this.tablevIndividual.FirstNameColumn]));
                }
                set {
                    this[this.tablevIndividual.FirstNameColumn] = value;
                }
            }
            
            public string MiddleName {
                get {
                    try {
                        return ((string)(this[this.tablevIndividual.MiddleNameColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'MiddleName\' in table \'vIndividual\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevIndividual.MiddleNameColumn] = value;
                }
            }
            
            public string LastName {
                get {
                    return ((string)(this[this.tablevIndividual.LastNameColumn]));
                }
                set {
                    this[this.tablevIndividual.LastNameColumn] = value;
                }
            }
            
            public string Suffix {
                get {
                    try {
                        return ((string)(this[this.tablevIndividual.SuffixColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Suffix\' in table \'vIndividual\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevIndividual.SuffixColumn] = value;
                }
            }
            
            public string Phone {
                get {
                    try {
                        return ((string)(this[this.tablevIndividual.PhoneColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Phone\' in table \'vIndividual\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevIndividual.PhoneColumn] = value;
                }
            }
            
            public string EmailAddress {
                get {
                    try {
                        return ((string)(this[this.tablevIndividual.EmailAddressColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'EmailAddress\' in table \'vIndividual\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevIndividual.EmailAddressColumn] = value;
                }
            }
            
            public int EmailPromotion {
                get {
                    return ((int)(this[this.tablevIndividual.EmailPromotionColumn]));
                }
                set {
                    this[this.tablevIndividual.EmailPromotionColumn] = value;
                }
            }
            
            public string AddressLine1 {
                get {
                    return ((string)(this[this.tablevIndividual.AddressLine1Column]));
                }
                set {
                    this[this.tablevIndividual.AddressLine1Column] = value;
                }
            }
            
            public string AddressLine2 {
                get {
                    try {
                        return ((string)(this[this.tablevIndividual.AddressLine2Column]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'AddressLine2\' in table \'vIndividual\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevIndividual.AddressLine2Column] = value;
                }
            }
            
            public string City {
                get {
                    return ((string)(this[this.tablevIndividual.CityColumn]));
                }
                set {
                    this[this.tablevIndividual.CityColumn] = value;
                }
            }
            
            public string StateProvinceName {
                get {
                    return ((string)(this[this.tablevIndividual.StateProvinceNameColumn]));
                }
                set {
                    this[this.tablevIndividual.StateProvinceNameColumn] = value;
                }
            }
            
            public string PostalCode {
                get {
                    return ((string)(this[this.tablevIndividual.PostalCodeColumn]));
                }
                set {
                    this[this.tablevIndividual.PostalCodeColumn] = value;
                }
            }
            
            public string CountryRegionName {
                get {
                    return ((string)(this[this.tablevIndividual.CountryRegionNameColumn]));
                }
                set {
                    this[this.tablevIndividual.CountryRegionNameColumn] = value;
                }
            }
            
            public string Demographics {
                get {
                    try {
                        return ((string)(this[this.tablevIndividual.DemographicsColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Demographics\' in table \'vIndividual\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevIndividual.DemographicsColumn] = value;
                }
            }
            
            public bool IsTitleNull() {
                return this.IsNull(this.tablevIndividual.TitleColumn);
            }
            
            public void SetTitleNull() {
                this[this.tablevIndividual.TitleColumn] = System.Convert.DBNull;
            }
            
            public bool IsMiddleNameNull() {
                return this.IsNull(this.tablevIndividual.MiddleNameColumn);
            }
            
            public void SetMiddleNameNull() {
                this[this.tablevIndividual.MiddleNameColumn] = System.Convert.DBNull;
            }
            
            public bool IsSuffixNull() {
                return this.IsNull(this.tablevIndividual.SuffixColumn);
            }
            
            public void SetSuffixNull() {
                this[this.tablevIndividual.SuffixColumn] = System.Convert.DBNull;
            }
            
            public bool IsPhoneNull() {
                return this.IsNull(this.tablevIndividual.PhoneColumn);
            }
            
            public void SetPhoneNull() {
                this[this.tablevIndividual.PhoneColumn] = System.Convert.DBNull;
            }
            
            public bool IsEmailAddressNull() {
                return this.IsNull(this.tablevIndividual.EmailAddressColumn);
            }
            
            public void SetEmailAddressNull() {
                this[this.tablevIndividual.EmailAddressColumn] = System.Convert.DBNull;
            }
            
            public bool IsAddressLine2Null() {
                return this.IsNull(this.tablevIndividual.AddressLine2Column);
            }
            
            public void SetAddressLine2Null() {
                this[this.tablevIndividual.AddressLine2Column] = System.Convert.DBNull;
            }
            
            public bool IsDemographicsNull() {
                return this.IsNull(this.tablevIndividual.DemographicsColumn);
            }
            
            public void SetDemographicsNull() {
                this[this.tablevIndividual.DemographicsColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class vIndividualDemographicsRow : System.Data.DataRow {
            
            private vIndividualDemographicsDataTable tablevIndividualDemographics;
            
            internal vIndividualDemographicsRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tablevIndividualDemographics = ((vIndividualDemographicsDataTable)(this.Table));
            }
            
            public int CustomerID {
                get {
                    return ((int)(this[this.tablevIndividualDemographics.CustomerIDColumn]));
                }
                set {
                    this[this.tablevIndividualDemographics.CustomerIDColumn] = value;
                }
            }
            
            public decimal TotalPurchaseYTD {
                get {
                    try {
                        return ((decimal)(this[this.tablevIndividualDemographics.TotalPurchaseYTDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'TotalPurchaseYTD\' in table \'vIndividualDemographics\' is DBN" +
                                "ull.", e);
                    }
                }
                set {
                    this[this.tablevIndividualDemographics.TotalPurchaseYTDColumn] = value;
                }
            }
            
            public System.DateTime DateFirstPurchase {
                get {
                    try {
                        return ((System.DateTime)(this[this.tablevIndividualDemographics.DateFirstPurchaseColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'DateFirstPurchase\' in table \'vIndividualDemographics\' is DB" +
                                "Null.", e);
                    }
                }
                set {
                    this[this.tablevIndividualDemographics.DateFirstPurchaseColumn] = value;
                }
            }
            
            public System.DateTime BirthDate {
                get {
                    try {
                        return ((System.DateTime)(this[this.tablevIndividualDemographics.BirthDateColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'BirthDate\' in table \'vIndividualDemographics\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevIndividualDemographics.BirthDateColumn] = value;
                }
            }
            
            public string MaritalStatus {
                get {
                    try {
                        return ((string)(this[this.tablevIndividualDemographics.MaritalStatusColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'MaritalStatus\' in table \'vIndividualDemographics\' is DBNull" +
                                ".", e);
                    }
                }
                set {
                    this[this.tablevIndividualDemographics.MaritalStatusColumn] = value;
                }
            }
            
            public string YearlyIncome {
                get {
                    try {
                        return ((string)(this[this.tablevIndividualDemographics.YearlyIncomeColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'YearlyIncome\' in table \'vIndividualDemographics\' is DBNull." +
                                "", e);
                    }
                }
                set {
                    this[this.tablevIndividualDemographics.YearlyIncomeColumn] = value;
                }
            }
            
            public string Gender {
                get {
                    try {
                        return ((string)(this[this.tablevIndividualDemographics.GenderColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Gender\' in table \'vIndividualDemographics\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevIndividualDemographics.GenderColumn] = value;
                }
            }
            
            public int TotalChildren {
                get {
                    try {
                        return ((int)(this[this.tablevIndividualDemographics.TotalChildrenColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'TotalChildren\' in table \'vIndividualDemographics\' is DBNull" +
                                ".", e);
                    }
                }
                set {
                    this[this.tablevIndividualDemographics.TotalChildrenColumn] = value;
                }
            }
            
            public int NumberChildrenAtHome {
                get {
                    try {
                        return ((int)(this[this.tablevIndividualDemographics.NumberChildrenAtHomeColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'NumberChildrenAtHome\' in table \'vIndividualDemographics\' is" +
                                " DBNull.", e);
                    }
                }
                set {
                    this[this.tablevIndividualDemographics.NumberChildrenAtHomeColumn] = value;
                }
            }
            
            public string Education {
                get {
                    try {
                        return ((string)(this[this.tablevIndividualDemographics.EducationColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Education\' in table \'vIndividualDemographics\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevIndividualDemographics.EducationColumn] = value;
                }
            }
            
            public string Occupation {
                get {
                    try {
                        return ((string)(this[this.tablevIndividualDemographics.OccupationColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Occupation\' in table \'vIndividualDemographics\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevIndividualDemographics.OccupationColumn] = value;
                }
            }
            
            public bool HomeOwnerFlag {
                get {
                    try {
                        return ((bool)(this[this.tablevIndividualDemographics.HomeOwnerFlagColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'HomeOwnerFlag\' in table \'vIndividualDemographics\' is DBNull" +
                                ".", e);
                    }
                }
                set {
                    this[this.tablevIndividualDemographics.HomeOwnerFlagColumn] = value;
                }
            }
            
            public int NumberCarsOwned {
                get {
                    try {
                        return ((int)(this[this.tablevIndividualDemographics.NumberCarsOwnedColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'NumberCarsOwned\' in table \'vIndividualDemographics\' is DBNu" +
                                "ll.", e);
                    }
                }
                set {
                    this[this.tablevIndividualDemographics.NumberCarsOwnedColumn] = value;
                }
            }
            
            public string Hobby {
                get {
                    try {
                        return ((string)(this[this.tablevIndividualDemographics.HobbyColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Hobby\' in table \'vIndividualDemographics\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevIndividualDemographics.HobbyColumn] = value;
                }
            }
            
            public bool IsTotalPurchaseYTDNull() {
                return this.IsNull(this.tablevIndividualDemographics.TotalPurchaseYTDColumn);
            }
            
            public void SetTotalPurchaseYTDNull() {
                this[this.tablevIndividualDemographics.TotalPurchaseYTDColumn] = System.Convert.DBNull;
            }
            
            public bool IsDateFirstPurchaseNull() {
                return this.IsNull(this.tablevIndividualDemographics.DateFirstPurchaseColumn);
            }
            
            public void SetDateFirstPurchaseNull() {
                this[this.tablevIndividualDemographics.DateFirstPurchaseColumn] = System.Convert.DBNull;
            }
            
            public bool IsBirthDateNull() {
                return this.IsNull(this.tablevIndividualDemographics.BirthDateColumn);
            }
            
            public void SetBirthDateNull() {
                this[this.tablevIndividualDemographics.BirthDateColumn] = System.Convert.DBNull;
            }
            
            public bool IsMaritalStatusNull() {
                return this.IsNull(this.tablevIndividualDemographics.MaritalStatusColumn);
            }
            
            public void SetMaritalStatusNull() {
                this[this.tablevIndividualDemographics.MaritalStatusColumn] = System.Convert.DBNull;
            }
            
            public bool IsYearlyIncomeNull() {
                return this.IsNull(this.tablevIndividualDemographics.YearlyIncomeColumn);
            }
            
            public void SetYearlyIncomeNull() {
                this[this.tablevIndividualDemographics.YearlyIncomeColumn] = System.Convert.DBNull;
            }
            
            public bool IsGenderNull() {
                return this.IsNull(this.tablevIndividualDemographics.GenderColumn);
            }
            
            public void SetGenderNull() {
                this[this.tablevIndividualDemographics.GenderColumn] = System.Convert.DBNull;
            }
            
            public bool IsTotalChildrenNull() {
                return this.IsNull(this.tablevIndividualDemographics.TotalChildrenColumn);
            }
            
            public void SetTotalChildrenNull() {
                this[this.tablevIndividualDemographics.TotalChildrenColumn] = System.Convert.DBNull;
            }
            
            public bool IsNumberChildrenAtHomeNull() {
                return this.IsNull(this.tablevIndividualDemographics.NumberChildrenAtHomeColumn);
            }
            
            public void SetNumberChildrenAtHomeNull() {
                this[this.tablevIndividualDemographics.NumberChildrenAtHomeColumn] = System.Convert.DBNull;
            }
            
            public bool IsEducationNull() {
                return this.IsNull(this.tablevIndividualDemographics.EducationColumn);
            }
            
            public void SetEducationNull() {
                this[this.tablevIndividualDemographics.EducationColumn] = System.Convert.DBNull;
            }
            
            public bool IsOccupationNull() {
                return this.IsNull(this.tablevIndividualDemographics.OccupationColumn);
            }
            
            public void SetOccupationNull() {
                this[this.tablevIndividualDemographics.OccupationColumn] = System.Convert.DBNull;
            }
            
            public bool IsHomeOwnerFlagNull() {
                return this.IsNull(this.tablevIndividualDemographics.HomeOwnerFlagColumn);
            }
            
            public void SetHomeOwnerFlagNull() {
                this[this.tablevIndividualDemographics.HomeOwnerFlagColumn] = System.Convert.DBNull;
            }
            
            public bool IsNumberCarsOwnedNull() {
                return this.IsNull(this.tablevIndividualDemographics.NumberCarsOwnedColumn);
            }
            
            public void SetNumberCarsOwnedNull() {
                this[this.tablevIndividualDemographics.NumberCarsOwnedColumn] = System.Convert.DBNull;
            }
            
            public bool IsHobbyNull() {
                return this.IsNull(this.tablevIndividualDemographics.HobbyColumn);
            }
            
            public void SetHobbyNull() {
                this[this.tablevIndividualDemographics.HobbyColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class vSalesPersonRow : System.Data.DataRow {
            
            private vSalesPersonDataTable tablevSalesPerson;
            
            internal vSalesPersonRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tablevSalesPerson = ((vSalesPersonDataTable)(this.Table));
            }
            
            public int SalesPersonID {
                get {
                    return ((int)(this[this.tablevSalesPerson.SalesPersonIDColumn]));
                }
                set {
                    this[this.tablevSalesPerson.SalesPersonIDColumn] = value;
                }
            }
            
            public string Title {
                get {
                    try {
                        return ((string)(this[this.tablevSalesPerson.TitleColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Title\' in table \'vSalesPerson\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevSalesPerson.TitleColumn] = value;
                }
            }
            
            public string FirstName {
                get {
                    return ((string)(this[this.tablevSalesPerson.FirstNameColumn]));
                }
                set {
                    this[this.tablevSalesPerson.FirstNameColumn] = value;
                }
            }
            
            public string MiddleName {
                get {
                    try {
                        return ((string)(this[this.tablevSalesPerson.MiddleNameColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'MiddleName\' in table \'vSalesPerson\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevSalesPerson.MiddleNameColumn] = value;
                }
            }
            
            public string LastName {
                get {
                    return ((string)(this[this.tablevSalesPerson.LastNameColumn]));
                }
                set {
                    this[this.tablevSalesPerson.LastNameColumn] = value;
                }
            }
            
            public string Suffix {
                get {
                    try {
                        return ((string)(this[this.tablevSalesPerson.SuffixColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Suffix\' in table \'vSalesPerson\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevSalesPerson.SuffixColumn] = value;
                }
            }
            
            public string JobTitle {
                get {
                    return ((string)(this[this.tablevSalesPerson.JobTitleColumn]));
                }
                set {
                    this[this.tablevSalesPerson.JobTitleColumn] = value;
                }
            }
            
            public string Phone {
                get {
                    try {
                        return ((string)(this[this.tablevSalesPerson.PhoneColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Phone\' in table \'vSalesPerson\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevSalesPerson.PhoneColumn] = value;
                }
            }
            
            public string EmailAddress {
                get {
                    try {
                        return ((string)(this[this.tablevSalesPerson.EmailAddressColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'EmailAddress\' in table \'vSalesPerson\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevSalesPerson.EmailAddressColumn] = value;
                }
            }
            
            public int EmailPromotion {
                get {
                    return ((int)(this[this.tablevSalesPerson.EmailPromotionColumn]));
                }
                set {
                    this[this.tablevSalesPerson.EmailPromotionColumn] = value;
                }
            }
            
            public string AddressLine1 {
                get {
                    return ((string)(this[this.tablevSalesPerson.AddressLine1Column]));
                }
                set {
                    this[this.tablevSalesPerson.AddressLine1Column] = value;
                }
            }
            
            public string AddressLine2 {
                get {
                    try {
                        return ((string)(this[this.tablevSalesPerson.AddressLine2Column]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'AddressLine2\' in table \'vSalesPerson\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevSalesPerson.AddressLine2Column] = value;
                }
            }
            
            public string City {
                get {
                    return ((string)(this[this.tablevSalesPerson.CityColumn]));
                }
                set {
                    this[this.tablevSalesPerson.CityColumn] = value;
                }
            }
            
            public string StateProvinceName {
                get {
                    return ((string)(this[this.tablevSalesPerson.StateProvinceNameColumn]));
                }
                set {
                    this[this.tablevSalesPerson.StateProvinceNameColumn] = value;
                }
            }
            
            public string PostalCode {
                get {
                    return ((string)(this[this.tablevSalesPerson.PostalCodeColumn]));
                }
                set {
                    this[this.tablevSalesPerson.PostalCodeColumn] = value;
                }
            }
            
            public string CountryRegionName {
                get {
                    return ((string)(this[this.tablevSalesPerson.CountryRegionNameColumn]));
                }
                set {
                    this[this.tablevSalesPerson.CountryRegionNameColumn] = value;
                }
            }
            
            public string TerritoryName {
                get {
                    try {
                        return ((string)(this[this.tablevSalesPerson.TerritoryNameColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'TerritoryName\' in table \'vSalesPerson\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevSalesPerson.TerritoryNameColumn] = value;
                }
            }
            
            public string TerritoryGroup {
                get {
                    try {
                        return ((string)(this[this.tablevSalesPerson.TerritoryGroupColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'TerritoryGroup\' in table \'vSalesPerson\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevSalesPerson.TerritoryGroupColumn] = value;
                }
            }
            
            public decimal SalesQuota {
                get {
                    try {
                        return ((decimal)(this[this.tablevSalesPerson.SalesQuotaColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'SalesQuota\' in table \'vSalesPerson\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevSalesPerson.SalesQuotaColumn] = value;
                }
            }
            
            public decimal SalesYTD {
                get {
                    return ((decimal)(this[this.tablevSalesPerson.SalesYTDColumn]));
                }
                set {
                    this[this.tablevSalesPerson.SalesYTDColumn] = value;
                }
            }
            
            public decimal SalesLastYear {
                get {
                    return ((decimal)(this[this.tablevSalesPerson.SalesLastYearColumn]));
                }
                set {
                    this[this.tablevSalesPerson.SalesLastYearColumn] = value;
                }
            }
            
            public bool IsTitleNull() {
                return this.IsNull(this.tablevSalesPerson.TitleColumn);
            }
            
            public void SetTitleNull() {
                this[this.tablevSalesPerson.TitleColumn] = System.Convert.DBNull;
            }
            
            public bool IsMiddleNameNull() {
                return this.IsNull(this.tablevSalesPerson.MiddleNameColumn);
            }
            
            public void SetMiddleNameNull() {
                this[this.tablevSalesPerson.MiddleNameColumn] = System.Convert.DBNull;
            }
            
            public bool IsSuffixNull() {
                return this.IsNull(this.tablevSalesPerson.SuffixColumn);
            }
            
            public void SetSuffixNull() {
                this[this.tablevSalesPerson.SuffixColumn] = System.Convert.DBNull;
            }
            
            public bool IsPhoneNull() {
                return this.IsNull(this.tablevSalesPerson.PhoneColumn);
            }
            
            public void SetPhoneNull() {
                this[this.tablevSalesPerson.PhoneColumn] = System.Convert.DBNull;
            }
            
            public bool IsEmailAddressNull() {
                return this.IsNull(this.tablevSalesPerson.EmailAddressColumn);
            }
            
            public void SetEmailAddressNull() {
                this[this.tablevSalesPerson.EmailAddressColumn] = System.Convert.DBNull;
            }
            
            public bool IsAddressLine2Null() {
                return this.IsNull(this.tablevSalesPerson.AddressLine2Column);
            }
            
            public void SetAddressLine2Null() {
                this[this.tablevSalesPerson.AddressLine2Column] = System.Convert.DBNull;
            }
            
            public bool IsTerritoryNameNull() {
                return this.IsNull(this.tablevSalesPerson.TerritoryNameColumn);
            }
            
            public void SetTerritoryNameNull() {
                this[this.tablevSalesPerson.TerritoryNameColumn] = System.Convert.DBNull;
            }
            
            public bool IsTerritoryGroupNull() {
                return this.IsNull(this.tablevSalesPerson.TerritoryGroupColumn);
            }
            
            public void SetTerritoryGroupNull() {
                this[this.tablevSalesPerson.TerritoryGroupColumn] = System.Convert.DBNull;
            }
            
            public bool IsSalesQuotaNull() {
                return this.IsNull(this.tablevSalesPerson.SalesQuotaColumn);
            }
            
            public void SetSalesQuotaNull() {
                this[this.tablevSalesPerson.SalesQuotaColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class vSalesPersonSalesByFiscalYearsRow : System.Data.DataRow {
            
            private vSalesPersonSalesByFiscalYearsDataTable tablevSalesPersonSalesByFiscalYears;
            
            internal vSalesPersonSalesByFiscalYearsRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tablevSalesPersonSalesByFiscalYears = ((vSalesPersonSalesByFiscalYearsDataTable)(this.Table));
            }
            
            public int SalesPersonID {
                get {
                    try {
                        return ((int)(this[this.tablevSalesPersonSalesByFiscalYears.SalesPersonIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'SalesPersonID\' in table \'vSalesPersonSalesByFiscalYears\' is" +
                                " DBNull.", e);
                    }
                }
                set {
                    this[this.tablevSalesPersonSalesByFiscalYears.SalesPersonIDColumn] = value;
                }
            }
            
            public string FullName {
                get {
                    try {
                        return ((string)(this[this.tablevSalesPersonSalesByFiscalYears.FullNameColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'FullName\' in table \'vSalesPersonSalesByFiscalYears\' is DBNu" +
                                "ll.", e);
                    }
                }
                set {
                    this[this.tablevSalesPersonSalesByFiscalYears.FullNameColumn] = value;
                }
            }
            
            public string Title {
                get {
                    return ((string)(this[this.tablevSalesPersonSalesByFiscalYears.TitleColumn]));
                }
                set {
                    this[this.tablevSalesPersonSalesByFiscalYears.TitleColumn] = value;
                }
            }
            
            public string SalesTerritory {
                get {
                    return ((string)(this[this.tablevSalesPersonSalesByFiscalYears.SalesTerritoryColumn]));
                }
                set {
                    this[this.tablevSalesPersonSalesByFiscalYears.SalesTerritoryColumn] = value;
                }
            }
            
            public decimal _2002 {
                get {
                    try {
                        return ((decimal)(this[this.tablevSalesPersonSalesByFiscalYears._2002Column]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'2002\' in table \'vSalesPersonSalesByFiscalYears\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevSalesPersonSalesByFiscalYears._2002Column] = value;
                }
            }
            
            public decimal _2003 {
                get {
                    try {
                        return ((decimal)(this[this.tablevSalesPersonSalesByFiscalYears._2003Column]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'2003\' in table \'vSalesPersonSalesByFiscalYears\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevSalesPersonSalesByFiscalYears._2003Column] = value;
                }
            }
            
            public decimal _2004 {
                get {
                    try {
                        return ((decimal)(this[this.tablevSalesPersonSalesByFiscalYears._2004Column]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'2004\' in table \'vSalesPersonSalesByFiscalYears\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevSalesPersonSalesByFiscalYears._2004Column] = value;
                }
            }
            
            public bool IsSalesPersonIDNull() {
                return this.IsNull(this.tablevSalesPersonSalesByFiscalYears.SalesPersonIDColumn);
            }
            
            public void SetSalesPersonIDNull() {
                this[this.tablevSalesPersonSalesByFiscalYears.SalesPersonIDColumn] = System.Convert.DBNull;
            }
            
            public bool IsFullNameNull() {
                return this.IsNull(this.tablevSalesPersonSalesByFiscalYears.FullNameColumn);
            }
            
            public void SetFullNameNull() {
                this[this.tablevSalesPersonSalesByFiscalYears.FullNameColumn] = System.Convert.DBNull;
            }
            
            public bool Is_2002Null() {
                return this.IsNull(this.tablevSalesPersonSalesByFiscalYears._2002Column);
            }
            
            public void Set_2002Null() {
                this[this.tablevSalesPersonSalesByFiscalYears._2002Column] = System.Convert.DBNull;
            }
            
            public bool Is_2003Null() {
                return this.IsNull(this.tablevSalesPersonSalesByFiscalYears._2003Column);
            }
            
            public void Set_2003Null() {
                this[this.tablevSalesPersonSalesByFiscalYears._2003Column] = System.Convert.DBNull;
            }
            
            public bool Is_2004Null() {
                return this.IsNull(this.tablevSalesPersonSalesByFiscalYears._2004Column);
            }
            
            public void Set_2004Null() {
                this[this.tablevSalesPersonSalesByFiscalYears._2004Column] = System.Convert.DBNull;
            }
        }
        
        public partial class vStoreWithDemographicsRow : System.Data.DataRow {
            
            private vStoreWithDemographicsDataTable tablevStoreWithDemographics;
            
            internal vStoreWithDemographicsRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tablevStoreWithDemographics = ((vStoreWithDemographicsDataTable)(this.Table));
            }
            
            public int CustomerID {
                get {
                    return ((int)(this[this.tablevStoreWithDemographics.CustomerIDColumn]));
                }
                set {
                    this[this.tablevStoreWithDemographics.CustomerIDColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tablevStoreWithDemographics.NameColumn]));
                }
                set {
                    this[this.tablevStoreWithDemographics.NameColumn] = value;
                }
            }
            
            public string ContactType {
                get {
                    return ((string)(this[this.tablevStoreWithDemographics.ContactTypeColumn]));
                }
                set {
                    this[this.tablevStoreWithDemographics.ContactTypeColumn] = value;
                }
            }
            
            public string Title {
                get {
                    try {
                        return ((string)(this[this.tablevStoreWithDemographics.TitleColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Title\' in table \'vStoreWithDemographics\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevStoreWithDemographics.TitleColumn] = value;
                }
            }
            
            public string FirstName {
                get {
                    return ((string)(this[this.tablevStoreWithDemographics.FirstNameColumn]));
                }
                set {
                    this[this.tablevStoreWithDemographics.FirstNameColumn] = value;
                }
            }
            
            public string MiddleName {
                get {
                    try {
                        return ((string)(this[this.tablevStoreWithDemographics.MiddleNameColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'MiddleName\' in table \'vStoreWithDemographics\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevStoreWithDemographics.MiddleNameColumn] = value;
                }
            }
            
            public string LastName {
                get {
                    return ((string)(this[this.tablevStoreWithDemographics.LastNameColumn]));
                }
                set {
                    this[this.tablevStoreWithDemographics.LastNameColumn] = value;
                }
            }
            
            public string Suffix {
                get {
                    try {
                        return ((string)(this[this.tablevStoreWithDemographics.SuffixColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Suffix\' in table \'vStoreWithDemographics\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevStoreWithDemographics.SuffixColumn] = value;
                }
            }
            
            public string Phone {
                get {
                    try {
                        return ((string)(this[this.tablevStoreWithDemographics.PhoneColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Phone\' in table \'vStoreWithDemographics\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevStoreWithDemographics.PhoneColumn] = value;
                }
            }
            
            public string EmailAddress {
                get {
                    try {
                        return ((string)(this[this.tablevStoreWithDemographics.EmailAddressColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'EmailAddress\' in table \'vStoreWithDemographics\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevStoreWithDemographics.EmailAddressColumn] = value;
                }
            }
            
            public int EmailPromotion {
                get {
                    return ((int)(this[this.tablevStoreWithDemographics.EmailPromotionColumn]));
                }
                set {
                    this[this.tablevStoreWithDemographics.EmailPromotionColumn] = value;
                }
            }
            
            public string AddressLine1 {
                get {
                    return ((string)(this[this.tablevStoreWithDemographics.AddressLine1Column]));
                }
                set {
                    this[this.tablevStoreWithDemographics.AddressLine1Column] = value;
                }
            }
            
            public string AddressLine2 {
                get {
                    try {
                        return ((string)(this[this.tablevStoreWithDemographics.AddressLine2Column]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'AddressLine2\' in table \'vStoreWithDemographics\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevStoreWithDemographics.AddressLine2Column] = value;
                }
            }
            
            public string City {
                get {
                    return ((string)(this[this.tablevStoreWithDemographics.CityColumn]));
                }
                set {
                    this[this.tablevStoreWithDemographics.CityColumn] = value;
                }
            }
            
            public string StateProvinceName {
                get {
                    return ((string)(this[this.tablevStoreWithDemographics.StateProvinceNameColumn]));
                }
                set {
                    this[this.tablevStoreWithDemographics.StateProvinceNameColumn] = value;
                }
            }
            
            public string PostalCode {
                get {
                    return ((string)(this[this.tablevStoreWithDemographics.PostalCodeColumn]));
                }
                set {
                    this[this.tablevStoreWithDemographics.PostalCodeColumn] = value;
                }
            }
            
            public string CountryRegionName {
                get {
                    return ((string)(this[this.tablevStoreWithDemographics.CountryRegionNameColumn]));
                }
                set {
                    this[this.tablevStoreWithDemographics.CountryRegionNameColumn] = value;
                }
            }
            
            public decimal AnnualSales {
                get {
                    try {
                        return ((decimal)(this[this.tablevStoreWithDemographics.AnnualSalesColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'AnnualSales\' in table \'vStoreWithDemographics\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevStoreWithDemographics.AnnualSalesColumn] = value;
                }
            }
            
            public decimal AnnualRevenue {
                get {
                    try {
                        return ((decimal)(this[this.tablevStoreWithDemographics.AnnualRevenueColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'AnnualRevenue\' in table \'vStoreWithDemographics\' is DBNull." +
                                "", e);
                    }
                }
                set {
                    this[this.tablevStoreWithDemographics.AnnualRevenueColumn] = value;
                }
            }
            
            public string BankName {
                get {
                    try {
                        return ((string)(this[this.tablevStoreWithDemographics.BankNameColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'BankName\' in table \'vStoreWithDemographics\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevStoreWithDemographics.BankNameColumn] = value;
                }
            }
            
            public string BusinessType {
                get {
                    try {
                        return ((string)(this[this.tablevStoreWithDemographics.BusinessTypeColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'BusinessType\' in table \'vStoreWithDemographics\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevStoreWithDemographics.BusinessTypeColumn] = value;
                }
            }
            
            public int YearOpened {
                get {
                    try {
                        return ((int)(this[this.tablevStoreWithDemographics.YearOpenedColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'YearOpened\' in table \'vStoreWithDemographics\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevStoreWithDemographics.YearOpenedColumn] = value;
                }
            }
            
            public string Specialty {
                get {
                    try {
                        return ((string)(this[this.tablevStoreWithDemographics.SpecialtyColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Specialty\' in table \'vStoreWithDemographics\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevStoreWithDemographics.SpecialtyColumn] = value;
                }
            }
            
            public int SquareFeet {
                get {
                    try {
                        return ((int)(this[this.tablevStoreWithDemographics.SquareFeetColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'SquareFeet\' in table \'vStoreWithDemographics\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevStoreWithDemographics.SquareFeetColumn] = value;
                }
            }
            
            public string Brands {
                get {
                    try {
                        return ((string)(this[this.tablevStoreWithDemographics.BrandsColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Brands\' in table \'vStoreWithDemographics\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevStoreWithDemographics.BrandsColumn] = value;
                }
            }
            
            public string Internet {
                get {
                    try {
                        return ((string)(this[this.tablevStoreWithDemographics.InternetColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Internet\' in table \'vStoreWithDemographics\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tablevStoreWithDemographics.InternetColumn] = value;
                }
            }
            
            public int NumberEmployees {
                get {
                    try {
                        return ((int)(this[this.tablevStoreWithDemographics.NumberEmployeesColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'NumberEmployees\' in table \'vStoreWithDemographics\' is DBNul" +
                                "l.", e);
                    }
                }
                set {
                    this[this.tablevStoreWithDemographics.NumberEmployeesColumn] = value;
                }
            }
            
            public bool IsTitleNull() {
                return this.IsNull(this.tablevStoreWithDemographics.TitleColumn);
            }
            
            public void SetTitleNull() {
                this[this.tablevStoreWithDemographics.TitleColumn] = System.Convert.DBNull;
            }
            
            public bool IsMiddleNameNull() {
                return this.IsNull(this.tablevStoreWithDemographics.MiddleNameColumn);
            }
            
            public void SetMiddleNameNull() {
                this[this.tablevStoreWithDemographics.MiddleNameColumn] = System.Convert.DBNull;
            }
            
            public bool IsSuffixNull() {
                return this.IsNull(this.tablevStoreWithDemographics.SuffixColumn);
            }
            
            public void SetSuffixNull() {
                this[this.tablevStoreWithDemographics.SuffixColumn] = System.Convert.DBNull;
            }
            
            public bool IsPhoneNull() {
                return this.IsNull(this.tablevStoreWithDemographics.PhoneColumn);
            }
            
            public void SetPhoneNull() {
                this[this.tablevStoreWithDemographics.PhoneColumn] = System.Convert.DBNull;
            }
            
            public bool IsEmailAddressNull() {
                return this.IsNull(this.tablevStoreWithDemographics.EmailAddressColumn);
            }
            
            public void SetEmailAddressNull() {
                this[this.tablevStoreWithDemographics.EmailAddressColumn] = System.Convert.DBNull;
            }
            
            public bool IsAddressLine2Null() {
                return this.IsNull(this.tablevStoreWithDemographics.AddressLine2Column);
            }
            
            public void SetAddressLine2Null() {
                this[this.tablevStoreWithDemographics.AddressLine2Column] = System.Convert.DBNull;
            }
            
            public bool IsAnnualSalesNull() {
                return this.IsNull(this.tablevStoreWithDemographics.AnnualSalesColumn);
            }
            
            public void SetAnnualSalesNull() {
                this[this.tablevStoreWithDemographics.AnnualSalesColumn] = System.Convert.DBNull;
            }
            
            public bool IsAnnualRevenueNull() {
                return this.IsNull(this.tablevStoreWithDemographics.AnnualRevenueColumn);
            }
            
            public void SetAnnualRevenueNull() {
                this[this.tablevStoreWithDemographics.AnnualRevenueColumn] = System.Convert.DBNull;
            }
            
            public bool IsBankNameNull() {
                return this.IsNull(this.tablevStoreWithDemographics.BankNameColumn);
            }
            
            public void SetBankNameNull() {
                this[this.tablevStoreWithDemographics.BankNameColumn] = System.Convert.DBNull;
            }
            
            public bool IsBusinessTypeNull() {
                return this.IsNull(this.tablevStoreWithDemographics.BusinessTypeColumn);
            }
            
            public void SetBusinessTypeNull() {
                this[this.tablevStoreWithDemographics.BusinessTypeColumn] = System.Convert.DBNull;
            }
            
            public bool IsYearOpenedNull() {
                return this.IsNull(this.tablevStoreWithDemographics.YearOpenedColumn);
            }
            
            public void SetYearOpenedNull() {
                this[this.tablevStoreWithDemographics.YearOpenedColumn] = System.Convert.DBNull;
            }
            
            public bool IsSpecialtyNull() {
                return this.IsNull(this.tablevStoreWithDemographics.SpecialtyColumn);
            }
            
            public void SetSpecialtyNull() {
                this[this.tablevStoreWithDemographics.SpecialtyColumn] = System.Convert.DBNull;
            }
            
            public bool IsSquareFeetNull() {
                return this.IsNull(this.tablevStoreWithDemographics.SquareFeetColumn);
            }
            
            public void SetSquareFeetNull() {
                this[this.tablevStoreWithDemographics.SquareFeetColumn] = System.Convert.DBNull;
            }
            
            public bool IsBrandsNull() {
                return this.IsNull(this.tablevStoreWithDemographics.BrandsColumn);
            }
            
            public void SetBrandsNull() {
                this[this.tablevStoreWithDemographics.BrandsColumn] = System.Convert.DBNull;
            }
            
            public bool IsInternetNull() {
                return this.IsNull(this.tablevStoreWithDemographics.InternetColumn);
            }
            
            public void SetInternetNull() {
                this[this.tablevStoreWithDemographics.InternetColumn] = System.Convert.DBNull;
            }
            
            public bool IsNumberEmployeesNull() {
                return this.IsNull(this.tablevStoreWithDemographics.NumberEmployeesColumn);
            }
            
            public void SetNumberEmployeesNull() {
                this[this.tablevStoreWithDemographics.NumberEmployeesColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class uspGetBillOfMaterialsRow : System.Data.DataRow {
            
            private uspGetBillOfMaterialsDataTable tableuspGetBillOfMaterials;
            
            internal uspGetBillOfMaterialsRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableuspGetBillOfMaterials = ((uspGetBillOfMaterialsDataTable)(this.Table));
            }
            
            public int ProductAssemblyID {
                get {
                    try {
                        return ((int)(this[this.tableuspGetBillOfMaterials.ProductAssemblyIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ProductAssemblyID\' in table \'uspGetBillOfMaterials\' is DBNu" +
                                "ll.", e);
                    }
                }
                set {
                    this[this.tableuspGetBillOfMaterials.ProductAssemblyIDColumn] = value;
                }
            }
            
            public int ComponentID {
                get {
                    try {
                        return ((int)(this[this.tableuspGetBillOfMaterials.ComponentIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ComponentID\' in table \'uspGetBillOfMaterials\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableuspGetBillOfMaterials.ComponentIDColumn] = value;
                }
            }
            
            public string ComponentDesc {
                get {
                    try {
                        return ((string)(this[this.tableuspGetBillOfMaterials.ComponentDescColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ComponentDesc\' in table \'uspGetBillOfMaterials\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableuspGetBillOfMaterials.ComponentDescColumn] = value;
                }
            }
            
            public decimal TotalQuantity {
                get {
                    try {
                        return ((decimal)(this[this.tableuspGetBillOfMaterials.TotalQuantityColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'TotalQuantity\' in table \'uspGetBillOfMaterials\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableuspGetBillOfMaterials.TotalQuantityColumn] = value;
                }
            }
            
            public decimal StandardCost {
                get {
                    try {
                        return ((decimal)(this[this.tableuspGetBillOfMaterials.StandardCostColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'StandardCost\' in table \'uspGetBillOfMaterials\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableuspGetBillOfMaterials.StandardCostColumn] = value;
                }
            }
            
            public decimal ListPrice {
                get {
                    try {
                        return ((decimal)(this[this.tableuspGetBillOfMaterials.ListPriceColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ListPrice\' in table \'uspGetBillOfMaterials\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableuspGetBillOfMaterials.ListPriceColumn] = value;
                }
            }
            
            public short BOMLevel {
                get {
                    try {
                        return ((short)(this[this.tableuspGetBillOfMaterials.BOMLevelColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'BOMLevel\' in table \'uspGetBillOfMaterials\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableuspGetBillOfMaterials.BOMLevelColumn] = value;
                }
            }
            
            public int RecursionLevel {
                get {
                    try {
                        return ((int)(this[this.tableuspGetBillOfMaterials.RecursionLevelColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'RecursionLevel\' in table \'uspGetBillOfMaterials\' is DBNull." +
                                "", e);
                    }
                }
                set {
                    this[this.tableuspGetBillOfMaterials.RecursionLevelColumn] = value;
                }
            }
            
            public bool IsProductAssemblyIDNull() {
                return this.IsNull(this.tableuspGetBillOfMaterials.ProductAssemblyIDColumn);
            }
            
            public void SetProductAssemblyIDNull() {
                this[this.tableuspGetBillOfMaterials.ProductAssemblyIDColumn] = System.Convert.DBNull;
            }
            
            public bool IsComponentIDNull() {
                return this.IsNull(this.tableuspGetBillOfMaterials.ComponentIDColumn);
            }
            
            public void SetComponentIDNull() {
                this[this.tableuspGetBillOfMaterials.ComponentIDColumn] = System.Convert.DBNull;
            }
            
            public bool IsComponentDescNull() {
                return this.IsNull(this.tableuspGetBillOfMaterials.ComponentDescColumn);
            }
            
            public void SetComponentDescNull() {
                this[this.tableuspGetBillOfMaterials.ComponentDescColumn] = System.Convert.DBNull;
            }
            
            public bool IsTotalQuantityNull() {
                return this.IsNull(this.tableuspGetBillOfMaterials.TotalQuantityColumn);
            }
            
            public void SetTotalQuantityNull() {
                this[this.tableuspGetBillOfMaterials.TotalQuantityColumn] = System.Convert.DBNull;
            }
            
            public bool IsStandardCostNull() {
                return this.IsNull(this.tableuspGetBillOfMaterials.StandardCostColumn);
            }
            
            public void SetStandardCostNull() {
                this[this.tableuspGetBillOfMaterials.StandardCostColumn] = System.Convert.DBNull;
            }
            
            public bool IsListPriceNull() {
                return this.IsNull(this.tableuspGetBillOfMaterials.ListPriceColumn);
            }
            
            public void SetListPriceNull() {
                this[this.tableuspGetBillOfMaterials.ListPriceColumn] = System.Convert.DBNull;
            }
            
            public bool IsBOMLevelNull() {
                return this.IsNull(this.tableuspGetBillOfMaterials.BOMLevelColumn);
            }
            
            public void SetBOMLevelNull() {
                this[this.tableuspGetBillOfMaterials.BOMLevelColumn] = System.Convert.DBNull;
            }
            
            public bool IsRecursionLevelNull() {
                return this.IsNull(this.tableuspGetBillOfMaterials.RecursionLevelColumn);
            }
            
            public void SetRecursionLevelNull() {
                this[this.tableuspGetBillOfMaterials.RecursionLevelColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class uspGetEmployeeManagersRow : System.Data.DataRow {
            
            private uspGetEmployeeManagersDataTable tableuspGetEmployeeManagers;
            
            internal uspGetEmployeeManagersRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableuspGetEmployeeManagers = ((uspGetEmployeeManagersDataTable)(this.Table));
            }
            
            public int RecursionLevel {
                get {
                    try {
                        return ((int)(this[this.tableuspGetEmployeeManagers.RecursionLevelColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'RecursionLevel\' in table \'uspGetEmployeeManagers\' is DBNull" +
                                ".", e);
                    }
                }
                set {
                    this[this.tableuspGetEmployeeManagers.RecursionLevelColumn] = value;
                }
            }
            
            public int EmployeeID {
                get {
                    try {
                        return ((int)(this[this.tableuspGetEmployeeManagers.EmployeeIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'EmployeeID\' in table \'uspGetEmployeeManagers\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableuspGetEmployeeManagers.EmployeeIDColumn] = value;
                }
            }
            
            public string FirstName {
                get {
                    try {
                        return ((string)(this[this.tableuspGetEmployeeManagers.FirstNameColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'FirstName\' in table \'uspGetEmployeeManagers\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableuspGetEmployeeManagers.FirstNameColumn] = value;
                }
            }
            
            public string LastName {
                get {
                    try {
                        return ((string)(this[this.tableuspGetEmployeeManagers.LastNameColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'LastName\' in table \'uspGetEmployeeManagers\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableuspGetEmployeeManagers.LastNameColumn] = value;
                }
            }
            
            public int ManagerID {
                get {
                    try {
                        return ((int)(this[this.tableuspGetEmployeeManagers.ManagerIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ManagerID\' in table \'uspGetEmployeeManagers\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableuspGetEmployeeManagers.ManagerIDColumn] = value;
                }
            }
            
            public string ManagerFirstName {
                get {
                    return ((string)(this[this.tableuspGetEmployeeManagers.ManagerFirstNameColumn]));
                }
                set {
                    this[this.tableuspGetEmployeeManagers.ManagerFirstNameColumn] = value;
                }
            }
            
            public string ManagerLastName {
                get {
                    return ((string)(this[this.tableuspGetEmployeeManagers.ManagerLastNameColumn]));
                }
                set {
                    this[this.tableuspGetEmployeeManagers.ManagerLastNameColumn] = value;
                }
            }
            
            public bool IsRecursionLevelNull() {
                return this.IsNull(this.tableuspGetEmployeeManagers.RecursionLevelColumn);
            }
            
            public void SetRecursionLevelNull() {
                this[this.tableuspGetEmployeeManagers.RecursionLevelColumn] = System.Convert.DBNull;
            }
            
            public bool IsEmployeeIDNull() {
                return this.IsNull(this.tableuspGetEmployeeManagers.EmployeeIDColumn);
            }
            
            public void SetEmployeeIDNull() {
                this[this.tableuspGetEmployeeManagers.EmployeeIDColumn] = System.Convert.DBNull;
            }
            
            public bool IsFirstNameNull() {
                return this.IsNull(this.tableuspGetEmployeeManagers.FirstNameColumn);
            }
            
            public void SetFirstNameNull() {
                this[this.tableuspGetEmployeeManagers.FirstNameColumn] = System.Convert.DBNull;
            }
            
            public bool IsLastNameNull() {
                return this.IsNull(this.tableuspGetEmployeeManagers.LastNameColumn);
            }
            
            public void SetLastNameNull() {
                this[this.tableuspGetEmployeeManagers.LastNameColumn] = System.Convert.DBNull;
            }
            
            public bool IsManagerIDNull() {
                return this.IsNull(this.tableuspGetEmployeeManagers.ManagerIDColumn);
            }
            
            public void SetManagerIDNull() {
                this[this.tableuspGetEmployeeManagers.ManagerIDColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class uspGetManagerEmployeesRow : System.Data.DataRow {
            
            private uspGetManagerEmployeesDataTable tableuspGetManagerEmployees;
            
            internal uspGetManagerEmployeesRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableuspGetManagerEmployees = ((uspGetManagerEmployeesDataTable)(this.Table));
            }
            
            public int RecursionLevel {
                get {
                    try {
                        return ((int)(this[this.tableuspGetManagerEmployees.RecursionLevelColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'RecursionLevel\' in table \'uspGetManagerEmployees\' is DBNull" +
                                ".", e);
                    }
                }
                set {
                    this[this.tableuspGetManagerEmployees.RecursionLevelColumn] = value;
                }
            }
            
            public int ManagerID {
                get {
                    try {
                        return ((int)(this[this.tableuspGetManagerEmployees.ManagerIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ManagerID\' in table \'uspGetManagerEmployees\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableuspGetManagerEmployees.ManagerIDColumn] = value;
                }
            }
            
            public string ManagerFirstName {
                get {
                    return ((string)(this[this.tableuspGetManagerEmployees.ManagerFirstNameColumn]));
                }
                set {
                    this[this.tableuspGetManagerEmployees.ManagerFirstNameColumn] = value;
                }
            }
            
            public string ManagerLastName {
                get {
                    return ((string)(this[this.tableuspGetManagerEmployees.ManagerLastNameColumn]));
                }
                set {
                    this[this.tableuspGetManagerEmployees.ManagerLastNameColumn] = value;
                }
            }
            
            public int EmployeeID {
                get {
                    try {
                        return ((int)(this[this.tableuspGetManagerEmployees.EmployeeIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'EmployeeID\' in table \'uspGetManagerEmployees\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableuspGetManagerEmployees.EmployeeIDColumn] = value;
                }
            }
            
            public string FirstName {
                get {
                    try {
                        return ((string)(this[this.tableuspGetManagerEmployees.FirstNameColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'FirstName\' in table \'uspGetManagerEmployees\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableuspGetManagerEmployees.FirstNameColumn] = value;
                }
            }
            
            public string LastName {
                get {
                    try {
                        return ((string)(this[this.tableuspGetManagerEmployees.LastNameColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'LastName\' in table \'uspGetManagerEmployees\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableuspGetManagerEmployees.LastNameColumn] = value;
                }
            }
            
            public bool IsRecursionLevelNull() {
                return this.IsNull(this.tableuspGetManagerEmployees.RecursionLevelColumn);
            }
            
            public void SetRecursionLevelNull() {
                this[this.tableuspGetManagerEmployees.RecursionLevelColumn] = System.Convert.DBNull;
            }
            
            public bool IsManagerIDNull() {
                return this.IsNull(this.tableuspGetManagerEmployees.ManagerIDColumn);
            }
            
            public void SetManagerIDNull() {
                this[this.tableuspGetManagerEmployees.ManagerIDColumn] = System.Convert.DBNull;
            }
            
            public bool IsEmployeeIDNull() {
                return this.IsNull(this.tableuspGetManagerEmployees.EmployeeIDColumn);
            }
            
            public void SetEmployeeIDNull() {
                this[this.tableuspGetManagerEmployees.EmployeeIDColumn] = System.Convert.DBNull;
            }
            
            public bool IsFirstNameNull() {
                return this.IsNull(this.tableuspGetManagerEmployees.FirstNameColumn);
            }
            
            public void SetFirstNameNull() {
                this[this.tableuspGetManagerEmployees.FirstNameColumn] = System.Convert.DBNull;
            }
            
            public bool IsLastNameNull() {
                return this.IsNull(this.tableuspGetManagerEmployees.LastNameColumn);
            }
            
            public void SetLastNameNull() {
                this[this.tableuspGetManagerEmployees.LastNameColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class uspGetWhereUsedProductIDRow : System.Data.DataRow {
            
            private uspGetWhereUsedProductIDDataTable tableuspGetWhereUsedProductID;
            
            internal uspGetWhereUsedProductIDRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableuspGetWhereUsedProductID = ((uspGetWhereUsedProductIDDataTable)(this.Table));
            }
            
            public int ProductAssemblyID {
                get {
                    try {
                        return ((int)(this[this.tableuspGetWhereUsedProductID.ProductAssemblyIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ProductAssemblyID\' in table \'uspGetWhereUsedProductID\' is D" +
                                "BNull.", e);
                    }
                }
                set {
                    this[this.tableuspGetWhereUsedProductID.ProductAssemblyIDColumn] = value;
                }
            }
            
            public int ComponentID {
                get {
                    try {
                        return ((int)(this[this.tableuspGetWhereUsedProductID.ComponentIDColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ComponentID\' in table \'uspGetWhereUsedProductID\' is DBNull." +
                                "", e);
                    }
                }
                set {
                    this[this.tableuspGetWhereUsedProductID.ComponentIDColumn] = value;
                }
            }
            
            public string ComponentDesc {
                get {
                    try {
                        return ((string)(this[this.tableuspGetWhereUsedProductID.ComponentDescColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ComponentDesc\' in table \'uspGetWhereUsedProductID\' is DBNul" +
                                "l.", e);
                    }
                }
                set {
                    this[this.tableuspGetWhereUsedProductID.ComponentDescColumn] = value;
                }
            }
            
            public decimal TotalQuantity {
                get {
                    try {
                        return ((decimal)(this[this.tableuspGetWhereUsedProductID.TotalQuantityColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'TotalQuantity\' in table \'uspGetWhereUsedProductID\' is DBNul" +
                                "l.", e);
                    }
                }
                set {
                    this[this.tableuspGetWhereUsedProductID.TotalQuantityColumn] = value;
                }
            }
            
            public decimal StandardCost {
                get {
                    try {
                        return ((decimal)(this[this.tableuspGetWhereUsedProductID.StandardCostColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'StandardCost\' in table \'uspGetWhereUsedProductID\' is DBNull" +
                                ".", e);
                    }
                }
                set {
                    this[this.tableuspGetWhereUsedProductID.StandardCostColumn] = value;
                }
            }
            
            public decimal ListPrice {
                get {
                    try {
                        return ((decimal)(this[this.tableuspGetWhereUsedProductID.ListPriceColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ListPrice\' in table \'uspGetWhereUsedProductID\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableuspGetWhereUsedProductID.ListPriceColumn] = value;
                }
            }
            
            public short BOMLevel {
                get {
                    try {
                        return ((short)(this[this.tableuspGetWhereUsedProductID.BOMLevelColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'BOMLevel\' in table \'uspGetWhereUsedProductID\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableuspGetWhereUsedProductID.BOMLevelColumn] = value;
                }
            }
            
            public int RecursionLevel {
                get {
                    try {
                        return ((int)(this[this.tableuspGetWhereUsedProductID.RecursionLevelColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'RecursionLevel\' in table \'uspGetWhereUsedProductID\' is DBNu" +
                                "ll.", e);
                    }
                }
                set {
                    this[this.tableuspGetWhereUsedProductID.RecursionLevelColumn] = value;
                }
            }
            
            public bool IsProductAssemblyIDNull() {
                return this.IsNull(this.tableuspGetWhereUsedProductID.ProductAssemblyIDColumn);
            }
            
            public void SetProductAssemblyIDNull() {
                this[this.tableuspGetWhereUsedProductID.ProductAssemblyIDColumn] = System.Convert.DBNull;
            }
            
            public bool IsComponentIDNull() {
                return this.IsNull(this.tableuspGetWhereUsedProductID.ComponentIDColumn);
            }
            
            public void SetComponentIDNull() {
                this[this.tableuspGetWhereUsedProductID.ComponentIDColumn] = System.Convert.DBNull;
            }
            
            public bool IsComponentDescNull() {
                return this.IsNull(this.tableuspGetWhereUsedProductID.ComponentDescColumn);
            }
            
            public void SetComponentDescNull() {
                this[this.tableuspGetWhereUsedProductID.ComponentDescColumn] = System.Convert.DBNull;
            }
            
            public bool IsTotalQuantityNull() {
                return this.IsNull(this.tableuspGetWhereUsedProductID.TotalQuantityColumn);
            }
            
            public void SetTotalQuantityNull() {
                this[this.tableuspGetWhereUsedProductID.TotalQuantityColumn] = System.Convert.DBNull;
            }
            
            public bool IsStandardCostNull() {
                return this.IsNull(this.tableuspGetWhereUsedProductID.StandardCostColumn);
            }
            
            public void SetStandardCostNull() {
                this[this.tableuspGetWhereUsedProductID.StandardCostColumn] = System.Convert.DBNull;
            }
            
            public bool IsListPriceNull() {
                return this.IsNull(this.tableuspGetWhereUsedProductID.ListPriceColumn);
            }
            
            public void SetListPriceNull() {
                this[this.tableuspGetWhereUsedProductID.ListPriceColumn] = System.Convert.DBNull;
            }
            
            public bool IsBOMLevelNull() {
                return this.IsNull(this.tableuspGetWhereUsedProductID.BOMLevelColumn);
            }
            
            public void SetBOMLevelNull() {
                this[this.tableuspGetWhereUsedProductID.BOMLevelColumn] = System.Convert.DBNull;
            }
            
            public bool IsRecursionLevelNull() {
                return this.IsNull(this.tableuspGetWhereUsedProductID.RecursionLevelColumn);
            }
            
            public void SetRecursionLevelNull() {
                this[this.tableuspGetWhereUsedProductID.RecursionLevelColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class ufnGetContactInformationRow : System.Data.DataRow {
            
            private ufnGetContactInformationDataTable tableufnGetContactInformation;
            
            internal ufnGetContactInformationRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableufnGetContactInformation = ((ufnGetContactInformationDataTable)(this.Table));
            }
            
            public int ContactID {
                get {
                    return ((int)(this[this.tableufnGetContactInformation.ContactIDColumn]));
                }
                set {
                    this[this.tableufnGetContactInformation.ContactIDColumn] = value;
                }
            }
            
            public string FirstName {
                get {
                    try {
                        return ((string)(this[this.tableufnGetContactInformation.FirstNameColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'FirstName\' in table \'ufnGetContactInformation\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableufnGetContactInformation.FirstNameColumn] = value;
                }
            }
            
            public string LastName {
                get {
                    try {
                        return ((string)(this[this.tableufnGetContactInformation.LastNameColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'LastName\' in table \'ufnGetContactInformation\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableufnGetContactInformation.LastNameColumn] = value;
                }
            }
            
            public string JobTitle {
                get {
                    try {
                        return ((string)(this[this.tableufnGetContactInformation.JobTitleColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'JobTitle\' in table \'ufnGetContactInformation\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableufnGetContactInformation.JobTitleColumn] = value;
                }
            }
            
            public string ContactType {
                get {
                    try {
                        return ((string)(this[this.tableufnGetContactInformation.ContactTypeColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'ContactType\' in table \'ufnGetContactInformation\' is DBNull." +
                                "", e);
                    }
                }
                set {
                    this[this.tableufnGetContactInformation.ContactTypeColumn] = value;
                }
            }
            
            public bool IsFirstNameNull() {
                return this.IsNull(this.tableufnGetContactInformation.FirstNameColumn);
            }
            
            public void SetFirstNameNull() {
                this[this.tableufnGetContactInformation.FirstNameColumn] = System.Convert.DBNull;
            }
            
            public bool IsLastNameNull() {
                return this.IsNull(this.tableufnGetContactInformation.LastNameColumn);
            }
            
            public void SetLastNameNull() {
                this[this.tableufnGetContactInformation.LastNameColumn] = System.Convert.DBNull;
            }
            
            public bool IsJobTitleNull() {
                return this.IsNull(this.tableufnGetContactInformation.JobTitleColumn);
            }
            
            public void SetJobTitleNull() {
                this[this.tableufnGetContactInformation.JobTitleColumn] = System.Convert.DBNull;
            }
            
            public bool IsContactTypeNull() {
                return this.IsNull(this.tableufnGetContactInformation.ContactTypeColumn);
            }
            
            public void SetContactTypeNull() {
                this[this.tableufnGetContactInformation.ContactTypeColumn] = System.Convert.DBNull;
            }
        }
        
        public class AWBuildVersionRowChangeEvent : System.EventArgs {
            
            private AWBuildVersionRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public AWBuildVersionRowChangeEvent(AWBuildVersionRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public AWBuildVersionRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class DatabaseLogRowChangeEvent : System.EventArgs {
            
            private DatabaseLogRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public DatabaseLogRowChangeEvent(DatabaseLogRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public DatabaseLogRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class DepartmentRowChangeEvent : System.EventArgs {
            
            private DepartmentRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public DepartmentRowChangeEvent(DepartmentRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public DepartmentRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class EmployeeRowChangeEvent : System.EventArgs {
            
            private EmployeeRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public EmployeeRowChangeEvent(EmployeeRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public EmployeeRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class EmployeeAddressRowChangeEvent : System.EventArgs {
            
            private EmployeeAddressRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public EmployeeAddressRowChangeEvent(EmployeeAddressRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public EmployeeAddressRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class EmployeeDepartmentHistoryRowChangeEvent : System.EventArgs {
            
            private EmployeeDepartmentHistoryRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public EmployeeDepartmentHistoryRowChangeEvent(EmployeeDepartmentHistoryRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public EmployeeDepartmentHistoryRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class EmployeePayHistoryRowChangeEvent : System.EventArgs {
            
            private EmployeePayHistoryRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public EmployeePayHistoryRowChangeEvent(EmployeePayHistoryRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public EmployeePayHistoryRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class JobCandidateRowChangeEvent : System.EventArgs {
            
            private JobCandidateRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public JobCandidateRowChangeEvent(JobCandidateRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public JobCandidateRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class ShiftRowChangeEvent : System.EventArgs {
            
            private ShiftRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public ShiftRowChangeEvent(ShiftRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ShiftRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class AddressRowChangeEvent : System.EventArgs {
            
            private AddressRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public AddressRowChangeEvent(AddressRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public AddressRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class AddressTypeRowChangeEvent : System.EventArgs {
            
            private AddressTypeRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public AddressTypeRowChangeEvent(AddressTypeRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public AddressTypeRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class ContactRowChangeEvent : System.EventArgs {
            
            private ContactRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public ContactRowChangeEvent(ContactRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ContactRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class ContactTypeRowChangeEvent : System.EventArgs {
            
            private ContactTypeRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public ContactTypeRowChangeEvent(ContactTypeRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ContactTypeRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class CountryRegionRowChangeEvent : System.EventArgs {
            
            private CountryRegionRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public CountryRegionRowChangeEvent(CountryRegionRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public CountryRegionRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class StateProvinceRowChangeEvent : System.EventArgs {
            
            private StateProvinceRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public StateProvinceRowChangeEvent(StateProvinceRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public StateProvinceRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class BillOfMaterialsRowChangeEvent : System.EventArgs {
            
            private BillOfMaterialsRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public BillOfMaterialsRowChangeEvent(BillOfMaterialsRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public BillOfMaterialsRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class CultureRowChangeEvent : System.EventArgs {
            
            private CultureRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public CultureRowChangeEvent(CultureRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public CultureRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class DocumentRowChangeEvent : System.EventArgs {
            
            private DocumentRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public DocumentRowChangeEvent(DocumentRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public DocumentRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class IllustrationRowChangeEvent : System.EventArgs {
            
            private IllustrationRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public IllustrationRowChangeEvent(IllustrationRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public IllustrationRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class LocationRowChangeEvent : System.EventArgs {
            
            private LocationRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public LocationRowChangeEvent(LocationRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public LocationRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class ProductRowChangeEvent : System.EventArgs {
            
            private ProductRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public ProductRowChangeEvent(ProductRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ProductRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class ProductCategoryRowChangeEvent : System.EventArgs {
            
            private ProductCategoryRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public ProductCategoryRowChangeEvent(ProductCategoryRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ProductCategoryRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class ProductCostHistoryRowChangeEvent : System.EventArgs {
            
            private ProductCostHistoryRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public ProductCostHistoryRowChangeEvent(ProductCostHistoryRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ProductCostHistoryRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class ProductDescriptionRowChangeEvent : System.EventArgs {
            
            private ProductDescriptionRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public ProductDescriptionRowChangeEvent(ProductDescriptionRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ProductDescriptionRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class ProductDocumentRowChangeEvent : System.EventArgs {
            
            private ProductDocumentRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public ProductDocumentRowChangeEvent(ProductDocumentRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ProductDocumentRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class ProductInventoryRowChangeEvent : System.EventArgs {
            
            private ProductInventoryRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public ProductInventoryRowChangeEvent(ProductInventoryRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ProductInventoryRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class ProductListPriceHistoryRowChangeEvent : System.EventArgs {
            
            private ProductListPriceHistoryRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public ProductListPriceHistoryRowChangeEvent(ProductListPriceHistoryRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ProductListPriceHistoryRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class ProductModelRowChangeEvent : System.EventArgs {
            
            private ProductModelRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public ProductModelRowChangeEvent(ProductModelRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ProductModelRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class ProductModelIllustrationRowChangeEvent : System.EventArgs {
            
            private ProductModelIllustrationRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public ProductModelIllustrationRowChangeEvent(ProductModelIllustrationRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ProductModelIllustrationRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class ProductModelProductDescriptionCultureRowChangeEvent : System.EventArgs {
            
            private ProductModelProductDescriptionCultureRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public ProductModelProductDescriptionCultureRowChangeEvent(ProductModelProductDescriptionCultureRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ProductModelProductDescriptionCultureRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class ProductPhotoRowChangeEvent : System.EventArgs {
            
            private ProductPhotoRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public ProductPhotoRowChangeEvent(ProductPhotoRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ProductPhotoRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class ProductProductPhotoRowChangeEvent : System.EventArgs {
            
            private ProductProductPhotoRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public ProductProductPhotoRowChangeEvent(ProductProductPhotoRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ProductProductPhotoRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class ProductReviewRowChangeEvent : System.EventArgs {
            
            private ProductReviewRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public ProductReviewRowChangeEvent(ProductReviewRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ProductReviewRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class ProductSubcategoryRowChangeEvent : System.EventArgs {
            
            private ProductSubcategoryRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public ProductSubcategoryRowChangeEvent(ProductSubcategoryRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ProductSubcategoryRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class ScrapReasonRowChangeEvent : System.EventArgs {
            
            private ScrapReasonRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public ScrapReasonRowChangeEvent(ScrapReasonRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ScrapReasonRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class TransactionHistoryRowChangeEvent : System.EventArgs {
            
            private TransactionHistoryRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public TransactionHistoryRowChangeEvent(TransactionHistoryRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public TransactionHistoryRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class TransactionHistoryArchiveRowChangeEvent : System.EventArgs {
            
            private TransactionHistoryArchiveRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public TransactionHistoryArchiveRowChangeEvent(TransactionHistoryArchiveRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public TransactionHistoryArchiveRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class UnitMeasureRowChangeEvent : System.EventArgs {
            
            private UnitMeasureRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public UnitMeasureRowChangeEvent(UnitMeasureRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public UnitMeasureRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class WorkOrderRowChangeEvent : System.EventArgs {
            
            private WorkOrderRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public WorkOrderRowChangeEvent(WorkOrderRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public WorkOrderRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class WorkOrderRoutingRowChangeEvent : System.EventArgs {
            
            private WorkOrderRoutingRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public WorkOrderRoutingRowChangeEvent(WorkOrderRoutingRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public WorkOrderRoutingRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class ProductVendorRowChangeEvent : System.EventArgs {
            
            private ProductVendorRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public ProductVendorRowChangeEvent(ProductVendorRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ProductVendorRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class PurchaseOrderDetailRowChangeEvent : System.EventArgs {
            
            private PurchaseOrderDetailRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public PurchaseOrderDetailRowChangeEvent(PurchaseOrderDetailRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public PurchaseOrderDetailRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class PurchaseOrderHeaderRowChangeEvent : System.EventArgs {
            
            private PurchaseOrderHeaderRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public PurchaseOrderHeaderRowChangeEvent(PurchaseOrderHeaderRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public PurchaseOrderHeaderRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class ShipMethodRowChangeEvent : System.EventArgs {
            
            private ShipMethodRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public ShipMethodRowChangeEvent(ShipMethodRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ShipMethodRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class VendorRowChangeEvent : System.EventArgs {
            
            private VendorRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public VendorRowChangeEvent(VendorRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public VendorRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class VendorAddressRowChangeEvent : System.EventArgs {
            
            private VendorAddressRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public VendorAddressRowChangeEvent(VendorAddressRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public VendorAddressRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class VendorContactRowChangeEvent : System.EventArgs {
            
            private VendorContactRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public VendorContactRowChangeEvent(VendorContactRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public VendorContactRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class ContactCreditCardRowChangeEvent : System.EventArgs {
            
            private ContactCreditCardRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public ContactCreditCardRowChangeEvent(ContactCreditCardRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ContactCreditCardRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class CountryRegionCurrencyRowChangeEvent : System.EventArgs {
            
            private CountryRegionCurrencyRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public CountryRegionCurrencyRowChangeEvent(CountryRegionCurrencyRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public CountryRegionCurrencyRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class CreditCardRowChangeEvent : System.EventArgs {
            
            private CreditCardRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public CreditCardRowChangeEvent(CreditCardRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public CreditCardRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class CurrencyRowChangeEvent : System.EventArgs {
            
            private CurrencyRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public CurrencyRowChangeEvent(CurrencyRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public CurrencyRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class CurrencyRateRowChangeEvent : System.EventArgs {
            
            private CurrencyRateRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public CurrencyRateRowChangeEvent(CurrencyRateRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public CurrencyRateRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class CustomerRowChangeEvent : System.EventArgs {
            
            private CustomerRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public CustomerRowChangeEvent(CustomerRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public CustomerRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class CustomerAddressRowChangeEvent : System.EventArgs {
            
            private CustomerAddressRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public CustomerAddressRowChangeEvent(CustomerAddressRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public CustomerAddressRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class IndividualRowChangeEvent : System.EventArgs {
            
            private IndividualRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public IndividualRowChangeEvent(IndividualRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public IndividualRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class SalesOrderDetailRowChangeEvent : System.EventArgs {
            
            private SalesOrderDetailRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public SalesOrderDetailRowChangeEvent(SalesOrderDetailRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public SalesOrderDetailRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class SalesOrderHeaderRowChangeEvent : System.EventArgs {
            
            private SalesOrderHeaderRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public SalesOrderHeaderRowChangeEvent(SalesOrderHeaderRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public SalesOrderHeaderRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class SalesOrderHeaderSalesReasonRowChangeEvent : System.EventArgs {
            
            private SalesOrderHeaderSalesReasonRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public SalesOrderHeaderSalesReasonRowChangeEvent(SalesOrderHeaderSalesReasonRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public SalesOrderHeaderSalesReasonRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class SalesPersonRowChangeEvent : System.EventArgs {
            
            private SalesPersonRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public SalesPersonRowChangeEvent(SalesPersonRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public SalesPersonRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class SalesPersonQuotaHistoryRowChangeEvent : System.EventArgs {
            
            private SalesPersonQuotaHistoryRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public SalesPersonQuotaHistoryRowChangeEvent(SalesPersonQuotaHistoryRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public SalesPersonQuotaHistoryRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class SalesReasonRowChangeEvent : System.EventArgs {
            
            private SalesReasonRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public SalesReasonRowChangeEvent(SalesReasonRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public SalesReasonRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class SalesTaxRateRowChangeEvent : System.EventArgs {
            
            private SalesTaxRateRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public SalesTaxRateRowChangeEvent(SalesTaxRateRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public SalesTaxRateRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class SalesTerritoryRowChangeEvent : System.EventArgs {
            
            private SalesTerritoryRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public SalesTerritoryRowChangeEvent(SalesTerritoryRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public SalesTerritoryRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class SalesTerritoryHistoryRowChangeEvent : System.EventArgs {
            
            private SalesTerritoryHistoryRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public SalesTerritoryHistoryRowChangeEvent(SalesTerritoryHistoryRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public SalesTerritoryHistoryRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class ShoppingCartItemRowChangeEvent : System.EventArgs {
            
            private ShoppingCartItemRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public ShoppingCartItemRowChangeEvent(ShoppingCartItemRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ShoppingCartItemRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class SpecialOfferRowChangeEvent : System.EventArgs {
            
            private SpecialOfferRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public SpecialOfferRowChangeEvent(SpecialOfferRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public SpecialOfferRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class SpecialOfferProductRowChangeEvent : System.EventArgs {
            
            private SpecialOfferProductRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public SpecialOfferProductRowChangeEvent(SpecialOfferProductRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public SpecialOfferProductRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class StoreRowChangeEvent : System.EventArgs {
            
            private StoreRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public StoreRowChangeEvent(StoreRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public StoreRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class StoreContactRowChangeEvent : System.EventArgs {
            
            private StoreContactRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public StoreContactRowChangeEvent(StoreContactRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public StoreContactRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class vEmployeeRowChangeEvent : System.EventArgs {
            
            private vEmployeeRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public vEmployeeRowChangeEvent(vEmployeeRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public vEmployeeRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class vEmployeeDepartmentRowChangeEvent : System.EventArgs {
            
            private vEmployeeDepartmentRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public vEmployeeDepartmentRowChangeEvent(vEmployeeDepartmentRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public vEmployeeDepartmentRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class vEmployeeDepartmentHistoryRowChangeEvent : System.EventArgs {
            
            private vEmployeeDepartmentHistoryRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public vEmployeeDepartmentHistoryRowChangeEvent(vEmployeeDepartmentHistoryRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public vEmployeeDepartmentHistoryRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class vJobCandidateRowChangeEvent : System.EventArgs {
            
            private vJobCandidateRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public vJobCandidateRowChangeEvent(vJobCandidateRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public vJobCandidateRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class vJobCandidateEducationRowChangeEvent : System.EventArgs {
            
            private vJobCandidateEducationRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public vJobCandidateEducationRowChangeEvent(vJobCandidateEducationRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public vJobCandidateEducationRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class vJobCandidateEmploymentRowChangeEvent : System.EventArgs {
            
            private vJobCandidateEmploymentRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public vJobCandidateEmploymentRowChangeEvent(vJobCandidateEmploymentRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public vJobCandidateEmploymentRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class vAdditionalContactInfoRowChangeEvent : System.EventArgs {
            
            private vAdditionalContactInfoRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public vAdditionalContactInfoRowChangeEvent(vAdditionalContactInfoRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public vAdditionalContactInfoRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class vStateProvinceCountryRegionRowChangeEvent : System.EventArgs {
            
            private vStateProvinceCountryRegionRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public vStateProvinceCountryRegionRowChangeEvent(vStateProvinceCountryRegionRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public vStateProvinceCountryRegionRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class vProductAndDescriptionRowChangeEvent : System.EventArgs {
            
            private vProductAndDescriptionRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public vProductAndDescriptionRowChangeEvent(vProductAndDescriptionRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public vProductAndDescriptionRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class vProductModelCatalogDescriptionRowChangeEvent : System.EventArgs {
            
            private vProductModelCatalogDescriptionRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public vProductModelCatalogDescriptionRowChangeEvent(vProductModelCatalogDescriptionRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public vProductModelCatalogDescriptionRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class vProductModelInstructionsRowChangeEvent : System.EventArgs {
            
            private vProductModelInstructionsRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public vProductModelInstructionsRowChangeEvent(vProductModelInstructionsRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public vProductModelInstructionsRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class vVendorRowChangeEvent : System.EventArgs {
            
            private vVendorRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public vVendorRowChangeEvent(vVendorRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public vVendorRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class vIndividualRowChangeEvent : System.EventArgs {
            
            private vIndividualRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public vIndividualRowChangeEvent(vIndividualRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public vIndividualRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class vIndividualDemographicsRowChangeEvent : System.EventArgs {
            
            private vIndividualDemographicsRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public vIndividualDemographicsRowChangeEvent(vIndividualDemographicsRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public vIndividualDemographicsRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class vSalesPersonRowChangeEvent : System.EventArgs {
            
            private vSalesPersonRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public vSalesPersonRowChangeEvent(vSalesPersonRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public vSalesPersonRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class vSalesPersonSalesByFiscalYearsRowChangeEvent : System.EventArgs {
            
            private vSalesPersonSalesByFiscalYearsRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public vSalesPersonSalesByFiscalYearsRowChangeEvent(vSalesPersonSalesByFiscalYearsRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public vSalesPersonSalesByFiscalYearsRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class vStoreWithDemographicsRowChangeEvent : System.EventArgs {
            
            private vStoreWithDemographicsRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public vStoreWithDemographicsRowChangeEvent(vStoreWithDemographicsRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public vStoreWithDemographicsRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class uspGetBillOfMaterialsRowChangeEvent : System.EventArgs {
            
            private uspGetBillOfMaterialsRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public uspGetBillOfMaterialsRowChangeEvent(uspGetBillOfMaterialsRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public uspGetBillOfMaterialsRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class uspGetEmployeeManagersRowChangeEvent : System.EventArgs {
            
            private uspGetEmployeeManagersRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public uspGetEmployeeManagersRowChangeEvent(uspGetEmployeeManagersRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public uspGetEmployeeManagersRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class uspGetManagerEmployeesRowChangeEvent : System.EventArgs {
            
            private uspGetManagerEmployeesRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public uspGetManagerEmployeesRowChangeEvent(uspGetManagerEmployeesRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public uspGetManagerEmployeesRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class uspGetWhereUsedProductIDRowChangeEvent : System.EventArgs {
            
            private uspGetWhereUsedProductIDRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public uspGetWhereUsedProductIDRowChangeEvent(uspGetWhereUsedProductIDRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public uspGetWhereUsedProductIDRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class ufnGetContactInformationRowChangeEvent : System.EventArgs {
            
            private ufnGetContactInformationRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public ufnGetContactInformationRowChangeEvent(ufnGetContactInformationRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ufnGetContactInformationRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}
namespace DataGridApplication.AdventureWorksDataSetTableAdapters {
    
    
    [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 AWBuildVersionTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public AWBuildVersionTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "AWBuildVersion";
            tableMapping.ColumnMappings.Add("SystemInformationID", "SystemInformationID");
            tableMapping.ColumnMappings.Add("Database Version", "Database Version");
            tableMapping.ColumnMappings.Add("VersionDate", "VersionDate");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[AWBuildVersion] WHERE (([SystemInformationID] = @Original_Syst" +
                "emInformationID) AND ([Database Version] = @Original_Database_Version) AND ([Ver" +
                "sionDate] = @Original_VersionDate) AND ([ModifiedDate] = @Original_ModifiedDate)" +
                ")";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SystemInformationID", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "SystemInformationID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Database_Version", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Database Version", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_VersionDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "VersionDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[AWBuildVersion] ([Database Version], [VersionDate], [ModifiedDate]) VALUES (@Database_Version, @VersionDate, @ModifiedDate);
SELECT SystemInformationID, [Database Version], VersionDate, ModifiedDate FROM AWBuildVersion WHERE (SystemInformationID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Database_Version", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Database Version", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@VersionDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "VersionDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[AWBuildVersion] SET [Database Version] = @Database_Version, [VersionDate] = @VersionDate, [ModifiedDate] = @ModifiedDate WHERE (([SystemInformationID] = @Original_SystemInformationID) AND ([Database Version] = @Original_Database_Version) AND ([VersionDate] = @Original_VersionDate) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT SystemInformationID, [Database Version], VersionDate, ModifiedDate FROM AWBuildVersion WHERE (SystemInformationID = @SystemInformationID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Database_Version", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Database Version", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@VersionDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "VersionDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SystemInformationID", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "SystemInformationID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Database_Version", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Database Version", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_VersionDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "VersionDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SystemInformationID", System.Data.SqlDbType.Int, 1, System.Data.ParameterDirection.Input, 0, 0, "SystemInformationID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT SystemInformationID, [Database Version], VersionDate, ModifiedDate FROM db" +
                "o.AWBuildVersion";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.AWBuildVersionDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.AWBuildVersionDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.AWBuildVersionDataTable dataTable = new AdventureWorksDataSet.AWBuildVersionDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.AWBuildVersionDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "AWBuildVersion");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(byte Original_SystemInformationID, string Original_Database_Version, System.DateTime Original_VersionDate, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((byte)(Original_SystemInformationID));
            if ((Original_Database_Version == null)) {
                throw new System.ArgumentNullException("Original_Database_Version");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Database_Version));
            }
            this.Adapter.DeleteCommand.Parameters[2].Value = ((System.DateTime)(Original_VersionDate));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string Database_Version, System.DateTime VersionDate, System.DateTime ModifiedDate) {
            if ((Database_Version == null)) {
                throw new System.ArgumentNullException("Database_Version");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Database_Version));
            }
            this.Adapter.InsertCommand.Parameters[1].Value = ((System.DateTime)(VersionDate));
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(string Database_Version, System.DateTime VersionDate, System.DateTime ModifiedDate, byte Original_SystemInformationID, string Original_Database_Version, System.DateTime Original_VersionDate, System.DateTime Original_ModifiedDate, int SystemInformationID) {
            if ((Database_Version == null)) {
                throw new System.ArgumentNullException("Database_Version");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Database_Version));
            }
            this.Adapter.UpdateCommand.Parameters[1].Value = ((System.DateTime)(VersionDate));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((byte)(Original_SystemInformationID));
            if ((Original_Database_Version == null)) {
                throw new System.ArgumentNullException("Original_Database_Version");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_Database_Version));
            }
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(Original_VersionDate));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(SystemInformationID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 DatabaseLogTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public DatabaseLogTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "DatabaseLog";
            tableMapping.ColumnMappings.Add("DatabaseLogID", "DatabaseLogID");
            tableMapping.ColumnMappings.Add("PostTime", "PostTime");
            tableMapping.ColumnMappings.Add("DatabaseUser", "DatabaseUser");
            tableMapping.ColumnMappings.Add("Event", "Event");
            tableMapping.ColumnMappings.Add("Schema", "Schema");
            tableMapping.ColumnMappings.Add("Object", "Object");
            tableMapping.ColumnMappings.Add("TSQL", "TSQL");
            tableMapping.ColumnMappings.Add("XmlEvent", "XmlEvent");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[DatabaseLog] ([PostTime], [DatabaseUser], [Event], [Schema], [" +
                "Object], [TSQL], [XmlEvent]) VALUES (@PostTime, @DatabaseUser, @Event, @Schema, " +
                "@Object, @TSQL, @XmlEvent)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PostTime", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "PostTime", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DatabaseUser", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "DatabaseUser", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Event", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Event", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Schema", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Schema", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Object", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Object", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TSQL", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TSQL", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@XmlEvent", System.Data.SqlDbType.Xml, 0, System.Data.ParameterDirection.Input, 0, 0, "XmlEvent", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT DatabaseLogID, PostTime, DatabaseUser, Event, [Schema], Object, TSQL, XmlE" +
                "vent FROM dbo.DatabaseLog";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.DatabaseLogDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.DatabaseLogDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.DatabaseLogDataTable dataTable = new AdventureWorksDataSet.DatabaseLogDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.DatabaseLogDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "DatabaseLog");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(System.DateTime PostTime, string DatabaseUser, string Event, string Schema, string Object, string TSQL, object XmlEvent) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((System.DateTime)(PostTime));
            if ((DatabaseUser == null)) {
                throw new System.ArgumentNullException("DatabaseUser");
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(DatabaseUser));
            }
            if ((Event == null)) {
                throw new System.ArgumentNullException("Event");
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Event));
            }
            if ((Schema == null)) {
                this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Schema));
            }
            if ((Object == null)) {
                this.Adapter.InsertCommand.Parameters[4].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[4].Value = ((string)(Object));
            }
            if ((TSQL == null)) {
                throw new System.ArgumentNullException("TSQL");
            }
            else {
                this.Adapter.InsertCommand.Parameters[5].Value = ((string)(TSQL));
            }
            if ((XmlEvent == null)) {
                throw new System.ArgumentNullException("XmlEvent");
            }
            else {
                this.Adapter.InsertCommand.Parameters[6].Value = ((object)(XmlEvent));
            }
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 DepartmentTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public DepartmentTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "Department";
            tableMapping.ColumnMappings.Add("DepartmentID", "DepartmentID");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("GroupName", "GroupName");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [HumanResources].[Department] WHERE (([DepartmentID] = @Original_Depa" +
                "rtmentID) AND ([Name] = @Original_Name) AND ([GroupName] = @Original_GroupName) " +
                "AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_DepartmentID", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "DepartmentID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_GroupName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "GroupName", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = "INSERT INTO [HumanResources].[Department] ([Name], [GroupName], [ModifiedDate]) V" +
                "ALUES (@Name, @GroupName, @ModifiedDate);\r\nSELECT DepartmentID, Name, GroupName," +
                " ModifiedDate FROM HumanResources.Department WHERE (DepartmentID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@GroupName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "GroupName", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [HumanResources].[Department] SET [Name] = @Name, [GroupName] = @GroupName, [ModifiedDate] = @ModifiedDate WHERE (([DepartmentID] = @Original_DepartmentID) AND ([Name] = @Original_Name) AND ([GroupName] = @Original_GroupName) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT DepartmentID, Name, GroupName, ModifiedDate FROM HumanResources.Department WHERE (DepartmentID = @DepartmentID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@GroupName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "GroupName", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_DepartmentID", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "DepartmentID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_GroupName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "GroupName", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DepartmentID", System.Data.SqlDbType.Int, 2, System.Data.ParameterDirection.Input, 0, 0, "DepartmentID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT DepartmentID, Name, GroupName, ModifiedDate FROM HumanResources.Department" +
                "";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.DepartmentDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.DepartmentDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.DepartmentDataTable dataTable = new AdventureWorksDataSet.DepartmentDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.DepartmentDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "Department");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(short Original_DepartmentID, string Original_Name, string Original_GroupName, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((short)(Original_DepartmentID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name));
            }
            if ((Original_GroupName == null)) {
                throw new System.ArgumentNullException("Original_GroupName");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_GroupName));
            }
            this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string Name, string GroupName, System.DateTime ModifiedDate) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name));
            }
            if ((GroupName == null)) {
                throw new System.ArgumentNullException("GroupName");
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(GroupName));
            }
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(string Name, string GroupName, System.DateTime ModifiedDate, short Original_DepartmentID, string Original_Name, string Original_GroupName, System.DateTime Original_ModifiedDate, int DepartmentID) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name));
            }
            if ((GroupName == null)) {
                throw new System.ArgumentNullException("GroupName");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(GroupName));
            }
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((short)(Original_DepartmentID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_Name));
            }
            if ((Original_GroupName == null)) {
                throw new System.ArgumentNullException("Original_GroupName");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Original_GroupName));
            }
            this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(DepartmentID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 EmployeeTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public EmployeeTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "Employee";
            tableMapping.ColumnMappings.Add("EmployeeID", "EmployeeID");
            tableMapping.ColumnMappings.Add("NationalIDNumber", "NationalIDNumber");
            tableMapping.ColumnMappings.Add("ContactID", "ContactID");
            tableMapping.ColumnMappings.Add("LoginID", "LoginID");
            tableMapping.ColumnMappings.Add("ManagerID", "ManagerID");
            tableMapping.ColumnMappings.Add("Title", "Title");
            tableMapping.ColumnMappings.Add("BirthDate", "BirthDate");
            tableMapping.ColumnMappings.Add("MaritalStatus", "MaritalStatus");
            tableMapping.ColumnMappings.Add("Gender", "Gender");
            tableMapping.ColumnMappings.Add("HireDate", "HireDate");
            tableMapping.ColumnMappings.Add("SalariedFlag", "SalariedFlag");
            tableMapping.ColumnMappings.Add("VacationHours", "VacationHours");
            tableMapping.ColumnMappings.Add("SickLeaveHours", "SickLeaveHours");
            tableMapping.ColumnMappings.Add("CurrentFlag", "CurrentFlag");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [HumanResources].[Employee] WHERE (([EmployeeID] = @Original_EmployeeID) AND ([NationalIDNumber] = @Original_NationalIDNumber) AND ([ContactID] = @Original_ContactID) AND ([LoginID] = @Original_LoginID) AND ((@IsNull_ManagerID = 1 AND [ManagerID] IS NULL) OR ([ManagerID] = @Original_ManagerID)) AND ([Title] = @Original_Title) AND ([BirthDate] = @Original_BirthDate) AND ([MaritalStatus] = @Original_MaritalStatus) AND ([Gender] = @Original_Gender) AND ([HireDate] = @Original_HireDate) AND ([SalariedFlag] = @Original_SalariedFlag) AND ([VacationHours] = @Original_VacationHours) AND ([SickLeaveHours] = @Original_SickLeaveHours) AND ([CurrentFlag] = @Original_CurrentFlag) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_NationalIDNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "NationalIDNumber", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_LoginID", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "LoginID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ManagerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ManagerID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ManagerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ManagerID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_MaritalStatus", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "MaritalStatus", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Gender", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Gender", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalariedFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "SalariedFlag", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_VacationHours", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "VacationHours", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SickLeaveHours", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "SickLeaveHours", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CurrentFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "CurrentFlag", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [HumanResources].[Employee] ([NationalIDNumber], [ContactID], [LoginID], [ManagerID], [Title], [BirthDate], [MaritalStatus], [Gender], [HireDate], [SalariedFlag], [VacationHours], [SickLeaveHours], [CurrentFlag], [rowguid], [ModifiedDate]) VALUES (@NationalIDNumber, @ContactID, @LoginID, @ManagerID, @Title, @BirthDate, @MaritalStatus, @Gender, @HireDate, @SalariedFlag, @VacationHours, @SickLeaveHours, @CurrentFlag, @rowguid, @ModifiedDate);
SELECT EmployeeID, NationalIDNumber, ContactID, LoginID, ManagerID, Title, BirthDate, MaritalStatus, Gender, HireDate, SalariedFlag, VacationHours, SickLeaveHours, CurrentFlag, rowguid, ModifiedDate FROM HumanResources.Employee WHERE (EmployeeID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@NationalIDNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "NationalIDNumber", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@LoginID", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "LoginID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ManagerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ManagerID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MaritalStatus", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "MaritalStatus", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Gender", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Gender", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalariedFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "SalariedFlag", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@VacationHours", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "VacationHours", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SickLeaveHours", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "SickLeaveHours", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CurrentFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "CurrentFlag", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [HumanResources].[Employee] SET [NationalIDNumber] = @NationalIDNumber, [ContactID] = @ContactID, [LoginID] = @LoginID, [ManagerID] = @ManagerID, [Title] = @Title, [BirthDate] = @BirthDate, [MaritalStatus] = @MaritalStatus, [Gender] = @Gender, [HireDate] = @HireDate, [SalariedFlag] = @SalariedFlag, [VacationHours] = @VacationHours, [SickLeaveHours] = @SickLeaveHours, [CurrentFlag] = @CurrentFlag, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([EmployeeID] = @Original_EmployeeID) AND ([NationalIDNumber] = @Original_NationalIDNumber) AND ([ContactID] = @Original_ContactID) AND ([LoginID] = @Original_LoginID) AND ((@IsNull_ManagerID = 1 AND [ManagerID] IS NULL) OR ([ManagerID] = @Original_ManagerID)) AND ([Title] = @Original_Title) AND ([BirthDate] = @Original_BirthDate) AND ([MaritalStatus] = @Original_MaritalStatus) AND ([Gender] = @Original_Gender) AND ([HireDate] = @Original_HireDate) AND ([SalariedFlag] = @Original_SalariedFlag) AND ([VacationHours] = @Original_VacationHours) AND ([SickLeaveHours] = @Original_SickLeaveHours) AND ([CurrentFlag] = @Original_CurrentFlag) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT EmployeeID, NationalIDNumber, ContactID, LoginID, ManagerID, Title, BirthDate, MaritalStatus, Gender, HireDate, SalariedFlag, VacationHours, SickLeaveHours, CurrentFlag, rowguid, ModifiedDate FROM HumanResources.Employee WHERE (EmployeeID = @EmployeeID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@NationalIDNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "NationalIDNumber", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@LoginID", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "LoginID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ManagerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ManagerID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MaritalStatus", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "MaritalStatus", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Gender", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Gender", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalariedFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "SalariedFlag", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@VacationHours", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "VacationHours", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SickLeaveHours", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "SickLeaveHours", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CurrentFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "CurrentFlag", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_NationalIDNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "NationalIDNumber", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_LoginID", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "LoginID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ManagerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ManagerID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ManagerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ManagerID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_MaritalStatus", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "MaritalStatus", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Gender", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Gender", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalariedFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "SalariedFlag", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_VacationHours", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "VacationHours", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SickLeaveHours", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "SickLeaveHours", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CurrentFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "CurrentFlag", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT EmployeeID, NationalIDNumber, ContactID, LoginID, ManagerID, Title, BirthD" +
                "ate, MaritalStatus, Gender, HireDate, SalariedFlag, VacationHours, SickLeaveHour" +
                "s, CurrentFlag, rowguid, ModifiedDate FROM HumanResources.Employee";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.EmployeeDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.EmployeeDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.EmployeeDataTable dataTable = new AdventureWorksDataSet.EmployeeDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.EmployeeDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "Employee");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(
                    int Original_EmployeeID, 
                    string Original_NationalIDNumber, 
                    int Original_ContactID, 
                    string Original_LoginID, 
                    System.Nullable<int> Original_ManagerID, 
                    string Original_Title, 
                    System.DateTime Original_BirthDate, 
                    string Original_MaritalStatus, 
                    string Original_Gender, 
                    System.DateTime Original_HireDate, 
                    bool Original_SalariedFlag, 
                    short Original_VacationHours, 
                    short Original_SickLeaveHours, 
                    bool Original_CurrentFlag, 
                    System.Guid Original_rowguid, 
                    System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_EmployeeID));
            if ((Original_NationalIDNumber == null)) {
                throw new System.ArgumentNullException("Original_NationalIDNumber");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_NationalIDNumber));
            }
            this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_ContactID));
            if ((Original_LoginID == null)) {
                throw new System.ArgumentNullException("Original_LoginID");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_LoginID));
            }
            if ((Original_ManagerID.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(Original_ManagerID.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[5].Value = System.DBNull.Value;
            }
            if ((Original_Title == null)) {
                throw new System.ArgumentNullException("Original_Title");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_Title));
            }
            this.Adapter.DeleteCommand.Parameters[7].Value = ((System.DateTime)(Original_BirthDate));
            if ((Original_MaritalStatus == null)) {
                throw new System.ArgumentNullException("Original_MaritalStatus");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[8].Value = ((string)(Original_MaritalStatus));
            }
            if ((Original_Gender == null)) {
                throw new System.ArgumentNullException("Original_Gender");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[9].Value = ((string)(Original_Gender));
            }
            this.Adapter.DeleteCommand.Parameters[10].Value = ((System.DateTime)(Original_HireDate));
            this.Adapter.DeleteCommand.Parameters[11].Value = ((bool)(Original_SalariedFlag));
            this.Adapter.DeleteCommand.Parameters[12].Value = ((short)(Original_VacationHours));
            this.Adapter.DeleteCommand.Parameters[13].Value = ((short)(Original_SickLeaveHours));
            this.Adapter.DeleteCommand.Parameters[14].Value = ((bool)(Original_CurrentFlag));
            this.Adapter.DeleteCommand.Parameters[15].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[16].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string NationalIDNumber, int ContactID, string LoginID, System.Nullable<int> ManagerID, string Title, System.DateTime BirthDate, string MaritalStatus, string Gender, System.DateTime HireDate, bool SalariedFlag, short VacationHours, short SickLeaveHours, bool CurrentFlag, System.Guid rowguid, System.DateTime ModifiedDate) {
            if ((NationalIDNumber == null)) {
                throw new System.ArgumentNullException("NationalIDNumber");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(NationalIDNumber));
            }
            this.Adapter.InsertCommand.Parameters[1].Value = ((int)(ContactID));
            if ((LoginID == null)) {
                throw new System.ArgumentNullException("LoginID");
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = ((string)(LoginID));
            }
            if ((ManagerID.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[3].Value = ((int)(ManagerID.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value;
            }
            if ((Title == null)) {
                throw new System.ArgumentNullException("Title");
            }
            else {
                this.Adapter.InsertCommand.Parameters[4].Value = ((string)(Title));
            }
            this.Adapter.InsertCommand.Parameters[5].Value = ((System.DateTime)(BirthDate));
            if ((MaritalStatus == null)) {
                throw new System.ArgumentNullException("MaritalStatus");
            }
            else {
                this.Adapter.InsertCommand.Parameters[6].Value = ((string)(MaritalStatus));
            }
            if ((Gender == null)) {
                throw new System.ArgumentNullException("Gender");
            }
            else {
                this.Adapter.InsertCommand.Parameters[7].Value = ((string)(Gender));
            }
            this.Adapter.InsertCommand.Parameters[8].Value = ((System.DateTime)(HireDate));
            this.Adapter.InsertCommand.Parameters[9].Value = ((bool)(SalariedFlag));
            this.Adapter.InsertCommand.Parameters[10].Value = ((short)(VacationHours));
            this.Adapter.InsertCommand.Parameters[11].Value = ((short)(SickLeaveHours));
            this.Adapter.InsertCommand.Parameters[12].Value = ((bool)(CurrentFlag));
            this.Adapter.InsertCommand.Parameters[13].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[14].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    string NationalIDNumber, 
                    int ContactID, 
                    string LoginID, 
                    System.Nullable<int> ManagerID, 
                    string Title, 
                    System.DateTime BirthDate, 
                    string MaritalStatus, 
                    string Gender, 
                    System.DateTime HireDate, 
                    bool SalariedFlag, 
                    short VacationHours, 
                    short SickLeaveHours, 
                    bool CurrentFlag, 
                    System.Guid rowguid, 
                    System.DateTime ModifiedDate, 
                    int Original_EmployeeID, 
                    string Original_NationalIDNumber, 
                    int Original_ContactID, 
                    string Original_LoginID, 
                    System.Nullable<int> Original_ManagerID, 
                    string Original_Title, 
                    System.DateTime Original_BirthDate, 
                    string Original_MaritalStatus, 
                    string Original_Gender, 
                    System.DateTime Original_HireDate, 
                    bool Original_SalariedFlag, 
                    short Original_VacationHours, 
                    short Original_SickLeaveHours, 
                    bool Original_CurrentFlag, 
                    System.Guid Original_rowguid, 
                    System.DateTime Original_ModifiedDate, 
                    int EmployeeID) {
            if ((NationalIDNumber == null)) {
                throw new System.ArgumentNullException("NationalIDNumber");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(NationalIDNumber));
            }
            this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(ContactID));
            if ((LoginID == null)) {
                throw new System.ArgumentNullException("LoginID");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(LoginID));
            }
            if ((ManagerID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(ManagerID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value;
            }
            if ((Title == null)) {
                throw new System.ArgumentNullException("Title");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Title));
            }
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(BirthDate));
            if ((MaritalStatus == null)) {
                throw new System.ArgumentNullException("MaritalStatus");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(MaritalStatus));
            }
            if ((Gender == null)) {
                throw new System.ArgumentNullException("Gender");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Gender));
            }
            this.Adapter.UpdateCommand.Parameters[8].Value = ((System.DateTime)(HireDate));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((bool)(SalariedFlag));
            this.Adapter.UpdateCommand.Parameters[10].Value = ((short)(VacationHours));
            this.Adapter.UpdateCommand.Parameters[11].Value = ((short)(SickLeaveHours));
            this.Adapter.UpdateCommand.Parameters[12].Value = ((bool)(CurrentFlag));
            this.Adapter.UpdateCommand.Parameters[13].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[14].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(Original_EmployeeID));
            if ((Original_NationalIDNumber == null)) {
                throw new System.ArgumentNullException("Original_NationalIDNumber");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(Original_NationalIDNumber));
            }
            this.Adapter.UpdateCommand.Parameters[17].Value = ((int)(Original_ContactID));
            if ((Original_LoginID == null)) {
                throw new System.ArgumentNullException("Original_LoginID");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[18].Value = ((string)(Original_LoginID));
            }
            if ((Original_ManagerID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[20].Value = ((int)(Original_ManagerID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[20].Value = System.DBNull.Value;
            }
            if ((Original_Title == null)) {
                throw new System.ArgumentNullException("Original_Title");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[21].Value = ((string)(Original_Title));
            }
            this.Adapter.UpdateCommand.Parameters[22].Value = ((System.DateTime)(Original_BirthDate));
            if ((Original_MaritalStatus == null)) {
                throw new System.ArgumentNullException("Original_MaritalStatus");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[23].Value = ((string)(Original_MaritalStatus));
            }
            if ((Original_Gender == null)) {
                throw new System.ArgumentNullException("Original_Gender");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[24].Value = ((string)(Original_Gender));
            }
            this.Adapter.UpdateCommand.Parameters[25].Value = ((System.DateTime)(Original_HireDate));
            this.Adapter.UpdateCommand.Parameters[26].Value = ((bool)(Original_SalariedFlag));
            this.Adapter.UpdateCommand.Parameters[27].Value = ((short)(Original_VacationHours));
            this.Adapter.UpdateCommand.Parameters[28].Value = ((short)(Original_SickLeaveHours));
            this.Adapter.UpdateCommand.Parameters[29].Value = ((bool)(Original_CurrentFlag));
            this.Adapter.UpdateCommand.Parameters[30].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[31].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[32].Value = ((int)(EmployeeID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 EmployeeAddressTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public EmployeeAddressTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "EmployeeAddress";
            tableMapping.ColumnMappings.Add("EmployeeID", "EmployeeID");
            tableMapping.ColumnMappings.Add("AddressID", "AddressID");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [HumanResources].[EmployeeAddress] WHERE (([EmployeeID] = @Original_E" +
                "mployeeID) AND ([AddressID] = @Original_AddressID) AND ([rowguid] = @Original_ro" +
                "wguid) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AddressID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [HumanResources].[EmployeeAddress] ([EmployeeID], [AddressID], [rowguid], [ModifiedDate]) VALUES (@EmployeeID, @AddressID, @rowguid, @ModifiedDate);
SELECT EmployeeID, AddressID, rowguid, ModifiedDate FROM HumanResources.EmployeeAddress WHERE (AddressID = @AddressID) AND (EmployeeID = @EmployeeID)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AddressID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [HumanResources].[EmployeeAddress] SET [EmployeeID] = @EmployeeID, [AddressID] = @AddressID, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([EmployeeID] = @Original_EmployeeID) AND ([AddressID] = @Original_AddressID) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT EmployeeID, AddressID, rowguid, ModifiedDate FROM HumanResources.EmployeeAddress WHERE (AddressID = @AddressID) AND (EmployeeID = @EmployeeID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AddressID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AddressID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT EmployeeID, AddressID, rowguid, ModifiedDate FROM HumanResources.EmployeeA" +
                "ddress";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.EmployeeAddressDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.EmployeeAddressDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.EmployeeAddressDataTable dataTable = new AdventureWorksDataSet.EmployeeAddressDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.EmployeeAddressDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "EmployeeAddress");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_EmployeeID, int Original_AddressID, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_EmployeeID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_AddressID));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int EmployeeID, int AddressID, System.Guid rowguid, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(EmployeeID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((int)(AddressID));
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[3].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int EmployeeID, int AddressID, System.Guid rowguid, System.DateTime ModifiedDate, int Original_EmployeeID, int Original_AddressID, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(EmployeeID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(AddressID));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_EmployeeID));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_AddressID));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 EmployeeDepartmentHistoryTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public EmployeeDepartmentHistoryTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "EmployeeDepartmentHistory";
            tableMapping.ColumnMappings.Add("EmployeeID", "EmployeeID");
            tableMapping.ColumnMappings.Add("DepartmentID", "DepartmentID");
            tableMapping.ColumnMappings.Add("ShiftID", "ShiftID");
            tableMapping.ColumnMappings.Add("StartDate", "StartDate");
            tableMapping.ColumnMappings.Add("EndDate", "EndDate");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [HumanResources].[EmployeeDepartmentHistory] WHERE (([EmployeeID] = @Original_EmployeeID) AND ([DepartmentID] = @Original_DepartmentID) AND ([ShiftID] = @Original_ShiftID) AND ([StartDate] = @Original_StartDate) AND ((@IsNull_EndDate = 1 AND [EndDate] IS NULL) OR ([EndDate] = @Original_EndDate)) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_DepartmentID", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "DepartmentID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShiftID", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ShiftID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_EndDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [HumanResources].[EmployeeDepartmentHistory] ([EmployeeID], [DepartmentID], [ShiftID], [StartDate], [EndDate], [ModifiedDate]) VALUES (@EmployeeID, @DepartmentID, @ShiftID, @StartDate, @EndDate, @ModifiedDate);
SELECT EmployeeID, DepartmentID, ShiftID, StartDate, EndDate, ModifiedDate FROM HumanResources.EmployeeDepartmentHistory WHERE (DepartmentID = @DepartmentID) AND (EmployeeID = @EmployeeID) AND (ShiftID = @ShiftID) AND (StartDate = @StartDate)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DepartmentID", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "DepartmentID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShiftID", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ShiftID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [HumanResources].[EmployeeDepartmentHistory] SET [EmployeeID] = @EmployeeID, [DepartmentID] = @DepartmentID, [ShiftID] = @ShiftID, [StartDate] = @StartDate, [EndDate] = @EndDate, [ModifiedDate] = @ModifiedDate WHERE (([EmployeeID] = @Original_EmployeeID) AND ([DepartmentID] = @Original_DepartmentID) AND ([ShiftID] = @Original_ShiftID) AND ([StartDate] = @Original_StartDate) AND ((@IsNull_EndDate = 1 AND [EndDate] IS NULL) OR ([EndDate] = @Original_EndDate)) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT EmployeeID, DepartmentID, ShiftID, StartDate, EndDate, ModifiedDate FROM HumanResources.EmployeeDepartmentHistory WHERE (DepartmentID = @DepartmentID) AND (EmployeeID = @EmployeeID) AND (ShiftID = @ShiftID) AND (StartDate = @StartDate)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DepartmentID", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "DepartmentID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShiftID", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ShiftID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_DepartmentID", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "DepartmentID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShiftID", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ShiftID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_EndDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT EmployeeID, DepartmentID, ShiftID, StartDate, EndDate, ModifiedDate FROM H" +
                "umanResources.EmployeeDepartmentHistory";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.EmployeeDepartmentHistoryDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.EmployeeDepartmentHistoryDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.EmployeeDepartmentHistoryDataTable dataTable = new AdventureWorksDataSet.EmployeeDepartmentHistoryDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.EmployeeDepartmentHistoryDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "EmployeeDepartmentHistory");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_EmployeeID, short Original_DepartmentID, byte Original_ShiftID, System.DateTime Original_StartDate, System.Nullable<System.DateTime> Original_EndDate, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_EmployeeID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((short)(Original_DepartmentID));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((byte)(Original_ShiftID));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_StartDate));
            if ((Original_EndDate.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[5].Value = ((System.DateTime)(Original_EndDate.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[5].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[6].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int EmployeeID, short DepartmentID, byte ShiftID, System.DateTime StartDate, System.Nullable<System.DateTime> EndDate, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(EmployeeID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((short)(DepartmentID));
            this.Adapter.InsertCommand.Parameters[2].Value = ((byte)(ShiftID));
            this.Adapter.InsertCommand.Parameters[3].Value = ((System.DateTime)(StartDate));
            if ((EndDate.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(EndDate.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[4].Value = System.DBNull.Value;
            }
            this.Adapter.InsertCommand.Parameters[5].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int EmployeeID, short DepartmentID, byte ShiftID, System.DateTime StartDate, System.Nullable<System.DateTime> EndDate, System.DateTime ModifiedDate, int Original_EmployeeID, short Original_DepartmentID, byte Original_ShiftID, System.DateTime Original_StartDate, System.Nullable<System.DateTime> Original_EndDate, System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(EmployeeID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((short)(DepartmentID));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((byte)(ShiftID));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(StartDate));
            if ((EndDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(EndDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_EmployeeID));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((short)(Original_DepartmentID));
            this.Adapter.UpdateCommand.Parameters[8].Value = ((byte)(Original_ShiftID));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((System.DateTime)(Original_StartDate));
            if ((Original_EndDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[11].Value = ((System.DateTime)(Original_EndDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[11].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[12].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 EmployeePayHistoryTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public EmployeePayHistoryTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "EmployeePayHistory";
            tableMapping.ColumnMappings.Add("EmployeeID", "EmployeeID");
            tableMapping.ColumnMappings.Add("RateChangeDate", "RateChangeDate");
            tableMapping.ColumnMappings.Add("Rate", "Rate");
            tableMapping.ColumnMappings.Add("PayFrequency", "PayFrequency");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [HumanResources].[EmployeePayHistory] WHERE (([EmployeeID] = @Original_EmployeeID) AND ([RateChangeDate] = @Original_RateChangeDate) AND ([Rate] = @Original_Rate) AND ([PayFrequency] = @Original_PayFrequency) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_RateChangeDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "RateChangeDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Rate", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "Rate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PayFrequency", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "PayFrequency", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [HumanResources].[EmployeePayHistory] ([EmployeeID], [RateChangeDate], [Rate], [PayFrequency], [ModifiedDate]) VALUES (@EmployeeID, @RateChangeDate, @Rate, @PayFrequency, @ModifiedDate);
SELECT EmployeeID, RateChangeDate, Rate, PayFrequency, ModifiedDate FROM HumanResources.EmployeePayHistory WHERE (EmployeeID = @EmployeeID) AND (RateChangeDate = @RateChangeDate)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RateChangeDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "RateChangeDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Rate", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "Rate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PayFrequency", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "PayFrequency", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [HumanResources].[EmployeePayHistory] SET [EmployeeID] = @EmployeeID, [RateChangeDate] = @RateChangeDate, [Rate] = @Rate, [PayFrequency] = @PayFrequency, [ModifiedDate] = @ModifiedDate WHERE (([EmployeeID] = @Original_EmployeeID) AND ([RateChangeDate] = @Original_RateChangeDate) AND ([Rate] = @Original_Rate) AND ([PayFrequency] = @Original_PayFrequency) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT EmployeeID, RateChangeDate, Rate, PayFrequency, ModifiedDate FROM HumanResources.EmployeePayHistory WHERE (EmployeeID = @EmployeeID) AND (RateChangeDate = @RateChangeDate)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RateChangeDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "RateChangeDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Rate", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "Rate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PayFrequency", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "PayFrequency", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_RateChangeDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "RateChangeDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Rate", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "Rate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PayFrequency", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "PayFrequency", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT EmployeeID, RateChangeDate, Rate, PayFrequency, ModifiedDate FROM HumanRes" +
                "ources.EmployeePayHistory";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.EmployeePayHistoryDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.EmployeePayHistoryDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.EmployeePayHistoryDataTable dataTable = new AdventureWorksDataSet.EmployeePayHistoryDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.EmployeePayHistoryDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "EmployeePayHistory");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_EmployeeID, System.DateTime Original_RateChangeDate, decimal Original_Rate, byte Original_PayFrequency, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_EmployeeID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((System.DateTime)(Original_RateChangeDate));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((decimal)(Original_Rate));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((byte)(Original_PayFrequency));
            this.Adapter.DeleteCommand.Parameters[4].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int EmployeeID, System.DateTime RateChangeDate, decimal Rate, byte PayFrequency, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(EmployeeID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((System.DateTime)(RateChangeDate));
            this.Adapter.InsertCommand.Parameters[2].Value = ((decimal)(Rate));
            this.Adapter.InsertCommand.Parameters[3].Value = ((byte)(PayFrequency));
            this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int EmployeeID, System.DateTime RateChangeDate, decimal Rate, byte PayFrequency, System.DateTime ModifiedDate, int Original_EmployeeID, System.DateTime Original_RateChangeDate, decimal Original_Rate, byte Original_PayFrequency, System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(EmployeeID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((System.DateTime)(RateChangeDate));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((decimal)(Rate));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((byte)(PayFrequency));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_EmployeeID));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(Original_RateChangeDate));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((decimal)(Original_Rate));
            this.Adapter.UpdateCommand.Parameters[8].Value = ((byte)(Original_PayFrequency));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 JobCandidateTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public JobCandidateTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "JobCandidate";
            tableMapping.ColumnMappings.Add("JobCandidateID", "JobCandidateID");
            tableMapping.ColumnMappings.Add("EmployeeID", "EmployeeID");
            tableMapping.ColumnMappings.Add("Resume", "Resume");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [HumanResources].[JobCandidate] WHERE (([JobCandidateID] = @Original_" +
                "JobCandidateID) AND ((@IsNull_EmployeeID = 1 AND [EmployeeID] IS NULL) OR ([Empl" +
                "oyeeID] = @Original_EmployeeID)) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_JobCandidateID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "JobCandidateID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [HumanResources].[JobCandidate] ([EmployeeID], [Resume], [ModifiedDate]) VALUES (@EmployeeID, @Resume, @ModifiedDate);
SELECT JobCandidateID, EmployeeID, Resume, ModifiedDate FROM HumanResources.JobCandidate WHERE (JobCandidateID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Resume", System.Data.SqlDbType.Xml, 0, System.Data.ParameterDirection.Input, 0, 0, "Resume", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [HumanResources].[JobCandidate] SET [EmployeeID] = @EmployeeID, [Resume] = @Resume, [ModifiedDate] = @ModifiedDate WHERE (([JobCandidateID] = @Original_JobCandidateID) AND ((@IsNull_EmployeeID = 1 AND [EmployeeID] IS NULL) OR ([EmployeeID] = @Original_EmployeeID)) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT JobCandidateID, EmployeeID, Resume, ModifiedDate FROM HumanResources.JobCandidate WHERE (JobCandidateID = @JobCandidateID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Resume", System.Data.SqlDbType.Xml, 0, System.Data.ParameterDirection.Input, 0, 0, "Resume", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_JobCandidateID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "JobCandidateID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@JobCandidateID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "JobCandidateID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT JobCandidateID, EmployeeID, Resume, ModifiedDate FROM HumanResources.JobCa" +
                "ndidate";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.JobCandidateDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.JobCandidateDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.JobCandidateDataTable dataTable = new AdventureWorksDataSet.JobCandidateDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.JobCandidateDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "JobCandidate");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_JobCandidateID, System.Nullable<int> Original_EmployeeID, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_JobCandidateID));
            if ((Original_EmployeeID.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_EmployeeID.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[2].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(System.Nullable<int> EmployeeID, object Resume, System.DateTime ModifiedDate) {
            if ((EmployeeID.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[0].Value = ((int)(EmployeeID.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = System.DBNull.Value;
            }
            if ((Resume == null)) {
                this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((object)(Resume));
            }
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(System.Nullable<int> EmployeeID, object Resume, System.DateTime ModifiedDate, int Original_JobCandidateID, System.Nullable<int> Original_EmployeeID, System.DateTime Original_ModifiedDate, int JobCandidateID) {
            if ((EmployeeID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(EmployeeID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = System.DBNull.Value;
            }
            if ((Resume == null)) {
                this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((object)(Resume));
            }
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_JobCandidateID));
            if ((Original_EmployeeID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_EmployeeID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(JobCandidateID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 ShiftTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public ShiftTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "Shift";
            tableMapping.ColumnMappings.Add("ShiftID", "ShiftID");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("StartTime", "StartTime");
            tableMapping.ColumnMappings.Add("EndTime", "EndTime");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [HumanResources].[Shift] WHERE (([ShiftID] = @Original_ShiftID) AND (" +
                "[Name] = @Original_Name) AND ([StartTime] = @Original_StartTime) AND ([EndTime] " +
                "= @Original_EndTime) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShiftID", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ShiftID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StartTime", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartTime", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EndTime", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndTime", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = "INSERT INTO [HumanResources].[Shift] ([Name], [StartTime], [EndTime], [ModifiedDa" +
                "te]) VALUES (@Name, @StartTime, @EndTime, @ModifiedDate);\r\nSELECT ShiftID, Name," +
                " StartTime, EndTime, ModifiedDate FROM HumanResources.Shift WHERE (ShiftID = @@I" +
                "DENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StartTime", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartTime", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EndTime", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndTime", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [HumanResources].[Shift] SET [Name] = @Name, [StartTime] = @StartTime, [EndTime] = @EndTime, [ModifiedDate] = @ModifiedDate WHERE (([ShiftID] = @Original_ShiftID) AND ([Name] = @Original_Name) AND ([StartTime] = @Original_StartTime) AND ([EndTime] = @Original_EndTime) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT ShiftID, Name, StartTime, EndTime, ModifiedDate FROM HumanResources.Shift WHERE (ShiftID = @ShiftID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StartTime", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartTime", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EndTime", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndTime", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShiftID", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ShiftID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StartTime", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartTime", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EndTime", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndTime", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShiftID", System.Data.SqlDbType.Int, 1, System.Data.ParameterDirection.Input, 0, 0, "ShiftID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT ShiftID, Name, StartTime, EndTime, ModifiedDate FROM HumanResources.Shift";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.ShiftDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.ShiftDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.ShiftDataTable dataTable = new AdventureWorksDataSet.ShiftDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.ShiftDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "Shift");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(byte Original_ShiftID, string Original_Name, System.DateTime Original_StartTime, System.DateTime Original_EndTime, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((byte)(Original_ShiftID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name));
            }
            this.Adapter.DeleteCommand.Parameters[2].Value = ((System.DateTime)(Original_StartTime));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_EndTime));
            this.Adapter.DeleteCommand.Parameters[4].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string Name, System.DateTime StartTime, System.DateTime EndTime, System.DateTime ModifiedDate) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name));
            }
            this.Adapter.InsertCommand.Parameters[1].Value = ((System.DateTime)(StartTime));
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(EndTime));
            this.Adapter.InsertCommand.Parameters[3].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(string Name, System.DateTime StartTime, System.DateTime EndTime, System.DateTime ModifiedDate, byte Original_ShiftID, string Original_Name, System.DateTime Original_StartTime, System.DateTime Original_EndTime, System.DateTime Original_ModifiedDate, int ShiftID) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name));
            }
            this.Adapter.UpdateCommand.Parameters[1].Value = ((System.DateTime)(StartTime));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(EndTime));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((byte)(Original_ShiftID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Original_Name));
            }
            this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(Original_StartTime));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((System.DateTime)(Original_EndTime));
            this.Adapter.UpdateCommand.Parameters[8].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(ShiftID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 AddressTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public AddressTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "Address";
            tableMapping.ColumnMappings.Add("AddressID", "AddressID");
            tableMapping.ColumnMappings.Add("AddressLine1", "AddressLine1");
            tableMapping.ColumnMappings.Add("AddressLine2", "AddressLine2");
            tableMapping.ColumnMappings.Add("City", "City");
            tableMapping.ColumnMappings.Add("StateProvinceID", "StateProvinceID");
            tableMapping.ColumnMappings.Add("PostalCode", "PostalCode");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Person].[Address] WHERE (([AddressID] = @Original_AddressID) AND ([AddressLine1] = @Original_AddressLine1) AND ((@IsNull_AddressLine2 = 1 AND [AddressLine2] IS NULL) OR ([AddressLine2] = @Original_AddressLine2)) AND ([City] = @Original_City) AND ([StateProvinceID] = @Original_StateProvinceID) AND ([PostalCode] = @Original_PostalCode) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AddressID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AddressLine1", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressLine1", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_AddressLine2", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressLine2", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AddressLine2", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressLine2", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StateProvinceID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "StateProvinceID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Person].[Address] ([AddressLine1], [AddressLine2], [City], [StateProvinceID], [PostalCode], [rowguid], [ModifiedDate]) VALUES (@AddressLine1, @AddressLine2, @City, @StateProvinceID, @PostalCode, @rowguid, @ModifiedDate);
SELECT AddressID, AddressLine1, AddressLine2, City, StateProvinceID, PostalCode, rowguid, ModifiedDate FROM Person.Address WHERE (AddressID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AddressLine1", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressLine1", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AddressLine2", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressLine2", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StateProvinceID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "StateProvinceID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Person].[Address] SET [AddressLine1] = @AddressLine1, [AddressLine2] = @AddressLine2, [City] = @City, [StateProvinceID] = @StateProvinceID, [PostalCode] = @PostalCode, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([AddressID] = @Original_AddressID) AND ([AddressLine1] = @Original_AddressLine1) AND ((@IsNull_AddressLine2 = 1 AND [AddressLine2] IS NULL) OR ([AddressLine2] = @Original_AddressLine2)) AND ([City] = @Original_City) AND ([StateProvinceID] = @Original_StateProvinceID) AND ([PostalCode] = @Original_PostalCode) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT AddressID, AddressLine1, AddressLine2, City, StateProvinceID, PostalCode, rowguid, ModifiedDate FROM Person.Address WHERE (AddressID = @AddressID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AddressLine1", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressLine1", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AddressLine2", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressLine2", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StateProvinceID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "StateProvinceID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AddressID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AddressLine1", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressLine1", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_AddressLine2", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressLine2", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AddressLine2", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressLine2", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StateProvinceID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "StateProvinceID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AddressID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "AddressID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT AddressID, AddressLine1, AddressLine2, City, StateProvinceID, PostalCode, " +
                "rowguid, ModifiedDate FROM Person.Address";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.AddressDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.AddressDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.AddressDataTable dataTable = new AdventureWorksDataSet.AddressDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.AddressDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "Address");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_AddressID, string Original_AddressLine1, string Original_AddressLine2, string Original_City, int Original_StateProvinceID, string Original_PostalCode, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_AddressID));
            if ((Original_AddressLine1 == null)) {
                throw new System.ArgumentNullException("Original_AddressLine1");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_AddressLine1));
            }
            if ((Original_AddressLine2 == null)) {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[3].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_AddressLine2));
            }
            if ((Original_City == null)) {
                throw new System.ArgumentNullException("Original_City");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_City));
            }
            this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(Original_StateProvinceID));
            if ((Original_PostalCode == null)) {
                throw new System.ArgumentNullException("Original_PostalCode");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_PostalCode));
            }
            this.Adapter.DeleteCommand.Parameters[7].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[8].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string AddressLine1, string AddressLine2, string City, int StateProvinceID, string PostalCode, System.Guid rowguid, System.DateTime ModifiedDate) {
            if ((AddressLine1 == null)) {
                throw new System.ArgumentNullException("AddressLine1");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(AddressLine1));
            }
            if ((AddressLine2 == null)) {
                this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(AddressLine2));
            }
            if ((City == null)) {
                throw new System.ArgumentNullException("City");
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = ((string)(City));
            }
            this.Adapter.InsertCommand.Parameters[3].Value = ((int)(StateProvinceID));
            if ((PostalCode == null)) {
                throw new System.ArgumentNullException("PostalCode");
            }
            else {
                this.Adapter.InsertCommand.Parameters[4].Value = ((string)(PostalCode));
            }
            this.Adapter.InsertCommand.Parameters[5].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[6].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    string AddressLine1, 
                    string AddressLine2, 
                    string City, 
                    int StateProvinceID, 
                    string PostalCode, 
                    System.Guid rowguid, 
                    System.DateTime ModifiedDate, 
                    int Original_AddressID, 
                    string Original_AddressLine1, 
                    string Original_AddressLine2, 
                    string Original_City, 
                    int Original_StateProvinceID, 
                    string Original_PostalCode, 
                    System.Guid Original_rowguid, 
                    System.DateTime Original_ModifiedDate, 
                    int AddressID) {
            if ((AddressLine1 == null)) {
                throw new System.ArgumentNullException("AddressLine1");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(AddressLine1));
            }
            if ((AddressLine2 == null)) {
                this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(AddressLine2));
            }
            if ((City == null)) {
                throw new System.ArgumentNullException("City");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(City));
            }
            this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(StateProvinceID));
            if ((PostalCode == null)) {
                throw new System.ArgumentNullException("PostalCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(PostalCode));
            }
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_AddressID));
            if ((Original_AddressLine1 == null)) {
                throw new System.ArgumentNullException("Original_AddressLine1");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_AddressLine1));
            }
            if ((Original_AddressLine2 == null)) {
                this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[10].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_AddressLine2));
            }
            if ((Original_City == null)) {
                throw new System.ArgumentNullException("Original_City");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_City));
            }
            this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(Original_StateProvinceID));
            if ((Original_PostalCode == null)) {
                throw new System.ArgumentNullException("Original_PostalCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[13].Value = ((string)(Original_PostalCode));
            }
            this.Adapter.UpdateCommand.Parameters[14].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[15].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[16].Value = ((int)(AddressID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 AddressTypeTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public AddressTypeTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "AddressType";
            tableMapping.ColumnMappings.Add("AddressTypeID", "AddressTypeID");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Person].[AddressType] WHERE (([AddressTypeID] = @Original_AddressTyp" +
                "eID) AND ([Name] = @Original_Name) AND ([rowguid] = @Original_rowguid) AND ([Mod" +
                "ifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AddressTypeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressTypeID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = "INSERT INTO [Person].[AddressType] ([Name], [rowguid], [ModifiedDate]) VALUES (@N" +
                "ame, @rowguid, @ModifiedDate);\r\nSELECT AddressTypeID, Name, rowguid, ModifiedDat" +
                "e FROM Person.AddressType WHERE (AddressTypeID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Person].[AddressType] SET [Name] = @Name, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([AddressTypeID] = @Original_AddressTypeID) AND ([Name] = @Original_Name) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT AddressTypeID, Name, rowguid, ModifiedDate FROM Person.AddressType WHERE (AddressTypeID = @AddressTypeID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AddressTypeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressTypeID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AddressTypeID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "AddressTypeID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT AddressTypeID, Name, rowguid, ModifiedDate FROM Person.AddressType";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.AddressTypeDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.AddressTypeDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.AddressTypeDataTable dataTable = new AdventureWorksDataSet.AddressTypeDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.AddressTypeDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "AddressType");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_AddressTypeID, string Original_Name, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_AddressTypeID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name));
            }
            this.Adapter.DeleteCommand.Parameters[2].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string Name, System.Guid rowguid, System.DateTime ModifiedDate) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name));
            }
            this.Adapter.InsertCommand.Parameters[1].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(string Name, System.Guid rowguid, System.DateTime ModifiedDate, int Original_AddressTypeID, string Original_Name, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate, int AddressTypeID) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name));
            }
            this.Adapter.UpdateCommand.Parameters[1].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_AddressTypeID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_Name));
            }
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(AddressTypeID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 ContactTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public ContactTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "Contact";
            tableMapping.ColumnMappings.Add("ContactID", "ContactID");
            tableMapping.ColumnMappings.Add("NameStyle", "NameStyle");
            tableMapping.ColumnMappings.Add("Title", "Title");
            tableMapping.ColumnMappings.Add("FirstName", "FirstName");
            tableMapping.ColumnMappings.Add("MiddleName", "MiddleName");
            tableMapping.ColumnMappings.Add("LastName", "LastName");
            tableMapping.ColumnMappings.Add("Suffix", "Suffix");
            tableMapping.ColumnMappings.Add("EmailAddress", "EmailAddress");
            tableMapping.ColumnMappings.Add("EmailPromotion", "EmailPromotion");
            tableMapping.ColumnMappings.Add("Phone", "Phone");
            tableMapping.ColumnMappings.Add("PasswordHash", "PasswordHash");
            tableMapping.ColumnMappings.Add("PasswordSalt", "PasswordSalt");
            tableMapping.ColumnMappings.Add("AdditionalContactInfo", "AdditionalContactInfo");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Person].[Contact] WHERE (([ContactID] = @Original_ContactID) AND ([NameStyle] = @Original_NameStyle) AND ((@IsNull_Title = 1 AND [Title] IS NULL) OR ([Title] = @Original_Title)) AND ([FirstName] = @Original_FirstName) AND ((@IsNull_MiddleName = 1 AND [MiddleName] IS NULL) OR ([MiddleName] = @Original_MiddleName)) AND ([LastName] = @Original_LastName) AND ((@IsNull_Suffix = 1 AND [Suffix] IS NULL) OR ([Suffix] = @Original_Suffix)) AND ((@IsNull_EmailAddress = 1 AND [EmailAddress] IS NULL) OR ([EmailAddress] = @Original_EmailAddress)) AND ([EmailPromotion] = @Original_EmailPromotion) AND ((@IsNull_Phone = 1 AND [Phone] IS NULL) OR ([Phone] = @Original_Phone)) AND ([PasswordHash] = @Original_PasswordHash) AND ([PasswordSalt] = @Original_PasswordSalt) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_NameStyle", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "NameStyle", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_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.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_MiddleName", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "MiddleName", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_MiddleName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "MiddleName", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Suffix", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Suffix", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Suffix", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Suffix", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_EmailAddress", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EmailAddress", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EmailAddress", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "EmailAddress", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EmailPromotion", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EmailPromotion", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PasswordHash", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PasswordHash", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PasswordSalt", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PasswordSalt", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Person].[Contact] ([NameStyle], [Title], [FirstName], [MiddleName], [LastName], [Suffix], [EmailAddress], [EmailPromotion], [Phone], [PasswordHash], [PasswordSalt], [AdditionalContactInfo], [rowguid], [ModifiedDate]) VALUES (@NameStyle, @Title, @FirstName, @MiddleName, @LastName, @Suffix, @EmailAddress, @EmailPromotion, @Phone, @PasswordHash, @PasswordSalt, @AdditionalContactInfo, @rowguid, @ModifiedDate);
SELECT ContactID, NameStyle, Title, FirstName, MiddleName, LastName, Suffix, EmailAddress, EmailPromotion, Phone, PasswordHash, PasswordSalt, AdditionalContactInfo, rowguid, ModifiedDate FROM Person.Contact WHERE (ContactID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@NameStyle", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "NameStyle", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MiddleName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "MiddleName", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Suffix", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Suffix", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EmailAddress", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "EmailAddress", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EmailPromotion", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EmailPromotion", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PasswordHash", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PasswordHash", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PasswordSalt", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PasswordSalt", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AdditionalContactInfo", System.Data.SqlDbType.Xml, 0, System.Data.ParameterDirection.Input, 0, 0, "AdditionalContactInfo", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Person].[Contact] SET [NameStyle] = @NameStyle, [Title] = @Title, [FirstName] = @FirstName, [MiddleName] = @MiddleName, [LastName] = @LastName, [Suffix] = @Suffix, [EmailAddress] = @EmailAddress, [EmailPromotion] = @EmailPromotion, [Phone] = @Phone, [PasswordHash] = @PasswordHash, [PasswordSalt] = @PasswordSalt, [AdditionalContactInfo] = @AdditionalContactInfo, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([ContactID] = @Original_ContactID) AND ([NameStyle] = @Original_NameStyle) AND ((@IsNull_Title = 1 AND [Title] IS NULL) OR ([Title] = @Original_Title)) AND ([FirstName] = @Original_FirstName) AND ((@IsNull_MiddleName = 1 AND [MiddleName] IS NULL) OR ([MiddleName] = @Original_MiddleName)) AND ([LastName] = @Original_LastName) AND ((@IsNull_Suffix = 1 AND [Suffix] IS NULL) OR ([Suffix] = @Original_Suffix)) AND ((@IsNull_EmailAddress = 1 AND [EmailAddress] IS NULL) OR ([EmailAddress] = @Original_EmailAddress)) AND ([EmailPromotion] = @Original_EmailPromotion) AND ((@IsNull_Phone = 1 AND [Phone] IS NULL) OR ([Phone] = @Original_Phone)) AND ([PasswordHash] = @Original_PasswordHash) AND ([PasswordSalt] = @Original_PasswordSalt) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT ContactID, NameStyle, Title, FirstName, MiddleName, LastName, Suffix, EmailAddress, EmailPromotion, Phone, PasswordHash, PasswordSalt, AdditionalContactInfo, rowguid, ModifiedDate FROM Person.Contact WHERE (ContactID = @ContactID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@NameStyle", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "NameStyle", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MiddleName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "MiddleName", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Suffix", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Suffix", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EmailAddress", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "EmailAddress", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EmailPromotion", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EmailPromotion", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PasswordHash", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PasswordHash", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PasswordSalt", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PasswordSalt", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AdditionalContactInfo", System.Data.SqlDbType.Xml, 0, System.Data.ParameterDirection.Input, 0, 0, "AdditionalContactInfo", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_NameStyle", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "NameStyle", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_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.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_MiddleName", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "MiddleName", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_MiddleName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "MiddleName", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Suffix", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Suffix", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Suffix", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Suffix", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_EmailAddress", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EmailAddress", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EmailAddress", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "EmailAddress", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EmailPromotion", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EmailPromotion", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PasswordHash", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PasswordHash", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PasswordSalt", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PasswordSalt", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT ContactID, NameStyle, Title, FirstName, MiddleName, LastName, Suffix, Emai" +
                "lAddress, EmailPromotion, Phone, PasswordHash, PasswordSalt, AdditionalContactIn" +
                "fo, rowguid, ModifiedDate FROM Person.Contact";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.ContactDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.ContactDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.ContactDataTable dataTable = new AdventureWorksDataSet.ContactDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.ContactDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "Contact");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_ContactID, bool Original_NameStyle, string Original_Title, string Original_FirstName, string Original_MiddleName, string Original_LastName, string Original_Suffix, string Original_EmailAddress, int Original_EmailPromotion, string Original_Phone, string Original_PasswordHash, string Original_PasswordSalt, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ContactID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((bool)(Original_NameStyle));
            if ((Original_Title == null)) {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[3].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_Title));
            }
            if ((Original_FirstName == null)) {
                throw new System.ArgumentNullException("Original_FirstName");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_FirstName));
            }
            if ((Original_MiddleName == null)) {
                this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[6].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_MiddleName));
            }
            if ((Original_LastName == null)) {
                throw new System.ArgumentNullException("Original_LastName");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[7].Value = ((string)(Original_LastName));
            }
            if ((Original_Suffix == null)) {
                this.Adapter.DeleteCommand.Parameters[8].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[9].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[8].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[9].Value = ((string)(Original_Suffix));
            }
            if ((Original_EmailAddress == null)) {
                this.Adapter.DeleteCommand.Parameters[10].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[11].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[10].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[11].Value = ((string)(Original_EmailAddress));
            }
            this.Adapter.DeleteCommand.Parameters[12].Value = ((int)(Original_EmailPromotion));
            if ((Original_Phone == null)) {
                this.Adapter.DeleteCommand.Parameters[13].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[14].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[13].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[14].Value = ((string)(Original_Phone));
            }
            if ((Original_PasswordHash == null)) {
                throw new System.ArgumentNullException("Original_PasswordHash");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[15].Value = ((string)(Original_PasswordHash));
            }
            if ((Original_PasswordSalt == null)) {
                throw new System.ArgumentNullException("Original_PasswordSalt");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[16].Value = ((string)(Original_PasswordSalt));
            }
            this.Adapter.DeleteCommand.Parameters[17].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[18].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(bool NameStyle, string Title, string FirstName, string MiddleName, string LastName, string Suffix, string EmailAddress, int EmailPromotion, string Phone, string PasswordHash, string PasswordSalt, object AdditionalContactInfo, System.Guid rowguid, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((bool)(NameStyle));
            if ((Title == null)) {
                this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Title));
            }
            if ((FirstName == null)) {
                throw new System.ArgumentNullException("FirstName");
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = ((string)(FirstName));
            }
            if ((MiddleName == null)) {
                this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[3].Value = ((string)(MiddleName));
            }
            if ((LastName == null)) {
                throw new System.ArgumentNullException("LastName");
            }
            else {
                this.Adapter.InsertCommand.Parameters[4].Value = ((string)(LastName));
            }
            if ((Suffix == null)) {
                this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[5].Value = ((string)(Suffix));
            }
            if ((EmailAddress == null)) {
                this.Adapter.InsertCommand.Parameters[6].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[6].Value = ((string)(EmailAddress));
            }
            this.Adapter.InsertCommand.Parameters[7].Value = ((int)(EmailPromotion));
            if ((Phone == null)) {
                this.Adapter.InsertCommand.Parameters[8].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[8].Value = ((string)(Phone));
            }
            if ((PasswordHash == null)) {
                throw new System.ArgumentNullException("PasswordHash");
            }
            else {
                this.Adapter.InsertCommand.Parameters[9].Value = ((string)(PasswordHash));
            }
            if ((PasswordSalt == null)) {
                throw new System.ArgumentNullException("PasswordSalt");
            }
            else {
                this.Adapter.InsertCommand.Parameters[10].Value = ((string)(PasswordSalt));
            }
            if ((AdditionalContactInfo == null)) {
                this.Adapter.InsertCommand.Parameters[11].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[11].Value = ((object)(AdditionalContactInfo));
            }
            this.Adapter.InsertCommand.Parameters[12].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[13].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    bool NameStyle, 
                    string Title, 
                    string FirstName, 
                    string MiddleName, 
                    string LastName, 
                    string Suffix, 
                    string EmailAddress, 
                    int EmailPromotion, 
                    string Phone, 
                    string PasswordHash, 
                    string PasswordSalt, 
                    object AdditionalContactInfo, 
                    System.Guid rowguid, 
                    System.DateTime ModifiedDate, 
                    int Original_ContactID, 
                    bool Original_NameStyle, 
                    string Original_Title, 
                    string Original_FirstName, 
                    string Original_MiddleName, 
                    string Original_LastName, 
                    string Original_Suffix, 
                    string Original_EmailAddress, 
                    int Original_EmailPromotion, 
                    string Original_Phone, 
                    string Original_PasswordHash, 
                    string Original_PasswordSalt, 
                    System.Guid Original_rowguid, 
                    System.DateTime Original_ModifiedDate, 
                    int ContactID) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((bool)(NameStyle));
            if ((Title == null)) {
                this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Title));
            }
            if ((FirstName == null)) {
                throw new System.ArgumentNullException("FirstName");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(FirstName));
            }
            if ((MiddleName == null)) {
                this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(MiddleName));
            }
            if ((LastName == null)) {
                throw new System.ArgumentNullException("LastName");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(LastName));
            }
            if ((Suffix == null)) {
                this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Suffix));
            }
            if ((EmailAddress == null)) {
                this.Adapter.UpdateCommand.Parameters[6].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(EmailAddress));
            }
            this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(EmailPromotion));
            if ((Phone == null)) {
                this.Adapter.UpdateCommand.Parameters[8].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Phone));
            }
            if ((PasswordHash == null)) {
                throw new System.ArgumentNullException("PasswordHash");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(PasswordHash));
            }
            if ((PasswordSalt == null)) {
                throw new System.ArgumentNullException("PasswordSalt");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(PasswordSalt));
            }
            if ((AdditionalContactInfo == null)) {
                this.Adapter.UpdateCommand.Parameters[11].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(AdditionalContactInfo));
            }
            this.Adapter.UpdateCommand.Parameters[12].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[13].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[14].Value = ((int)(Original_ContactID));
            this.Adapter.UpdateCommand.Parameters[15].Value = ((bool)(Original_NameStyle));
            if ((Original_Title == null)) {
                this.Adapter.UpdateCommand.Parameters[16].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[17].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[16].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[17].Value = ((string)(Original_Title));
            }
            if ((Original_FirstName == null)) {
                throw new System.ArgumentNullException("Original_FirstName");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[18].Value = ((string)(Original_FirstName));
            }
            if ((Original_MiddleName == null)) {
                this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[20].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[20].Value = ((string)(Original_MiddleName));
            }
            if ((Original_LastName == null)) {
                throw new System.ArgumentNullException("Original_LastName");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[21].Value = ((string)(Original_LastName));
            }
            if ((Original_Suffix == null)) {
                this.Adapter.UpdateCommand.Parameters[22].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[23].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[22].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[23].Value = ((string)(Original_Suffix));
            }
            if ((Original_EmailAddress == null)) {
                this.Adapter.UpdateCommand.Parameters[24].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[25].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[24].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[25].Value = ((string)(Original_EmailAddress));
            }
            this.Adapter.UpdateCommand.Parameters[26].Value = ((int)(Original_EmailPromotion));
            if ((Original_Phone == null)) {
                this.Adapter.UpdateCommand.Parameters[27].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[28].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[27].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[28].Value = ((string)(Original_Phone));
            }
            if ((Original_PasswordHash == null)) {
                throw new System.ArgumentNullException("Original_PasswordHash");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[29].Value = ((string)(Original_PasswordHash));
            }
            if ((Original_PasswordSalt == null)) {
                throw new System.ArgumentNullException("Original_PasswordSalt");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[30].Value = ((string)(Original_PasswordSalt));
            }
            this.Adapter.UpdateCommand.Parameters[31].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[32].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[33].Value = ((int)(ContactID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 ContactTypeTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public ContactTypeTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "ContactType";
            tableMapping.ColumnMappings.Add("ContactTypeID", "ContactTypeID");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Person].[ContactType] WHERE (([ContactTypeID] = @Original_ContactTyp" +
                "eID) AND ([Name] = @Original_Name) AND ([ModifiedDate] = @Original_ModifiedDate)" +
                ")";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactTypeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactTypeID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = "INSERT INTO [Person].[ContactType] ([Name], [ModifiedDate]) VALUES (@Name, @Modif" +
                "iedDate);\r\nSELECT ContactTypeID, Name, ModifiedDate FROM Person.ContactType WHER" +
                "E (ContactTypeID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Person].[ContactType] SET [Name] = @Name, [ModifiedDate] = @ModifiedDate WHERE (([ContactTypeID] = @Original_ContactTypeID) AND ([Name] = @Original_Name) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT ContactTypeID, Name, ModifiedDate FROM Person.ContactType WHERE (ContactTypeID = @ContactTypeID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactTypeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactTypeID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactTypeID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "ContactTypeID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT ContactTypeID, Name, ModifiedDate FROM Person.ContactType";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.ContactTypeDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.ContactTypeDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.ContactTypeDataTable dataTable = new AdventureWorksDataSet.ContactTypeDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.ContactTypeDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "ContactType");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_ContactTypeID, string Original_Name, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ContactTypeID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name));
            }
            this.Adapter.DeleteCommand.Parameters[2].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string Name, System.DateTime ModifiedDate) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name));
            }
            this.Adapter.InsertCommand.Parameters[1].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(string Name, System.DateTime ModifiedDate, int Original_ContactTypeID, string Original_Name, System.DateTime Original_ModifiedDate, int ContactTypeID) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name));
            }
            this.Adapter.UpdateCommand.Parameters[1].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_ContactTypeID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_Name));
            }
            this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(ContactTypeID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 CountryRegionTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public CountryRegionTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "CountryRegion";
            tableMapping.ColumnMappings.Add("CountryRegionCode", "CountryRegionCode");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Person].[CountryRegion] WHERE (([CountryRegionCode] = @Original_Coun" +
                "tryRegionCode) AND ([Name] = @Original_Name) AND ([ModifiedDate] = @Original_Mod" +
                "ifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CountryRegionCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CountryRegionCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = "INSERT INTO [Person].[CountryRegion] ([CountryRegionCode], [Name], [ModifiedDate]" +
                ") VALUES (@CountryRegionCode, @Name, @ModifiedDate);\r\nSELECT CountryRegionCode, " +
                "Name, ModifiedDate FROM Person.CountryRegion WHERE (CountryRegionCode = @Country" +
                "RegionCode)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CountryRegionCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CountryRegionCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Person].[CountryRegion] SET [CountryRegionCode] = @CountryRegionCode, [Name] = @Name, [ModifiedDate] = @ModifiedDate WHERE (([CountryRegionCode] = @Original_CountryRegionCode) AND ([Name] = @Original_Name) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT CountryRegionCode, Name, ModifiedDate FROM Person.CountryRegion WHERE (CountryRegionCode = @CountryRegionCode)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CountryRegionCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CountryRegionCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CountryRegionCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CountryRegionCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT CountryRegionCode, Name, ModifiedDate FROM Person.CountryRegion";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.CountryRegionDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.CountryRegionDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.CountryRegionDataTable dataTable = new AdventureWorksDataSet.CountryRegionDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.CountryRegionDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "CountryRegion");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(string Original_CountryRegionCode, string Original_Name, System.DateTime Original_ModifiedDate) {
            if ((Original_CountryRegionCode == null)) {
                throw new System.ArgumentNullException("Original_CountryRegionCode");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_CountryRegionCode));
            }
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name));
            }
            this.Adapter.DeleteCommand.Parameters[2].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string CountryRegionCode, string Name, System.DateTime ModifiedDate) {
            if ((CountryRegionCode == null)) {
                throw new System.ArgumentNullException("CountryRegionCode");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(CountryRegionCode));
            }
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Name));
            }
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(string CountryRegionCode, string Name, System.DateTime ModifiedDate, string Original_CountryRegionCode, string Original_Name, System.DateTime Original_ModifiedDate) {
            if ((CountryRegionCode == null)) {
                throw new System.ArgumentNullException("CountryRegionCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(CountryRegionCode));
            }
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Name));
            }
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            if ((Original_CountryRegionCode == null)) {
                throw new System.ArgumentNullException("Original_CountryRegionCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_CountryRegionCode));
            }
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_Name));
            }
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 StateProvinceTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public StateProvinceTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "StateProvince";
            tableMapping.ColumnMappings.Add("StateProvinceID", "StateProvinceID");
            tableMapping.ColumnMappings.Add("StateProvinceCode", "StateProvinceCode");
            tableMapping.ColumnMappings.Add("CountryRegionCode", "CountryRegionCode");
            tableMapping.ColumnMappings.Add("IsOnlyStateProvinceFlag", "IsOnlyStateProvinceFlag");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("TerritoryID", "TerritoryID");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Person].[StateProvince] WHERE (([StateProvinceID] = @Original_StateProvinceID) AND ([StateProvinceCode] = @Original_StateProvinceCode) AND ([CountryRegionCode] = @Original_CountryRegionCode) AND ([IsOnlyStateProvinceFlag] = @Original_IsOnlyStateProvinceFlag) AND ([Name] = @Original_Name) AND ([TerritoryID] = @Original_TerritoryID) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StateProvinceID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "StateProvinceID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StateProvinceCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "StateProvinceCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CountryRegionCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CountryRegionCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_IsOnlyStateProvinceFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "IsOnlyStateProvinceFlag", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Person].[StateProvince] ([StateProvinceCode], [CountryRegionCode], [IsOnlyStateProvinceFlag], [Name], [TerritoryID], [rowguid], [ModifiedDate]) VALUES (@StateProvinceCode, @CountryRegionCode, @IsOnlyStateProvinceFlag, @Name, @TerritoryID, @rowguid, @ModifiedDate);
SELECT StateProvinceID, StateProvinceCode, CountryRegionCode, IsOnlyStateProvinceFlag, Name, TerritoryID, rowguid, ModifiedDate FROM Person.StateProvince WHERE (StateProvinceID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StateProvinceCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "StateProvinceCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CountryRegionCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CountryRegionCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsOnlyStateProvinceFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "IsOnlyStateProvinceFlag", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Person].[StateProvince] SET [StateProvinceCode] = @StateProvinceCode, [CountryRegionCode] = @CountryRegionCode, [IsOnlyStateProvinceFlag] = @IsOnlyStateProvinceFlag, [Name] = @Name, [TerritoryID] = @TerritoryID, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([StateProvinceID] = @Original_StateProvinceID) AND ([StateProvinceCode] = @Original_StateProvinceCode) AND ([CountryRegionCode] = @Original_CountryRegionCode) AND ([IsOnlyStateProvinceFlag] = @Original_IsOnlyStateProvinceFlag) AND ([Name] = @Original_Name) AND ([TerritoryID] = @Original_TerritoryID) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT StateProvinceID, StateProvinceCode, CountryRegionCode, IsOnlyStateProvinceFlag, Name, TerritoryID, rowguid, ModifiedDate FROM Person.StateProvince WHERE (StateProvinceID = @StateProvinceID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StateProvinceCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "StateProvinceCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CountryRegionCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CountryRegionCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsOnlyStateProvinceFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "IsOnlyStateProvinceFlag", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StateProvinceID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "StateProvinceID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StateProvinceCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "StateProvinceCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CountryRegionCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CountryRegionCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_IsOnlyStateProvinceFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "IsOnlyStateProvinceFlag", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StateProvinceID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "StateProvinceID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT StateProvinceID, StateProvinceCode, CountryRegionCode, IsOnlyStateProvince" +
                "Flag, Name, TerritoryID, rowguid, ModifiedDate FROM Person.StateProvince";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.StateProvinceDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.StateProvinceDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.StateProvinceDataTable dataTable = new AdventureWorksDataSet.StateProvinceDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.StateProvinceDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "StateProvince");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_StateProvinceID, string Original_StateProvinceCode, string Original_CountryRegionCode, bool Original_IsOnlyStateProvinceFlag, string Original_Name, int Original_TerritoryID, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_StateProvinceID));
            if ((Original_StateProvinceCode == null)) {
                throw new System.ArgumentNullException("Original_StateProvinceCode");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_StateProvinceCode));
            }
            if ((Original_CountryRegionCode == null)) {
                throw new System.ArgumentNullException("Original_CountryRegionCode");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_CountryRegionCode));
            }
            this.Adapter.DeleteCommand.Parameters[3].Value = ((bool)(Original_IsOnlyStateProvinceFlag));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_Name));
            }
            this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(Original_TerritoryID));
            this.Adapter.DeleteCommand.Parameters[6].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[7].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string StateProvinceCode, string CountryRegionCode, bool IsOnlyStateProvinceFlag, string Name, int TerritoryID, System.Guid rowguid, System.DateTime ModifiedDate) {
            if ((StateProvinceCode == null)) {
                throw new System.ArgumentNullException("StateProvinceCode");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(StateProvinceCode));
            }
            if ((CountryRegionCode == null)) {
                throw new System.ArgumentNullException("CountryRegionCode");
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(CountryRegionCode));
            }
            this.Adapter.InsertCommand.Parameters[2].Value = ((bool)(IsOnlyStateProvinceFlag));
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Name));
            }
            this.Adapter.InsertCommand.Parameters[4].Value = ((int)(TerritoryID));
            this.Adapter.InsertCommand.Parameters[5].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[6].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    string StateProvinceCode, 
                    string CountryRegionCode, 
                    bool IsOnlyStateProvinceFlag, 
                    string Name, 
                    int TerritoryID, 
                    System.Guid rowguid, 
                    System.DateTime ModifiedDate, 
                    int Original_StateProvinceID, 
                    string Original_StateProvinceCode, 
                    string Original_CountryRegionCode, 
                    bool Original_IsOnlyStateProvinceFlag, 
                    string Original_Name, 
                    int Original_TerritoryID, 
                    System.Guid Original_rowguid, 
                    System.DateTime Original_ModifiedDate, 
                    int StateProvinceID) {
            if ((StateProvinceCode == null)) {
                throw new System.ArgumentNullException("StateProvinceCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(StateProvinceCode));
            }
            if ((CountryRegionCode == null)) {
                throw new System.ArgumentNullException("CountryRegionCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(CountryRegionCode));
            }
            this.Adapter.UpdateCommand.Parameters[2].Value = ((bool)(IsOnlyStateProvinceFlag));
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Name));
            }
            this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(TerritoryID));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_StateProvinceID));
            if ((Original_StateProvinceCode == null)) {
                throw new System.ArgumentNullException("Original_StateProvinceCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_StateProvinceCode));
            }
            if ((Original_CountryRegionCode == null)) {
                throw new System.ArgumentNullException("Original_CountryRegionCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_CountryRegionCode));
            }
            this.Adapter.UpdateCommand.Parameters[10].Value = ((bool)(Original_IsOnlyStateProvinceFlag));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_Name));
            }
            this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(Original_TerritoryID));
            this.Adapter.UpdateCommand.Parameters[13].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[14].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(StateProvinceID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 BillOfMaterialsTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public BillOfMaterialsTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "BillOfMaterials";
            tableMapping.ColumnMappings.Add("BillOfMaterialsID", "BillOfMaterialsID");
            tableMapping.ColumnMappings.Add("ProductAssemblyID", "ProductAssemblyID");
            tableMapping.ColumnMappings.Add("ComponentID", "ComponentID");
            tableMapping.ColumnMappings.Add("StartDate", "StartDate");
            tableMapping.ColumnMappings.Add("EndDate", "EndDate");
            tableMapping.ColumnMappings.Add("UnitMeasureCode", "UnitMeasureCode");
            tableMapping.ColumnMappings.Add("BOMLevel", "BOMLevel");
            tableMapping.ColumnMappings.Add("PerAssemblyQty", "PerAssemblyQty");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Production].[BillOfMaterials] WHERE (([BillOfMaterialsID] = @Original_BillOfMaterialsID) AND ((@IsNull_ProductAssemblyID = 1 AND [ProductAssemblyID] IS NULL) OR ([ProductAssemblyID] = @Original_ProductAssemblyID)) AND ([ComponentID] = @Original_ComponentID) AND ([StartDate] = @Original_StartDate) AND ((@IsNull_EndDate = 1 AND [EndDate] IS NULL) OR ([EndDate] = @Original_EndDate)) AND ([UnitMeasureCode] = @Original_UnitMeasureCode) AND ([BOMLevel] = @Original_BOMLevel) AND ([PerAssemblyQty] = @Original_PerAssemblyQty) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_BillOfMaterialsID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "BillOfMaterialsID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ProductAssemblyID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductAssemblyID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductAssemblyID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductAssemblyID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ComponentID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ComponentID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_EndDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_UnitMeasureCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitMeasureCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_BOMLevel", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "BOMLevel", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PerAssemblyQty", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 8, 2, "PerAssemblyQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Production].[BillOfMaterials] ([ProductAssemblyID], [ComponentID], [StartDate], [EndDate], [UnitMeasureCode], [BOMLevel], [PerAssemblyQty], [ModifiedDate]) VALUES (@ProductAssemblyID, @ComponentID, @StartDate, @EndDate, @UnitMeasureCode, @BOMLevel, @PerAssemblyQty, @ModifiedDate);
SELECT BillOfMaterialsID, ProductAssemblyID, ComponentID, StartDate, EndDate, UnitMeasureCode, BOMLevel, PerAssemblyQty, ModifiedDate FROM Production.BillOfMaterials WHERE (BillOfMaterialsID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductAssemblyID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductAssemblyID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ComponentID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ComponentID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@UnitMeasureCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitMeasureCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@BOMLevel", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "BOMLevel", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PerAssemblyQty", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 8, 2, "PerAssemblyQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Production].[BillOfMaterials] SET [ProductAssemblyID] = @ProductAssemblyID, [ComponentID] = @ComponentID, [StartDate] = @StartDate, [EndDate] = @EndDate, [UnitMeasureCode] = @UnitMeasureCode, [BOMLevel] = @BOMLevel, [PerAssemblyQty] = @PerAssemblyQty, [ModifiedDate] = @ModifiedDate WHERE (([BillOfMaterialsID] = @Original_BillOfMaterialsID) AND ((@IsNull_ProductAssemblyID = 1 AND [ProductAssemblyID] IS NULL) OR ([ProductAssemblyID] = @Original_ProductAssemblyID)) AND ([ComponentID] = @Original_ComponentID) AND ([StartDate] = @Original_StartDate) AND ((@IsNull_EndDate = 1 AND [EndDate] IS NULL) OR ([EndDate] = @Original_EndDate)) AND ([UnitMeasureCode] = @Original_UnitMeasureCode) AND ([BOMLevel] = @Original_BOMLevel) AND ([PerAssemblyQty] = @Original_PerAssemblyQty) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT BillOfMaterialsID, ProductAssemblyID, ComponentID, StartDate, EndDate, UnitMeasureCode, BOMLevel, PerAssemblyQty, ModifiedDate FROM Production.BillOfMaterials WHERE (BillOfMaterialsID = @BillOfMaterialsID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductAssemblyID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductAssemblyID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ComponentID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ComponentID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@UnitMeasureCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitMeasureCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@BOMLevel", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "BOMLevel", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PerAssemblyQty", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 8, 2, "PerAssemblyQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_BillOfMaterialsID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "BillOfMaterialsID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ProductAssemblyID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductAssemblyID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductAssemblyID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductAssemblyID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ComponentID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ComponentID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_EndDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_UnitMeasureCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitMeasureCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_BOMLevel", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "BOMLevel", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PerAssemblyQty", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 8, 2, "PerAssemblyQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@BillOfMaterialsID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "BillOfMaterialsID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT BillOfMaterialsID, ProductAssemblyID, ComponentID, StartDate, EndDate, Uni" +
                "tMeasureCode, BOMLevel, PerAssemblyQty, ModifiedDate FROM Production.BillOfMater" +
                "ials";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.BillOfMaterialsDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.BillOfMaterialsDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.BillOfMaterialsDataTable dataTable = new AdventureWorksDataSet.BillOfMaterialsDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.BillOfMaterialsDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "BillOfMaterials");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_BillOfMaterialsID, System.Nullable<int> Original_ProductAssemblyID, int Original_ComponentID, System.DateTime Original_StartDate, System.Nullable<System.DateTime> Original_EndDate, string Original_UnitMeasureCode, short Original_BOMLevel, decimal Original_PerAssemblyQty, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_BillOfMaterialsID));
            if ((Original_ProductAssemblyID.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_ProductAssemblyID.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[2].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(Original_ComponentID));
            this.Adapter.DeleteCommand.Parameters[4].Value = ((System.DateTime)(Original_StartDate));
            if ((Original_EndDate.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[6].Value = ((System.DateTime)(Original_EndDate.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[6].Value = System.DBNull.Value;
            }
            if ((Original_UnitMeasureCode == null)) {
                throw new System.ArgumentNullException("Original_UnitMeasureCode");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[7].Value = ((string)(Original_UnitMeasureCode));
            }
            this.Adapter.DeleteCommand.Parameters[8].Value = ((short)(Original_BOMLevel));
            this.Adapter.DeleteCommand.Parameters[9].Value = ((decimal)(Original_PerAssemblyQty));
            this.Adapter.DeleteCommand.Parameters[10].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(System.Nullable<int> ProductAssemblyID, int ComponentID, System.DateTime StartDate, System.Nullable<System.DateTime> EndDate, string UnitMeasureCode, short BOMLevel, decimal PerAssemblyQty, System.DateTime ModifiedDate) {
            if ((ProductAssemblyID.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[0].Value = ((int)(ProductAssemblyID.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = System.DBNull.Value;
            }
            this.Adapter.InsertCommand.Parameters[1].Value = ((int)(ComponentID));
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(StartDate));
            if ((EndDate.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[3].Value = ((System.DateTime)(EndDate.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value;
            }
            if ((UnitMeasureCode == null)) {
                throw new System.ArgumentNullException("UnitMeasureCode");
            }
            else {
                this.Adapter.InsertCommand.Parameters[4].Value = ((string)(UnitMeasureCode));
            }
            this.Adapter.InsertCommand.Parameters[5].Value = ((short)(BOMLevel));
            this.Adapter.InsertCommand.Parameters[6].Value = ((decimal)(PerAssemblyQty));
            this.Adapter.InsertCommand.Parameters[7].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    System.Nullable<int> ProductAssemblyID, 
                    int ComponentID, 
                    System.DateTime StartDate, 
                    System.Nullable<System.DateTime> EndDate, 
                    string UnitMeasureCode, 
                    short BOMLevel, 
                    decimal PerAssemblyQty, 
                    System.DateTime ModifiedDate, 
                    int Original_BillOfMaterialsID, 
                    System.Nullable<int> Original_ProductAssemblyID, 
                    int Original_ComponentID, 
                    System.DateTime Original_StartDate, 
                    System.Nullable<System.DateTime> Original_EndDate, 
                    string Original_UnitMeasureCode, 
                    short Original_BOMLevel, 
                    decimal Original_PerAssemblyQty, 
                    System.DateTime Original_ModifiedDate, 
                    int BillOfMaterialsID) {
            if ((ProductAssemblyID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(ProductAssemblyID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(ComponentID));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(StartDate));
            if ((EndDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(EndDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value;
            }
            if ((UnitMeasureCode == null)) {
                throw new System.ArgumentNullException("UnitMeasureCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(UnitMeasureCode));
            }
            this.Adapter.UpdateCommand.Parameters[5].Value = ((short)(BOMLevel));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((decimal)(PerAssemblyQty));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Original_BillOfMaterialsID));
            if ((Original_ProductAssemblyID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_ProductAssemblyID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[10].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Original_ComponentID));
            this.Adapter.UpdateCommand.Parameters[12].Value = ((System.DateTime)(Original_StartDate));
            if ((Original_EndDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[14].Value = ((System.DateTime)(Original_EndDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[14].Value = System.DBNull.Value;
            }
            if ((Original_UnitMeasureCode == null)) {
                throw new System.ArgumentNullException("Original_UnitMeasureCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[15].Value = ((string)(Original_UnitMeasureCode));
            }
            this.Adapter.UpdateCommand.Parameters[16].Value = ((short)(Original_BOMLevel));
            this.Adapter.UpdateCommand.Parameters[17].Value = ((decimal)(Original_PerAssemblyQty));
            this.Adapter.UpdateCommand.Parameters[18].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(BillOfMaterialsID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 CultureTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public CultureTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "Culture";
            tableMapping.ColumnMappings.Add("CultureID", "CultureID");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Production].[Culture] WHERE (([CultureID] = @Original_CultureID) AND" +
                " ([Name] = @Original_Name) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CultureID", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CultureID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = "INSERT INTO [Production].[Culture] ([CultureID], [Name], [ModifiedDate]) VALUES (" +
                "@CultureID, @Name, @ModifiedDate);\r\nSELECT CultureID, Name, ModifiedDate FROM Pr" +
                "oduction.Culture WHERE (CultureID = @CultureID)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CultureID", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CultureID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Production].[Culture] SET [CultureID] = @CultureID, [Name] = @Name, [ModifiedDate] = @ModifiedDate WHERE (([CultureID] = @Original_CultureID) AND ([Name] = @Original_Name) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT CultureID, Name, ModifiedDate FROM Production.Culture WHERE (CultureID = @CultureID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CultureID", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CultureID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CultureID", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CultureID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT CultureID, Name, ModifiedDate FROM Production.Culture";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.CultureDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.CultureDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.CultureDataTable dataTable = new AdventureWorksDataSet.CultureDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.CultureDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "Culture");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(string Original_CultureID, string Original_Name, System.DateTime Original_ModifiedDate) {
            if ((Original_CultureID == null)) {
                throw new System.ArgumentNullException("Original_CultureID");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_CultureID));
            }
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name));
            }
            this.Adapter.DeleteCommand.Parameters[2].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string CultureID, string Name, System.DateTime ModifiedDate) {
            if ((CultureID == null)) {
                throw new System.ArgumentNullException("CultureID");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(CultureID));
            }
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Name));
            }
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(string CultureID, string Name, System.DateTime ModifiedDate, string Original_CultureID, string Original_Name, System.DateTime Original_ModifiedDate) {
            if ((CultureID == null)) {
                throw new System.ArgumentNullException("CultureID");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(CultureID));
            }
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Name));
            }
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            if ((Original_CultureID == null)) {
                throw new System.ArgumentNullException("Original_CultureID");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_CultureID));
            }
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_Name));
            }
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 DocumentTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public DocumentTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "Document";
            tableMapping.ColumnMappings.Add("DocumentID", "DocumentID");
            tableMapping.ColumnMappings.Add("Title", "Title");
            tableMapping.ColumnMappings.Add("FileName", "FileName");
            tableMapping.ColumnMappings.Add("FileExtension", "FileExtension");
            tableMapping.ColumnMappings.Add("Revision", "Revision");
            tableMapping.ColumnMappings.Add("ChangeNumber", "ChangeNumber");
            tableMapping.ColumnMappings.Add("Status", "Status");
            tableMapping.ColumnMappings.Add("DocumentSummary", "DocumentSummary");
            tableMapping.ColumnMappings.Add("Document", "Document");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Production].[Document] WHERE (([DocumentID] = @Original_DocumentID) AND ([Title] = @Original_Title) AND ([FileName] = @Original_FileName) AND ([FileExtension] = @Original_FileExtension) AND ([Revision] = @Original_Revision) AND ([ChangeNumber] = @Original_ChangeNumber) AND ([Status] = @Original_Status) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_DocumentID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "DocumentID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_FileName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "FileName", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_FileExtension", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "FileExtension", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Revision", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Revision", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ChangeNumber", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ChangeNumber", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Status", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "Status", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Production].[Document] ([Title], [FileName], [FileExtension], [Revision], [ChangeNumber], [Status], [DocumentSummary], [Document], [ModifiedDate]) VALUES (@Title, @FileName, @FileExtension, @Revision, @ChangeNumber, @Status, @DocumentSummary, @Document, @ModifiedDate);
SELECT DocumentID, Title, FileName, FileExtension, Revision, ChangeNumber, Status, DocumentSummary, [Document], ModifiedDate FROM Production.[Document] WHERE (DocumentID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@FileName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "FileName", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@FileExtension", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "FileExtension", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Revision", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Revision", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ChangeNumber", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ChangeNumber", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Status", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "Status", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DocumentSummary", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "DocumentSummary", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Document", System.Data.SqlDbType.VarBinary, 0, System.Data.ParameterDirection.Input, 0, 0, "Document", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Production].[Document] SET [Title] = @Title, [FileName] = @FileName, [FileExtension] = @FileExtension, [Revision] = @Revision, [ChangeNumber] = @ChangeNumber, [Status] = @Status, [DocumentSummary] = @DocumentSummary, [Document] = @Document, [ModifiedDate] = @ModifiedDate WHERE (([DocumentID] = @Original_DocumentID) AND ([Title] = @Original_Title) AND ([FileName] = @Original_FileName) AND ([FileExtension] = @Original_FileExtension) AND ([Revision] = @Original_Revision) AND ([ChangeNumber] = @Original_ChangeNumber) AND ([Status] = @Original_Status) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT DocumentID, Title, FileName, FileExtension, Revision, ChangeNumber, Status, DocumentSummary, [Document], ModifiedDate FROM Production.[Document] WHERE (DocumentID = @DocumentID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@FileName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "FileName", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@FileExtension", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "FileExtension", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Revision", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Revision", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ChangeNumber", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ChangeNumber", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Status", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "Status", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DocumentSummary", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "DocumentSummary", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Document", System.Data.SqlDbType.VarBinary, 0, System.Data.ParameterDirection.Input, 0, 0, "Document", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_DocumentID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "DocumentID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_FileName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "FileName", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_FileExtension", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "FileExtension", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Revision", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Revision", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ChangeNumber", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ChangeNumber", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Status", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "Status", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DocumentID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "DocumentID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT DocumentID, Title, FileName, FileExtension, Revision, ChangeNumber, Status" +
                ", DocumentSummary, Document, ModifiedDate FROM Production.Document";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.DocumentDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.DocumentDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.DocumentDataTable dataTable = new AdventureWorksDataSet.DocumentDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.DocumentDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "Document");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_DocumentID, string Original_Title, string Original_FileName, string Original_FileExtension, string Original_Revision, int Original_ChangeNumber, byte Original_Status, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_DocumentID));
            if ((Original_Title == null)) {
                throw new System.ArgumentNullException("Original_Title");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Title));
            }
            if ((Original_FileName == null)) {
                throw new System.ArgumentNullException("Original_FileName");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_FileName));
            }
            if ((Original_FileExtension == null)) {
                throw new System.ArgumentNullException("Original_FileExtension");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_FileExtension));
            }
            if ((Original_Revision == null)) {
                throw new System.ArgumentNullException("Original_Revision");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_Revision));
            }
            this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(Original_ChangeNumber));
            this.Adapter.DeleteCommand.Parameters[6].Value = ((byte)(Original_Status));
            this.Adapter.DeleteCommand.Parameters[7].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string Title, string FileName, string FileExtension, string Revision, int ChangeNumber, byte Status, string DocumentSummary, byte[] Document, System.DateTime ModifiedDate) {
            if ((Title == null)) {
                throw new System.ArgumentNullException("Title");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Title));
            }
            if ((FileName == null)) {
                throw new System.ArgumentNullException("FileName");
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(FileName));
            }
            if ((FileExtension == null)) {
                throw new System.ArgumentNullException("FileExtension");
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = ((string)(FileExtension));
            }
            if ((Revision == null)) {
                throw new System.ArgumentNullException("Revision");
            }
            else {
                this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Revision));
            }
            this.Adapter.InsertCommand.Parameters[4].Value = ((int)(ChangeNumber));
            this.Adapter.InsertCommand.Parameters[5].Value = ((byte)(Status));
            if ((DocumentSummary == null)) {
                this.Adapter.InsertCommand.Parameters[6].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[6].Value = ((string)(DocumentSummary));
            }
            if ((Document == null)) {
                this.Adapter.InsertCommand.Parameters[7].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[7].Value = ((byte[])(Document));
            }
            this.Adapter.InsertCommand.Parameters[8].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    string Title, 
                    string FileName, 
                    string FileExtension, 
                    string Revision, 
                    int ChangeNumber, 
                    byte Status, 
                    string DocumentSummary, 
                    byte[] Document, 
                    System.DateTime ModifiedDate, 
                    int Original_DocumentID, 
                    string Original_Title, 
                    string Original_FileName, 
                    string Original_FileExtension, 
                    string Original_Revision, 
                    int Original_ChangeNumber, 
                    byte Original_Status, 
                    System.DateTime Original_ModifiedDate, 
                    int DocumentID) {
            if ((Title == null)) {
                throw new System.ArgumentNullException("Title");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Title));
            }
            if ((FileName == null)) {
                throw new System.ArgumentNullException("FileName");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(FileName));
            }
            if ((FileExtension == null)) {
                throw new System.ArgumentNullException("FileExtension");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(FileExtension));
            }
            if ((Revision == null)) {
                throw new System.ArgumentNullException("Revision");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Revision));
            }
            this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(ChangeNumber));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((byte)(Status));
            if ((DocumentSummary == null)) {
                this.Adapter.UpdateCommand.Parameters[6].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(DocumentSummary));
            }
            if ((Document == null)) {
                this.Adapter.UpdateCommand.Parameters[7].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[7].Value = ((byte[])(Document));
            }
            this.Adapter.UpdateCommand.Parameters[8].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_DocumentID));
            if ((Original_Title == null)) {
                throw new System.ArgumentNullException("Original_Title");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_Title));
            }
            if ((Original_FileName == null)) {
                throw new System.ArgumentNullException("Original_FileName");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_FileName));
            }
            if ((Original_FileExtension == null)) {
                throw new System.ArgumentNullException("Original_FileExtension");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Original_FileExtension));
            }
            if ((Original_Revision == null)) {
                throw new System.ArgumentNullException("Original_Revision");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[13].Value = ((string)(Original_Revision));
            }
            this.Adapter.UpdateCommand.Parameters[14].Value = ((int)(Original_ChangeNumber));
            this.Adapter.UpdateCommand.Parameters[15].Value = ((byte)(Original_Status));
            this.Adapter.UpdateCommand.Parameters[16].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[17].Value = ((int)(DocumentID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 IllustrationTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public IllustrationTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "Illustration";
            tableMapping.ColumnMappings.Add("IllustrationID", "IllustrationID");
            tableMapping.ColumnMappings.Add("Diagram", "Diagram");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Production].[Illustration] WHERE (([IllustrationID] = @Original_Illu" +
                "strationID) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_IllustrationID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "IllustrationID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = "INSERT INTO [Production].[Illustration] ([Diagram], [ModifiedDate]) VALUES (@Diag" +
                "ram, @ModifiedDate);\r\nSELECT IllustrationID, Diagram, ModifiedDate FROM Producti" +
                "on.Illustration WHERE (IllustrationID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Diagram", System.Data.SqlDbType.Xml, 0, System.Data.ParameterDirection.Input, 0, 0, "Diagram", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Production].[Illustration] SET [Diagram] = @Diagram, [ModifiedDate] = @ModifiedDate WHERE (([IllustrationID] = @Original_IllustrationID) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT IllustrationID, Diagram, ModifiedDate FROM Production.Illustration WHERE (IllustrationID = @IllustrationID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Diagram", System.Data.SqlDbType.Xml, 0, System.Data.ParameterDirection.Input, 0, 0, "Diagram", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_IllustrationID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "IllustrationID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IllustrationID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "IllustrationID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT IllustrationID, Diagram, ModifiedDate FROM Production.Illustration";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.IllustrationDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.IllustrationDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.IllustrationDataTable dataTable = new AdventureWorksDataSet.IllustrationDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.IllustrationDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "Illustration");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_IllustrationID, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_IllustrationID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(object Diagram, System.DateTime ModifiedDate) {
            if ((Diagram == null)) {
                this.Adapter.InsertCommand.Parameters[0].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((object)(Diagram));
            }
            this.Adapter.InsertCommand.Parameters[1].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(object Diagram, System.DateTime ModifiedDate, int Original_IllustrationID, System.DateTime Original_ModifiedDate, int IllustrationID) {
            if ((Diagram == null)) {
                this.Adapter.UpdateCommand.Parameters[0].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((object)(Diagram));
            }
            this.Adapter.UpdateCommand.Parameters[1].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_IllustrationID));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(IllustrationID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 LocationTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public LocationTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "Location";
            tableMapping.ColumnMappings.Add("LocationID", "LocationID");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("CostRate", "CostRate");
            tableMapping.ColumnMappings.Add("Availability", "Availability");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Production].[Location] WHERE (([LocationID] = @Original_LocationID) " +
                "AND ([Name] = @Original_Name) AND ([CostRate] = @Original_CostRate) AND ([Availa" +
                "bility] = @Original_Availability) AND ([ModifiedDate] = @Original_ModifiedDate))" +
                "";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_LocationID", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "LocationID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CostRate", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "CostRate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Availability", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 8, 2, "Availability", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Production].[Location] ([Name], [CostRate], [Availability], [ModifiedDate]) VALUES (@Name, @CostRate, @Availability, @ModifiedDate);
SELECT LocationID, Name, CostRate, Availability, ModifiedDate FROM Production.Location WHERE (LocationID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CostRate", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "CostRate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Availability", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 8, 2, "Availability", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Production].[Location] SET [Name] = @Name, [CostRate] = @CostRate, [Availability] = @Availability, [ModifiedDate] = @ModifiedDate WHERE (([LocationID] = @Original_LocationID) AND ([Name] = @Original_Name) AND ([CostRate] = @Original_CostRate) AND ([Availability] = @Original_Availability) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT LocationID, Name, CostRate, Availability, ModifiedDate FROM Production.Location WHERE (LocationID = @LocationID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CostRate", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "CostRate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Availability", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 8, 2, "Availability", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_LocationID", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "LocationID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CostRate", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "CostRate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Availability", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 8, 2, "Availability", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@LocationID", System.Data.SqlDbType.Int, 2, System.Data.ParameterDirection.Input, 0, 0, "LocationID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT LocationID, Name, CostRate, Availability, ModifiedDate FROM Production.Loc" +
                "ation";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.LocationDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.LocationDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.LocationDataTable dataTable = new AdventureWorksDataSet.LocationDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.LocationDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "Location");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(short Original_LocationID, string Original_Name, decimal Original_CostRate, decimal Original_Availability, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((short)(Original_LocationID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name));
            }
            this.Adapter.DeleteCommand.Parameters[2].Value = ((decimal)(Original_CostRate));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((decimal)(Original_Availability));
            this.Adapter.DeleteCommand.Parameters[4].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string Name, decimal CostRate, decimal Availability, System.DateTime ModifiedDate) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name));
            }
            this.Adapter.InsertCommand.Parameters[1].Value = ((decimal)(CostRate));
            this.Adapter.InsertCommand.Parameters[2].Value = ((decimal)(Availability));
            this.Adapter.InsertCommand.Parameters[3].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(string Name, decimal CostRate, decimal Availability, System.DateTime ModifiedDate, short Original_LocationID, string Original_Name, decimal Original_CostRate, decimal Original_Availability, System.DateTime Original_ModifiedDate, int LocationID) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name));
            }
            this.Adapter.UpdateCommand.Parameters[1].Value = ((decimal)(CostRate));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((decimal)(Availability));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((short)(Original_LocationID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Original_Name));
            }
            this.Adapter.UpdateCommand.Parameters[6].Value = ((decimal)(Original_CostRate));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((decimal)(Original_Availability));
            this.Adapter.UpdateCommand.Parameters[8].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(LocationID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 ProductTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public ProductTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "Product";
            tableMapping.ColumnMappings.Add("ProductID", "ProductID");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("ProductNumber", "ProductNumber");
            tableMapping.ColumnMappings.Add("MakeFlag", "MakeFlag");
            tableMapping.ColumnMappings.Add("FinishedGoodsFlag", "FinishedGoodsFlag");
            tableMapping.ColumnMappings.Add("Color", "Color");
            tableMapping.ColumnMappings.Add("SafetyStockLevel", "SafetyStockLevel");
            tableMapping.ColumnMappings.Add("ReorderPoint", "ReorderPoint");
            tableMapping.ColumnMappings.Add("StandardCost", "StandardCost");
            tableMapping.ColumnMappings.Add("ListPrice", "ListPrice");
            tableMapping.ColumnMappings.Add("Size", "Size");
            tableMapping.ColumnMappings.Add("SizeUnitMeasureCode", "SizeUnitMeasureCode");
            tableMapping.ColumnMappings.Add("WeightUnitMeasureCode", "WeightUnitMeasureCode");
            tableMapping.ColumnMappings.Add("Weight", "Weight");
            tableMapping.ColumnMappings.Add("DaysToManufacture", "DaysToManufacture");
            tableMapping.ColumnMappings.Add("ProductLine", "ProductLine");
            tableMapping.ColumnMappings.Add("Class", "Class");
            tableMapping.ColumnMappings.Add("Style", "Style");
            tableMapping.ColumnMappings.Add("ProductSubcategoryID", "ProductSubcategoryID");
            tableMapping.ColumnMappings.Add("ProductModelID", "ProductModelID");
            tableMapping.ColumnMappings.Add("SellStartDate", "SellStartDate");
            tableMapping.ColumnMappings.Add("SellEndDate", "SellEndDate");
            tableMapping.ColumnMappings.Add("DiscontinuedDate", "DiscontinuedDate");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Production].[Product] WHERE (([ProductID] = @Original_ProductID) AND" +
                " ([Name] = @Original_Name) AND ([ProductNumber] = @Original_ProductNumber) AND (" +
                "[MakeFlag] = @Original_MakeFlag) AND ([FinishedGoodsFlag] = @Original_FinishedGo" +
                "odsFlag) AND ((@IsNull_Color = 1 AND [Color] IS NULL) OR ([Color] = @Original_Co" +
                "lor)) AND ([SafetyStockLevel] = @Original_SafetyStockLevel) AND ([ReorderPoint] " +
                "= @Original_ReorderPoint) AND ([StandardCost] = @Original_StandardCost) AND ([Li" +
                "stPrice] = @Original_ListPrice) AND ((@IsNull_Size = 1 AND [Size] IS NULL) OR ([" +
                "Size] = @Original_Size)) AND ((@IsNull_SizeUnitMeasureCode = 1 AND [SizeUnitMeas" +
                "ureCode] IS NULL) OR ([SizeUnitMeasureCode] = @Original_SizeUnitMeasureCode)) AN" +
                "D ((@IsNull_WeightUnitMeasureCode = 1 AND [WeightUnitMeasureCode] IS NULL) OR ([" +
                "WeightUnitMeasureCode] = @Original_WeightUnitMeasureCode)) AND ((@IsNull_Weight " +
                "= 1 AND [Weight] IS NULL) OR ([Weight] = @Original_Weight)) AND ([DaysToManufact" +
                "ure] = @Original_DaysToManufacture) AND ((@IsNull_ProductLine = 1 AND [ProductLi" +
                "ne] IS NULL) OR ([ProductLine] = @Original_ProductLine)) AND ((@IsNull_Class = 1" +
                " AND [Class] IS NULL) OR ([Class] = @Original_Class)) AND ((@IsNull_Style = 1 AN" +
                "D [Style] IS NULL) OR ([Style] = @Original_Style)) AND ((@IsNull_ProductSubcateg" +
                "oryID = 1 AND [ProductSubcategoryID] IS NULL) OR ([ProductSubcategoryID] = @Orig" +
                "inal_ProductSubcategoryID)) AND ((@IsNull_ProductModelID = 1 AND [ProductModelID" +
                "] IS NULL) OR ([ProductModelID] = @Original_ProductModelID)) AND ([SellStartDate" +
                "] = @Original_SellStartDate) AND ((@IsNull_SellEndDate = 1 AND [SellEndDate] IS " +
                "NULL) OR ([SellEndDate] = @Original_SellEndDate)) AND ((@IsNull_DiscontinuedDate" +
                " = 1 AND [DiscontinuedDate] IS NULL) OR ([DiscontinuedDate] = @Original_Disconti" +
                "nuedDate)) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_M" +
                "odifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductNumber", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_MakeFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "MakeFlag", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_FinishedGoodsFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "FinishedGoodsFlag", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Color", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Color", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Color", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Color", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SafetyStockLevel", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "SafetyStockLevel", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ReorderPoint", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ReorderPoint", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StandardCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "StandardCost", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ListPrice", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ListPrice", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Size", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Size", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Size", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Size", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_SizeUnitMeasureCode", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SizeUnitMeasureCode", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SizeUnitMeasureCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "SizeUnitMeasureCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_WeightUnitMeasureCode", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "WeightUnitMeasureCode", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_WeightUnitMeasureCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "WeightUnitMeasureCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Weight", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Weight", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Weight", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 8, 2, "Weight", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_DaysToManufacture", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "DaysToManufacture", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ProductLine", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductLine", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductLine", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductLine", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Class", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Class", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Class", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Class", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Style", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Style", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Style", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Style", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ProductSubcategoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductSubcategoryID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductSubcategoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductSubcategoryID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ProductModelID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductModelID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductModelID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductModelID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SellStartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "SellStartDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_SellEndDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SellEndDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SellEndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "SellEndDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_DiscontinuedDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "DiscontinuedDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_DiscontinuedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "DiscontinuedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Production].[Product] ([Name], [ProductNumber], [MakeFlag], [FinishedGoodsFlag], [Color], [SafetyStockLevel], [ReorderPoint], [StandardCost], [ListPrice], [Size], [SizeUnitMeasureCode], [WeightUnitMeasureCode], [Weight], [DaysToManufacture], [ProductLine], [Class], [Style], [ProductSubcategoryID], [ProductModelID], [SellStartDate], [SellEndDate], [DiscontinuedDate], [rowguid], [ModifiedDate]) VALUES (@Name, @ProductNumber, @MakeFlag, @FinishedGoodsFlag, @Color, @SafetyStockLevel, @ReorderPoint, @StandardCost, @ListPrice, @Size, @SizeUnitMeasureCode, @WeightUnitMeasureCode, @Weight, @DaysToManufacture, @ProductLine, @Class, @Style, @ProductSubcategoryID, @ProductModelID, @SellStartDate, @SellEndDate, @DiscontinuedDate, @rowguid, @ModifiedDate);
SELECT ProductID, Name, ProductNumber, MakeFlag, FinishedGoodsFlag, Color, SafetyStockLevel, ReorderPoint, StandardCost, ListPrice, Size, SizeUnitMeasureCode, WeightUnitMeasureCode, Weight, DaysToManufacture, ProductLine, Class, Style, ProductSubcategoryID, ProductModelID, SellStartDate, SellEndDate, DiscontinuedDate, rowguid, ModifiedDate FROM Production.Product WHERE (ProductID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductNumber", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MakeFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "MakeFlag", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@FinishedGoodsFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "FinishedGoodsFlag", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Color", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Color", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SafetyStockLevel", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "SafetyStockLevel", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ReorderPoint", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ReorderPoint", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StandardCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "StandardCost", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ListPrice", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ListPrice", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Size", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Size", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SizeUnitMeasureCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "SizeUnitMeasureCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@WeightUnitMeasureCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "WeightUnitMeasureCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Weight", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 8, 2, "Weight", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DaysToManufacture", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "DaysToManufacture", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductLine", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductLine", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Class", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Class", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Style", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Style", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductSubcategoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductSubcategoryID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductModelID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductModelID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SellStartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "SellStartDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SellEndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "SellEndDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DiscontinuedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "DiscontinuedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = "UPDATE [Production].[Product] SET [Name] = @Name, [ProductNumber] = @ProductNumbe" +
                "r, [MakeFlag] = @MakeFlag, [FinishedGoodsFlag] = @FinishedGoodsFlag, [Color] = @" +
                "Color, [SafetyStockLevel] = @SafetyStockLevel, [ReorderPoint] = @ReorderPoint, [" +
                "StandardCost] = @StandardCost, [ListPrice] = @ListPrice, [Size] = @Size, [SizeUn" +
                "itMeasureCode] = @SizeUnitMeasureCode, [WeightUnitMeasureCode] = @WeightUnitMeas" +
                "ureCode, [Weight] = @Weight, [DaysToManufacture] = @DaysToManufacture, [ProductL" +
                "ine] = @ProductLine, [Class] = @Class, [Style] = @Style, [ProductSubcategoryID] " +
                "= @ProductSubcategoryID, [ProductModelID] = @ProductModelID, [SellStartDate] = @" +
                "SellStartDate, [SellEndDate] = @SellEndDate, [DiscontinuedDate] = @DiscontinuedD" +
                "ate, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([ProductID] = " +
                "@Original_ProductID) AND ([Name] = @Original_Name) AND ([ProductNumber] = @Origi" +
                "nal_ProductNumber) AND ([MakeFlag] = @Original_MakeFlag) AND ([FinishedGoodsFlag" +
                "] = @Original_FinishedGoodsFlag) AND ((@IsNull_Color = 1 AND [Color] IS NULL) OR" +
                " ([Color] = @Original_Color)) AND ([SafetyStockLevel] = @Original_SafetyStockLev" +
                "el) AND ([ReorderPoint] = @Original_ReorderPoint) AND ([StandardCost] = @Origina" +
                "l_StandardCost) AND ([ListPrice] = @Original_ListPrice) AND ((@IsNull_Size = 1 A" +
                "ND [Size] IS NULL) OR ([Size] = @Original_Size)) AND ((@IsNull_SizeUnitMeasureCo" +
                "de = 1 AND [SizeUnitMeasureCode] IS NULL) OR ([SizeUnitMeasureCode] = @Original_" +
                "SizeUnitMeasureCode)) AND ((@IsNull_WeightUnitMeasureCode = 1 AND [WeightUnitMea" +
                "sureCode] IS NULL) OR ([WeightUnitMeasureCode] = @Original_WeightUnitMeasureCode" +
                ")) AND ((@IsNull_Weight = 1 AND [Weight] IS NULL) OR ([Weight] = @Original_Weigh" +
                "t)) AND ([DaysToManufacture] = @Original_DaysToManufacture) AND ((@IsNull_Produc" +
                "tLine = 1 AND [ProductLine] IS NULL) OR ([ProductLine] = @Original_ProductLine))" +
                " AND ((@IsNull_Class = 1 AND [Class] IS NULL) OR ([Class] = @Original_Class)) AN" +
                "D ((@IsNull_Style = 1 AND [Style] IS NULL) OR ([Style] = @Original_Style)) AND (" +
                "(@IsNull_ProductSubcategoryID = 1 AND [ProductSubcategoryID] IS NULL) OR ([Produ" +
                "ctSubcategoryID] = @Original_ProductSubcategoryID)) AND ((@IsNull_ProductModelID" +
                " = 1 AND [ProductModelID] IS NULL) OR ([ProductModelID] = @Original_ProductModel" +
                "ID)) AND ([SellStartDate] = @Original_SellStartDate) AND ((@IsNull_SellEndDate =" +
                " 1 AND [SellEndDate] IS NULL) OR ([SellEndDate] = @Original_SellEndDate)) AND ((" +
                "@IsNull_DiscontinuedDate = 1 AND [DiscontinuedDate] IS NULL) OR ([DiscontinuedDa" +
                "te] = @Original_DiscontinuedDate)) AND ([rowguid] = @Original_rowguid) AND ([Mod" +
                "ifiedDate] = @Original_ModifiedDate));\r\nSELECT ProductID, Name, ProductNumber, M" +
                "akeFlag, FinishedGoodsFlag, Color, SafetyStockLevel, ReorderPoint, StandardCost," +
                " ListPrice, Size, SizeUnitMeasureCode, WeightUnitMeasureCode, Weight, DaysToManu" +
                "facture, ProductLine, Class, Style, ProductSubcategoryID, ProductModelID, SellSt" +
                "artDate, SellEndDate, DiscontinuedDate, rowguid, ModifiedDate FROM Production.Pr" +
                "oduct WHERE (ProductID = @ProductID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductNumber", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MakeFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "MakeFlag", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@FinishedGoodsFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "FinishedGoodsFlag", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Color", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Color", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SafetyStockLevel", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "SafetyStockLevel", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ReorderPoint", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ReorderPoint", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StandardCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "StandardCost", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ListPrice", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ListPrice", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Size", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Size", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SizeUnitMeasureCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "SizeUnitMeasureCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@WeightUnitMeasureCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "WeightUnitMeasureCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Weight", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 8, 2, "Weight", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DaysToManufacture", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "DaysToManufacture", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductLine", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductLine", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Class", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Class", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Style", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Style", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductSubcategoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductSubcategoryID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductModelID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductModelID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SellStartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "SellStartDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SellEndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "SellEndDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DiscontinuedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "DiscontinuedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductNumber", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_MakeFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "MakeFlag", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_FinishedGoodsFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "FinishedGoodsFlag", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Color", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Color", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Color", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Color", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SafetyStockLevel", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "SafetyStockLevel", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ReorderPoint", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ReorderPoint", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StandardCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "StandardCost", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ListPrice", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ListPrice", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Size", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Size", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Size", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Size", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_SizeUnitMeasureCode", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SizeUnitMeasureCode", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SizeUnitMeasureCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "SizeUnitMeasureCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_WeightUnitMeasureCode", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "WeightUnitMeasureCode", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_WeightUnitMeasureCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "WeightUnitMeasureCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Weight", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Weight", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Weight", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 8, 2, "Weight", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_DaysToManufacture", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "DaysToManufacture", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ProductLine", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductLine", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductLine", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductLine", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Class", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Class", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Class", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Class", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Style", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Style", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Style", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Style", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ProductSubcategoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductSubcategoryID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductSubcategoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductSubcategoryID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ProductModelID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductModelID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductModelID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductModelID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SellStartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "SellStartDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_SellEndDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SellEndDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SellEndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "SellEndDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_DiscontinuedDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "DiscontinuedDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_DiscontinuedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "DiscontinuedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = @"SELECT ProductID, Name, ProductNumber, MakeFlag, FinishedGoodsFlag, Color, SafetyStockLevel, ReorderPoint, StandardCost, ListPrice, Size, SizeUnitMeasureCode, WeightUnitMeasureCode, Weight, DaysToManufacture, ProductLine, Class, Style, ProductSubcategoryID, ProductModelID, SellStartDate, SellEndDate, DiscontinuedDate, rowguid, ModifiedDate FROM Production.Product";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.ProductDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.ProductDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.ProductDataTable dataTable = new AdventureWorksDataSet.ProductDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.ProductDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "Product");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(
                    int Original_ProductID, 
                    string Original_Name, 
                    string Original_ProductNumber, 
                    bool Original_MakeFlag, 
                    bool Original_FinishedGoodsFlag, 
                    string Original_Color, 
                    short Original_SafetyStockLevel, 
                    short Original_ReorderPoint, 
                    decimal Original_StandardCost, 
                    decimal Original_ListPrice, 
                    string Original_Size, 
                    string Original_SizeUnitMeasureCode, 
                    string Original_WeightUnitMeasureCode, 
                    System.Nullable<decimal> Original_Weight, 
                    int Original_DaysToManufacture, 
                    string Original_ProductLine, 
                    string Original_Class, 
                    string Original_Style, 
                    System.Nullable<int> Original_ProductSubcategoryID, 
                    System.Nullable<int> Original_ProductModelID, 
                    System.DateTime Original_SellStartDate, 
                    System.Nullable<System.DateTime> Original_SellEndDate, 
                    System.Nullable<System.DateTime> Original_DiscontinuedDate, 
                    System.Guid Original_rowguid, 
                    System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ProductID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name));
            }
            if ((Original_ProductNumber == null)) {
                throw new System.ArgumentNullException("Original_ProductNumber");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_ProductNumber));
            }
            this.Adapter.DeleteCommand.Parameters[3].Value = ((bool)(Original_MakeFlag));
            this.Adapter.DeleteCommand.Parameters[4].Value = ((bool)(Original_FinishedGoodsFlag));
            if ((Original_Color == null)) {
                this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[6].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_Color));
            }
            this.Adapter.DeleteCommand.Parameters[7].Value = ((short)(Original_SafetyStockLevel));
            this.Adapter.DeleteCommand.Parameters[8].Value = ((short)(Original_ReorderPoint));
            this.Adapter.DeleteCommand.Parameters[9].Value = ((decimal)(Original_StandardCost));
            this.Adapter.DeleteCommand.Parameters[10].Value = ((decimal)(Original_ListPrice));
            if ((Original_Size == null)) {
                this.Adapter.DeleteCommand.Parameters[11].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[12].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[11].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[12].Value = ((string)(Original_Size));
            }
            if ((Original_SizeUnitMeasureCode == null)) {
                this.Adapter.DeleteCommand.Parameters[13].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[14].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[13].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[14].Value = ((string)(Original_SizeUnitMeasureCode));
            }
            if ((Original_WeightUnitMeasureCode == null)) {
                this.Adapter.DeleteCommand.Parameters[15].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[16].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[15].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[16].Value = ((string)(Original_WeightUnitMeasureCode));
            }
            if ((Original_Weight.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[17].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[18].Value = ((decimal)(Original_Weight.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[17].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[18].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[19].Value = ((int)(Original_DaysToManufacture));
            if ((Original_ProductLine == null)) {
                this.Adapter.DeleteCommand.Parameters[20].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[21].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[20].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[21].Value = ((string)(Original_ProductLine));
            }
            if ((Original_Class == null)) {
                this.Adapter.DeleteCommand.Parameters[22].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[23].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[22].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[23].Value = ((string)(Original_Class));
            }
            if ((Original_Style == null)) {
                this.Adapter.DeleteCommand.Parameters[24].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[25].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[24].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[25].Value = ((string)(Original_Style));
            }
            if ((Original_ProductSubcategoryID.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[26].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[27].Value = ((int)(Original_ProductSubcategoryID.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[26].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[27].Value = System.DBNull.Value;
            }
            if ((Original_ProductModelID.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[28].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[29].Value = ((int)(Original_ProductModelID.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[28].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[29].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[30].Value = ((System.DateTime)(Original_SellStartDate));
            if ((Original_SellEndDate.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[31].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[32].Value = ((System.DateTime)(Original_SellEndDate.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[31].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[32].Value = System.DBNull.Value;
            }
            if ((Original_DiscontinuedDate.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[33].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[34].Value = ((System.DateTime)(Original_DiscontinuedDate.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[33].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[34].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[35].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[36].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(
                    string Name, 
                    string ProductNumber, 
                    bool MakeFlag, 
                    bool FinishedGoodsFlag, 
                    string Color, 
                    short SafetyStockLevel, 
                    short ReorderPoint, 
                    decimal StandardCost, 
                    decimal ListPrice, 
                    string Size, 
                    string SizeUnitMeasureCode, 
                    string WeightUnitMeasureCode, 
                    System.Nullable<decimal> Weight, 
                    int DaysToManufacture, 
                    string ProductLine, 
                    string Class, 
                    string Style, 
                    System.Nullable<int> ProductSubcategoryID, 
                    System.Nullable<int> ProductModelID, 
                    System.DateTime SellStartDate, 
                    System.Nullable<System.DateTime> SellEndDate, 
                    System.Nullable<System.DateTime> DiscontinuedDate, 
                    System.Guid rowguid, 
                    System.DateTime ModifiedDate) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name));
            }
            if ((ProductNumber == null)) {
                throw new System.ArgumentNullException("ProductNumber");
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(ProductNumber));
            }
            this.Adapter.InsertCommand.Parameters[2].Value = ((bool)(MakeFlag));
            this.Adapter.InsertCommand.Parameters[3].Value = ((bool)(FinishedGoodsFlag));
            if ((Color == null)) {
                this.Adapter.InsertCommand.Parameters[4].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[4].Value = ((string)(Color));
            }
            this.Adapter.InsertCommand.Parameters[5].Value = ((short)(SafetyStockLevel));
            this.Adapter.InsertCommand.Parameters[6].Value = ((short)(ReorderPoint));
            this.Adapter.InsertCommand.Parameters[7].Value = ((decimal)(StandardCost));
            this.Adapter.InsertCommand.Parameters[8].Value = ((decimal)(ListPrice));
            if ((Size == null)) {
                this.Adapter.InsertCommand.Parameters[9].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[9].Value = ((string)(Size));
            }
            if ((SizeUnitMeasureCode == null)) {
                this.Adapter.InsertCommand.Parameters[10].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[10].Value = ((string)(SizeUnitMeasureCode));
            }
            if ((WeightUnitMeasureCode == null)) {
                this.Adapter.InsertCommand.Parameters[11].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[11].Value = ((string)(WeightUnitMeasureCode));
            }
            if ((Weight.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[12].Value = ((decimal)(Weight.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[12].Value = System.DBNull.Value;
            }
            this.Adapter.InsertCommand.Parameters[13].Value = ((int)(DaysToManufacture));
            if ((ProductLine == null)) {
                this.Adapter.InsertCommand.Parameters[14].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[14].Value = ((string)(ProductLine));
            }
            if ((Class == null)) {
                this.Adapter.InsertCommand.Parameters[15].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[15].Value = ((string)(Class));
            }
            if ((Style == null)) {
                this.Adapter.InsertCommand.Parameters[16].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[16].Value = ((string)(Style));
            }
            if ((ProductSubcategoryID.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[17].Value = ((int)(ProductSubcategoryID.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[17].Value = System.DBNull.Value;
            }
            if ((ProductModelID.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[18].Value = ((int)(ProductModelID.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[18].Value = System.DBNull.Value;
            }
            this.Adapter.InsertCommand.Parameters[19].Value = ((System.DateTime)(SellStartDate));
            if ((SellEndDate.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[20].Value = ((System.DateTime)(SellEndDate.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[20].Value = System.DBNull.Value;
            }
            if ((DiscontinuedDate.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[21].Value = ((System.DateTime)(DiscontinuedDate.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[21].Value = System.DBNull.Value;
            }
            this.Adapter.InsertCommand.Parameters[22].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[23].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    string Name, 
                    string ProductNumber, 
                    bool MakeFlag, 
                    bool FinishedGoodsFlag, 
                    string Color, 
                    short SafetyStockLevel, 
                    short ReorderPoint, 
                    decimal StandardCost, 
                    decimal ListPrice, 
                    string Size, 
                    string SizeUnitMeasureCode, 
                    string WeightUnitMeasureCode, 
                    System.Nullable<decimal> Weight, 
                    int DaysToManufacture, 
                    string ProductLine, 
                    string Class, 
                    string Style, 
                    System.Nullable<int> ProductSubcategoryID, 
                    System.Nullable<int> ProductModelID, 
                    System.DateTime SellStartDate, 
                    System.Nullable<System.DateTime> SellEndDate, 
                    System.Nullable<System.DateTime> DiscontinuedDate, 
                    System.Guid rowguid, 
                    System.DateTime ModifiedDate, 
                    int Original_ProductID, 
                    string Original_Name, 
                    string Original_ProductNumber, 
                    bool Original_MakeFlag, 
                    bool Original_FinishedGoodsFlag, 
                    string Original_Color, 
                    short Original_SafetyStockLevel, 
                    short Original_ReorderPoint, 
                    decimal Original_StandardCost, 
                    decimal Original_ListPrice, 
                    string Original_Size, 
                    string Original_SizeUnitMeasureCode, 
                    string Original_WeightUnitMeasureCode, 
                    System.Nullable<decimal> Original_Weight, 
                    int Original_DaysToManufacture, 
                    string Original_ProductLine, 
                    string Original_Class, 
                    string Original_Style, 
                    System.Nullable<int> Original_ProductSubcategoryID, 
                    System.Nullable<int> Original_ProductModelID, 
                    System.DateTime Original_SellStartDate, 
                    System.Nullable<System.DateTime> Original_SellEndDate, 
                    System.Nullable<System.DateTime> Original_DiscontinuedDate, 
                    System.Guid Original_rowguid, 
                    System.DateTime Original_ModifiedDate, 
                    int ProductID) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name));
            }
            if ((ProductNumber == null)) {
                throw new System.ArgumentNullException("ProductNumber");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(ProductNumber));
            }
            this.Adapter.UpdateCommand.Parameters[2].Value = ((bool)(MakeFlag));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((bool)(FinishedGoodsFlag));
            if ((Color == null)) {
                this.Adapter.UpdateCommand.Parameters[4].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Color));
            }
            this.Adapter.UpdateCommand.Parameters[5].Value = ((short)(SafetyStockLevel));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((short)(ReorderPoint));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((decimal)(StandardCost));
            this.Adapter.UpdateCommand.Parameters[8].Value = ((decimal)(ListPrice));
            if ((Size == null)) {
                this.Adapter.UpdateCommand.Parameters[9].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Size));
            }
            if ((SizeUnitMeasureCode == null)) {
                this.Adapter.UpdateCommand.Parameters[10].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(SizeUnitMeasureCode));
            }
            if ((WeightUnitMeasureCode == null)) {
                this.Adapter.UpdateCommand.Parameters[11].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(WeightUnitMeasureCode));
            }
            if ((Weight.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[12].Value = ((decimal)(Weight.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[12].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(DaysToManufacture));
            if ((ProductLine == null)) {
                this.Adapter.UpdateCommand.Parameters[14].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(ProductLine));
            }
            if ((Class == null)) {
                this.Adapter.UpdateCommand.Parameters[15].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[15].Value = ((string)(Class));
            }
            if ((Style == null)) {
                this.Adapter.UpdateCommand.Parameters[16].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(Style));
            }
            if ((ProductSubcategoryID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[17].Value = ((int)(ProductSubcategoryID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[17].Value = System.DBNull.Value;
            }
            if ((ProductModelID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[18].Value = ((int)(ProductModelID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[18].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[19].Value = ((System.DateTime)(SellStartDate));
            if ((SellEndDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[20].Value = ((System.DateTime)(SellEndDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[20].Value = System.DBNull.Value;
            }
            if ((DiscontinuedDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[21].Value = ((System.DateTime)(DiscontinuedDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[21].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[22].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[23].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[24].Value = ((int)(Original_ProductID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[25].Value = ((string)(Original_Name));
            }
            if ((Original_ProductNumber == null)) {
                throw new System.ArgumentNullException("Original_ProductNumber");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[26].Value = ((string)(Original_ProductNumber));
            }
            this.Adapter.UpdateCommand.Parameters[27].Value = ((bool)(Original_MakeFlag));
            this.Adapter.UpdateCommand.Parameters[28].Value = ((bool)(Original_FinishedGoodsFlag));
            if ((Original_Color == null)) {
                this.Adapter.UpdateCommand.Parameters[29].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[30].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[29].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[30].Value = ((string)(Original_Color));
            }
            this.Adapter.UpdateCommand.Parameters[31].Value = ((short)(Original_SafetyStockLevel));
            this.Adapter.UpdateCommand.Parameters[32].Value = ((short)(Original_ReorderPoint));
            this.Adapter.UpdateCommand.Parameters[33].Value = ((decimal)(Original_StandardCost));
            this.Adapter.UpdateCommand.Parameters[34].Value = ((decimal)(Original_ListPrice));
            if ((Original_Size == null)) {
                this.Adapter.UpdateCommand.Parameters[35].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[36].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[35].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[36].Value = ((string)(Original_Size));
            }
            if ((Original_SizeUnitMeasureCode == null)) {
                this.Adapter.UpdateCommand.Parameters[37].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[38].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[37].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[38].Value = ((string)(Original_SizeUnitMeasureCode));
            }
            if ((Original_WeightUnitMeasureCode == null)) {
                this.Adapter.UpdateCommand.Parameters[39].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[40].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[39].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[40].Value = ((string)(Original_WeightUnitMeasureCode));
            }
            if ((Original_Weight.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[41].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[42].Value = ((decimal)(Original_Weight.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[41].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[42].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[43].Value = ((int)(Original_DaysToManufacture));
            if ((Original_ProductLine == null)) {
                this.Adapter.UpdateCommand.Parameters[44].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[45].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[44].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[45].Value = ((string)(Original_ProductLine));
            }
            if ((Original_Class == null)) {
                this.Adapter.UpdateCommand.Parameters[46].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[47].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[46].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[47].Value = ((string)(Original_Class));
            }
            if ((Original_Style == null)) {
                this.Adapter.UpdateCommand.Parameters[48].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[49].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[48].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[49].Value = ((string)(Original_Style));
            }
            if ((Original_ProductSubcategoryID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[50].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[51].Value = ((int)(Original_ProductSubcategoryID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[50].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[51].Value = System.DBNull.Value;
            }
            if ((Original_ProductModelID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[52].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[53].Value = ((int)(Original_ProductModelID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[52].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[53].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[54].Value = ((System.DateTime)(Original_SellStartDate));
            if ((Original_SellEndDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[55].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[56].Value = ((System.DateTime)(Original_SellEndDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[55].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[56].Value = System.DBNull.Value;
            }
            if ((Original_DiscontinuedDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[57].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[58].Value = ((System.DateTime)(Original_DiscontinuedDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[57].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[58].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[59].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[60].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[61].Value = ((int)(ProductID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 ProductCategoryTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public ProductCategoryTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "ProductCategory";
            tableMapping.ColumnMappings.Add("ProductCategoryID", "ProductCategoryID");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Production].[ProductCategory] WHERE (([ProductCategoryID] = @Origina" +
                "l_ProductCategoryID) AND ([Name] = @Original_Name) AND ([rowguid] = @Original_ro" +
                "wguid) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductCategoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductCategoryID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = "INSERT INTO [Production].[ProductCategory] ([Name], [rowguid], [ModifiedDate]) VA" +
                "LUES (@Name, @rowguid, @ModifiedDate);\r\nSELECT ProductCategoryID, Name, rowguid," +
                " ModifiedDate FROM Production.ProductCategory WHERE (ProductCategoryID = @@IDENT" +
                "ITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Production].[ProductCategory] SET [Name] = @Name, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([ProductCategoryID] = @Original_ProductCategoryID) AND ([Name] = @Original_Name) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT ProductCategoryID, Name, rowguid, ModifiedDate FROM Production.ProductCategory WHERE (ProductCategoryID = @ProductCategoryID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductCategoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductCategoryID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductCategoryID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "ProductCategoryID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT ProductCategoryID, Name, rowguid, ModifiedDate FROM Production.ProductCate" +
                "gory";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.ProductCategoryDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.ProductCategoryDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.ProductCategoryDataTable dataTable = new AdventureWorksDataSet.ProductCategoryDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.ProductCategoryDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "ProductCategory");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_ProductCategoryID, string Original_Name, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ProductCategoryID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name));
            }
            this.Adapter.DeleteCommand.Parameters[2].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string Name, System.Guid rowguid, System.DateTime ModifiedDate) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name));
            }
            this.Adapter.InsertCommand.Parameters[1].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(string Name, System.Guid rowguid, System.DateTime ModifiedDate, int Original_ProductCategoryID, string Original_Name, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate, int ProductCategoryID) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name));
            }
            this.Adapter.UpdateCommand.Parameters[1].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_ProductCategoryID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_Name));
            }
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(ProductCategoryID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 ProductCostHistoryTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public ProductCostHistoryTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "ProductCostHistory";
            tableMapping.ColumnMappings.Add("ProductID", "ProductID");
            tableMapping.ColumnMappings.Add("StartDate", "StartDate");
            tableMapping.ColumnMappings.Add("EndDate", "EndDate");
            tableMapping.ColumnMappings.Add("StandardCost", "StandardCost");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Production].[ProductCostHistory] WHERE (([ProductID] = @Original_ProductID) AND ([StartDate] = @Original_StartDate) AND ((@IsNull_EndDate = 1 AND [EndDate] IS NULL) OR ([EndDate] = @Original_EndDate)) AND ([StandardCost] = @Original_StandardCost) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_EndDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StandardCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "StandardCost", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Production].[ProductCostHistory] ([ProductID], [StartDate], [EndDate], [StandardCost], [ModifiedDate]) VALUES (@ProductID, @StartDate, @EndDate, @StandardCost, @ModifiedDate);
SELECT ProductID, StartDate, EndDate, StandardCost, ModifiedDate FROM Production.ProductCostHistory WHERE (ProductID = @ProductID) AND (StartDate = @StartDate)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StandardCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "StandardCost", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Production].[ProductCostHistory] SET [ProductID] = @ProductID, [StartDate] = @StartDate, [EndDate] = @EndDate, [StandardCost] = @StandardCost, [ModifiedDate] = @ModifiedDate WHERE (([ProductID] = @Original_ProductID) AND ([StartDate] = @Original_StartDate) AND ((@IsNull_EndDate = 1 AND [EndDate] IS NULL) OR ([EndDate] = @Original_EndDate)) AND ([StandardCost] = @Original_StandardCost) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT ProductID, StartDate, EndDate, StandardCost, ModifiedDate FROM Production.ProductCostHistory WHERE (ProductID = @ProductID) AND (StartDate = @StartDate)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StandardCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "StandardCost", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_EndDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StandardCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "StandardCost", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT ProductID, StartDate, EndDate, StandardCost, ModifiedDate FROM Production." +
                "ProductCostHistory";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.ProductCostHistoryDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.ProductCostHistoryDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.ProductCostHistoryDataTable dataTable = new AdventureWorksDataSet.ProductCostHistoryDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.ProductCostHistoryDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "ProductCostHistory");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_ProductID, System.DateTime Original_StartDate, System.Nullable<System.DateTime> Original_EndDate, decimal Original_StandardCost, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ProductID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((System.DateTime)(Original_StartDate));
            if ((Original_EndDate.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_EndDate.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[3].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[4].Value = ((decimal)(Original_StandardCost));
            this.Adapter.DeleteCommand.Parameters[5].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int ProductID, System.DateTime StartDate, System.Nullable<System.DateTime> EndDate, decimal StandardCost, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(ProductID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((System.DateTime)(StartDate));
            if ((EndDate.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(EndDate.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
            }
            this.Adapter.InsertCommand.Parameters[3].Value = ((decimal)(StandardCost));
            this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int ProductID, System.DateTime StartDate, System.Nullable<System.DateTime> EndDate, decimal StandardCost, System.DateTime ModifiedDate, int Original_ProductID, System.DateTime Original_StartDate, System.Nullable<System.DateTime> Original_EndDate, decimal Original_StandardCost, System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(ProductID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((System.DateTime)(StartDate));
            if ((EndDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(EndDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[3].Value = ((decimal)(StandardCost));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_ProductID));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(Original_StartDate));
            if ((Original_EndDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[8].Value = ((System.DateTime)(Original_EndDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[8].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[9].Value = ((decimal)(Original_StandardCost));
            this.Adapter.UpdateCommand.Parameters[10].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 ProductDescriptionTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public ProductDescriptionTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "ProductDescription";
            tableMapping.ColumnMappings.Add("ProductDescriptionID", "ProductDescriptionID");
            tableMapping.ColumnMappings.Add("Description", "Description");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Production].[ProductDescription] WHERE (([ProductDescriptionID] = @O" +
                "riginal_ProductDescriptionID) AND ([Description] = @Original_Description) AND ([" +
                "rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductDescriptionID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductDescriptionID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Description", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Description", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Production].[ProductDescription] ([Description], [rowguid], [ModifiedDate]) VALUES (@Description, @rowguid, @ModifiedDate);
SELECT ProductDescriptionID, Description, rowguid, ModifiedDate FROM Production.ProductDescription WHERE (ProductDescriptionID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Description", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Description", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Production].[ProductDescription] SET [Description] = @Description, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([ProductDescriptionID] = @Original_ProductDescriptionID) AND ([Description] = @Original_Description) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT ProductDescriptionID, Description, rowguid, ModifiedDate FROM Production.ProductDescription WHERE (ProductDescriptionID = @ProductDescriptionID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Description", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Description", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductDescriptionID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductDescriptionID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Description", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Description", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductDescriptionID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "ProductDescriptionID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT ProductDescriptionID, Description, rowguid, ModifiedDate FROM Production.P" +
                "roductDescription";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.ProductDescriptionDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.ProductDescriptionDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.ProductDescriptionDataTable dataTable = new AdventureWorksDataSet.ProductDescriptionDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.ProductDescriptionDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "ProductDescription");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_ProductDescriptionID, string Original_Description, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ProductDescriptionID));
            if ((Original_Description == null)) {
                throw new System.ArgumentNullException("Original_Description");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Description));
            }
            this.Adapter.DeleteCommand.Parameters[2].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string Description, System.Guid rowguid, System.DateTime ModifiedDate) {
            if ((Description == null)) {
                throw new System.ArgumentNullException("Description");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Description));
            }
            this.Adapter.InsertCommand.Parameters[1].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(string Description, System.Guid rowguid, System.DateTime ModifiedDate, int Original_ProductDescriptionID, string Original_Description, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate, int ProductDescriptionID) {
            if ((Description == null)) {
                throw new System.ArgumentNullException("Description");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Description));
            }
            this.Adapter.UpdateCommand.Parameters[1].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_ProductDescriptionID));
            if ((Original_Description == null)) {
                throw new System.ArgumentNullException("Original_Description");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_Description));
            }
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(ProductDescriptionID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 ProductDocumentTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public ProductDocumentTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "ProductDocument";
            tableMapping.ColumnMappings.Add("ProductID", "ProductID");
            tableMapping.ColumnMappings.Add("DocumentID", "DocumentID");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Production].[ProductDocument] WHERE (([ProductID] = @Original_Produc" +
                "tID) AND ([DocumentID] = @Original_DocumentID) AND ([ModifiedDate] = @Original_M" +
                "odifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_DocumentID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "DocumentID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Production].[ProductDocument] ([ProductID], [DocumentID], [ModifiedDate]) VALUES (@ProductID, @DocumentID, @ModifiedDate);
SELECT ProductID, DocumentID, ModifiedDate FROM Production.ProductDocument WHERE (DocumentID = @DocumentID) AND (ProductID = @ProductID)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DocumentID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "DocumentID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Production].[ProductDocument] SET [ProductID] = @ProductID, [DocumentID] = @DocumentID, [ModifiedDate] = @ModifiedDate WHERE (([ProductID] = @Original_ProductID) AND ([DocumentID] = @Original_DocumentID) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT ProductID, DocumentID, ModifiedDate FROM Production.ProductDocument WHERE (DocumentID = @DocumentID) AND (ProductID = @ProductID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DocumentID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "DocumentID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_DocumentID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "DocumentID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT ProductID, DocumentID, ModifiedDate FROM Production.ProductDocument";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.ProductDocumentDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.ProductDocumentDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.ProductDocumentDataTable dataTable = new AdventureWorksDataSet.ProductDocumentDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.ProductDocumentDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "ProductDocument");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_ProductID, int Original_DocumentID, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ProductID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_DocumentID));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int ProductID, int DocumentID, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(ProductID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((int)(DocumentID));
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int ProductID, int DocumentID, System.DateTime ModifiedDate, int Original_ProductID, int Original_DocumentID, System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(ProductID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(DocumentID));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_ProductID));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_DocumentID));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 ProductInventoryTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public ProductInventoryTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "ProductInventory";
            tableMapping.ColumnMappings.Add("ProductID", "ProductID");
            tableMapping.ColumnMappings.Add("LocationID", "LocationID");
            tableMapping.ColumnMappings.Add("Shelf", "Shelf");
            tableMapping.ColumnMappings.Add("Bin", "Bin");
            tableMapping.ColumnMappings.Add("Quantity", "Quantity");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Production].[ProductInventory] WHERE (([ProductID] = @Original_ProductID) AND ([LocationID] = @Original_LocationID) AND ([Shelf] = @Original_Shelf) AND ([Bin] = @Original_Bin) AND ([Quantity] = @Original_Quantity) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_LocationID", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "LocationID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Shelf", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Shelf", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Bin", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "Bin", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Production].[ProductInventory] ([ProductID], [LocationID], [Shelf], [Bin], [Quantity], [rowguid], [ModifiedDate]) VALUES (@ProductID, @LocationID, @Shelf, @Bin, @Quantity, @rowguid, @ModifiedDate);
SELECT ProductID, LocationID, Shelf, Bin, Quantity, rowguid, ModifiedDate FROM Production.ProductInventory WHERE (LocationID = @LocationID) AND (ProductID = @ProductID)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@LocationID", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "LocationID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Shelf", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Shelf", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Bin", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "Bin", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Production].[ProductInventory] SET [ProductID] = @ProductID, [LocationID] = @LocationID, [Shelf] = @Shelf, [Bin] = @Bin, [Quantity] = @Quantity, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([ProductID] = @Original_ProductID) AND ([LocationID] = @Original_LocationID) AND ([Shelf] = @Original_Shelf) AND ([Bin] = @Original_Bin) AND ([Quantity] = @Original_Quantity) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT ProductID, LocationID, Shelf, Bin, Quantity, rowguid, ModifiedDate FROM Production.ProductInventory WHERE (LocationID = @LocationID) AND (ProductID = @ProductID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@LocationID", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "LocationID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Shelf", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Shelf", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Bin", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "Bin", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_LocationID", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "LocationID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Shelf", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Shelf", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Bin", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "Bin", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT ProductID, LocationID, Shelf, Bin, Quantity, rowguid, ModifiedDate FROM Pr" +
                "oduction.ProductInventory";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.ProductInventoryDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.ProductInventoryDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.ProductInventoryDataTable dataTable = new AdventureWorksDataSet.ProductInventoryDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.ProductInventoryDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "ProductInventory");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_ProductID, short Original_LocationID, string Original_Shelf, byte Original_Bin, short Original_Quantity, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ProductID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((short)(Original_LocationID));
            if ((Original_Shelf == null)) {
                throw new System.ArgumentNullException("Original_Shelf");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_Shelf));
            }
            this.Adapter.DeleteCommand.Parameters[3].Value = ((byte)(Original_Bin));
            this.Adapter.DeleteCommand.Parameters[4].Value = ((short)(Original_Quantity));
            this.Adapter.DeleteCommand.Parameters[5].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[6].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int ProductID, short LocationID, string Shelf, byte Bin, short Quantity, System.Guid rowguid, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(ProductID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((short)(LocationID));
            if ((Shelf == null)) {
                throw new System.ArgumentNullException("Shelf");
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Shelf));
            }
            this.Adapter.InsertCommand.Parameters[3].Value = ((byte)(Bin));
            this.Adapter.InsertCommand.Parameters[4].Value = ((short)(Quantity));
            this.Adapter.InsertCommand.Parameters[5].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[6].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int ProductID, short LocationID, string Shelf, byte Bin, short Quantity, System.Guid rowguid, System.DateTime ModifiedDate, int Original_ProductID, short Original_LocationID, string Original_Shelf, byte Original_Bin, short Original_Quantity, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(ProductID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((short)(LocationID));
            if ((Shelf == null)) {
                throw new System.ArgumentNullException("Shelf");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Shelf));
            }
            this.Adapter.UpdateCommand.Parameters[3].Value = ((byte)(Bin));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((short)(Quantity));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_ProductID));
            this.Adapter.UpdateCommand.Parameters[8].Value = ((short)(Original_LocationID));
            if ((Original_Shelf == null)) {
                throw new System.ArgumentNullException("Original_Shelf");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_Shelf));
            }
            this.Adapter.UpdateCommand.Parameters[10].Value = ((byte)(Original_Bin));
            this.Adapter.UpdateCommand.Parameters[11].Value = ((short)(Original_Quantity));
            this.Adapter.UpdateCommand.Parameters[12].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[13].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 ProductListPriceHistoryTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public ProductListPriceHistoryTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "ProductListPriceHistory";
            tableMapping.ColumnMappings.Add("ProductID", "ProductID");
            tableMapping.ColumnMappings.Add("StartDate", "StartDate");
            tableMapping.ColumnMappings.Add("EndDate", "EndDate");
            tableMapping.ColumnMappings.Add("ListPrice", "ListPrice");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Production].[ProductListPriceHistory] WHERE (([ProductID] = @Original_ProductID) AND ([StartDate] = @Original_StartDate) AND ((@IsNull_EndDate = 1 AND [EndDate] IS NULL) OR ([EndDate] = @Original_EndDate)) AND ([ListPrice] = @Original_ListPrice) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_EndDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ListPrice", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ListPrice", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Production].[ProductListPriceHistory] ([ProductID], [StartDate], [EndDate], [ListPrice], [ModifiedDate]) VALUES (@ProductID, @StartDate, @EndDate, @ListPrice, @ModifiedDate);
SELECT ProductID, StartDate, EndDate, ListPrice, ModifiedDate FROM Production.ProductListPriceHistory WHERE (ProductID = @ProductID) AND (StartDate = @StartDate)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ListPrice", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ListPrice", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Production].[ProductListPriceHistory] SET [ProductID] = @ProductID, [StartDate] = @StartDate, [EndDate] = @EndDate, [ListPrice] = @ListPrice, [ModifiedDate] = @ModifiedDate WHERE (([ProductID] = @Original_ProductID) AND ([StartDate] = @Original_StartDate) AND ((@IsNull_EndDate = 1 AND [EndDate] IS NULL) OR ([EndDate] = @Original_EndDate)) AND ([ListPrice] = @Original_ListPrice) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT ProductID, StartDate, EndDate, ListPrice, ModifiedDate FROM Production.ProductListPriceHistory WHERE (ProductID = @ProductID) AND (StartDate = @StartDate)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ListPrice", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ListPrice", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_EndDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ListPrice", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ListPrice", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT ProductID, StartDate, EndDate, ListPrice, ModifiedDate FROM Production.Pro" +
                "ductListPriceHistory";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.ProductListPriceHistoryDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.ProductListPriceHistoryDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.ProductListPriceHistoryDataTable dataTable = new AdventureWorksDataSet.ProductListPriceHistoryDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.ProductListPriceHistoryDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "ProductListPriceHistory");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_ProductID, System.DateTime Original_StartDate, System.Nullable<System.DateTime> Original_EndDate, decimal Original_ListPrice, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ProductID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((System.DateTime)(Original_StartDate));
            if ((Original_EndDate.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_EndDate.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[3].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[4].Value = ((decimal)(Original_ListPrice));
            this.Adapter.DeleteCommand.Parameters[5].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int ProductID, System.DateTime StartDate, System.Nullable<System.DateTime> EndDate, decimal ListPrice, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(ProductID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((System.DateTime)(StartDate));
            if ((EndDate.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(EndDate.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
            }
            this.Adapter.InsertCommand.Parameters[3].Value = ((decimal)(ListPrice));
            this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int ProductID, System.DateTime StartDate, System.Nullable<System.DateTime> EndDate, decimal ListPrice, System.DateTime ModifiedDate, int Original_ProductID, System.DateTime Original_StartDate, System.Nullable<System.DateTime> Original_EndDate, decimal Original_ListPrice, System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(ProductID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((System.DateTime)(StartDate));
            if ((EndDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(EndDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[3].Value = ((decimal)(ListPrice));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_ProductID));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(Original_StartDate));
            if ((Original_EndDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[8].Value = ((System.DateTime)(Original_EndDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[8].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[9].Value = ((decimal)(Original_ListPrice));
            this.Adapter.UpdateCommand.Parameters[10].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 ProductModelTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public ProductModelTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "ProductModel";
            tableMapping.ColumnMappings.Add("ProductModelID", "ProductModelID");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("CatalogDescription", "CatalogDescription");
            tableMapping.ColumnMappings.Add("Instructions", "Instructions");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Production].[ProductModel] WHERE (([ProductModelID] = @Original_Prod" +
                "uctModelID) AND ([Name] = @Original_Name) AND ([rowguid] = @Original_rowguid) AN" +
                "D ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductModelID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductModelID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Production].[ProductModel] ([Name], [CatalogDescription], [Instructions], [rowguid], [ModifiedDate]) VALUES (@Name, @CatalogDescription, @Instructions, @rowguid, @ModifiedDate);
SELECT ProductModelID, Name, CatalogDescription, Instructions, rowguid, ModifiedDate FROM Production.ProductModel WHERE (ProductModelID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CatalogDescription", System.Data.SqlDbType.Xml, 0, System.Data.ParameterDirection.Input, 0, 0, "CatalogDescription", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Instructions", System.Data.SqlDbType.Xml, 0, System.Data.ParameterDirection.Input, 0, 0, "Instructions", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Production].[ProductModel] SET [Name] = @Name, [CatalogDescription] = @CatalogDescription, [Instructions] = @Instructions, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([ProductModelID] = @Original_ProductModelID) AND ([Name] = @Original_Name) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT ProductModelID, Name, CatalogDescription, Instructions, rowguid, ModifiedDate FROM Production.ProductModel WHERE (ProductModelID = @ProductModelID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CatalogDescription", System.Data.SqlDbType.Xml, 0, System.Data.ParameterDirection.Input, 0, 0, "CatalogDescription", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Instructions", System.Data.SqlDbType.Xml, 0, System.Data.ParameterDirection.Input, 0, 0, "Instructions", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductModelID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductModelID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductModelID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "ProductModelID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT ProductModelID, Name, CatalogDescription, Instructions, rowguid, ModifiedD" +
                "ate FROM Production.ProductModel";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.ProductModelDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.ProductModelDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.ProductModelDataTable dataTable = new AdventureWorksDataSet.ProductModelDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.ProductModelDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "ProductModel");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_ProductModelID, string Original_Name, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ProductModelID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name));
            }
            this.Adapter.DeleteCommand.Parameters[2].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string Name, object CatalogDescription, object Instructions, System.Guid rowguid, System.DateTime ModifiedDate) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name));
            }
            if ((CatalogDescription == null)) {
                this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((object)(CatalogDescription));
            }
            if ((Instructions == null)) {
                this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = ((object)(Instructions));
            }
            this.Adapter.InsertCommand.Parameters[3].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(string Name, object CatalogDescription, object Instructions, System.Guid rowguid, System.DateTime ModifiedDate, int Original_ProductModelID, string Original_Name, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate, int ProductModelID) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name));
            }
            if ((CatalogDescription == null)) {
                this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((object)(CatalogDescription));
            }
            if ((Instructions == null)) {
                this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[2].Value = ((object)(Instructions));
            }
            this.Adapter.UpdateCommand.Parameters[3].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_ProductModelID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_Name));
            }
            this.Adapter.UpdateCommand.Parameters[7].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[8].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(ProductModelID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 ProductModelIllustrationTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public ProductModelIllustrationTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "ProductModelIllustration";
            tableMapping.ColumnMappings.Add("ProductModelID", "ProductModelID");
            tableMapping.ColumnMappings.Add("IllustrationID", "IllustrationID");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Production].[ProductModelIllustration] WHERE (([ProductModelID] = @O" +
                "riginal_ProductModelID) AND ([IllustrationID] = @Original_IllustrationID) AND ([" +
                "ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductModelID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductModelID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_IllustrationID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "IllustrationID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Production].[ProductModelIllustration] ([ProductModelID], [IllustrationID], [ModifiedDate]) VALUES (@ProductModelID, @IllustrationID, @ModifiedDate);
SELECT ProductModelID, IllustrationID, ModifiedDate FROM Production.ProductModelIllustration WHERE (IllustrationID = @IllustrationID) AND (ProductModelID = @ProductModelID)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductModelID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductModelID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IllustrationID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "IllustrationID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Production].[ProductModelIllustration] SET [ProductModelID] = @ProductModelID, [IllustrationID] = @IllustrationID, [ModifiedDate] = @ModifiedDate WHERE (([ProductModelID] = @Original_ProductModelID) AND ([IllustrationID] = @Original_IllustrationID) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT ProductModelID, IllustrationID, ModifiedDate FROM Production.ProductModelIllustration WHERE (IllustrationID = @IllustrationID) AND (ProductModelID = @ProductModelID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductModelID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductModelID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IllustrationID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "IllustrationID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductModelID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductModelID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_IllustrationID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "IllustrationID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT ProductModelID, IllustrationID, ModifiedDate FROM Production.ProductModelI" +
                "llustration";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.ProductModelIllustrationDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.ProductModelIllustrationDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.ProductModelIllustrationDataTable dataTable = new AdventureWorksDataSet.ProductModelIllustrationDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.ProductModelIllustrationDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "ProductModelIllustration");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_ProductModelID, int Original_IllustrationID, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ProductModelID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_IllustrationID));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int ProductModelID, int IllustrationID, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(ProductModelID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((int)(IllustrationID));
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int ProductModelID, int IllustrationID, System.DateTime ModifiedDate, int Original_ProductModelID, int Original_IllustrationID, System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(ProductModelID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(IllustrationID));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_ProductModelID));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_IllustrationID));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 ProductModelProductDescriptionCultureTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public ProductModelProductDescriptionCultureTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "ProductModelProductDescriptionCulture";
            tableMapping.ColumnMappings.Add("ProductModelID", "ProductModelID");
            tableMapping.ColumnMappings.Add("ProductDescriptionID", "ProductDescriptionID");
            tableMapping.ColumnMappings.Add("CultureID", "CultureID");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Production].[ProductModelProductDescriptionCulture] WHERE (([ProductModelID] = @Original_ProductModelID) AND ([ProductDescriptionID] = @Original_ProductDescriptionID) AND ([CultureID] = @Original_CultureID) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductModelID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductModelID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductDescriptionID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductDescriptionID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CultureID", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CultureID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Production].[ProductModelProductDescriptionCulture] ([ProductModelID], [ProductDescriptionID], [CultureID], [ModifiedDate]) VALUES (@ProductModelID, @ProductDescriptionID, @CultureID, @ModifiedDate);
SELECT ProductModelID, ProductDescriptionID, CultureID, ModifiedDate FROM Production.ProductModelProductDescriptionCulture WHERE (CultureID = @CultureID) AND (ProductDescriptionID = @ProductDescriptionID) AND (ProductModelID = @ProductModelID)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductModelID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductModelID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductDescriptionID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductDescriptionID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CultureID", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CultureID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Production].[ProductModelProductDescriptionCulture] SET [ProductModelID] = @ProductModelID, [ProductDescriptionID] = @ProductDescriptionID, [CultureID] = @CultureID, [ModifiedDate] = @ModifiedDate WHERE (([ProductModelID] = @Original_ProductModelID) AND ([ProductDescriptionID] = @Original_ProductDescriptionID) AND ([CultureID] = @Original_CultureID) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT ProductModelID, ProductDescriptionID, CultureID, ModifiedDate FROM Production.ProductModelProductDescriptionCulture WHERE (CultureID = @CultureID) AND (ProductDescriptionID = @ProductDescriptionID) AND (ProductModelID = @ProductModelID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductModelID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductModelID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductDescriptionID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductDescriptionID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CultureID", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CultureID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductModelID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductModelID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductDescriptionID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductDescriptionID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CultureID", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CultureID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT ProductModelID, ProductDescriptionID, CultureID, ModifiedDate FROM Product" +
                "ion.ProductModelProductDescriptionCulture";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.ProductModelProductDescriptionCultureDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.ProductModelProductDescriptionCultureDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.ProductModelProductDescriptionCultureDataTable dataTable = new AdventureWorksDataSet.ProductModelProductDescriptionCultureDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.ProductModelProductDescriptionCultureDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "ProductModelProductDescriptionCulture");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_ProductModelID, int Original_ProductDescriptionID, string Original_CultureID, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ProductModelID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_ProductDescriptionID));
            if ((Original_CultureID == null)) {
                throw new System.ArgumentNullException("Original_CultureID");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_CultureID));
            }
            this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int ProductModelID, int ProductDescriptionID, string CultureID, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(ProductModelID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((int)(ProductDescriptionID));
            if ((CultureID == null)) {
                throw new System.ArgumentNullException("CultureID");
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = ((string)(CultureID));
            }
            this.Adapter.InsertCommand.Parameters[3].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int ProductModelID, int ProductDescriptionID, string CultureID, System.DateTime ModifiedDate, int Original_ProductModelID, int Original_ProductDescriptionID, string Original_CultureID, System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(ProductModelID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(ProductDescriptionID));
            if ((CultureID == null)) {
                throw new System.ArgumentNullException("CultureID");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(CultureID));
            }
            this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_ProductModelID));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_ProductDescriptionID));
            if ((Original_CultureID == null)) {
                throw new System.ArgumentNullException("Original_CultureID");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_CultureID));
            }
            this.Adapter.UpdateCommand.Parameters[7].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 ProductPhotoTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public ProductPhotoTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "ProductPhoto";
            tableMapping.ColumnMappings.Add("ProductPhotoID", "ProductPhotoID");
            tableMapping.ColumnMappings.Add("ThumbNailPhoto", "ThumbNailPhoto");
            tableMapping.ColumnMappings.Add("ThumbnailPhotoFileName", "ThumbnailPhotoFileName");
            tableMapping.ColumnMappings.Add("LargePhoto", "LargePhoto");
            tableMapping.ColumnMappings.Add("LargePhotoFileName", "LargePhotoFileName");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Production].[ProductPhoto] WHERE (([ProductPhotoID] = @Original_ProductPhotoID) AND ((@IsNull_ThumbnailPhotoFileName = 1 AND [ThumbnailPhotoFileName] IS NULL) OR ([ThumbnailPhotoFileName] = @Original_ThumbnailPhotoFileName)) AND ((@IsNull_LargePhotoFileName = 1 AND [LargePhotoFileName] IS NULL) OR ([LargePhotoFileName] = @Original_LargePhotoFileName)) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductPhotoID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductPhotoID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ThumbnailPhotoFileName", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ThumbnailPhotoFileName", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ThumbnailPhotoFileName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ThumbnailPhotoFileName", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_LargePhotoFileName", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "LargePhotoFileName", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_LargePhotoFileName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "LargePhotoFileName", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Production].[ProductPhoto] ([ThumbNailPhoto], [ThumbnailPhotoFileName], [LargePhoto], [LargePhotoFileName], [ModifiedDate]) VALUES (@ThumbNailPhoto, @ThumbnailPhotoFileName, @LargePhoto, @LargePhotoFileName, @ModifiedDate);
SELECT ProductPhotoID, ThumbNailPhoto, ThumbnailPhotoFileName, LargePhoto, LargePhotoFileName, ModifiedDate FROM Production.ProductPhoto WHERE (ProductPhotoID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ThumbNailPhoto", System.Data.SqlDbType.VarBinary, 0, System.Data.ParameterDirection.Input, 0, 0, "ThumbNailPhoto", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ThumbnailPhotoFileName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ThumbnailPhotoFileName", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@LargePhoto", System.Data.SqlDbType.VarBinary, 0, System.Data.ParameterDirection.Input, 0, 0, "LargePhoto", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@LargePhotoFileName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "LargePhotoFileName", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Production].[ProductPhoto] SET [ThumbNailPhoto] = @ThumbNailPhoto, [ThumbnailPhotoFileName] = @ThumbnailPhotoFileName, [LargePhoto] = @LargePhoto, [LargePhotoFileName] = @LargePhotoFileName, [ModifiedDate] = @ModifiedDate WHERE (([ProductPhotoID] = @Original_ProductPhotoID) AND ((@IsNull_ThumbnailPhotoFileName = 1 AND [ThumbnailPhotoFileName] IS NULL) OR ([ThumbnailPhotoFileName] = @Original_ThumbnailPhotoFileName)) AND ((@IsNull_LargePhotoFileName = 1 AND [LargePhotoFileName] IS NULL) OR ([LargePhotoFileName] = @Original_LargePhotoFileName)) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT ProductPhotoID, ThumbNailPhoto, ThumbnailPhotoFileName, LargePhoto, LargePhotoFileName, ModifiedDate FROM Production.ProductPhoto WHERE (ProductPhotoID = @ProductPhotoID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ThumbNailPhoto", System.Data.SqlDbType.VarBinary, 0, System.Data.ParameterDirection.Input, 0, 0, "ThumbNailPhoto", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ThumbnailPhotoFileName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ThumbnailPhotoFileName", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@LargePhoto", System.Data.SqlDbType.VarBinary, 0, System.Data.ParameterDirection.Input, 0, 0, "LargePhoto", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@LargePhotoFileName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "LargePhotoFileName", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductPhotoID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductPhotoID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ThumbnailPhotoFileName", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ThumbnailPhotoFileName", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ThumbnailPhotoFileName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ThumbnailPhotoFileName", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_LargePhotoFileName", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "LargePhotoFileName", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_LargePhotoFileName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "LargePhotoFileName", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductPhotoID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "ProductPhotoID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT ProductPhotoID, ThumbNailPhoto, ThumbnailPhotoFileName, LargePhoto, LargeP" +
                "hotoFileName, ModifiedDate FROM Production.ProductPhoto";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.ProductPhotoDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.ProductPhotoDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.ProductPhotoDataTable dataTable = new AdventureWorksDataSet.ProductPhotoDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.ProductPhotoDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "ProductPhoto");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_ProductPhotoID, string Original_ThumbnailPhotoFileName, string Original_LargePhotoFileName, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ProductPhotoID));
            if ((Original_ThumbnailPhotoFileName == null)) {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[2].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_ThumbnailPhotoFileName));
            }
            if ((Original_LargePhotoFileName == null)) {
                this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[4].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_LargePhotoFileName));
            }
            this.Adapter.DeleteCommand.Parameters[5].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(byte[] ThumbNailPhoto, string ThumbnailPhotoFileName, byte[] LargePhoto, string LargePhotoFileName, System.DateTime ModifiedDate) {
            if ((ThumbNailPhoto == null)) {
                this.Adapter.InsertCommand.Parameters[0].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((byte[])(ThumbNailPhoto));
            }
            if ((ThumbnailPhotoFileName == null)) {
                this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(ThumbnailPhotoFileName));
            }
            if ((LargePhoto == null)) {
                this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = ((byte[])(LargePhoto));
            }
            if ((LargePhotoFileName == null)) {
                this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[3].Value = ((string)(LargePhotoFileName));
            }
            this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(byte[] ThumbNailPhoto, string ThumbnailPhotoFileName, byte[] LargePhoto, string LargePhotoFileName, System.DateTime ModifiedDate, int Original_ProductPhotoID, string Original_ThumbnailPhotoFileName, string Original_LargePhotoFileName, System.DateTime Original_ModifiedDate, int ProductPhotoID) {
            if ((ThumbNailPhoto == null)) {
                this.Adapter.UpdateCommand.Parameters[0].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((byte[])(ThumbNailPhoto));
            }
            if ((ThumbnailPhotoFileName == null)) {
                this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(ThumbnailPhotoFileName));
            }
            if ((LargePhoto == null)) {
                this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[2].Value = ((byte[])(LargePhoto));
            }
            if ((LargePhotoFileName == null)) {
                this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(LargePhotoFileName));
            }
            this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_ProductPhotoID));
            if ((Original_ThumbnailPhotoFileName == null)) {
                this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[7].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_ThumbnailPhotoFileName));
            }
            if ((Original_LargePhotoFileName == null)) {
                this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[9].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_LargePhotoFileName));
            }
            this.Adapter.UpdateCommand.Parameters[10].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(ProductPhotoID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 ProductProductPhotoTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public ProductProductPhotoTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "ProductProductPhoto";
            tableMapping.ColumnMappings.Add("ProductID", "ProductID");
            tableMapping.ColumnMappings.Add("ProductPhotoID", "ProductPhotoID");
            tableMapping.ColumnMappings.Add("Primary", "Primary");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Production].[ProductProductPhoto] WHERE (([ProductID] = @Original_Pr" +
                "oductID) AND ([ProductPhotoID] = @Original_ProductPhotoID) AND ([Primary] = @Ori" +
                "ginal_Primary) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductPhotoID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductPhotoID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Primary", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "Primary", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Production].[ProductProductPhoto] ([ProductID], [ProductPhotoID], [Primary], [ModifiedDate]) VALUES (@ProductID, @ProductPhotoID, @Primary, @ModifiedDate);
SELECT ProductID, ProductPhotoID, [Primary], ModifiedDate FROM Production.ProductProductPhoto WHERE (ProductID = @ProductID) AND (ProductPhotoID = @ProductPhotoID)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductPhotoID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductPhotoID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Primary", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "Primary", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Production].[ProductProductPhoto] SET [ProductID] = @ProductID, [ProductPhotoID] = @ProductPhotoID, [Primary] = @Primary, [ModifiedDate] = @ModifiedDate WHERE (([ProductID] = @Original_ProductID) AND ([ProductPhotoID] = @Original_ProductPhotoID) AND ([Primary] = @Original_Primary) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT ProductID, ProductPhotoID, [Primary], ModifiedDate FROM Production.ProductProductPhoto WHERE (ProductID = @ProductID) AND (ProductPhotoID = @ProductPhotoID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductPhotoID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductPhotoID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Primary", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "Primary", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductPhotoID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductPhotoID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Primary", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "Primary", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT ProductID, ProductPhotoID, [Primary], ModifiedDate FROM Production.Product" +
                "ProductPhoto";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.ProductProductPhotoDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.ProductProductPhotoDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.ProductProductPhotoDataTable dataTable = new AdventureWorksDataSet.ProductProductPhotoDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.ProductProductPhotoDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "ProductProductPhoto");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_ProductID, int Original_ProductPhotoID, bool Original_Primary, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ProductID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_ProductPhotoID));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((bool)(Original_Primary));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int ProductID, int ProductPhotoID, bool Primary, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(ProductID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((int)(ProductPhotoID));
            this.Adapter.InsertCommand.Parameters[2].Value = ((bool)(Primary));
            this.Adapter.InsertCommand.Parameters[3].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int ProductID, int ProductPhotoID, bool Primary, System.DateTime ModifiedDate, int Original_ProductID, int Original_ProductPhotoID, bool Original_Primary, System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(ProductID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(ProductPhotoID));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((bool)(Primary));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_ProductID));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_ProductPhotoID));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((bool)(Original_Primary));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 ProductReviewTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public ProductReviewTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "ProductReview";
            tableMapping.ColumnMappings.Add("ProductReviewID", "ProductReviewID");
            tableMapping.ColumnMappings.Add("ProductID", "ProductID");
            tableMapping.ColumnMappings.Add("ReviewerName", "ReviewerName");
            tableMapping.ColumnMappings.Add("ReviewDate", "ReviewDate");
            tableMapping.ColumnMappings.Add("EmailAddress", "EmailAddress");
            tableMapping.ColumnMappings.Add("Rating", "Rating");
            tableMapping.ColumnMappings.Add("Comments", "Comments");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Production].[ProductReview] WHERE (([ProductReviewID] = @Original_ProductReviewID) AND ([ProductID] = @Original_ProductID) AND ([ReviewerName] = @Original_ReviewerName) AND ([ReviewDate] = @Original_ReviewDate) AND ([EmailAddress] = @Original_EmailAddress) AND ([Rating] = @Original_Rating) AND ((@IsNull_Comments = 1 AND [Comments] IS NULL) OR ([Comments] = @Original_Comments)) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductReviewID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductReviewID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ReviewerName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ReviewerName", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ReviewDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ReviewDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EmailAddress", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "EmailAddress", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Rating", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Rating", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Comments", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Comments", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Comments", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Comments", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Production].[ProductReview] ([ProductID], [ReviewerName], [ReviewDate], [EmailAddress], [Rating], [Comments], [ModifiedDate]) VALUES (@ProductID, @ReviewerName, @ReviewDate, @EmailAddress, @Rating, @Comments, @ModifiedDate);
SELECT ProductReviewID, ProductID, ReviewerName, ReviewDate, EmailAddress, Rating, Comments, ModifiedDate FROM Production.ProductReview WHERE (ProductReviewID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ReviewerName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ReviewerName", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ReviewDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ReviewDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EmailAddress", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "EmailAddress", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Rating", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Rating", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Comments", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Comments", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Production].[ProductReview] SET [ProductID] = @ProductID, [ReviewerName] = @ReviewerName, [ReviewDate] = @ReviewDate, [EmailAddress] = @EmailAddress, [Rating] = @Rating, [Comments] = @Comments, [ModifiedDate] = @ModifiedDate WHERE (([ProductReviewID] = @Original_ProductReviewID) AND ([ProductID] = @Original_ProductID) AND ([ReviewerName] = @Original_ReviewerName) AND ([ReviewDate] = @Original_ReviewDate) AND ([EmailAddress] = @Original_EmailAddress) AND ([Rating] = @Original_Rating) AND ((@IsNull_Comments = 1 AND [Comments] IS NULL) OR ([Comments] = @Original_Comments)) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT ProductReviewID, ProductID, ReviewerName, ReviewDate, EmailAddress, Rating, Comments, ModifiedDate FROM Production.ProductReview WHERE (ProductReviewID = @ProductReviewID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ReviewerName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ReviewerName", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ReviewDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ReviewDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EmailAddress", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "EmailAddress", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Rating", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Rating", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Comments", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Comments", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductReviewID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductReviewID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ReviewerName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ReviewerName", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ReviewDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ReviewDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EmailAddress", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "EmailAddress", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Rating", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Rating", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Comments", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Comments", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Comments", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Comments", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductReviewID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "ProductReviewID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT ProductReviewID, ProductID, ReviewerName, ReviewDate, EmailAddress, Rating" +
                ", Comments, ModifiedDate FROM Production.ProductReview";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.ProductReviewDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.ProductReviewDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.ProductReviewDataTable dataTable = new AdventureWorksDataSet.ProductReviewDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.ProductReviewDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "ProductReview");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_ProductReviewID, int Original_ProductID, string Original_ReviewerName, System.DateTime Original_ReviewDate, string Original_EmailAddress, int Original_Rating, string Original_Comments, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ProductReviewID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_ProductID));
            if ((Original_ReviewerName == null)) {
                throw new System.ArgumentNullException("Original_ReviewerName");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_ReviewerName));
            }
            this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_ReviewDate));
            if ((Original_EmailAddress == null)) {
                throw new System.ArgumentNullException("Original_EmailAddress");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_EmailAddress));
            }
            this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(Original_Rating));
            if ((Original_Comments == null)) {
                this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[7].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[7].Value = ((string)(Original_Comments));
            }
            this.Adapter.DeleteCommand.Parameters[8].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int ProductID, string ReviewerName, System.DateTime ReviewDate, string EmailAddress, int Rating, string Comments, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(ProductID));
            if ((ReviewerName == null)) {
                throw new System.ArgumentNullException("ReviewerName");
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(ReviewerName));
            }
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(ReviewDate));
            if ((EmailAddress == null)) {
                throw new System.ArgumentNullException("EmailAddress");
            }
            else {
                this.Adapter.InsertCommand.Parameters[3].Value = ((string)(EmailAddress));
            }
            this.Adapter.InsertCommand.Parameters[4].Value = ((int)(Rating));
            if ((Comments == null)) {
                this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[5].Value = ((string)(Comments));
            }
            this.Adapter.InsertCommand.Parameters[6].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    int ProductID, 
                    string ReviewerName, 
                    System.DateTime ReviewDate, 
                    string EmailAddress, 
                    int Rating, 
                    string Comments, 
                    System.DateTime ModifiedDate, 
                    int Original_ProductReviewID, 
                    int Original_ProductID, 
                    string Original_ReviewerName, 
                    System.DateTime Original_ReviewDate, 
                    string Original_EmailAddress, 
                    int Original_Rating, 
                    string Original_Comments, 
                    System.DateTime Original_ModifiedDate, 
                    int ProductReviewID) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(ProductID));
            if ((ReviewerName == null)) {
                throw new System.ArgumentNullException("ReviewerName");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(ReviewerName));
            }
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(ReviewDate));
            if ((EmailAddress == null)) {
                throw new System.ArgumentNullException("EmailAddress");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(EmailAddress));
            }
            this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Rating));
            if ((Comments == null)) {
                this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Comments));
            }
            this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_ProductReviewID));
            this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Original_ProductID));
            if ((Original_ReviewerName == null)) {
                throw new System.ArgumentNullException("Original_ReviewerName");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_ReviewerName));
            }
            this.Adapter.UpdateCommand.Parameters[10].Value = ((System.DateTime)(Original_ReviewDate));
            if ((Original_EmailAddress == null)) {
                throw new System.ArgumentNullException("Original_EmailAddress");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_EmailAddress));
            }
            this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(Original_Rating));
            if ((Original_Comments == null)) {
                this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[14].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_Comments));
            }
            this.Adapter.UpdateCommand.Parameters[15].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[16].Value = ((int)(ProductReviewID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 ProductSubcategoryTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public ProductSubcategoryTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "ProductSubcategory";
            tableMapping.ColumnMappings.Add("ProductSubcategoryID", "ProductSubcategoryID");
            tableMapping.ColumnMappings.Add("ProductCategoryID", "ProductCategoryID");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Production].[ProductSubcategory] WHERE (([ProductSubcategoryID] = @Original_ProductSubcategoryID) AND ([ProductCategoryID] = @Original_ProductCategoryID) AND ([Name] = @Original_Name) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductSubcategoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductSubcategoryID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductCategoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductCategoryID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Production].[ProductSubcategory] ([ProductCategoryID], [Name], [rowguid], [ModifiedDate]) VALUES (@ProductCategoryID, @Name, @rowguid, @ModifiedDate);
SELECT ProductSubcategoryID, ProductCategoryID, Name, rowguid, ModifiedDate FROM Production.ProductSubcategory WHERE (ProductSubcategoryID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductCategoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductCategoryID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Production].[ProductSubcategory] SET [ProductCategoryID] = @ProductCategoryID, [Name] = @Name, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([ProductSubcategoryID] = @Original_ProductSubcategoryID) AND ([ProductCategoryID] = @Original_ProductCategoryID) AND ([Name] = @Original_Name) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT ProductSubcategoryID, ProductCategoryID, Name, rowguid, ModifiedDate FROM Production.ProductSubcategory WHERE (ProductSubcategoryID = @ProductSubcategoryID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductCategoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductCategoryID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductSubcategoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductSubcategoryID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductCategoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductCategoryID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductSubcategoryID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "ProductSubcategoryID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT ProductSubcategoryID, ProductCategoryID, Name, rowguid, ModifiedDate FROM " +
                "Production.ProductSubcategory";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.ProductSubcategoryDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.ProductSubcategoryDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.ProductSubcategoryDataTable dataTable = new AdventureWorksDataSet.ProductSubcategoryDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.ProductSubcategoryDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "ProductSubcategory");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_ProductSubcategoryID, int Original_ProductCategoryID, string Original_Name, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ProductSubcategoryID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_ProductCategoryID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_Name));
            }
            this.Adapter.DeleteCommand.Parameters[3].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[4].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int ProductCategoryID, string Name, System.Guid rowguid, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(ProductCategoryID));
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Name));
            }
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[3].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int ProductCategoryID, string Name, System.Guid rowguid, System.DateTime ModifiedDate, int Original_ProductSubcategoryID, int Original_ProductCategoryID, string Original_Name, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate, int ProductSubcategoryID) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(ProductCategoryID));
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Name));
            }
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_ProductSubcategoryID));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_ProductCategoryID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_Name));
            }
            this.Adapter.UpdateCommand.Parameters[7].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[8].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(ProductSubcategoryID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 ScrapReasonTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public ScrapReasonTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "ScrapReason";
            tableMapping.ColumnMappings.Add("ScrapReasonID", "ScrapReasonID");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Production].[ScrapReason] WHERE (([ScrapReasonID] = @Original_ScrapR" +
                "easonID) AND ([Name] = @Original_Name) AND ([ModifiedDate] = @Original_ModifiedD" +
                "ate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ScrapReasonID", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ScrapReasonID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = "INSERT INTO [Production].[ScrapReason] ([Name], [ModifiedDate]) VALUES (@Name, @M" +
                "odifiedDate);\r\nSELECT ScrapReasonID, Name, ModifiedDate FROM Production.ScrapRea" +
                "son WHERE (ScrapReasonID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Production].[ScrapReason] SET [Name] = @Name, [ModifiedDate] = @ModifiedDate WHERE (([ScrapReasonID] = @Original_ScrapReasonID) AND ([Name] = @Original_Name) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT ScrapReasonID, Name, ModifiedDate FROM Production.ScrapReason WHERE (ScrapReasonID = @ScrapReasonID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ScrapReasonID", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ScrapReasonID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ScrapReasonID", System.Data.SqlDbType.Int, 2, System.Data.ParameterDirection.Input, 0, 0, "ScrapReasonID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT ScrapReasonID, Name, ModifiedDate FROM Production.ScrapReason";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.ScrapReasonDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.ScrapReasonDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.ScrapReasonDataTable dataTable = new AdventureWorksDataSet.ScrapReasonDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.ScrapReasonDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "ScrapReason");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(short Original_ScrapReasonID, string Original_Name, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((short)(Original_ScrapReasonID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name));
            }
            this.Adapter.DeleteCommand.Parameters[2].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string Name, System.DateTime ModifiedDate) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name));
            }
            this.Adapter.InsertCommand.Parameters[1].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(string Name, System.DateTime ModifiedDate, short Original_ScrapReasonID, string Original_Name, System.DateTime Original_ModifiedDate, int ScrapReasonID) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name));
            }
            this.Adapter.UpdateCommand.Parameters[1].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((short)(Original_ScrapReasonID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_Name));
            }
            this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(ScrapReasonID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 TransactionHistoryTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public TransactionHistoryTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "TransactionHistory";
            tableMapping.ColumnMappings.Add("TransactionID", "TransactionID");
            tableMapping.ColumnMappings.Add("ProductID", "ProductID");
            tableMapping.ColumnMappings.Add("ReferenceOrderID", "ReferenceOrderID");
            tableMapping.ColumnMappings.Add("ReferenceOrderLineID", "ReferenceOrderLineID");
            tableMapping.ColumnMappings.Add("TransactionDate", "TransactionDate");
            tableMapping.ColumnMappings.Add("TransactionType", "TransactionType");
            tableMapping.ColumnMappings.Add("Quantity", "Quantity");
            tableMapping.ColumnMappings.Add("ActualCost", "ActualCost");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Production].[TransactionHistory] WHERE (([TransactionID] = @Original_TransactionID) AND ([ProductID] = @Original_ProductID) AND ([ReferenceOrderID] = @Original_ReferenceOrderID) AND ([ReferenceOrderLineID] = @Original_ReferenceOrderLineID) AND ([TransactionDate] = @Original_TransactionDate) AND ([TransactionType] = @Original_TransactionType) AND ([Quantity] = @Original_Quantity) AND ([ActualCost] = @Original_ActualCost) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TransactionID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TransactionID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ReferenceOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ReferenceOrderID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ReferenceOrderLineID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ReferenceOrderLineID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TransactionDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "TransactionDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TransactionType", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TransactionType", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Quantity", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Quantity", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ActualCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualCost", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Production].[TransactionHistory] ([ProductID], [ReferenceOrderID], [ReferenceOrderLineID], [TransactionDate], [TransactionType], [Quantity], [ActualCost], [ModifiedDate]) VALUES (@ProductID, @ReferenceOrderID, @ReferenceOrderLineID, @TransactionDate, @TransactionType, @Quantity, @ActualCost, @ModifiedDate);
SELECT TransactionID, ProductID, ReferenceOrderID, ReferenceOrderLineID, TransactionDate, TransactionType, Quantity, ActualCost, ModifiedDate FROM Production.TransactionHistory WHERE (TransactionID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ReferenceOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ReferenceOrderID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ReferenceOrderLineID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ReferenceOrderLineID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TransactionDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "TransactionDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TransactionType", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TransactionType", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Quantity", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Quantity", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ActualCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualCost", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Production].[TransactionHistory] SET [ProductID] = @ProductID, [ReferenceOrderID] = @ReferenceOrderID, [ReferenceOrderLineID] = @ReferenceOrderLineID, [TransactionDate] = @TransactionDate, [TransactionType] = @TransactionType, [Quantity] = @Quantity, [ActualCost] = @ActualCost, [ModifiedDate] = @ModifiedDate WHERE (([TransactionID] = @Original_TransactionID) AND ([ProductID] = @Original_ProductID) AND ([ReferenceOrderID] = @Original_ReferenceOrderID) AND ([ReferenceOrderLineID] = @Original_ReferenceOrderLineID) AND ([TransactionDate] = @Original_TransactionDate) AND ([TransactionType] = @Original_TransactionType) AND ([Quantity] = @Original_Quantity) AND ([ActualCost] = @Original_ActualCost) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT TransactionID, ProductID, ReferenceOrderID, ReferenceOrderLineID, TransactionDate, TransactionType, Quantity, ActualCost, ModifiedDate FROM Production.TransactionHistory WHERE (TransactionID = @TransactionID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ReferenceOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ReferenceOrderID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ReferenceOrderLineID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ReferenceOrderLineID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TransactionDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "TransactionDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TransactionType", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TransactionType", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Quantity", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Quantity", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ActualCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualCost", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TransactionID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TransactionID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ReferenceOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ReferenceOrderID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ReferenceOrderLineID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ReferenceOrderLineID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TransactionDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "TransactionDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TransactionType", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TransactionType", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Quantity", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Quantity", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ActualCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualCost", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TransactionID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "TransactionID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT TransactionID, ProductID, ReferenceOrderID, ReferenceOrderLineID, Transact" +
                "ionDate, TransactionType, Quantity, ActualCost, ModifiedDate FROM Production.Tra" +
                "nsactionHistory";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.TransactionHistoryDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.TransactionHistoryDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.TransactionHistoryDataTable dataTable = new AdventureWorksDataSet.TransactionHistoryDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.TransactionHistoryDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "TransactionHistory");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_TransactionID, int Original_ProductID, int Original_ReferenceOrderID, int Original_ReferenceOrderLineID, System.DateTime Original_TransactionDate, string Original_TransactionType, int Original_Quantity, decimal Original_ActualCost, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_TransactionID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_ProductID));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_ReferenceOrderID));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(Original_ReferenceOrderLineID));
            this.Adapter.DeleteCommand.Parameters[4].Value = ((System.DateTime)(Original_TransactionDate));
            if ((Original_TransactionType == null)) {
                throw new System.ArgumentNullException("Original_TransactionType");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[5].Value = ((string)(Original_TransactionType));
            }
            this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(Original_Quantity));
            this.Adapter.DeleteCommand.Parameters[7].Value = ((decimal)(Original_ActualCost));
            this.Adapter.DeleteCommand.Parameters[8].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int ProductID, int ReferenceOrderID, int ReferenceOrderLineID, System.DateTime TransactionDate, string TransactionType, int Quantity, decimal ActualCost, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(ProductID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((int)(ReferenceOrderID));
            this.Adapter.InsertCommand.Parameters[2].Value = ((int)(ReferenceOrderLineID));
            this.Adapter.InsertCommand.Parameters[3].Value = ((System.DateTime)(TransactionDate));
            if ((TransactionType == null)) {
                throw new System.ArgumentNullException("TransactionType");
            }
            else {
                this.Adapter.InsertCommand.Parameters[4].Value = ((string)(TransactionType));
            }
            this.Adapter.InsertCommand.Parameters[5].Value = ((int)(Quantity));
            this.Adapter.InsertCommand.Parameters[6].Value = ((decimal)(ActualCost));
            this.Adapter.InsertCommand.Parameters[7].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    int ProductID, 
                    int ReferenceOrderID, 
                    int ReferenceOrderLineID, 
                    System.DateTime TransactionDate, 
                    string TransactionType, 
                    int Quantity, 
                    decimal ActualCost, 
                    System.DateTime ModifiedDate, 
                    int Original_TransactionID, 
                    int Original_ProductID, 
                    int Original_ReferenceOrderID, 
                    int Original_ReferenceOrderLineID, 
                    System.DateTime Original_TransactionDate, 
                    string Original_TransactionType, 
                    int Original_Quantity, 
                    decimal Original_ActualCost, 
                    System.DateTime Original_ModifiedDate, 
                    int TransactionID) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(ProductID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(ReferenceOrderID));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(ReferenceOrderLineID));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(TransactionDate));
            if ((TransactionType == null)) {
                throw new System.ArgumentNullException("TransactionType");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(TransactionType));
            }
            this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Quantity));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((decimal)(ActualCost));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Original_TransactionID));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_ProductID));
            this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_ReferenceOrderID));
            this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Original_ReferenceOrderLineID));
            this.Adapter.UpdateCommand.Parameters[12].Value = ((System.DateTime)(Original_TransactionDate));
            if ((Original_TransactionType == null)) {
                throw new System.ArgumentNullException("Original_TransactionType");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[13].Value = ((string)(Original_TransactionType));
            }
            this.Adapter.UpdateCommand.Parameters[14].Value = ((int)(Original_Quantity));
            this.Adapter.UpdateCommand.Parameters[15].Value = ((decimal)(Original_ActualCost));
            this.Adapter.UpdateCommand.Parameters[16].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[17].Value = ((int)(TransactionID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 TransactionHistoryArchiveTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public TransactionHistoryArchiveTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "TransactionHistoryArchive";
            tableMapping.ColumnMappings.Add("TransactionID", "TransactionID");
            tableMapping.ColumnMappings.Add("ProductID", "ProductID");
            tableMapping.ColumnMappings.Add("ReferenceOrderID", "ReferenceOrderID");
            tableMapping.ColumnMappings.Add("ReferenceOrderLineID", "ReferenceOrderLineID");
            tableMapping.ColumnMappings.Add("TransactionDate", "TransactionDate");
            tableMapping.ColumnMappings.Add("TransactionType", "TransactionType");
            tableMapping.ColumnMappings.Add("Quantity", "Quantity");
            tableMapping.ColumnMappings.Add("ActualCost", "ActualCost");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Production].[TransactionHistoryArchive] WHERE (([TransactionID] = @Original_TransactionID) AND ([ProductID] = @Original_ProductID) AND ([ReferenceOrderID] = @Original_ReferenceOrderID) AND ([ReferenceOrderLineID] = @Original_ReferenceOrderLineID) AND ([TransactionDate] = @Original_TransactionDate) AND ([TransactionType] = @Original_TransactionType) AND ([Quantity] = @Original_Quantity) AND ([ActualCost] = @Original_ActualCost) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TransactionID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TransactionID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ReferenceOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ReferenceOrderID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ReferenceOrderLineID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ReferenceOrderLineID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TransactionDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "TransactionDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TransactionType", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TransactionType", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Quantity", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Quantity", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ActualCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualCost", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Production].[TransactionHistoryArchive] ([TransactionID], [ProductID], [ReferenceOrderID], [ReferenceOrderLineID], [TransactionDate], [TransactionType], [Quantity], [ActualCost], [ModifiedDate]) VALUES (@TransactionID, @ProductID, @ReferenceOrderID, @ReferenceOrderLineID, @TransactionDate, @TransactionType, @Quantity, @ActualCost, @ModifiedDate);
SELECT TransactionID, ProductID, ReferenceOrderID, ReferenceOrderLineID, TransactionDate, TransactionType, Quantity, ActualCost, ModifiedDate FROM Production.TransactionHistoryArchive WHERE (TransactionID = @TransactionID)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TransactionID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TransactionID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ReferenceOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ReferenceOrderID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ReferenceOrderLineID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ReferenceOrderLineID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TransactionDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "TransactionDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TransactionType", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TransactionType", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Quantity", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Quantity", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ActualCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualCost", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Production].[TransactionHistoryArchive] SET [TransactionID] = @TransactionID, [ProductID] = @ProductID, [ReferenceOrderID] = @ReferenceOrderID, [ReferenceOrderLineID] = @ReferenceOrderLineID, [TransactionDate] = @TransactionDate, [TransactionType] = @TransactionType, [Quantity] = @Quantity, [ActualCost] = @ActualCost, [ModifiedDate] = @ModifiedDate WHERE (([TransactionID] = @Original_TransactionID) AND ([ProductID] = @Original_ProductID) AND ([ReferenceOrderID] = @Original_ReferenceOrderID) AND ([ReferenceOrderLineID] = @Original_ReferenceOrderLineID) AND ([TransactionDate] = @Original_TransactionDate) AND ([TransactionType] = @Original_TransactionType) AND ([Quantity] = @Original_Quantity) AND ([ActualCost] = @Original_ActualCost) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT TransactionID, ProductID, ReferenceOrderID, ReferenceOrderLineID, TransactionDate, TransactionType, Quantity, ActualCost, ModifiedDate FROM Production.TransactionHistoryArchive WHERE (TransactionID = @TransactionID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TransactionID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TransactionID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ReferenceOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ReferenceOrderID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ReferenceOrderLineID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ReferenceOrderLineID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TransactionDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "TransactionDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TransactionType", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TransactionType", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Quantity", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Quantity", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ActualCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualCost", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TransactionID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TransactionID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ReferenceOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ReferenceOrderID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ReferenceOrderLineID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ReferenceOrderLineID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TransactionDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "TransactionDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TransactionType", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TransactionType", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Quantity", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Quantity", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ActualCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualCost", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT TransactionID, ProductID, ReferenceOrderID, ReferenceOrderLineID, Transact" +
                "ionDate, TransactionType, Quantity, ActualCost, ModifiedDate FROM Production.Tra" +
                "nsactionHistoryArchive";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.TransactionHistoryArchiveDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.TransactionHistoryArchiveDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.TransactionHistoryArchiveDataTable dataTable = new AdventureWorksDataSet.TransactionHistoryArchiveDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.TransactionHistoryArchiveDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "TransactionHistoryArchive");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_TransactionID, int Original_ProductID, int Original_ReferenceOrderID, int Original_ReferenceOrderLineID, System.DateTime Original_TransactionDate, string Original_TransactionType, int Original_Quantity, decimal Original_ActualCost, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_TransactionID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_ProductID));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_ReferenceOrderID));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(Original_ReferenceOrderLineID));
            this.Adapter.DeleteCommand.Parameters[4].Value = ((System.DateTime)(Original_TransactionDate));
            if ((Original_TransactionType == null)) {
                throw new System.ArgumentNullException("Original_TransactionType");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[5].Value = ((string)(Original_TransactionType));
            }
            this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(Original_Quantity));
            this.Adapter.DeleteCommand.Parameters[7].Value = ((decimal)(Original_ActualCost));
            this.Adapter.DeleteCommand.Parameters[8].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int TransactionID, int ProductID, int ReferenceOrderID, int ReferenceOrderLineID, System.DateTime TransactionDate, string TransactionType, int Quantity, decimal ActualCost, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(TransactionID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((int)(ProductID));
            this.Adapter.InsertCommand.Parameters[2].Value = ((int)(ReferenceOrderID));
            this.Adapter.InsertCommand.Parameters[3].Value = ((int)(ReferenceOrderLineID));
            this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(TransactionDate));
            if ((TransactionType == null)) {
                throw new System.ArgumentNullException("TransactionType");
            }
            else {
                this.Adapter.InsertCommand.Parameters[5].Value = ((string)(TransactionType));
            }
            this.Adapter.InsertCommand.Parameters[6].Value = ((int)(Quantity));
            this.Adapter.InsertCommand.Parameters[7].Value = ((decimal)(ActualCost));
            this.Adapter.InsertCommand.Parameters[8].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    int TransactionID, 
                    int ProductID, 
                    int ReferenceOrderID, 
                    int ReferenceOrderLineID, 
                    System.DateTime TransactionDate, 
                    string TransactionType, 
                    int Quantity, 
                    decimal ActualCost, 
                    System.DateTime ModifiedDate, 
                    int Original_TransactionID, 
                    int Original_ProductID, 
                    int Original_ReferenceOrderID, 
                    int Original_ReferenceOrderLineID, 
                    System.DateTime Original_TransactionDate, 
                    string Original_TransactionType, 
                    int Original_Quantity, 
                    decimal Original_ActualCost, 
                    System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(TransactionID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(ProductID));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(ReferenceOrderID));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(ReferenceOrderLineID));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(TransactionDate));
            if ((TransactionType == null)) {
                throw new System.ArgumentNullException("TransactionType");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(TransactionType));
            }
            this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Quantity));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((decimal)(ActualCost));
            this.Adapter.UpdateCommand.Parameters[8].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_TransactionID));
            this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_ProductID));
            this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Original_ReferenceOrderID));
            this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(Original_ReferenceOrderLineID));
            this.Adapter.UpdateCommand.Parameters[13].Value = ((System.DateTime)(Original_TransactionDate));
            if ((Original_TransactionType == null)) {
                throw new System.ArgumentNullException("Original_TransactionType");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_TransactionType));
            }
            this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(Original_Quantity));
            this.Adapter.UpdateCommand.Parameters[16].Value = ((decimal)(Original_ActualCost));
            this.Adapter.UpdateCommand.Parameters[17].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 UnitMeasureTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public UnitMeasureTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "UnitMeasure";
            tableMapping.ColumnMappings.Add("UnitMeasureCode", "UnitMeasureCode");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Production].[UnitMeasure] WHERE (([UnitMeasureCode] = @Original_Unit" +
                "MeasureCode) AND ([Name] = @Original_Name) AND ([ModifiedDate] = @Original_Modif" +
                "iedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_UnitMeasureCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitMeasureCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = "INSERT INTO [Production].[UnitMeasure] ([UnitMeasureCode], [Name], [ModifiedDate]" +
                ") VALUES (@UnitMeasureCode, @Name, @ModifiedDate);\r\nSELECT UnitMeasureCode, Name" +
                ", ModifiedDate FROM Production.UnitMeasure WHERE (UnitMeasureCode = @UnitMeasure" +
                "Code)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@UnitMeasureCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitMeasureCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Production].[UnitMeasure] SET [UnitMeasureCode] = @UnitMeasureCode, [Name] = @Name, [ModifiedDate] = @ModifiedDate WHERE (([UnitMeasureCode] = @Original_UnitMeasureCode) AND ([Name] = @Original_Name) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT UnitMeasureCode, Name, ModifiedDate FROM Production.UnitMeasure WHERE (UnitMeasureCode = @UnitMeasureCode)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@UnitMeasureCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitMeasureCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_UnitMeasureCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitMeasureCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT UnitMeasureCode, Name, ModifiedDate FROM Production.UnitMeasure";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.UnitMeasureDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.UnitMeasureDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.UnitMeasureDataTable dataTable = new AdventureWorksDataSet.UnitMeasureDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.UnitMeasureDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "UnitMeasure");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(string Original_UnitMeasureCode, string Original_Name, System.DateTime Original_ModifiedDate) {
            if ((Original_UnitMeasureCode == null)) {
                throw new System.ArgumentNullException("Original_UnitMeasureCode");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_UnitMeasureCode));
            }
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name));
            }
            this.Adapter.DeleteCommand.Parameters[2].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string UnitMeasureCode, string Name, System.DateTime ModifiedDate) {
            if ((UnitMeasureCode == null)) {
                throw new System.ArgumentNullException("UnitMeasureCode");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(UnitMeasureCode));
            }
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Name));
            }
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(string UnitMeasureCode, string Name, System.DateTime ModifiedDate, string Original_UnitMeasureCode, string Original_Name, System.DateTime Original_ModifiedDate) {
            if ((UnitMeasureCode == null)) {
                throw new System.ArgumentNullException("UnitMeasureCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(UnitMeasureCode));
            }
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Name));
            }
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            if ((Original_UnitMeasureCode == null)) {
                throw new System.ArgumentNullException("Original_UnitMeasureCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_UnitMeasureCode));
            }
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_Name));
            }
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 WorkOrderTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public WorkOrderTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "WorkOrder";
            tableMapping.ColumnMappings.Add("WorkOrderID", "WorkOrderID");
            tableMapping.ColumnMappings.Add("ProductID", "ProductID");
            tableMapping.ColumnMappings.Add("OrderQty", "OrderQty");
            tableMapping.ColumnMappings.Add("StockedQty", "StockedQty");
            tableMapping.ColumnMappings.Add("ScrappedQty", "ScrappedQty");
            tableMapping.ColumnMappings.Add("StartDate", "StartDate");
            tableMapping.ColumnMappings.Add("EndDate", "EndDate");
            tableMapping.ColumnMappings.Add("DueDate", "DueDate");
            tableMapping.ColumnMappings.Add("ScrapReasonID", "ScrapReasonID");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Production].[WorkOrder] WHERE (([WorkOrderID] = @Original_WorkOrderID) AND ([ProductID] = @Original_ProductID) AND ([OrderQty] = @Original_OrderQty) AND ([StockedQty] = @Original_StockedQty) AND ([ScrappedQty] = @Original_ScrappedQty) AND ([StartDate] = @Original_StartDate) AND ((@IsNull_EndDate = 1 AND [EndDate] IS NULL) OR ([EndDate] = @Original_EndDate)) AND ([DueDate] = @Original_DueDate) AND ((@IsNull_ScrapReasonID = 1 AND [ScrapReasonID] IS NULL) OR ([ScrapReasonID] = @Original_ScrapReasonID)) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_WorkOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "WorkOrderID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_OrderQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "OrderQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StockedQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "StockedQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ScrappedQty", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ScrappedQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_EndDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_DueDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "DueDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ScrapReasonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ScrapReasonID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ScrapReasonID", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ScrapReasonID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Production].[WorkOrder] ([ProductID], [OrderQty], [StockedQty], [ScrappedQty], [StartDate], [EndDate], [DueDate], [ScrapReasonID], [ModifiedDate]) VALUES (@ProductID, @OrderQty, @StockedQty, @ScrappedQty, @StartDate, @EndDate, @DueDate, @ScrapReasonID, @ModifiedDate);
SELECT WorkOrderID, ProductID, OrderQty, StockedQty, ScrappedQty, StartDate, EndDate, DueDate, ScrapReasonID, ModifiedDate FROM Production.WorkOrder WHERE (WorkOrderID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OrderQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "OrderQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StockedQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "StockedQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ScrappedQty", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ScrappedQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DueDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "DueDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ScrapReasonID", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ScrapReasonID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Production].[WorkOrder] SET [ProductID] = @ProductID, [OrderQty] = @OrderQty, [StockedQty] = @StockedQty, [ScrappedQty] = @ScrappedQty, [StartDate] = @StartDate, [EndDate] = @EndDate, [DueDate] = @DueDate, [ScrapReasonID] = @ScrapReasonID, [ModifiedDate] = @ModifiedDate WHERE (([WorkOrderID] = @Original_WorkOrderID) AND ([ProductID] = @Original_ProductID) AND ([OrderQty] = @Original_OrderQty) AND ([StockedQty] = @Original_StockedQty) AND ([ScrappedQty] = @Original_ScrappedQty) AND ([StartDate] = @Original_StartDate) AND ((@IsNull_EndDate = 1 AND [EndDate] IS NULL) OR ([EndDate] = @Original_EndDate)) AND ([DueDate] = @Original_DueDate) AND ((@IsNull_ScrapReasonID = 1 AND [ScrapReasonID] IS NULL) OR ([ScrapReasonID] = @Original_ScrapReasonID)) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT WorkOrderID, ProductID, OrderQty, StockedQty, ScrappedQty, StartDate, EndDate, DueDate, ScrapReasonID, ModifiedDate FROM Production.WorkOrder WHERE (WorkOrderID = @WorkOrderID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OrderQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "OrderQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StockedQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "StockedQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ScrappedQty", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ScrappedQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DueDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "DueDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ScrapReasonID", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ScrapReasonID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_WorkOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "WorkOrderID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_OrderQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "OrderQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StockedQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "StockedQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ScrappedQty", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ScrappedQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_EndDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_DueDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "DueDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ScrapReasonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ScrapReasonID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ScrapReasonID", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ScrapReasonID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@WorkOrderID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "WorkOrderID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT WorkOrderID, ProductID, OrderQty, StockedQty, ScrappedQty, StartDate, EndD" +
                "ate, DueDate, ScrapReasonID, ModifiedDate FROM Production.WorkOrder";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.WorkOrderDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.WorkOrderDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.WorkOrderDataTable dataTable = new AdventureWorksDataSet.WorkOrderDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.WorkOrderDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "WorkOrder");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_WorkOrderID, int Original_ProductID, int Original_OrderQty, int Original_StockedQty, short Original_ScrappedQty, System.DateTime Original_StartDate, System.Nullable<System.DateTime> Original_EndDate, System.DateTime Original_DueDate, System.Nullable<short> Original_ScrapReasonID, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_WorkOrderID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_ProductID));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_OrderQty));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(Original_StockedQty));
            this.Adapter.DeleteCommand.Parameters[4].Value = ((short)(Original_ScrappedQty));
            this.Adapter.DeleteCommand.Parameters[5].Value = ((System.DateTime)(Original_StartDate));
            if ((Original_EndDate.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[7].Value = ((System.DateTime)(Original_EndDate.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[7].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[8].Value = ((System.DateTime)(Original_DueDate));
            if ((Original_ScrapReasonID.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[9].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[10].Value = ((short)(Original_ScrapReasonID.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[9].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[10].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[11].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int ProductID, int OrderQty, int StockedQty, short ScrappedQty, System.DateTime StartDate, System.Nullable<System.DateTime> EndDate, System.DateTime DueDate, System.Nullable<short> ScrapReasonID, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(ProductID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((int)(OrderQty));
            this.Adapter.InsertCommand.Parameters[2].Value = ((int)(StockedQty));
            this.Adapter.InsertCommand.Parameters[3].Value = ((short)(ScrappedQty));
            this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(StartDate));
            if ((EndDate.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[5].Value = ((System.DateTime)(EndDate.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value;
            }
            this.Adapter.InsertCommand.Parameters[6].Value = ((System.DateTime)(DueDate));
            if ((ScrapReasonID.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[7].Value = ((short)(ScrapReasonID.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[7].Value = System.DBNull.Value;
            }
            this.Adapter.InsertCommand.Parameters[8].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    int ProductID, 
                    int OrderQty, 
                    int StockedQty, 
                    short ScrappedQty, 
                    System.DateTime StartDate, 
                    System.Nullable<System.DateTime> EndDate, 
                    System.DateTime DueDate, 
                    System.Nullable<short> ScrapReasonID, 
                    System.DateTime ModifiedDate, 
                    int Original_WorkOrderID, 
                    int Original_ProductID, 
                    int Original_OrderQty, 
                    int Original_StockedQty, 
                    short Original_ScrappedQty, 
                    System.DateTime Original_StartDate, 
                    System.Nullable<System.DateTime> Original_EndDate, 
                    System.DateTime Original_DueDate, 
                    System.Nullable<short> Original_ScrapReasonID, 
                    System.DateTime Original_ModifiedDate, 
                    int WorkOrderID) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(ProductID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(OrderQty));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(StockedQty));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((short)(ScrappedQty));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(StartDate));
            if ((EndDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(EndDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(DueDate));
            if ((ScrapReasonID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[7].Value = ((short)(ScrapReasonID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[7].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[8].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_WorkOrderID));
            this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_ProductID));
            this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Original_OrderQty));
            this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(Original_StockedQty));
            this.Adapter.UpdateCommand.Parameters[13].Value = ((short)(Original_ScrappedQty));
            this.Adapter.UpdateCommand.Parameters[14].Value = ((System.DateTime)(Original_StartDate));
            if ((Original_EndDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[16].Value = ((System.DateTime)(Original_EndDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[16].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[17].Value = ((System.DateTime)(Original_DueDate));
            if ((Original_ScrapReasonID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[18].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[19].Value = ((short)(Original_ScrapReasonID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[18].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[19].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[20].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[21].Value = ((int)(WorkOrderID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 WorkOrderRoutingTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public WorkOrderRoutingTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "WorkOrderRouting";
            tableMapping.ColumnMappings.Add("WorkOrderID", "WorkOrderID");
            tableMapping.ColumnMappings.Add("ProductID", "ProductID");
            tableMapping.ColumnMappings.Add("OperationSequence", "OperationSequence");
            tableMapping.ColumnMappings.Add("LocationID", "LocationID");
            tableMapping.ColumnMappings.Add("ScheduledStartDate", "ScheduledStartDate");
            tableMapping.ColumnMappings.Add("ScheduledEndDate", "ScheduledEndDate");
            tableMapping.ColumnMappings.Add("ActualStartDate", "ActualStartDate");
            tableMapping.ColumnMappings.Add("ActualEndDate", "ActualEndDate");
            tableMapping.ColumnMappings.Add("ActualResourceHrs", "ActualResourceHrs");
            tableMapping.ColumnMappings.Add("PlannedCost", "PlannedCost");
            tableMapping.ColumnMappings.Add("ActualCost", "ActualCost");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Production].[WorkOrderRouting] WHERE (([WorkOrderID] = @Original_WorkOrderID) AND ([ProductID] = @Original_ProductID) AND ([OperationSequence] = @Original_OperationSequence) AND ([LocationID] = @Original_LocationID) AND ([ScheduledStartDate] = @Original_ScheduledStartDate) AND ([ScheduledEndDate] = @Original_ScheduledEndDate) AND ((@IsNull_ActualStartDate = 1 AND [ActualStartDate] IS NULL) OR ([ActualStartDate] = @Original_ActualStartDate)) AND ((@IsNull_ActualEndDate = 1 AND [ActualEndDate] IS NULL) OR ([ActualEndDate] = @Original_ActualEndDate)) AND ((@IsNull_ActualResourceHrs = 1 AND [ActualResourceHrs] IS NULL) OR ([ActualResourceHrs] = @Original_ActualResourceHrs)) AND ([PlannedCost] = @Original_PlannedCost) AND ((@IsNull_ActualCost = 1 AND [ActualCost] IS NULL) OR ([ActualCost] = @Original_ActualCost)) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_WorkOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "WorkOrderID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_OperationSequence", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "OperationSequence", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_LocationID", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "LocationID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ScheduledStartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ScheduledStartDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ScheduledEndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ScheduledEndDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ActualStartDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualStartDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ActualStartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualStartDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ActualEndDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualEndDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ActualEndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualEndDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ActualResourceHrs", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualResourceHrs", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ActualResourceHrs", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 9, 4, "ActualResourceHrs", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PlannedCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "PlannedCost", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ActualCost", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualCost", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ActualCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualCost", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Production].[WorkOrderRouting] ([WorkOrderID], [ProductID], [OperationSequence], [LocationID], [ScheduledStartDate], [ScheduledEndDate], [ActualStartDate], [ActualEndDate], [ActualResourceHrs], [PlannedCost], [ActualCost], [ModifiedDate]) VALUES (@WorkOrderID, @ProductID, @OperationSequence, @LocationID, @ScheduledStartDate, @ScheduledEndDate, @ActualStartDate, @ActualEndDate, @ActualResourceHrs, @PlannedCost, @ActualCost, @ModifiedDate);
SELECT WorkOrderID, ProductID, OperationSequence, LocationID, ScheduledStartDate, ScheduledEndDate, ActualStartDate, ActualEndDate, ActualResourceHrs, PlannedCost, ActualCost, ModifiedDate FROM Production.WorkOrderRouting WHERE (OperationSequence = @OperationSequence) AND (ProductID = @ProductID) AND (WorkOrderID = @WorkOrderID)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@WorkOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "WorkOrderID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OperationSequence", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "OperationSequence", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@LocationID", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "LocationID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ScheduledStartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ScheduledStartDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ScheduledEndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ScheduledEndDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ActualStartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualStartDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ActualEndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualEndDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ActualResourceHrs", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 9, 4, "ActualResourceHrs", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PlannedCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "PlannedCost", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ActualCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualCost", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = "UPDATE [Production].[WorkOrderRouting] SET [WorkOrderID] = @WorkOrderID, [Product" +
                "ID] = @ProductID, [OperationSequence] = @OperationSequence, [LocationID] = @Loca" +
                "tionID, [ScheduledStartDate] = @ScheduledStartDate, [ScheduledEndDate] = @Schedu" +
                "ledEndDate, [ActualStartDate] = @ActualStartDate, [ActualEndDate] = @ActualEndDa" +
                "te, [ActualResourceHrs] = @ActualResourceHrs, [PlannedCost] = @PlannedCost, [Act" +
                "ualCost] = @ActualCost, [ModifiedDate] = @ModifiedDate WHERE (([WorkOrderID] = @" +
                "Original_WorkOrderID) AND ([ProductID] = @Original_ProductID) AND ([OperationSeq" +
                "uence] = @Original_OperationSequence) AND ([LocationID] = @Original_LocationID) " +
                "AND ([ScheduledStartDate] = @Original_ScheduledStartDate) AND ([ScheduledEndDate" +
                "] = @Original_ScheduledEndDate) AND ((@IsNull_ActualStartDate = 1 AND [ActualSta" +
                "rtDate] IS NULL) OR ([ActualStartDate] = @Original_ActualStartDate)) AND ((@IsNu" +
                "ll_ActualEndDate = 1 AND [ActualEndDate] IS NULL) OR ([ActualEndDate] = @Origina" +
                "l_ActualEndDate)) AND ((@IsNull_ActualResourceHrs = 1 AND [ActualResourceHrs] IS" +
                " NULL) OR ([ActualResourceHrs] = @Original_ActualResourceHrs)) AND ([PlannedCost" +
                "] = @Original_PlannedCost) AND ((@IsNull_ActualCost = 1 AND [ActualCost] IS NULL" +
                ") OR ([ActualCost] = @Original_ActualCost)) AND ([ModifiedDate] = @Original_Modi" +
                "fiedDate));\r\nSELECT WorkOrderID, ProductID, OperationSequence, LocationID, Sched" +
                "uledStartDate, ScheduledEndDate, ActualStartDate, ActualEndDate, ActualResourceH" +
                "rs, PlannedCost, ActualCost, ModifiedDate FROM Production.WorkOrderRouting WHERE" +
                " (OperationSequence = @OperationSequence) AND (ProductID = @ProductID) AND (Work" +
                "OrderID = @WorkOrderID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@WorkOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "WorkOrderID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OperationSequence", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "OperationSequence", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@LocationID", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "LocationID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ScheduledStartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ScheduledStartDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ScheduledEndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ScheduledEndDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ActualStartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualStartDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ActualEndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualEndDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ActualResourceHrs", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 9, 4, "ActualResourceHrs", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PlannedCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "PlannedCost", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ActualCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualCost", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_WorkOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "WorkOrderID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_OperationSequence", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "OperationSequence", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_LocationID", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "LocationID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ScheduledStartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ScheduledStartDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ScheduledEndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ScheduledEndDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ActualStartDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualStartDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ActualStartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualStartDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ActualEndDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualEndDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ActualEndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualEndDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ActualResourceHrs", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualResourceHrs", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ActualResourceHrs", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 9, 4, "ActualResourceHrs", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PlannedCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "PlannedCost", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ActualCost", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualCost", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ActualCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ActualCost", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT WorkOrderID, ProductID, OperationSequence, LocationID, ScheduledStartDate," +
                " ScheduledEndDate, ActualStartDate, ActualEndDate, ActualResourceHrs, PlannedCos" +
                "t, ActualCost, ModifiedDate FROM Production.WorkOrderRouting";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.WorkOrderRoutingDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.WorkOrderRoutingDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.WorkOrderRoutingDataTable dataTable = new AdventureWorksDataSet.WorkOrderRoutingDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.WorkOrderRoutingDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "WorkOrderRouting");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_WorkOrderID, int Original_ProductID, short Original_OperationSequence, short Original_LocationID, System.DateTime Original_ScheduledStartDate, System.DateTime Original_ScheduledEndDate, System.Nullable<System.DateTime> Original_ActualStartDate, System.Nullable<System.DateTime> Original_ActualEndDate, System.Nullable<decimal> Original_ActualResourceHrs, decimal Original_PlannedCost, System.Nullable<decimal> Original_ActualCost, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_WorkOrderID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_ProductID));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((short)(Original_OperationSequence));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((short)(Original_LocationID));
            this.Adapter.DeleteCommand.Parameters[4].Value = ((System.DateTime)(Original_ScheduledStartDate));
            this.Adapter.DeleteCommand.Parameters[5].Value = ((System.DateTime)(Original_ScheduledEndDate));
            if ((Original_ActualStartDate.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[7].Value = ((System.DateTime)(Original_ActualStartDate.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[7].Value = System.DBNull.Value;
            }
            if ((Original_ActualEndDate.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[8].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[9].Value = ((System.DateTime)(Original_ActualEndDate.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[8].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[9].Value = System.DBNull.Value;
            }
            if ((Original_ActualResourceHrs.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[10].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[11].Value = ((decimal)(Original_ActualResourceHrs.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[10].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[11].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[12].Value = ((decimal)(Original_PlannedCost));
            if ((Original_ActualCost.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[13].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[14].Value = ((decimal)(Original_ActualCost.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[13].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[14].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[15].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int WorkOrderID, int ProductID, short OperationSequence, short LocationID, System.DateTime ScheduledStartDate, System.DateTime ScheduledEndDate, System.Nullable<System.DateTime> ActualStartDate, System.Nullable<System.DateTime> ActualEndDate, System.Nullable<decimal> ActualResourceHrs, decimal PlannedCost, System.Nullable<decimal> ActualCost, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(WorkOrderID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((int)(ProductID));
            this.Adapter.InsertCommand.Parameters[2].Value = ((short)(OperationSequence));
            this.Adapter.InsertCommand.Parameters[3].Value = ((short)(LocationID));
            this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(ScheduledStartDate));
            this.Adapter.InsertCommand.Parameters[5].Value = ((System.DateTime)(ScheduledEndDate));
            if ((ActualStartDate.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[6].Value = ((System.DateTime)(ActualStartDate.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[6].Value = System.DBNull.Value;
            }
            if ((ActualEndDate.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[7].Value = ((System.DateTime)(ActualEndDate.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[7].Value = System.DBNull.Value;
            }
            if ((ActualResourceHrs.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[8].Value = ((decimal)(ActualResourceHrs.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[8].Value = System.DBNull.Value;
            }
            this.Adapter.InsertCommand.Parameters[9].Value = ((decimal)(PlannedCost));
            if ((ActualCost.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[10].Value = ((decimal)(ActualCost.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[10].Value = System.DBNull.Value;
            }
            this.Adapter.InsertCommand.Parameters[11].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    int WorkOrderID, 
                    int ProductID, 
                    short OperationSequence, 
                    short LocationID, 
                    System.DateTime ScheduledStartDate, 
                    System.DateTime ScheduledEndDate, 
                    System.Nullable<System.DateTime> ActualStartDate, 
                    System.Nullable<System.DateTime> ActualEndDate, 
                    System.Nullable<decimal> ActualResourceHrs, 
                    decimal PlannedCost, 
                    System.Nullable<decimal> ActualCost, 
                    System.DateTime ModifiedDate, 
                    int Original_WorkOrderID, 
                    int Original_ProductID, 
                    short Original_OperationSequence, 
                    short Original_LocationID, 
                    System.DateTime Original_ScheduledStartDate, 
                    System.DateTime Original_ScheduledEndDate, 
                    System.Nullable<System.DateTime> Original_ActualStartDate, 
                    System.Nullable<System.DateTime> Original_ActualEndDate, 
                    System.Nullable<decimal> Original_ActualResourceHrs, 
                    decimal Original_PlannedCost, 
                    System.Nullable<decimal> Original_ActualCost, 
                    System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(WorkOrderID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(ProductID));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((short)(OperationSequence));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((short)(LocationID));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(ScheduledStartDate));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(ScheduledEndDate));
            if ((ActualStartDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(ActualStartDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[6].Value = System.DBNull.Value;
            }
            if ((ActualEndDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[7].Value = ((System.DateTime)(ActualEndDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[7].Value = System.DBNull.Value;
            }
            if ((ActualResourceHrs.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[8].Value = ((decimal)(ActualResourceHrs.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[8].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[9].Value = ((decimal)(PlannedCost));
            if ((ActualCost.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[10].Value = ((decimal)(ActualCost.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[10].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[11].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(Original_WorkOrderID));
            this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(Original_ProductID));
            this.Adapter.UpdateCommand.Parameters[14].Value = ((short)(Original_OperationSequence));
            this.Adapter.UpdateCommand.Parameters[15].Value = ((short)(Original_LocationID));
            this.Adapter.UpdateCommand.Parameters[16].Value = ((System.DateTime)(Original_ScheduledStartDate));
            this.Adapter.UpdateCommand.Parameters[17].Value = ((System.DateTime)(Original_ScheduledEndDate));
            if ((Original_ActualStartDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[18].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[19].Value = ((System.DateTime)(Original_ActualStartDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[18].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[19].Value = System.DBNull.Value;
            }
            if ((Original_ActualEndDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[20].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[21].Value = ((System.DateTime)(Original_ActualEndDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[20].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[21].Value = System.DBNull.Value;
            }
            if ((Original_ActualResourceHrs.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[22].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[23].Value = ((decimal)(Original_ActualResourceHrs.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[22].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[23].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[24].Value = ((decimal)(Original_PlannedCost));
            if ((Original_ActualCost.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[25].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[26].Value = ((decimal)(Original_ActualCost.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[25].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[26].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[27].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 ProductVendorTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public ProductVendorTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "ProductVendor";
            tableMapping.ColumnMappings.Add("ProductID", "ProductID");
            tableMapping.ColumnMappings.Add("VendorID", "VendorID");
            tableMapping.ColumnMappings.Add("AverageLeadTime", "AverageLeadTime");
            tableMapping.ColumnMappings.Add("StandardPrice", "StandardPrice");
            tableMapping.ColumnMappings.Add("LastReceiptCost", "LastReceiptCost");
            tableMapping.ColumnMappings.Add("LastReceiptDate", "LastReceiptDate");
            tableMapping.ColumnMappings.Add("MinOrderQty", "MinOrderQty");
            tableMapping.ColumnMappings.Add("MaxOrderQty", "MaxOrderQty");
            tableMapping.ColumnMappings.Add("OnOrderQty", "OnOrderQty");
            tableMapping.ColumnMappings.Add("UnitMeasureCode", "UnitMeasureCode");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Purchasing].[ProductVendor] WHERE (([ProductID] = @Original_ProductID) AND ([VendorID] = @Original_VendorID) AND ([AverageLeadTime] = @Original_AverageLeadTime) AND ([StandardPrice] = @Original_StandardPrice) AND ((@IsNull_LastReceiptCost = 1 AND [LastReceiptCost] IS NULL) OR ([LastReceiptCost] = @Original_LastReceiptCost)) AND ((@IsNull_LastReceiptDate = 1 AND [LastReceiptDate] IS NULL) OR ([LastReceiptDate] = @Original_LastReceiptDate)) AND ([MinOrderQty] = @Original_MinOrderQty) AND ([MaxOrderQty] = @Original_MaxOrderQty) AND ((@IsNull_OnOrderQty = 1 AND [OnOrderQty] IS NULL) OR ([OnOrderQty] = @Original_OnOrderQty)) AND ([UnitMeasureCode] = @Original_UnitMeasureCode) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_VendorID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "VendorID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AverageLeadTime", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AverageLeadTime", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StandardPrice", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "StandardPrice", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_LastReceiptCost", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "LastReceiptCost", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_LastReceiptCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "LastReceiptCost", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_LastReceiptDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "LastReceiptDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_LastReceiptDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "LastReceiptDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_MinOrderQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "MinOrderQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_MaxOrderQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "MaxOrderQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_OnOrderQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "OnOrderQty", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_OnOrderQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "OnOrderQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_UnitMeasureCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitMeasureCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Purchasing].[ProductVendor] ([ProductID], [VendorID], [AverageLeadTime], [StandardPrice], [LastReceiptCost], [LastReceiptDate], [MinOrderQty], [MaxOrderQty], [OnOrderQty], [UnitMeasureCode], [ModifiedDate]) VALUES (@ProductID, @VendorID, @AverageLeadTime, @StandardPrice, @LastReceiptCost, @LastReceiptDate, @MinOrderQty, @MaxOrderQty, @OnOrderQty, @UnitMeasureCode, @ModifiedDate);
SELECT ProductID, VendorID, AverageLeadTime, StandardPrice, LastReceiptCost, LastReceiptDate, MinOrderQty, MaxOrderQty, OnOrderQty, UnitMeasureCode, ModifiedDate FROM Purchasing.ProductVendor WHERE (ProductID = @ProductID) AND (VendorID = @VendorID)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@VendorID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "VendorID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AverageLeadTime", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AverageLeadTime", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StandardPrice", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "StandardPrice", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@LastReceiptCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "LastReceiptCost", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@LastReceiptDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "LastReceiptDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MinOrderQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "MinOrderQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MaxOrderQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "MaxOrderQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OnOrderQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "OnOrderQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@UnitMeasureCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitMeasureCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Purchasing].[ProductVendor] SET [ProductID] = @ProductID, [VendorID] = @VendorID, [AverageLeadTime] = @AverageLeadTime, [StandardPrice] = @StandardPrice, [LastReceiptCost] = @LastReceiptCost, [LastReceiptDate] = @LastReceiptDate, [MinOrderQty] = @MinOrderQty, [MaxOrderQty] = @MaxOrderQty, [OnOrderQty] = @OnOrderQty, [UnitMeasureCode] = @UnitMeasureCode, [ModifiedDate] = @ModifiedDate WHERE (([ProductID] = @Original_ProductID) AND ([VendorID] = @Original_VendorID) AND ([AverageLeadTime] = @Original_AverageLeadTime) AND ([StandardPrice] = @Original_StandardPrice) AND ((@IsNull_LastReceiptCost = 1 AND [LastReceiptCost] IS NULL) OR ([LastReceiptCost] = @Original_LastReceiptCost)) AND ((@IsNull_LastReceiptDate = 1 AND [LastReceiptDate] IS NULL) OR ([LastReceiptDate] = @Original_LastReceiptDate)) AND ([MinOrderQty] = @Original_MinOrderQty) AND ([MaxOrderQty] = @Original_MaxOrderQty) AND ((@IsNull_OnOrderQty = 1 AND [OnOrderQty] IS NULL) OR ([OnOrderQty] = @Original_OnOrderQty)) AND ([UnitMeasureCode] = @Original_UnitMeasureCode) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT ProductID, VendorID, AverageLeadTime, StandardPrice, LastReceiptCost, LastReceiptDate, MinOrderQty, MaxOrderQty, OnOrderQty, UnitMeasureCode, ModifiedDate FROM Purchasing.ProductVendor WHERE (ProductID = @ProductID) AND (VendorID = @VendorID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@VendorID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "VendorID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AverageLeadTime", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AverageLeadTime", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StandardPrice", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "StandardPrice", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@LastReceiptCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "LastReceiptCost", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@LastReceiptDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "LastReceiptDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MinOrderQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "MinOrderQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MaxOrderQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "MaxOrderQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OnOrderQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "OnOrderQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@UnitMeasureCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitMeasureCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_VendorID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "VendorID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AverageLeadTime", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AverageLeadTime", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StandardPrice", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "StandardPrice", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_LastReceiptCost", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "LastReceiptCost", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_LastReceiptCost", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "LastReceiptCost", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_LastReceiptDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "LastReceiptDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_LastReceiptDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "LastReceiptDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_MinOrderQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "MinOrderQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_MaxOrderQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "MaxOrderQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_OnOrderQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "OnOrderQty", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_OnOrderQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "OnOrderQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_UnitMeasureCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitMeasureCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT ProductID, VendorID, AverageLeadTime, StandardPrice, LastReceiptCost, Last" +
                "ReceiptDate, MinOrderQty, MaxOrderQty, OnOrderQty, UnitMeasureCode, ModifiedDate" +
                " FROM Purchasing.ProductVendor";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.ProductVendorDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.ProductVendorDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.ProductVendorDataTable dataTable = new AdventureWorksDataSet.ProductVendorDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.ProductVendorDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "ProductVendor");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_ProductID, int Original_VendorID, int Original_AverageLeadTime, decimal Original_StandardPrice, System.Nullable<decimal> Original_LastReceiptCost, System.Nullable<System.DateTime> Original_LastReceiptDate, int Original_MinOrderQty, int Original_MaxOrderQty, System.Nullable<int> Original_OnOrderQty, string Original_UnitMeasureCode, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ProductID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_VendorID));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_AverageLeadTime));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((decimal)(Original_StandardPrice));
            if ((Original_LastReceiptCost.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[5].Value = ((decimal)(Original_LastReceiptCost.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[5].Value = System.DBNull.Value;
            }
            if ((Original_LastReceiptDate.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[7].Value = ((System.DateTime)(Original_LastReceiptDate.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[7].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[8].Value = ((int)(Original_MinOrderQty));
            this.Adapter.DeleteCommand.Parameters[9].Value = ((int)(Original_MaxOrderQty));
            if ((Original_OnOrderQty.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[10].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[11].Value = ((int)(Original_OnOrderQty.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[10].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[11].Value = System.DBNull.Value;
            }
            if ((Original_UnitMeasureCode == null)) {
                throw new System.ArgumentNullException("Original_UnitMeasureCode");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[12].Value = ((string)(Original_UnitMeasureCode));
            }
            this.Adapter.DeleteCommand.Parameters[13].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int ProductID, int VendorID, int AverageLeadTime, decimal StandardPrice, System.Nullable<decimal> LastReceiptCost, System.Nullable<System.DateTime> LastReceiptDate, int MinOrderQty, int MaxOrderQty, System.Nullable<int> OnOrderQty, string UnitMeasureCode, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(ProductID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((int)(VendorID));
            this.Adapter.InsertCommand.Parameters[2].Value = ((int)(AverageLeadTime));
            this.Adapter.InsertCommand.Parameters[3].Value = ((decimal)(StandardPrice));
            if ((LastReceiptCost.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[4].Value = ((decimal)(LastReceiptCost.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[4].Value = System.DBNull.Value;
            }
            if ((LastReceiptDate.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[5].Value = ((System.DateTime)(LastReceiptDate.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value;
            }
            this.Adapter.InsertCommand.Parameters[6].Value = ((int)(MinOrderQty));
            this.Adapter.InsertCommand.Parameters[7].Value = ((int)(MaxOrderQty));
            if ((OnOrderQty.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[8].Value = ((int)(OnOrderQty.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[8].Value = System.DBNull.Value;
            }
            if ((UnitMeasureCode == null)) {
                throw new System.ArgumentNullException("UnitMeasureCode");
            }
            else {
                this.Adapter.InsertCommand.Parameters[9].Value = ((string)(UnitMeasureCode));
            }
            this.Adapter.InsertCommand.Parameters[10].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    int ProductID, 
                    int VendorID, 
                    int AverageLeadTime, 
                    decimal StandardPrice, 
                    System.Nullable<decimal> LastReceiptCost, 
                    System.Nullable<System.DateTime> LastReceiptDate, 
                    int MinOrderQty, 
                    int MaxOrderQty, 
                    System.Nullable<int> OnOrderQty, 
                    string UnitMeasureCode, 
                    System.DateTime ModifiedDate, 
                    int Original_ProductID, 
                    int Original_VendorID, 
                    int Original_AverageLeadTime, 
                    decimal Original_StandardPrice, 
                    System.Nullable<decimal> Original_LastReceiptCost, 
                    System.Nullable<System.DateTime> Original_LastReceiptDate, 
                    int Original_MinOrderQty, 
                    int Original_MaxOrderQty, 
                    System.Nullable<int> Original_OnOrderQty, 
                    string Original_UnitMeasureCode, 
                    System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(ProductID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(VendorID));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(AverageLeadTime));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((decimal)(StandardPrice));
            if ((LastReceiptCost.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((decimal)(LastReceiptCost.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = System.DBNull.Value;
            }
            if ((LastReceiptDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(LastReceiptDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(MinOrderQty));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(MaxOrderQty));
            if ((OnOrderQty.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(OnOrderQty.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[8].Value = System.DBNull.Value;
            }
            if ((UnitMeasureCode == null)) {
                throw new System.ArgumentNullException("UnitMeasureCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(UnitMeasureCode));
            }
            this.Adapter.UpdateCommand.Parameters[10].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Original_ProductID));
            this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(Original_VendorID));
            this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(Original_AverageLeadTime));
            this.Adapter.UpdateCommand.Parameters[14].Value = ((decimal)(Original_StandardPrice));
            if ((Original_LastReceiptCost.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[16].Value = ((decimal)(Original_LastReceiptCost.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[16].Value = System.DBNull.Value;
            }
            if ((Original_LastReceiptDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[17].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[18].Value = ((System.DateTime)(Original_LastReceiptDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[17].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[18].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(Original_MinOrderQty));
            this.Adapter.UpdateCommand.Parameters[20].Value = ((int)(Original_MaxOrderQty));
            if ((Original_OnOrderQty.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[21].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[22].Value = ((int)(Original_OnOrderQty.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[21].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[22].Value = System.DBNull.Value;
            }
            if ((Original_UnitMeasureCode == null)) {
                throw new System.ArgumentNullException("Original_UnitMeasureCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[23].Value = ((string)(Original_UnitMeasureCode));
            }
            this.Adapter.UpdateCommand.Parameters[24].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 PurchaseOrderDetailTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public PurchaseOrderDetailTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "PurchaseOrderDetail";
            tableMapping.ColumnMappings.Add("PurchaseOrderID", "PurchaseOrderID");
            tableMapping.ColumnMappings.Add("PurchaseOrderDetailID", "PurchaseOrderDetailID");
            tableMapping.ColumnMappings.Add("DueDate", "DueDate");
            tableMapping.ColumnMappings.Add("OrderQty", "OrderQty");
            tableMapping.ColumnMappings.Add("ProductID", "ProductID");
            tableMapping.ColumnMappings.Add("UnitPrice", "UnitPrice");
            tableMapping.ColumnMappings.Add("LineTotal", "LineTotal");
            tableMapping.ColumnMappings.Add("ReceivedQty", "ReceivedQty");
            tableMapping.ColumnMappings.Add("RejectedQty", "RejectedQty");
            tableMapping.ColumnMappings.Add("StockedQty", "StockedQty");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Purchasing].[PurchaseOrderDetail] WHERE (([PurchaseOrderID] = @Original_PurchaseOrderID) AND ([PurchaseOrderDetailID] = @Original_PurchaseOrderDetailID) AND ([DueDate] = @Original_DueDate) AND ([OrderQty] = @Original_OrderQty) AND ([ProductID] = @Original_ProductID) AND ([UnitPrice] = @Original_UnitPrice) AND ((@IsNull_LineTotal = 1 AND [LineTotal] IS NULL) OR ([LineTotal] = @Original_LineTotal)) AND ([ReceivedQty] = @Original_ReceivedQty) AND ([RejectedQty] = @Original_RejectedQty) AND ((@IsNull_StockedQty = 1 AND [StockedQty] IS NULL) OR ([StockedQty] = @Original_StockedQty)) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PurchaseOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PurchaseOrderDetailID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderDetailID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_DueDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "DueDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_OrderQty", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "OrderQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_LineTotal", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "LineTotal", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_LineTotal", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "LineTotal", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ReceivedQty", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 8, 2, "ReceivedQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_RejectedQty", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 8, 2, "RejectedQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_StockedQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "StockedQty", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StockedQty", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 9, 2, "StockedQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Purchasing].[PurchaseOrderDetail] ([PurchaseOrderID], [DueDate], [OrderQty], [ProductID], [UnitPrice], [LineTotal], [ReceivedQty], [RejectedQty], [StockedQty], [ModifiedDate]) VALUES (@PurchaseOrderID, @DueDate, @OrderQty, @ProductID, @UnitPrice, @LineTotal, @ReceivedQty, @RejectedQty, @StockedQty, @ModifiedDate);
SELECT PurchaseOrderID, PurchaseOrderDetailID, DueDate, OrderQty, ProductID, UnitPrice, LineTotal, ReceivedQty, RejectedQty, StockedQty, ModifiedDate FROM Purchasing.PurchaseOrderDetail WHERE (PurchaseOrderDetailID = @@IDENTITY) AND (PurchaseOrderID = @PurchaseOrderID)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PurchaseOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DueDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "DueDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OrderQty", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "OrderQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@LineTotal", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "LineTotal", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ReceivedQty", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 8, 2, "ReceivedQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RejectedQty", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 8, 2, "RejectedQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StockedQty", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 9, 2, "StockedQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Purchasing].[PurchaseOrderDetail] SET [PurchaseOrderID] = @PurchaseOrderID, [DueDate] = @DueDate, [OrderQty] = @OrderQty, [ProductID] = @ProductID, [UnitPrice] = @UnitPrice, [LineTotal] = @LineTotal, [ReceivedQty] = @ReceivedQty, [RejectedQty] = @RejectedQty, [StockedQty] = @StockedQty, [ModifiedDate] = @ModifiedDate WHERE (([PurchaseOrderID] = @Original_PurchaseOrderID) AND ([PurchaseOrderDetailID] = @Original_PurchaseOrderDetailID) AND ([DueDate] = @Original_DueDate) AND ([OrderQty] = @Original_OrderQty) AND ([ProductID] = @Original_ProductID) AND ([UnitPrice] = @Original_UnitPrice) AND ((@IsNull_LineTotal = 1 AND [LineTotal] IS NULL) OR ([LineTotal] = @Original_LineTotal)) AND ([ReceivedQty] = @Original_ReceivedQty) AND ([RejectedQty] = @Original_RejectedQty) AND ((@IsNull_StockedQty = 1 AND [StockedQty] IS NULL) OR ([StockedQty] = @Original_StockedQty)) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT PurchaseOrderID, PurchaseOrderDetailID, DueDate, OrderQty, ProductID, UnitPrice, LineTotal, ReceivedQty, RejectedQty, StockedQty, ModifiedDate FROM Purchasing.PurchaseOrderDetail WHERE (PurchaseOrderDetailID = @PurchaseOrderDetailID) AND (PurchaseOrderID = @PurchaseOrderID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PurchaseOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DueDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "DueDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OrderQty", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "OrderQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@LineTotal", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "LineTotal", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ReceivedQty", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 8, 2, "ReceivedQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RejectedQty", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 8, 2, "RejectedQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StockedQty", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 9, 2, "StockedQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PurchaseOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PurchaseOrderDetailID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderDetailID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_DueDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "DueDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_OrderQty", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "OrderQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_LineTotal", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "LineTotal", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_LineTotal", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "LineTotal", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ReceivedQty", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 8, 2, "ReceivedQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_RejectedQty", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 8, 2, "RejectedQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_StockedQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "StockedQty", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StockedQty", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 9, 2, "StockedQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PurchaseOrderDetailID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderDetailID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT PurchaseOrderID, PurchaseOrderDetailID, DueDate, OrderQty, ProductID, Unit" +
                "Price, LineTotal, ReceivedQty, RejectedQty, StockedQty, ModifiedDate FROM Purcha" +
                "sing.PurchaseOrderDetail";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.PurchaseOrderDetailDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.PurchaseOrderDetailDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.PurchaseOrderDetailDataTable dataTable = new AdventureWorksDataSet.PurchaseOrderDetailDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.PurchaseOrderDetailDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "PurchaseOrderDetail");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_PurchaseOrderID, int Original_PurchaseOrderDetailID, System.DateTime Original_DueDate, short Original_OrderQty, int Original_ProductID, decimal Original_UnitPrice, System.Nullable<decimal> Original_LineTotal, decimal Original_ReceivedQty, decimal Original_RejectedQty, System.Nullable<decimal> Original_StockedQty, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_PurchaseOrderID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_PurchaseOrderDetailID));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((System.DateTime)(Original_DueDate));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((short)(Original_OrderQty));
            this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_ProductID));
            this.Adapter.DeleteCommand.Parameters[5].Value = ((decimal)(Original_UnitPrice));
            if ((Original_LineTotal.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[7].Value = ((decimal)(Original_LineTotal.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[7].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[8].Value = ((decimal)(Original_ReceivedQty));
            this.Adapter.DeleteCommand.Parameters[9].Value = ((decimal)(Original_RejectedQty));
            if ((Original_StockedQty.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[10].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[11].Value = ((decimal)(Original_StockedQty.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[10].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[11].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[12].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int PurchaseOrderID, System.DateTime DueDate, short OrderQty, int ProductID, decimal UnitPrice, System.Nullable<decimal> LineTotal, decimal ReceivedQty, decimal RejectedQty, System.Nullable<decimal> StockedQty, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(PurchaseOrderID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((System.DateTime)(DueDate));
            this.Adapter.InsertCommand.Parameters[2].Value = ((short)(OrderQty));
            this.Adapter.InsertCommand.Parameters[3].Value = ((int)(ProductID));
            this.Adapter.InsertCommand.Parameters[4].Value = ((decimal)(UnitPrice));
            if ((LineTotal.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[5].Value = ((decimal)(LineTotal.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value;
            }
            this.Adapter.InsertCommand.Parameters[6].Value = ((decimal)(ReceivedQty));
            this.Adapter.InsertCommand.Parameters[7].Value = ((decimal)(RejectedQty));
            if ((StockedQty.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[8].Value = ((decimal)(StockedQty.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[8].Value = System.DBNull.Value;
            }
            this.Adapter.InsertCommand.Parameters[9].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    int PurchaseOrderID, 
                    System.DateTime DueDate, 
                    short OrderQty, 
                    int ProductID, 
                    decimal UnitPrice, 
                    System.Nullable<decimal> LineTotal, 
                    decimal ReceivedQty, 
                    decimal RejectedQty, 
                    System.Nullable<decimal> StockedQty, 
                    System.DateTime ModifiedDate, 
                    int Original_PurchaseOrderID, 
                    int Original_PurchaseOrderDetailID, 
                    System.DateTime Original_DueDate, 
                    short Original_OrderQty, 
                    int Original_ProductID, 
                    decimal Original_UnitPrice, 
                    System.Nullable<decimal> Original_LineTotal, 
                    decimal Original_ReceivedQty, 
                    decimal Original_RejectedQty, 
                    System.Nullable<decimal> Original_StockedQty, 
                    System.DateTime Original_ModifiedDate, 
                    int PurchaseOrderDetailID) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(PurchaseOrderID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((System.DateTime)(DueDate));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((short)(OrderQty));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(ProductID));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((decimal)(UnitPrice));
            if ((LineTotal.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[5].Value = ((decimal)(LineTotal.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[6].Value = ((decimal)(ReceivedQty));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((decimal)(RejectedQty));
            if ((StockedQty.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[8].Value = ((decimal)(StockedQty.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[8].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[9].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_PurchaseOrderID));
            this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Original_PurchaseOrderDetailID));
            this.Adapter.UpdateCommand.Parameters[12].Value = ((System.DateTime)(Original_DueDate));
            this.Adapter.UpdateCommand.Parameters[13].Value = ((short)(Original_OrderQty));
            this.Adapter.UpdateCommand.Parameters[14].Value = ((int)(Original_ProductID));
            this.Adapter.UpdateCommand.Parameters[15].Value = ((decimal)(Original_UnitPrice));
            if ((Original_LineTotal.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[16].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[17].Value = ((decimal)(Original_LineTotal.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[16].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[17].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[18].Value = ((decimal)(Original_ReceivedQty));
            this.Adapter.UpdateCommand.Parameters[19].Value = ((decimal)(Original_RejectedQty));
            if ((Original_StockedQty.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[20].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[21].Value = ((decimal)(Original_StockedQty.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[20].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[21].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[22].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[23].Value = ((int)(PurchaseOrderDetailID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 PurchaseOrderHeaderTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public PurchaseOrderHeaderTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "PurchaseOrderHeader";
            tableMapping.ColumnMappings.Add("PurchaseOrderID", "PurchaseOrderID");
            tableMapping.ColumnMappings.Add("RevisionNumber", "RevisionNumber");
            tableMapping.ColumnMappings.Add("Status", "Status");
            tableMapping.ColumnMappings.Add("EmployeeID", "EmployeeID");
            tableMapping.ColumnMappings.Add("VendorID", "VendorID");
            tableMapping.ColumnMappings.Add("ShipMethodID", "ShipMethodID");
            tableMapping.ColumnMappings.Add("OrderDate", "OrderDate");
            tableMapping.ColumnMappings.Add("ShipDate", "ShipDate");
            tableMapping.ColumnMappings.Add("SubTotal", "SubTotal");
            tableMapping.ColumnMappings.Add("TaxAmt", "TaxAmt");
            tableMapping.ColumnMappings.Add("Freight", "Freight");
            tableMapping.ColumnMappings.Add("TotalDue", "TotalDue");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Purchasing].[PurchaseOrderHeader] WHERE (([PurchaseOrderID] = @Original_PurchaseOrderID) AND ([RevisionNumber] = @Original_RevisionNumber) AND ([Status] = @Original_Status) AND ([EmployeeID] = @Original_EmployeeID) AND ([VendorID] = @Original_VendorID) AND ([ShipMethodID] = @Original_ShipMethodID) AND ([OrderDate] = @Original_OrderDate) AND ((@IsNull_ShipDate = 1 AND [ShipDate] IS NULL) OR ([ShipDate] = @Original_ShipDate)) AND ([SubTotal] = @Original_SubTotal) AND ([TaxAmt] = @Original_TaxAmt) AND ([Freight] = @Original_Freight) AND ((@IsNull_TotalDue = 1 AND [TotalDue] IS NULL) OR ([TotalDue] = @Original_TotalDue)) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PurchaseOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_RevisionNumber", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "RevisionNumber", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Status", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "Status", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_VendorID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "VendorID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipMethodID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipMethodID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ShipDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SubTotal", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SubTotal", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TaxAmt", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "TaxAmt", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_TotalDue", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TotalDue", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TotalDue", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "TotalDue", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Purchasing].[PurchaseOrderHeader] ([RevisionNumber], [Status], [EmployeeID], [VendorID], [ShipMethodID], [OrderDate], [ShipDate], [SubTotal], [TaxAmt], [Freight], [TotalDue], [ModifiedDate]) VALUES (@RevisionNumber, @Status, @EmployeeID, @VendorID, @ShipMethodID, @OrderDate, @ShipDate, @SubTotal, @TaxAmt, @Freight, @TotalDue, @ModifiedDate);
SELECT PurchaseOrderID, RevisionNumber, Status, EmployeeID, VendorID, ShipMethodID, OrderDate, ShipDate, SubTotal, TaxAmt, Freight, TotalDue, ModifiedDate FROM Purchasing.PurchaseOrderHeader WHERE (PurchaseOrderID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RevisionNumber", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "RevisionNumber", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Status", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "Status", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@VendorID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "VendorID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipMethodID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipMethodID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SubTotal", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SubTotal", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TaxAmt", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "TaxAmt", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TotalDue", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "TotalDue", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Purchasing].[PurchaseOrderHeader] SET [RevisionNumber] = @RevisionNumber, [Status] = @Status, [EmployeeID] = @EmployeeID, [VendorID] = @VendorID, [ShipMethodID] = @ShipMethodID, [OrderDate] = @OrderDate, [ShipDate] = @ShipDate, [SubTotal] = @SubTotal, [TaxAmt] = @TaxAmt, [Freight] = @Freight, [TotalDue] = @TotalDue, [ModifiedDate] = @ModifiedDate WHERE (([PurchaseOrderID] = @Original_PurchaseOrderID) AND ([RevisionNumber] = @Original_RevisionNumber) AND ([Status] = @Original_Status) AND ([EmployeeID] = @Original_EmployeeID) AND ([VendorID] = @Original_VendorID) AND ([ShipMethodID] = @Original_ShipMethodID) AND ([OrderDate] = @Original_OrderDate) AND ((@IsNull_ShipDate = 1 AND [ShipDate] IS NULL) OR ([ShipDate] = @Original_ShipDate)) AND ([SubTotal] = @Original_SubTotal) AND ([TaxAmt] = @Original_TaxAmt) AND ([Freight] = @Original_Freight) AND ((@IsNull_TotalDue = 1 AND [TotalDue] IS NULL) OR ([TotalDue] = @Original_TotalDue)) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT PurchaseOrderID, RevisionNumber, Status, EmployeeID, VendorID, ShipMethodID, OrderDate, ShipDate, SubTotal, TaxAmt, Freight, TotalDue, ModifiedDate FROM Purchasing.PurchaseOrderHeader WHERE (PurchaseOrderID = @PurchaseOrderID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RevisionNumber", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "RevisionNumber", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Status", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "Status", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@VendorID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "VendorID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipMethodID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipMethodID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SubTotal", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SubTotal", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TaxAmt", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "TaxAmt", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TotalDue", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "TotalDue", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PurchaseOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_RevisionNumber", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "RevisionNumber", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Status", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "Status", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_VendorID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "VendorID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipMethodID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipMethodID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ShipDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SubTotal", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SubTotal", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TaxAmt", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "TaxAmt", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_TotalDue", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TotalDue", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TotalDue", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "TotalDue", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PurchaseOrderID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT PurchaseOrderID, RevisionNumber, Status, EmployeeID, VendorID, ShipMethodI" +
                "D, OrderDate, ShipDate, SubTotal, TaxAmt, Freight, TotalDue, ModifiedDate FROM P" +
                "urchasing.PurchaseOrderHeader";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.PurchaseOrderHeaderDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.PurchaseOrderHeaderDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.PurchaseOrderHeaderDataTable dataTable = new AdventureWorksDataSet.PurchaseOrderHeaderDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.PurchaseOrderHeaderDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "PurchaseOrderHeader");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_PurchaseOrderID, byte Original_RevisionNumber, byte Original_Status, int Original_EmployeeID, int Original_VendorID, int Original_ShipMethodID, System.DateTime Original_OrderDate, System.Nullable<System.DateTime> Original_ShipDate, decimal Original_SubTotal, decimal Original_TaxAmt, decimal Original_Freight, decimal Original_TotalDue, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_PurchaseOrderID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((byte)(Original_RevisionNumber));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((byte)(Original_Status));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(Original_EmployeeID));
            this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_VendorID));
            this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(Original_ShipMethodID));
            this.Adapter.DeleteCommand.Parameters[6].Value = ((System.DateTime)(Original_OrderDate));
            if ((Original_ShipDate.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[7].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[8].Value = ((System.DateTime)(Original_ShipDate.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[7].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[8].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[9].Value = ((decimal)(Original_SubTotal));
            this.Adapter.DeleteCommand.Parameters[10].Value = ((decimal)(Original_TaxAmt));
            this.Adapter.DeleteCommand.Parameters[11].Value = ((decimal)(Original_Freight));
            this.Adapter.DeleteCommand.Parameters[12].Value = ((int)(0));
            this.Adapter.DeleteCommand.Parameters[13].Value = ((decimal)(Original_TotalDue));
            this.Adapter.DeleteCommand.Parameters[14].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(byte RevisionNumber, byte Status, int EmployeeID, int VendorID, int ShipMethodID, System.DateTime OrderDate, System.Nullable<System.DateTime> ShipDate, decimal SubTotal, decimal TaxAmt, decimal Freight, decimal TotalDue, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((byte)(RevisionNumber));
            this.Adapter.InsertCommand.Parameters[1].Value = ((byte)(Status));
            this.Adapter.InsertCommand.Parameters[2].Value = ((int)(EmployeeID));
            this.Adapter.InsertCommand.Parameters[3].Value = ((int)(VendorID));
            this.Adapter.InsertCommand.Parameters[4].Value = ((int)(ShipMethodID));
            this.Adapter.InsertCommand.Parameters[5].Value = ((System.DateTime)(OrderDate));
            if ((ShipDate.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[6].Value = ((System.DateTime)(ShipDate.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[6].Value = System.DBNull.Value;
            }
            this.Adapter.InsertCommand.Parameters[7].Value = ((decimal)(SubTotal));
            this.Adapter.InsertCommand.Parameters[8].Value = ((decimal)(TaxAmt));
            this.Adapter.InsertCommand.Parameters[9].Value = ((decimal)(Freight));
            this.Adapter.InsertCommand.Parameters[10].Value = ((decimal)(TotalDue));
            this.Adapter.InsertCommand.Parameters[11].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    byte RevisionNumber, 
                    byte Status, 
                    int EmployeeID, 
                    int VendorID, 
                    int ShipMethodID, 
                    System.DateTime OrderDate, 
                    System.Nullable<System.DateTime> ShipDate, 
                    decimal SubTotal, 
                    decimal TaxAmt, 
                    decimal Freight, 
                    decimal TotalDue, 
                    System.DateTime ModifiedDate, 
                    int Original_PurchaseOrderID, 
                    byte Original_RevisionNumber, 
                    byte Original_Status, 
                    int Original_EmployeeID, 
                    int Original_VendorID, 
                    int Original_ShipMethodID, 
                    System.DateTime Original_OrderDate, 
                    System.Nullable<System.DateTime> Original_ShipDate, 
                    decimal Original_SubTotal, 
                    decimal Original_TaxAmt, 
                    decimal Original_Freight, 
                    decimal Original_TotalDue, 
                    System.DateTime Original_ModifiedDate, 
                    int PurchaseOrderID) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((byte)(RevisionNumber));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((byte)(Status));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(EmployeeID));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(VendorID));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(ShipMethodID));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(OrderDate));
            if ((ShipDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(ShipDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[6].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[7].Value = ((decimal)(SubTotal));
            this.Adapter.UpdateCommand.Parameters[8].Value = ((decimal)(TaxAmt));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((decimal)(Freight));
            this.Adapter.UpdateCommand.Parameters[10].Value = ((decimal)(TotalDue));
            this.Adapter.UpdateCommand.Parameters[11].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(Original_PurchaseOrderID));
            this.Adapter.UpdateCommand.Parameters[13].Value = ((byte)(Original_RevisionNumber));
            this.Adapter.UpdateCommand.Parameters[14].Value = ((byte)(Original_Status));
            this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(Original_EmployeeID));
            this.Adapter.UpdateCommand.Parameters[16].Value = ((int)(Original_VendorID));
            this.Adapter.UpdateCommand.Parameters[17].Value = ((int)(Original_ShipMethodID));
            this.Adapter.UpdateCommand.Parameters[18].Value = ((System.DateTime)(Original_OrderDate));
            if ((Original_ShipDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[20].Value = ((System.DateTime)(Original_ShipDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[20].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[21].Value = ((decimal)(Original_SubTotal));
            this.Adapter.UpdateCommand.Parameters[22].Value = ((decimal)(Original_TaxAmt));
            this.Adapter.UpdateCommand.Parameters[23].Value = ((decimal)(Original_Freight));
            this.Adapter.UpdateCommand.Parameters[24].Value = ((int)(0));
            this.Adapter.UpdateCommand.Parameters[25].Value = ((decimal)(Original_TotalDue));
            this.Adapter.UpdateCommand.Parameters[26].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[27].Value = ((int)(PurchaseOrderID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 ShipMethodTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public ShipMethodTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "ShipMethod";
            tableMapping.ColumnMappings.Add("ShipMethodID", "ShipMethodID");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("ShipBase", "ShipBase");
            tableMapping.ColumnMappings.Add("ShipRate", "ShipRate");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Purchasing].[ShipMethod] WHERE (([ShipMethodID] = @Original_ShipMethodID) AND ([Name] = @Original_Name) AND ([ShipBase] = @Original_ShipBase) AND ([ShipRate] = @Original_ShipRate) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipMethodID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipMethodID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipBase", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipBase", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipRate", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipRate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Purchasing].[ShipMethod] ([Name], [ShipBase], [ShipRate], [rowguid], [ModifiedDate]) VALUES (@Name, @ShipBase, @ShipRate, @rowguid, @ModifiedDate);
SELECT ShipMethodID, Name, ShipBase, ShipRate, rowguid, ModifiedDate FROM Purchasing.ShipMethod WHERE (ShipMethodID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipBase", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipBase", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipRate", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipRate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Purchasing].[ShipMethod] SET [Name] = @Name, [ShipBase] = @ShipBase, [ShipRate] = @ShipRate, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([ShipMethodID] = @Original_ShipMethodID) AND ([Name] = @Original_Name) AND ([ShipBase] = @Original_ShipBase) AND ([ShipRate] = @Original_ShipRate) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT ShipMethodID, Name, ShipBase, ShipRate, rowguid, ModifiedDate FROM Purchasing.ShipMethod WHERE (ShipMethodID = @ShipMethodID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipBase", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipBase", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipRate", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipRate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipMethodID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipMethodID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipBase", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipBase", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipRate", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipRate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipMethodID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "ShipMethodID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT ShipMethodID, Name, ShipBase, ShipRate, rowguid, ModifiedDate FROM Purchas" +
                "ing.ShipMethod";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.ShipMethodDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.ShipMethodDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.ShipMethodDataTable dataTable = new AdventureWorksDataSet.ShipMethodDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.ShipMethodDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "ShipMethod");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_ShipMethodID, string Original_Name, decimal Original_ShipBase, decimal Original_ShipRate, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ShipMethodID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name));
            }
            this.Adapter.DeleteCommand.Parameters[2].Value = ((decimal)(Original_ShipBase));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((decimal)(Original_ShipRate));
            this.Adapter.DeleteCommand.Parameters[4].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[5].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string Name, decimal ShipBase, decimal ShipRate, System.Guid rowguid, System.DateTime ModifiedDate) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name));
            }
            this.Adapter.InsertCommand.Parameters[1].Value = ((decimal)(ShipBase));
            this.Adapter.InsertCommand.Parameters[2].Value = ((decimal)(ShipRate));
            this.Adapter.InsertCommand.Parameters[3].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(string Name, decimal ShipBase, decimal ShipRate, System.Guid rowguid, System.DateTime ModifiedDate, int Original_ShipMethodID, string Original_Name, decimal Original_ShipBase, decimal Original_ShipRate, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate, int ShipMethodID) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name));
            }
            this.Adapter.UpdateCommand.Parameters[1].Value = ((decimal)(ShipBase));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((decimal)(ShipRate));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_ShipMethodID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_Name));
            }
            this.Adapter.UpdateCommand.Parameters[7].Value = ((decimal)(Original_ShipBase));
            this.Adapter.UpdateCommand.Parameters[8].Value = ((decimal)(Original_ShipRate));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[10].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(ShipMethodID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 VendorTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public VendorTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "Vendor";
            tableMapping.ColumnMappings.Add("VendorID", "VendorID");
            tableMapping.ColumnMappings.Add("AccountNumber", "AccountNumber");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("CreditRating", "CreditRating");
            tableMapping.ColumnMappings.Add("PreferredVendorStatus", "PreferredVendorStatus");
            tableMapping.ColumnMappings.Add("ActiveFlag", "ActiveFlag");
            tableMapping.ColumnMappings.Add("PurchasingWebServiceURL", "PurchasingWebServiceURL");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Purchasing].[Vendor] WHERE (([VendorID] = @Original_VendorID) AND ([AccountNumber] = @Original_AccountNumber) AND ([Name] = @Original_Name) AND ([CreditRating] = @Original_CreditRating) AND ([PreferredVendorStatus] = @Original_PreferredVendorStatus) AND ([ActiveFlag] = @Original_ActiveFlag) AND ((@IsNull_PurchasingWebServiceURL = 1 AND [PurchasingWebServiceURL] IS NULL) OR ([PurchasingWebServiceURL] = @Original_PurchasingWebServiceURL)) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_VendorID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "VendorID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AccountNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "AccountNumber", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CreditRating", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "CreditRating", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PreferredVendorStatus", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "PreferredVendorStatus", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ActiveFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "ActiveFlag", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_PurchasingWebServiceURL", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "PurchasingWebServiceURL", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PurchasingWebServiceURL", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PurchasingWebServiceURL", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Purchasing].[Vendor] ([AccountNumber], [Name], [CreditRating], [PreferredVendorStatus], [ActiveFlag], [PurchasingWebServiceURL], [ModifiedDate]) VALUES (@AccountNumber, @Name, @CreditRating, @PreferredVendorStatus, @ActiveFlag, @PurchasingWebServiceURL, @ModifiedDate);
SELECT VendorID, AccountNumber, Name, CreditRating, PreferredVendorStatus, ActiveFlag, PurchasingWebServiceURL, ModifiedDate FROM Purchasing.Vendor WHERE (VendorID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AccountNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "AccountNumber", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CreditRating", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "CreditRating", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PreferredVendorStatus", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "PreferredVendorStatus", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ActiveFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "ActiveFlag", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PurchasingWebServiceURL", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PurchasingWebServiceURL", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Purchasing].[Vendor] SET [AccountNumber] = @AccountNumber, [Name] = @Name, [CreditRating] = @CreditRating, [PreferredVendorStatus] = @PreferredVendorStatus, [ActiveFlag] = @ActiveFlag, [PurchasingWebServiceURL] = @PurchasingWebServiceURL, [ModifiedDate] = @ModifiedDate WHERE (([VendorID] = @Original_VendorID) AND ([AccountNumber] = @Original_AccountNumber) AND ([Name] = @Original_Name) AND ([CreditRating] = @Original_CreditRating) AND ([PreferredVendorStatus] = @Original_PreferredVendorStatus) AND ([ActiveFlag] = @Original_ActiveFlag) AND ((@IsNull_PurchasingWebServiceURL = 1 AND [PurchasingWebServiceURL] IS NULL) OR ([PurchasingWebServiceURL] = @Original_PurchasingWebServiceURL)) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT VendorID, AccountNumber, Name, CreditRating, PreferredVendorStatus, ActiveFlag, PurchasingWebServiceURL, ModifiedDate FROM Purchasing.Vendor WHERE (VendorID = @VendorID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AccountNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "AccountNumber", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CreditRating", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "CreditRating", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PreferredVendorStatus", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "PreferredVendorStatus", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ActiveFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "ActiveFlag", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PurchasingWebServiceURL", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PurchasingWebServiceURL", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_VendorID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "VendorID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AccountNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "AccountNumber", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CreditRating", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "CreditRating", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PreferredVendorStatus", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "PreferredVendorStatus", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ActiveFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "ActiveFlag", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_PurchasingWebServiceURL", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "PurchasingWebServiceURL", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PurchasingWebServiceURL", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PurchasingWebServiceURL", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@VendorID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "VendorID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT VendorID, AccountNumber, Name, CreditRating, PreferredVendorStatus, Active" +
                "Flag, PurchasingWebServiceURL, ModifiedDate FROM Purchasing.Vendor";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.VendorDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.VendorDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.VendorDataTable dataTable = new AdventureWorksDataSet.VendorDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.VendorDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "Vendor");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_VendorID, string Original_AccountNumber, string Original_Name, byte Original_CreditRating, bool Original_PreferredVendorStatus, bool Original_ActiveFlag, string Original_PurchasingWebServiceURL, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_VendorID));
            if ((Original_AccountNumber == null)) {
                throw new System.ArgumentNullException("Original_AccountNumber");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_AccountNumber));
            }
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_Name));
            }
            this.Adapter.DeleteCommand.Parameters[3].Value = ((byte)(Original_CreditRating));
            this.Adapter.DeleteCommand.Parameters[4].Value = ((bool)(Original_PreferredVendorStatus));
            this.Adapter.DeleteCommand.Parameters[5].Value = ((bool)(Original_ActiveFlag));
            if ((Original_PurchasingWebServiceURL == null)) {
                this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[7].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[7].Value = ((string)(Original_PurchasingWebServiceURL));
            }
            this.Adapter.DeleteCommand.Parameters[8].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string AccountNumber, string Name, byte CreditRating, bool PreferredVendorStatus, bool ActiveFlag, string PurchasingWebServiceURL, System.DateTime ModifiedDate) {
            if ((AccountNumber == null)) {
                throw new System.ArgumentNullException("AccountNumber");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(AccountNumber));
            }
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Name));
            }
            this.Adapter.InsertCommand.Parameters[2].Value = ((byte)(CreditRating));
            this.Adapter.InsertCommand.Parameters[3].Value = ((bool)(PreferredVendorStatus));
            this.Adapter.InsertCommand.Parameters[4].Value = ((bool)(ActiveFlag));
            if ((PurchasingWebServiceURL == null)) {
                this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[5].Value = ((string)(PurchasingWebServiceURL));
            }
            this.Adapter.InsertCommand.Parameters[6].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    string AccountNumber, 
                    string Name, 
                    byte CreditRating, 
                    bool PreferredVendorStatus, 
                    bool ActiveFlag, 
                    string PurchasingWebServiceURL, 
                    System.DateTime ModifiedDate, 
                    int Original_VendorID, 
                    string Original_AccountNumber, 
                    string Original_Name, 
                    byte Original_CreditRating, 
                    bool Original_PreferredVendorStatus, 
                    bool Original_ActiveFlag, 
                    string Original_PurchasingWebServiceURL, 
                    System.DateTime Original_ModifiedDate, 
                    int VendorID) {
            if ((AccountNumber == null)) {
                throw new System.ArgumentNullException("AccountNumber");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(AccountNumber));
            }
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Name));
            }
            this.Adapter.UpdateCommand.Parameters[2].Value = ((byte)(CreditRating));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((bool)(PreferredVendorStatus));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((bool)(ActiveFlag));
            if ((PurchasingWebServiceURL == null)) {
                this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(PurchasingWebServiceURL));
            }
            this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_VendorID));
            if ((Original_AccountNumber == null)) {
                throw new System.ArgumentNullException("Original_AccountNumber");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_AccountNumber));
            }
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_Name));
            }
            this.Adapter.UpdateCommand.Parameters[10].Value = ((byte)(Original_CreditRating));
            this.Adapter.UpdateCommand.Parameters[11].Value = ((bool)(Original_PreferredVendorStatus));
            this.Adapter.UpdateCommand.Parameters[12].Value = ((bool)(Original_ActiveFlag));
            if ((Original_PurchasingWebServiceURL == null)) {
                this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[14].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_PurchasingWebServiceURL));
            }
            this.Adapter.UpdateCommand.Parameters[15].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[16].Value = ((int)(VendorID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 VendorAddressTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public VendorAddressTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "VendorAddress";
            tableMapping.ColumnMappings.Add("VendorID", "VendorID");
            tableMapping.ColumnMappings.Add("AddressID", "AddressID");
            tableMapping.ColumnMappings.Add("AddressTypeID", "AddressTypeID");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Purchasing].[VendorAddress] WHERE (([VendorID] = @Original_VendorID)" +
                " AND ([AddressID] = @Original_AddressID) AND ([AddressTypeID] = @Original_Addres" +
                "sTypeID) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_VendorID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "VendorID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AddressID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AddressTypeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressTypeID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Purchasing].[VendorAddress] ([VendorID], [AddressID], [AddressTypeID], [ModifiedDate]) VALUES (@VendorID, @AddressID, @AddressTypeID, @ModifiedDate);
SELECT VendorID, AddressID, AddressTypeID, ModifiedDate FROM Purchasing.VendorAddress WHERE (AddressID = @AddressID) AND (VendorID = @VendorID)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@VendorID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "VendorID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AddressID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AddressTypeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressTypeID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Purchasing].[VendorAddress] SET [VendorID] = @VendorID, [AddressID] = @AddressID, [AddressTypeID] = @AddressTypeID, [ModifiedDate] = @ModifiedDate WHERE (([VendorID] = @Original_VendorID) AND ([AddressID] = @Original_AddressID) AND ([AddressTypeID] = @Original_AddressTypeID) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT VendorID, AddressID, AddressTypeID, ModifiedDate FROM Purchasing.VendorAddress WHERE (AddressID = @AddressID) AND (VendorID = @VendorID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@VendorID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "VendorID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AddressID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AddressTypeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressTypeID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_VendorID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "VendorID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AddressID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AddressTypeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressTypeID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT VendorID, AddressID, AddressTypeID, ModifiedDate FROM Purchasing.VendorAdd" +
                "ress";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.VendorAddressDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.VendorAddressDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.VendorAddressDataTable dataTable = new AdventureWorksDataSet.VendorAddressDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.VendorAddressDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "VendorAddress");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_VendorID, int Original_AddressID, int Original_AddressTypeID, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_VendorID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_AddressID));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_AddressTypeID));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int VendorID, int AddressID, int AddressTypeID, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(VendorID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((int)(AddressID));
            this.Adapter.InsertCommand.Parameters[2].Value = ((int)(AddressTypeID));
            this.Adapter.InsertCommand.Parameters[3].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int VendorID, int AddressID, int AddressTypeID, System.DateTime ModifiedDate, int Original_VendorID, int Original_AddressID, int Original_AddressTypeID, System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(VendorID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(AddressID));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(AddressTypeID));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_VendorID));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_AddressID));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_AddressTypeID));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 VendorContactTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public VendorContactTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "VendorContact";
            tableMapping.ColumnMappings.Add("VendorID", "VendorID");
            tableMapping.ColumnMappings.Add("ContactID", "ContactID");
            tableMapping.ColumnMappings.Add("ContactTypeID", "ContactTypeID");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Purchasing].[VendorContact] WHERE (([VendorID] = @Original_VendorID)" +
                " AND ([ContactID] = @Original_ContactID) AND ([ContactTypeID] = @Original_Contac" +
                "tTypeID) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_VendorID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "VendorID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactTypeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactTypeID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Purchasing].[VendorContact] ([VendorID], [ContactID], [ContactTypeID], [ModifiedDate]) VALUES (@VendorID, @ContactID, @ContactTypeID, @ModifiedDate);
SELECT VendorID, ContactID, ContactTypeID, ModifiedDate FROM Purchasing.VendorContact WHERE (ContactID = @ContactID) AND (VendorID = @VendorID)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@VendorID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "VendorID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactTypeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactTypeID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Purchasing].[VendorContact] SET [VendorID] = @VendorID, [ContactID] = @ContactID, [ContactTypeID] = @ContactTypeID, [ModifiedDate] = @ModifiedDate WHERE (([VendorID] = @Original_VendorID) AND ([ContactID] = @Original_ContactID) AND ([ContactTypeID] = @Original_ContactTypeID) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT VendorID, ContactID, ContactTypeID, ModifiedDate FROM Purchasing.VendorContact WHERE (ContactID = @ContactID) AND (VendorID = @VendorID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@VendorID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "VendorID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactTypeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactTypeID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_VendorID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "VendorID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactTypeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactTypeID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT VendorID, ContactID, ContactTypeID, ModifiedDate FROM Purchasing.VendorCon" +
                "tact";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.VendorContactDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.VendorContactDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.VendorContactDataTable dataTable = new AdventureWorksDataSet.VendorContactDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.VendorContactDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "VendorContact");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_VendorID, int Original_ContactID, int Original_ContactTypeID, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_VendorID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_ContactID));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_ContactTypeID));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int VendorID, int ContactID, int ContactTypeID, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(VendorID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((int)(ContactID));
            this.Adapter.InsertCommand.Parameters[2].Value = ((int)(ContactTypeID));
            this.Adapter.InsertCommand.Parameters[3].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int VendorID, int ContactID, int ContactTypeID, System.DateTime ModifiedDate, int Original_VendorID, int Original_ContactID, int Original_ContactTypeID, System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(VendorID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(ContactID));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(ContactTypeID));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_VendorID));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_ContactID));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_ContactTypeID));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 ContactCreditCardTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public ContactCreditCardTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "ContactCreditCard";
            tableMapping.ColumnMappings.Add("ContactID", "ContactID");
            tableMapping.ColumnMappings.Add("CreditCardID", "CreditCardID");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Sales].[ContactCreditCard] WHERE (([ContactID] = @Original_ContactID" +
                ") AND ([CreditCardID] = @Original_CreditCardID) AND ([ModifiedDate] = @Original_" +
                "ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CreditCardID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CreditCardID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Sales].[ContactCreditCard] ([ContactID], [CreditCardID], [ModifiedDate]) VALUES (@ContactID, @CreditCardID, @ModifiedDate);
SELECT ContactID, CreditCardID, ModifiedDate FROM Sales.ContactCreditCard WHERE (ContactID = @ContactID) AND (CreditCardID = @CreditCardID)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CreditCardID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CreditCardID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Sales].[ContactCreditCard] SET [ContactID] = @ContactID, [CreditCardID] = @CreditCardID, [ModifiedDate] = @ModifiedDate WHERE (([ContactID] = @Original_ContactID) AND ([CreditCardID] = @Original_CreditCardID) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT ContactID, CreditCardID, ModifiedDate FROM Sales.ContactCreditCard WHERE (ContactID = @ContactID) AND (CreditCardID = @CreditCardID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CreditCardID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CreditCardID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CreditCardID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CreditCardID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT ContactID, CreditCardID, ModifiedDate FROM Sales.ContactCreditCard";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.ContactCreditCardDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.ContactCreditCardDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.ContactCreditCardDataTable dataTable = new AdventureWorksDataSet.ContactCreditCardDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.ContactCreditCardDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "ContactCreditCard");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_ContactID, int Original_CreditCardID, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ContactID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_CreditCardID));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int ContactID, int CreditCardID, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(ContactID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((int)(CreditCardID));
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int ContactID, int CreditCardID, System.DateTime ModifiedDate, int Original_ContactID, int Original_CreditCardID, System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(ContactID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(CreditCardID));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_ContactID));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_CreditCardID));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 CountryRegionCurrencyTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public CountryRegionCurrencyTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "CountryRegionCurrency";
            tableMapping.ColumnMappings.Add("CountryRegionCode", "CountryRegionCode");
            tableMapping.ColumnMappings.Add("CurrencyCode", "CurrencyCode");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Sales].[CountryRegionCurrency] WHERE (([CountryRegionCode] = @Origin" +
                "al_CountryRegionCode) AND ([CurrencyCode] = @Original_CurrencyCode) AND ([Modifi" +
                "edDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CountryRegionCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CountryRegionCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CurrencyCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CurrencyCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Sales].[CountryRegionCurrency] ([CountryRegionCode], [CurrencyCode], [ModifiedDate]) VALUES (@CountryRegionCode, @CurrencyCode, @ModifiedDate);
SELECT CountryRegionCode, CurrencyCode, ModifiedDate FROM Sales.CountryRegionCurrency WHERE (CountryRegionCode = @CountryRegionCode) AND (CurrencyCode = @CurrencyCode)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CountryRegionCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CountryRegionCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CurrencyCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CurrencyCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Sales].[CountryRegionCurrency] SET [CountryRegionCode] = @CountryRegionCode, [CurrencyCode] = @CurrencyCode, [ModifiedDate] = @ModifiedDate WHERE (([CountryRegionCode] = @Original_CountryRegionCode) AND ([CurrencyCode] = @Original_CurrencyCode) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT CountryRegionCode, CurrencyCode, ModifiedDate FROM Sales.CountryRegionCurrency WHERE (CountryRegionCode = @CountryRegionCode) AND (CurrencyCode = @CurrencyCode)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CountryRegionCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CountryRegionCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CurrencyCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CurrencyCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CountryRegionCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CountryRegionCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CurrencyCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CurrencyCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT CountryRegionCode, CurrencyCode, ModifiedDate FROM Sales.CountryRegionCurr" +
                "ency";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.CountryRegionCurrencyDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.CountryRegionCurrencyDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.CountryRegionCurrencyDataTable dataTable = new AdventureWorksDataSet.CountryRegionCurrencyDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.CountryRegionCurrencyDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "CountryRegionCurrency");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(string Original_CountryRegionCode, string Original_CurrencyCode, System.DateTime Original_ModifiedDate) {
            if ((Original_CountryRegionCode == null)) {
                throw new System.ArgumentNullException("Original_CountryRegionCode");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_CountryRegionCode));
            }
            if ((Original_CurrencyCode == null)) {
                throw new System.ArgumentNullException("Original_CurrencyCode");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_CurrencyCode));
            }
            this.Adapter.DeleteCommand.Parameters[2].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string CountryRegionCode, string CurrencyCode, System.DateTime ModifiedDate) {
            if ((CountryRegionCode == null)) {
                throw new System.ArgumentNullException("CountryRegionCode");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(CountryRegionCode));
            }
            if ((CurrencyCode == null)) {
                throw new System.ArgumentNullException("CurrencyCode");
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(CurrencyCode));
            }
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(string CountryRegionCode, string CurrencyCode, System.DateTime ModifiedDate, string Original_CountryRegionCode, string Original_CurrencyCode, System.DateTime Original_ModifiedDate) {
            if ((CountryRegionCode == null)) {
                throw new System.ArgumentNullException("CountryRegionCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(CountryRegionCode));
            }
            if ((CurrencyCode == null)) {
                throw new System.ArgumentNullException("CurrencyCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(CurrencyCode));
            }
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            if ((Original_CountryRegionCode == null)) {
                throw new System.ArgumentNullException("Original_CountryRegionCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_CountryRegionCode));
            }
            if ((Original_CurrencyCode == null)) {
                throw new System.ArgumentNullException("Original_CurrencyCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_CurrencyCode));
            }
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 CreditCardTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public CreditCardTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "CreditCard";
            tableMapping.ColumnMappings.Add("CreditCardID", "CreditCardID");
            tableMapping.ColumnMappings.Add("CardType", "CardType");
            tableMapping.ColumnMappings.Add("CardNumber", "CardNumber");
            tableMapping.ColumnMappings.Add("ExpMonth", "ExpMonth");
            tableMapping.ColumnMappings.Add("ExpYear", "ExpYear");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Sales].[CreditCard] WHERE (([CreditCardID] = @Original_CreditCardID) AND ([CardType] = @Original_CardType) AND ([CardNumber] = @Original_CardNumber) AND ([ExpMonth] = @Original_ExpMonth) AND ([ExpYear] = @Original_ExpYear) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CreditCardID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CreditCardID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CardType", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CardType", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CardNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CardNumber", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ExpMonth", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ExpMonth", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ExpYear", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ExpYear", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Sales].[CreditCard] ([CardType], [CardNumber], [ExpMonth], [ExpYear], [ModifiedDate]) VALUES (@CardType, @CardNumber, @ExpMonth, @ExpYear, @ModifiedDate);
SELECT CreditCardID, CardType, CardNumber, ExpMonth, ExpYear, ModifiedDate FROM Sales.CreditCard WHERE (CreditCardID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CardType", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CardType", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CardNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CardNumber", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ExpMonth", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ExpMonth", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ExpYear", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ExpYear", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Sales].[CreditCard] SET [CardType] = @CardType, [CardNumber] = @CardNumber, [ExpMonth] = @ExpMonth, [ExpYear] = @ExpYear, [ModifiedDate] = @ModifiedDate WHERE (([CreditCardID] = @Original_CreditCardID) AND ([CardType] = @Original_CardType) AND ([CardNumber] = @Original_CardNumber) AND ([ExpMonth] = @Original_ExpMonth) AND ([ExpYear] = @Original_ExpYear) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT CreditCardID, CardType, CardNumber, ExpMonth, ExpYear, ModifiedDate FROM Sales.CreditCard WHERE (CreditCardID = @CreditCardID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CardType", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CardType", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CardNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CardNumber", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ExpMonth", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ExpMonth", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ExpYear", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ExpYear", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CreditCardID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CreditCardID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CardType", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CardType", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CardNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CardNumber", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ExpMonth", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ExpMonth", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ExpYear", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "ExpYear", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CreditCardID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "CreditCardID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT CreditCardID, CardType, CardNumber, ExpMonth, ExpYear, ModifiedDate FROM S" +
                "ales.CreditCard";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.CreditCardDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.CreditCardDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.CreditCardDataTable dataTable = new AdventureWorksDataSet.CreditCardDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.CreditCardDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "CreditCard");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_CreditCardID, string Original_CardType, string Original_CardNumber, byte Original_ExpMonth, short Original_ExpYear, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_CreditCardID));
            if ((Original_CardType == null)) {
                throw new System.ArgumentNullException("Original_CardType");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_CardType));
            }
            if ((Original_CardNumber == null)) {
                throw new System.ArgumentNullException("Original_CardNumber");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_CardNumber));
            }
            this.Adapter.DeleteCommand.Parameters[3].Value = ((byte)(Original_ExpMonth));
            this.Adapter.DeleteCommand.Parameters[4].Value = ((short)(Original_ExpYear));
            this.Adapter.DeleteCommand.Parameters[5].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string CardType, string CardNumber, byte ExpMonth, short ExpYear, System.DateTime ModifiedDate) {
            if ((CardType == null)) {
                throw new System.ArgumentNullException("CardType");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(CardType));
            }
            if ((CardNumber == null)) {
                throw new System.ArgumentNullException("CardNumber");
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(CardNumber));
            }
            this.Adapter.InsertCommand.Parameters[2].Value = ((byte)(ExpMonth));
            this.Adapter.InsertCommand.Parameters[3].Value = ((short)(ExpYear));
            this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(string CardType, string CardNumber, byte ExpMonth, short ExpYear, System.DateTime ModifiedDate, int Original_CreditCardID, string Original_CardType, string Original_CardNumber, byte Original_ExpMonth, short Original_ExpYear, System.DateTime Original_ModifiedDate, int CreditCardID) {
            if ((CardType == null)) {
                throw new System.ArgumentNullException("CardType");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(CardType));
            }
            if ((CardNumber == null)) {
                throw new System.ArgumentNullException("CardNumber");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(CardNumber));
            }
            this.Adapter.UpdateCommand.Parameters[2].Value = ((byte)(ExpMonth));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((short)(ExpYear));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_CreditCardID));
            if ((Original_CardType == null)) {
                throw new System.ArgumentNullException("Original_CardType");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_CardType));
            }
            if ((Original_CardNumber == null)) {
                throw new System.ArgumentNullException("Original_CardNumber");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_CardNumber));
            }
            this.Adapter.UpdateCommand.Parameters[8].Value = ((byte)(Original_ExpMonth));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((short)(Original_ExpYear));
            this.Adapter.UpdateCommand.Parameters[10].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(CreditCardID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 CurrencyTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public CurrencyTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "Currency";
            tableMapping.ColumnMappings.Add("CurrencyCode", "CurrencyCode");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Sales].[Currency] WHERE (([CurrencyCode] = @Original_CurrencyCode) A" +
                "ND ([Name] = @Original_Name) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CurrencyCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CurrencyCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = "INSERT INTO [Sales].[Currency] ([CurrencyCode], [Name], [ModifiedDate]) VALUES (@" +
                "CurrencyCode, @Name, @ModifiedDate);\r\nSELECT CurrencyCode, Name, ModifiedDate FR" +
                "OM Sales.Currency WHERE (CurrencyCode = @CurrencyCode)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CurrencyCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CurrencyCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Sales].[Currency] SET [CurrencyCode] = @CurrencyCode, [Name] = @Name, [ModifiedDate] = @ModifiedDate WHERE (([CurrencyCode] = @Original_CurrencyCode) AND ([Name] = @Original_Name) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT CurrencyCode, Name, ModifiedDate FROM Sales.Currency WHERE (CurrencyCode = @CurrencyCode)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CurrencyCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CurrencyCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CurrencyCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CurrencyCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT CurrencyCode, Name, ModifiedDate FROM Sales.Currency";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.CurrencyDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.CurrencyDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.CurrencyDataTable dataTable = new AdventureWorksDataSet.CurrencyDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.CurrencyDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "Currency");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(string Original_CurrencyCode, string Original_Name, System.DateTime Original_ModifiedDate) {
            if ((Original_CurrencyCode == null)) {
                throw new System.ArgumentNullException("Original_CurrencyCode");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_CurrencyCode));
            }
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name));
            }
            this.Adapter.DeleteCommand.Parameters[2].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string CurrencyCode, string Name, System.DateTime ModifiedDate) {
            if ((CurrencyCode == null)) {
                throw new System.ArgumentNullException("CurrencyCode");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(CurrencyCode));
            }
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Name));
            }
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(string CurrencyCode, string Name, System.DateTime ModifiedDate, string Original_CurrencyCode, string Original_Name, System.DateTime Original_ModifiedDate) {
            if ((CurrencyCode == null)) {
                throw new System.ArgumentNullException("CurrencyCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(CurrencyCode));
            }
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Name));
            }
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            if ((Original_CurrencyCode == null)) {
                throw new System.ArgumentNullException("Original_CurrencyCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_CurrencyCode));
            }
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_Name));
            }
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 CurrencyRateTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public CurrencyRateTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "CurrencyRate";
            tableMapping.ColumnMappings.Add("CurrencyRateID", "CurrencyRateID");
            tableMapping.ColumnMappings.Add("CurrencyRateDate", "CurrencyRateDate");
            tableMapping.ColumnMappings.Add("FromCurrencyCode", "FromCurrencyCode");
            tableMapping.ColumnMappings.Add("ToCurrencyCode", "ToCurrencyCode");
            tableMapping.ColumnMappings.Add("AverageRate", "AverageRate");
            tableMapping.ColumnMappings.Add("EndOfDayRate", "EndOfDayRate");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Sales].[CurrencyRate] WHERE (([CurrencyRateID] = @Original_CurrencyRateID) AND ([CurrencyRateDate] = @Original_CurrencyRateDate) AND ([FromCurrencyCode] = @Original_FromCurrencyCode) AND ([ToCurrencyCode] = @Original_ToCurrencyCode) AND ([AverageRate] = @Original_AverageRate) AND ([EndOfDayRate] = @Original_EndOfDayRate) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CurrencyRateID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CurrencyRateID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CurrencyRateDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "CurrencyRateDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_FromCurrencyCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "FromCurrencyCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ToCurrencyCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ToCurrencyCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AverageRate", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "AverageRate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EndOfDayRate", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "EndOfDayRate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Sales].[CurrencyRate] ([CurrencyRateDate], [FromCurrencyCode], [ToCurrencyCode], [AverageRate], [EndOfDayRate], [ModifiedDate]) VALUES (@CurrencyRateDate, @FromCurrencyCode, @ToCurrencyCode, @AverageRate, @EndOfDayRate, @ModifiedDate);
SELECT CurrencyRateID, CurrencyRateDate, FromCurrencyCode, ToCurrencyCode, AverageRate, EndOfDayRate, ModifiedDate FROM Sales.CurrencyRate WHERE (CurrencyRateID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CurrencyRateDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "CurrencyRateDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@FromCurrencyCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "FromCurrencyCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ToCurrencyCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ToCurrencyCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AverageRate", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "AverageRate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EndOfDayRate", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "EndOfDayRate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Sales].[CurrencyRate] SET [CurrencyRateDate] = @CurrencyRateDate, [FromCurrencyCode] = @FromCurrencyCode, [ToCurrencyCode] = @ToCurrencyCode, [AverageRate] = @AverageRate, [EndOfDayRate] = @EndOfDayRate, [ModifiedDate] = @ModifiedDate WHERE (([CurrencyRateID] = @Original_CurrencyRateID) AND ([CurrencyRateDate] = @Original_CurrencyRateDate) AND ([FromCurrencyCode] = @Original_FromCurrencyCode) AND ([ToCurrencyCode] = @Original_ToCurrencyCode) AND ([AverageRate] = @Original_AverageRate) AND ([EndOfDayRate] = @Original_EndOfDayRate) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT CurrencyRateID, CurrencyRateDate, FromCurrencyCode, ToCurrencyCode, AverageRate, EndOfDayRate, ModifiedDate FROM Sales.CurrencyRate WHERE (CurrencyRateID = @CurrencyRateID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CurrencyRateDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "CurrencyRateDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@FromCurrencyCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "FromCurrencyCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ToCurrencyCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ToCurrencyCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AverageRate", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "AverageRate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EndOfDayRate", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "EndOfDayRate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CurrencyRateID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CurrencyRateID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CurrencyRateDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "CurrencyRateDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_FromCurrencyCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "FromCurrencyCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ToCurrencyCode", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ToCurrencyCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AverageRate", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "AverageRate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EndOfDayRate", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "EndOfDayRate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CurrencyRateID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "CurrencyRateID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT CurrencyRateID, CurrencyRateDate, FromCurrencyCode, ToCurrencyCode, Averag" +
                "eRate, EndOfDayRate, ModifiedDate FROM Sales.CurrencyRate";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.CurrencyRateDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.CurrencyRateDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.CurrencyRateDataTable dataTable = new AdventureWorksDataSet.CurrencyRateDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.CurrencyRateDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "CurrencyRate");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_CurrencyRateID, System.DateTime Original_CurrencyRateDate, string Original_FromCurrencyCode, string Original_ToCurrencyCode, decimal Original_AverageRate, decimal Original_EndOfDayRate, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_CurrencyRateID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((System.DateTime)(Original_CurrencyRateDate));
            if ((Original_FromCurrencyCode == null)) {
                throw new System.ArgumentNullException("Original_FromCurrencyCode");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_FromCurrencyCode));
            }
            if ((Original_ToCurrencyCode == null)) {
                throw new System.ArgumentNullException("Original_ToCurrencyCode");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_ToCurrencyCode));
            }
            this.Adapter.DeleteCommand.Parameters[4].Value = ((decimal)(Original_AverageRate));
            this.Adapter.DeleteCommand.Parameters[5].Value = ((decimal)(Original_EndOfDayRate));
            this.Adapter.DeleteCommand.Parameters[6].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(System.DateTime CurrencyRateDate, string FromCurrencyCode, string ToCurrencyCode, decimal AverageRate, decimal EndOfDayRate, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((System.DateTime)(CurrencyRateDate));
            if ((FromCurrencyCode == null)) {
                throw new System.ArgumentNullException("FromCurrencyCode");
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(FromCurrencyCode));
            }
            if ((ToCurrencyCode == null)) {
                throw new System.ArgumentNullException("ToCurrencyCode");
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = ((string)(ToCurrencyCode));
            }
            this.Adapter.InsertCommand.Parameters[3].Value = ((decimal)(AverageRate));
            this.Adapter.InsertCommand.Parameters[4].Value = ((decimal)(EndOfDayRate));
            this.Adapter.InsertCommand.Parameters[5].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(System.DateTime CurrencyRateDate, string FromCurrencyCode, string ToCurrencyCode, decimal AverageRate, decimal EndOfDayRate, System.DateTime ModifiedDate, int Original_CurrencyRateID, System.DateTime Original_CurrencyRateDate, string Original_FromCurrencyCode, string Original_ToCurrencyCode, decimal Original_AverageRate, decimal Original_EndOfDayRate, System.DateTime Original_ModifiedDate, int CurrencyRateID) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((System.DateTime)(CurrencyRateDate));
            if ((FromCurrencyCode == null)) {
                throw new System.ArgumentNullException("FromCurrencyCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(FromCurrencyCode));
            }
            if ((ToCurrencyCode == null)) {
                throw new System.ArgumentNullException("ToCurrencyCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(ToCurrencyCode));
            }
            this.Adapter.UpdateCommand.Parameters[3].Value = ((decimal)(AverageRate));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((decimal)(EndOfDayRate));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_CurrencyRateID));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((System.DateTime)(Original_CurrencyRateDate));
            if ((Original_FromCurrencyCode == null)) {
                throw new System.ArgumentNullException("Original_FromCurrencyCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_FromCurrencyCode));
            }
            if ((Original_ToCurrencyCode == null)) {
                throw new System.ArgumentNullException("Original_ToCurrencyCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_ToCurrencyCode));
            }
            this.Adapter.UpdateCommand.Parameters[10].Value = ((decimal)(Original_AverageRate));
            this.Adapter.UpdateCommand.Parameters[11].Value = ((decimal)(Original_EndOfDayRate));
            this.Adapter.UpdateCommand.Parameters[12].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(CurrencyRateID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 CustomerTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public CustomerTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "Customer";
            tableMapping.ColumnMappings.Add("CustomerID", "CustomerID");
            tableMapping.ColumnMappings.Add("TerritoryID", "TerritoryID");
            tableMapping.ColumnMappings.Add("AccountNumber", "AccountNumber");
            tableMapping.ColumnMappings.Add("CustomerType", "CustomerType");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Sales].[Customer] WHERE (([CustomerID] = @Original_CustomerID) AND ((@IsNull_TerritoryID = 1 AND [TerritoryID] IS NULL) OR ([TerritoryID] = @Original_TerritoryID)) AND ([AccountNumber] = @Original_AccountNumber) AND ([CustomerType] = @Original_CustomerType) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AccountNumber", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "AccountNumber", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CustomerType", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerType", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Sales].[Customer] ([TerritoryID], [AccountNumber], [CustomerType], [rowguid], [ModifiedDate]) VALUES (@TerritoryID, @AccountNumber, @CustomerType, @rowguid, @ModifiedDate);
SELECT CustomerID, TerritoryID, AccountNumber, CustomerType, rowguid, ModifiedDate FROM Sales.Customer WHERE (CustomerID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AccountNumber", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "AccountNumber", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CustomerType", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerType", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Sales].[Customer] SET [TerritoryID] = @TerritoryID, [AccountNumber] = @AccountNumber, [CustomerType] = @CustomerType, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([CustomerID] = @Original_CustomerID) AND ((@IsNull_TerritoryID = 1 AND [TerritoryID] IS NULL) OR ([TerritoryID] = @Original_TerritoryID)) AND ([AccountNumber] = @Original_AccountNumber) AND ([CustomerType] = @Original_CustomerType) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT CustomerID, TerritoryID, AccountNumber, CustomerType, rowguid, ModifiedDate FROM Sales.Customer WHERE (CustomerID = @CustomerID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AccountNumber", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "AccountNumber", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CustomerType", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerType", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AccountNumber", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "AccountNumber", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CustomerType", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerType", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CustomerID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT CustomerID, TerritoryID, AccountNumber, CustomerType, rowguid, ModifiedDat" +
                "e FROM Sales.Customer";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.CustomerDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.CustomerDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.CustomerDataTable dataTable = new AdventureWorksDataSet.CustomerDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.CustomerDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "Customer");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_CustomerID, System.Nullable<int> Original_TerritoryID, string Original_AccountNumber, string Original_CustomerType, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_CustomerID));
            if ((Original_TerritoryID.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_TerritoryID.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[2].Value = System.DBNull.Value;
            }
            if ((Original_AccountNumber == null)) {
                throw new System.ArgumentNullException("Original_AccountNumber");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_AccountNumber));
            }
            if ((Original_CustomerType == null)) {
                throw new System.ArgumentNullException("Original_CustomerType");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_CustomerType));
            }
            this.Adapter.DeleteCommand.Parameters[5].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[6].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(System.Nullable<int> TerritoryID, string AccountNumber, string CustomerType, System.Guid rowguid, System.DateTime ModifiedDate) {
            if ((TerritoryID.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[0].Value = ((int)(TerritoryID.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = System.DBNull.Value;
            }
            if ((AccountNumber == null)) {
                throw new System.ArgumentNullException("AccountNumber");
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(AccountNumber));
            }
            if ((CustomerType == null)) {
                throw new System.ArgumentNullException("CustomerType");
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = ((string)(CustomerType));
            }
            this.Adapter.InsertCommand.Parameters[3].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(System.Nullable<int> TerritoryID, string AccountNumber, string CustomerType, System.Guid rowguid, System.DateTime ModifiedDate, int Original_CustomerID, System.Nullable<int> Original_TerritoryID, string Original_AccountNumber, string Original_CustomerType, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate, int CustomerID) {
            if ((TerritoryID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(TerritoryID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = System.DBNull.Value;
            }
            if ((AccountNumber == null)) {
                throw new System.ArgumentNullException("AccountNumber");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(AccountNumber));
            }
            if ((CustomerType == null)) {
                throw new System.ArgumentNullException("CustomerType");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(CustomerType));
            }
            this.Adapter.UpdateCommand.Parameters[3].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_CustomerID));
            if ((Original_TerritoryID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_TerritoryID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[7].Value = System.DBNull.Value;
            }
            if ((Original_AccountNumber == null)) {
                throw new System.ArgumentNullException("Original_AccountNumber");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_AccountNumber));
            }
            if ((Original_CustomerType == null)) {
                throw new System.ArgumentNullException("Original_CustomerType");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_CustomerType));
            }
            this.Adapter.UpdateCommand.Parameters[10].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[11].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(CustomerID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 CustomerAddressTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public CustomerAddressTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "CustomerAddress";
            tableMapping.ColumnMappings.Add("CustomerID", "CustomerID");
            tableMapping.ColumnMappings.Add("AddressID", "AddressID");
            tableMapping.ColumnMappings.Add("AddressTypeID", "AddressTypeID");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Sales].[CustomerAddress] WHERE (([CustomerID] = @Original_CustomerID" +
                ") AND ([AddressID] = @Original_AddressID) AND ([AddressTypeID] = @Original_Addre" +
                "ssTypeID) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_Mo" +
                "difiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AddressID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AddressTypeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressTypeID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Sales].[CustomerAddress] ([CustomerID], [AddressID], [AddressTypeID], [rowguid], [ModifiedDate]) VALUES (@CustomerID, @AddressID, @AddressTypeID, @rowguid, @ModifiedDate);
SELECT CustomerID, AddressID, AddressTypeID, rowguid, ModifiedDate FROM Sales.CustomerAddress WHERE (AddressID = @AddressID) AND (CustomerID = @CustomerID)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AddressID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AddressTypeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressTypeID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Sales].[CustomerAddress] SET [CustomerID] = @CustomerID, [AddressID] = @AddressID, [AddressTypeID] = @AddressTypeID, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([CustomerID] = @Original_CustomerID) AND ([AddressID] = @Original_AddressID) AND ([AddressTypeID] = @Original_AddressTypeID) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT CustomerID, AddressID, AddressTypeID, rowguid, ModifiedDate FROM Sales.CustomerAddress WHERE (AddressID = @AddressID) AND (CustomerID = @CustomerID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AddressID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AddressTypeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressTypeID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AddressID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AddressTypeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AddressTypeID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT CustomerID, AddressID, AddressTypeID, rowguid, ModifiedDate FROM Sales.Cus" +
                "tomerAddress";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.CustomerAddressDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.CustomerAddressDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.CustomerAddressDataTable dataTable = new AdventureWorksDataSet.CustomerAddressDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.CustomerAddressDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "CustomerAddress");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_CustomerID, int Original_AddressID, int Original_AddressTypeID, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_CustomerID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_AddressID));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_AddressTypeID));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[4].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int CustomerID, int AddressID, int AddressTypeID, System.Guid rowguid, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(CustomerID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((int)(AddressID));
            this.Adapter.InsertCommand.Parameters[2].Value = ((int)(AddressTypeID));
            this.Adapter.InsertCommand.Parameters[3].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int CustomerID, int AddressID, int AddressTypeID, System.Guid rowguid, System.DateTime ModifiedDate, int Original_CustomerID, int Original_AddressID, int Original_AddressTypeID, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(CustomerID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(AddressID));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(AddressTypeID));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_CustomerID));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_AddressID));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_AddressTypeID));
            this.Adapter.UpdateCommand.Parameters[8].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 IndividualTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public IndividualTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "Individual";
            tableMapping.ColumnMappings.Add("CustomerID", "CustomerID");
            tableMapping.ColumnMappings.Add("ContactID", "ContactID");
            tableMapping.ColumnMappings.Add("Demographics", "Demographics");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Sales].[Individual] WHERE (([CustomerID] = @Original_CustomerID) AND" +
                " ([ContactID] = @Original_ContactID) AND ([ModifiedDate] = @Original_ModifiedDat" +
                "e))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Sales].[Individual] ([CustomerID], [ContactID], [Demographics], [ModifiedDate]) VALUES (@CustomerID, @ContactID, @Demographics, @ModifiedDate);
SELECT CustomerID, ContactID, Demographics, ModifiedDate FROM Sales.Individual WHERE (CustomerID = @CustomerID)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Demographics", System.Data.SqlDbType.Xml, 0, System.Data.ParameterDirection.Input, 0, 0, "Demographics", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Sales].[Individual] SET [CustomerID] = @CustomerID, [ContactID] = @ContactID, [Demographics] = @Demographics, [ModifiedDate] = @ModifiedDate WHERE (([CustomerID] = @Original_CustomerID) AND ([ContactID] = @Original_ContactID) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT CustomerID, ContactID, Demographics, ModifiedDate FROM Sales.Individual WHERE (CustomerID = @CustomerID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Demographics", System.Data.SqlDbType.Xml, 0, System.Data.ParameterDirection.Input, 0, 0, "Demographics", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT CustomerID, ContactID, Demographics, ModifiedDate FROM Sales.Individual";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.IndividualDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.IndividualDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.IndividualDataTable dataTable = new AdventureWorksDataSet.IndividualDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.IndividualDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "Individual");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_CustomerID, int Original_ContactID, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_CustomerID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_ContactID));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int CustomerID, int ContactID, object Demographics, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(CustomerID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((int)(ContactID));
            if ((Demographics == null)) {
                this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = ((object)(Demographics));
            }
            this.Adapter.InsertCommand.Parameters[3].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int CustomerID, int ContactID, object Demographics, System.DateTime ModifiedDate, int Original_CustomerID, int Original_ContactID, System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(CustomerID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(ContactID));
            if ((Demographics == null)) {
                this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[2].Value = ((object)(Demographics));
            }
            this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_CustomerID));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_ContactID));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 SalesOrderDetailTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public SalesOrderDetailTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "SalesOrderDetail";
            tableMapping.ColumnMappings.Add("SalesOrderID", "SalesOrderID");
            tableMapping.ColumnMappings.Add("SalesOrderDetailID", "SalesOrderDetailID");
            tableMapping.ColumnMappings.Add("CarrierTrackingNumber", "CarrierTrackingNumber");
            tableMapping.ColumnMappings.Add("OrderQty", "OrderQty");
            tableMapping.ColumnMappings.Add("ProductID", "ProductID");
            tableMapping.ColumnMappings.Add("SpecialOfferID", "SpecialOfferID");
            tableMapping.ColumnMappings.Add("UnitPrice", "UnitPrice");
            tableMapping.ColumnMappings.Add("UnitPriceDiscount", "UnitPriceDiscount");
            tableMapping.ColumnMappings.Add("LineTotal", "LineTotal");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Sales].[SalesOrderDetail] WHERE (([SalesOrderID] = @Original_SalesOrderID) AND ([SalesOrderDetailID] = @Original_SalesOrderDetailID) AND ((@IsNull_CarrierTrackingNumber = 1 AND [CarrierTrackingNumber] IS NULL) OR ([CarrierTrackingNumber] = @Original_CarrierTrackingNumber)) AND ([OrderQty] = @Original_OrderQty) AND ([ProductID] = @Original_ProductID) AND ([SpecialOfferID] = @Original_SpecialOfferID) AND ([UnitPrice] = @Original_UnitPrice) AND ([UnitPriceDiscount] = @Original_UnitPriceDiscount) AND ((@IsNull_LineTotal = 1 AND [LineTotal] IS NULL) OR ([LineTotal] = @Original_LineTotal)) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesOrderID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesOrderDetailID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesOrderDetailID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_CarrierTrackingNumber", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CarrierTrackingNumber", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CarrierTrackingNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CarrierTrackingNumber", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_OrderQty", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "OrderQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SpecialOfferID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SpecialOfferID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_UnitPriceDiscount", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitPriceDiscount", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_LineTotal", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "LineTotal", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_LineTotal", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 38, 6, "LineTotal", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Sales].[SalesOrderDetail] ([SalesOrderID], [CarrierTrackingNumber], [OrderQty], [ProductID], [SpecialOfferID], [UnitPrice], [UnitPriceDiscount], [LineTotal], [rowguid], [ModifiedDate]) VALUES (@SalesOrderID, @CarrierTrackingNumber, @OrderQty, @ProductID, @SpecialOfferID, @UnitPrice, @UnitPriceDiscount, @LineTotal, @rowguid, @ModifiedDate);
SELECT SalesOrderID, SalesOrderDetailID, CarrierTrackingNumber, OrderQty, ProductID, SpecialOfferID, UnitPrice, UnitPriceDiscount, LineTotal, rowguid, ModifiedDate FROM Sales.SalesOrderDetail WHERE (SalesOrderDetailID = @@IDENTITY) AND (SalesOrderID = @SalesOrderID)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesOrderID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CarrierTrackingNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CarrierTrackingNumber", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OrderQty", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "OrderQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SpecialOfferID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SpecialOfferID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@UnitPriceDiscount", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitPriceDiscount", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@LineTotal", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 38, 6, "LineTotal", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Sales].[SalesOrderDetail] SET [SalesOrderID] = @SalesOrderID, [CarrierTrackingNumber] = @CarrierTrackingNumber, [OrderQty] = @OrderQty, [ProductID] = @ProductID, [SpecialOfferID] = @SpecialOfferID, [UnitPrice] = @UnitPrice, [UnitPriceDiscount] = @UnitPriceDiscount, [LineTotal] = @LineTotal, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([SalesOrderID] = @Original_SalesOrderID) AND ([SalesOrderDetailID] = @Original_SalesOrderDetailID) AND ((@IsNull_CarrierTrackingNumber = 1 AND [CarrierTrackingNumber] IS NULL) OR ([CarrierTrackingNumber] = @Original_CarrierTrackingNumber)) AND ([OrderQty] = @Original_OrderQty) AND ([ProductID] = @Original_ProductID) AND ([SpecialOfferID] = @Original_SpecialOfferID) AND ([UnitPrice] = @Original_UnitPrice) AND ([UnitPriceDiscount] = @Original_UnitPriceDiscount) AND ((@IsNull_LineTotal = 1 AND [LineTotal] IS NULL) OR ([LineTotal] = @Original_LineTotal)) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT SalesOrderID, SalesOrderDetailID, CarrierTrackingNumber, OrderQty, ProductID, SpecialOfferID, UnitPrice, UnitPriceDiscount, LineTotal, rowguid, ModifiedDate FROM Sales.SalesOrderDetail WHERE (SalesOrderDetailID = @SalesOrderDetailID) AND (SalesOrderID = @SalesOrderID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesOrderID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CarrierTrackingNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CarrierTrackingNumber", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OrderQty", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "OrderQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SpecialOfferID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SpecialOfferID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@UnitPriceDiscount", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitPriceDiscount", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@LineTotal", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 38, 6, "LineTotal", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesOrderID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesOrderDetailID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesOrderDetailID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_CarrierTrackingNumber", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CarrierTrackingNumber", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CarrierTrackingNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CarrierTrackingNumber", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_OrderQty", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "OrderQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SpecialOfferID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SpecialOfferID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_UnitPriceDiscount", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "UnitPriceDiscount", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_LineTotal", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "LineTotal", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_LineTotal", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 38, 6, "LineTotal", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesOrderDetailID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "SalesOrderDetailID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT SalesOrderID, SalesOrderDetailID, CarrierTrackingNumber, OrderQty, Product" +
                "ID, SpecialOfferID, UnitPrice, UnitPriceDiscount, LineTotal, rowguid, ModifiedDa" +
                "te FROM Sales.SalesOrderDetail";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.SalesOrderDetailDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.SalesOrderDetailDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.SalesOrderDetailDataTable dataTable = new AdventureWorksDataSet.SalesOrderDetailDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.SalesOrderDetailDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "SalesOrderDetail");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_SalesOrderID, int Original_SalesOrderDetailID, string Original_CarrierTrackingNumber, short Original_OrderQty, int Original_ProductID, int Original_SpecialOfferID, decimal Original_UnitPrice, decimal Original_UnitPriceDiscount, System.Nullable<decimal> Original_LineTotal, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_SalesOrderID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_SalesOrderDetailID));
            if ((Original_CarrierTrackingNumber == null)) {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[3].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_CarrierTrackingNumber));
            }
            this.Adapter.DeleteCommand.Parameters[4].Value = ((short)(Original_OrderQty));
            this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(Original_ProductID));
            this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(Original_SpecialOfferID));
            this.Adapter.DeleteCommand.Parameters[7].Value = ((decimal)(Original_UnitPrice));
            this.Adapter.DeleteCommand.Parameters[8].Value = ((decimal)(Original_UnitPriceDiscount));
            if ((Original_LineTotal.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[9].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[10].Value = ((decimal)(Original_LineTotal.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[9].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[10].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[11].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[12].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int SalesOrderID, string CarrierTrackingNumber, short OrderQty, int ProductID, int SpecialOfferID, decimal UnitPrice, decimal UnitPriceDiscount, System.Nullable<decimal> LineTotal, System.Guid rowguid, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(SalesOrderID));
            if ((CarrierTrackingNumber == null)) {
                this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(CarrierTrackingNumber));
            }
            this.Adapter.InsertCommand.Parameters[2].Value = ((short)(OrderQty));
            this.Adapter.InsertCommand.Parameters[3].Value = ((int)(ProductID));
            this.Adapter.InsertCommand.Parameters[4].Value = ((int)(SpecialOfferID));
            this.Adapter.InsertCommand.Parameters[5].Value = ((decimal)(UnitPrice));
            this.Adapter.InsertCommand.Parameters[6].Value = ((decimal)(UnitPriceDiscount));
            if ((LineTotal.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[7].Value = ((decimal)(LineTotal.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[7].Value = System.DBNull.Value;
            }
            this.Adapter.InsertCommand.Parameters[8].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[9].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    int SalesOrderID, 
                    string CarrierTrackingNumber, 
                    short OrderQty, 
                    int ProductID, 
                    int SpecialOfferID, 
                    decimal UnitPrice, 
                    decimal UnitPriceDiscount, 
                    System.Nullable<decimal> LineTotal, 
                    System.Guid rowguid, 
                    System.DateTime ModifiedDate, 
                    int Original_SalesOrderID, 
                    int Original_SalesOrderDetailID, 
                    string Original_CarrierTrackingNumber, 
                    short Original_OrderQty, 
                    int Original_ProductID, 
                    int Original_SpecialOfferID, 
                    decimal Original_UnitPrice, 
                    decimal Original_UnitPriceDiscount, 
                    System.Nullable<decimal> Original_LineTotal, 
                    System.Guid Original_rowguid, 
                    System.DateTime Original_ModifiedDate, 
                    int SalesOrderDetailID) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(SalesOrderID));
            if ((CarrierTrackingNumber == null)) {
                this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(CarrierTrackingNumber));
            }
            this.Adapter.UpdateCommand.Parameters[2].Value = ((short)(OrderQty));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(ProductID));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(SpecialOfferID));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((decimal)(UnitPrice));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((decimal)(UnitPriceDiscount));
            if ((LineTotal.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[7].Value = ((decimal)(LineTotal.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[7].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[8].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_SalesOrderID));
            this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Original_SalesOrderDetailID));
            if ((Original_CarrierTrackingNumber == null)) {
                this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[13].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[13].Value = ((string)(Original_CarrierTrackingNumber));
            }
            this.Adapter.UpdateCommand.Parameters[14].Value = ((short)(Original_OrderQty));
            this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(Original_ProductID));
            this.Adapter.UpdateCommand.Parameters[16].Value = ((int)(Original_SpecialOfferID));
            this.Adapter.UpdateCommand.Parameters[17].Value = ((decimal)(Original_UnitPrice));
            this.Adapter.UpdateCommand.Parameters[18].Value = ((decimal)(Original_UnitPriceDiscount));
            if ((Original_LineTotal.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[20].Value = ((decimal)(Original_LineTotal.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[20].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[21].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[22].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[23].Value = ((int)(SalesOrderDetailID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 SalesOrderHeaderTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public SalesOrderHeaderTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "SalesOrderHeader";
            tableMapping.ColumnMappings.Add("SalesOrderID", "SalesOrderID");
            tableMapping.ColumnMappings.Add("RevisionNumber", "RevisionNumber");
            tableMapping.ColumnMappings.Add("OrderDate", "OrderDate");
            tableMapping.ColumnMappings.Add("DueDate", "DueDate");
            tableMapping.ColumnMappings.Add("ShipDate", "ShipDate");
            tableMapping.ColumnMappings.Add("Status", "Status");
            tableMapping.ColumnMappings.Add("OnlineOrderFlag", "OnlineOrderFlag");
            tableMapping.ColumnMappings.Add("SalesOrderNumber", "SalesOrderNumber");
            tableMapping.ColumnMappings.Add("PurchaseOrderNumber", "PurchaseOrderNumber");
            tableMapping.ColumnMappings.Add("AccountNumber", "AccountNumber");
            tableMapping.ColumnMappings.Add("CustomerID", "CustomerID");
            tableMapping.ColumnMappings.Add("ContactID", "ContactID");
            tableMapping.ColumnMappings.Add("SalesPersonID", "SalesPersonID");
            tableMapping.ColumnMappings.Add("TerritoryID", "TerritoryID");
            tableMapping.ColumnMappings.Add("BillToAddressID", "BillToAddressID");
            tableMapping.ColumnMappings.Add("ShipToAddressID", "ShipToAddressID");
            tableMapping.ColumnMappings.Add("ShipMethodID", "ShipMethodID");
            tableMapping.ColumnMappings.Add("CreditCardID", "CreditCardID");
            tableMapping.ColumnMappings.Add("CreditCardApprovalCode", "CreditCardApprovalCode");
            tableMapping.ColumnMappings.Add("CurrencyRateID", "CurrencyRateID");
            tableMapping.ColumnMappings.Add("SubTotal", "SubTotal");
            tableMapping.ColumnMappings.Add("TaxAmt", "TaxAmt");
            tableMapping.ColumnMappings.Add("Freight", "Freight");
            tableMapping.ColumnMappings.Add("TotalDue", "TotalDue");
            tableMapping.ColumnMappings.Add("Comment", "Comment");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Sales].[SalesOrderHeader] WHERE (([SalesOrderID] = @Original_SalesOr" +
                "derID) AND ([RevisionNumber] = @Original_RevisionNumber) AND ([OrderDate] = @Ori" +
                "ginal_OrderDate) AND ([DueDate] = @Original_DueDate) AND ((@IsNull_ShipDate = 1 " +
                "AND [ShipDate] IS NULL) OR ([ShipDate] = @Original_ShipDate)) AND ([Status] = @O" +
                "riginal_Status) AND ([OnlineOrderFlag] = @Original_OnlineOrderFlag) AND ((@IsNul" +
                "l_SalesOrderNumber = 1 AND [SalesOrderNumber] IS NULL) OR ([SalesOrderNumber] = " +
                "@Original_SalesOrderNumber)) AND ((@IsNull_PurchaseOrderNumber = 1 AND [Purchase" +
                "OrderNumber] IS NULL) OR ([PurchaseOrderNumber] = @Original_PurchaseOrderNumber)" +
                ") AND ((@IsNull_AccountNumber = 1 AND [AccountNumber] IS NULL) OR ([AccountNumbe" +
                "r] = @Original_AccountNumber)) AND ([CustomerID] = @Original_CustomerID) AND ([C" +
                "ontactID] = @Original_ContactID) AND ((@IsNull_SalesPersonID = 1 AND [SalesPerso" +
                "nID] IS NULL) OR ([SalesPersonID] = @Original_SalesPersonID)) AND ((@IsNull_Terr" +
                "itoryID = 1 AND [TerritoryID] IS NULL) OR ([TerritoryID] = @Original_TerritoryID" +
                ")) AND ([BillToAddressID] = @Original_BillToAddressID) AND ([ShipToAddressID] = " +
                "@Original_ShipToAddressID) AND ([ShipMethodID] = @Original_ShipMethodID) AND ((@" +
                "IsNull_CreditCardID = 1 AND [CreditCardID] IS NULL) OR ([CreditCardID] = @Origin" +
                "al_CreditCardID)) AND ((@IsNull_CreditCardApprovalCode = 1 AND [CreditCardApprov" +
                "alCode] IS NULL) OR ([CreditCardApprovalCode] = @Original_CreditCardApprovalCode" +
                ")) AND ((@IsNull_CurrencyRateID = 1 AND [CurrencyRateID] IS NULL) OR ([CurrencyR" +
                "ateID] = @Original_CurrencyRateID)) AND ([SubTotal] = @Original_SubTotal) AND ([" +
                "TaxAmt] = @Original_TaxAmt) AND ([Freight] = @Original_Freight) AND ((@IsNull_To" +
                "talDue = 1 AND [TotalDue] IS NULL) OR ([TotalDue] = @Original_TotalDue)) AND ((@" +
                "IsNull_Comment = 1 AND [Comment] IS NULL) OR ([Comment] = @Original_Comment)) AN" +
                "D ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate))" +
                "";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesOrderID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_RevisionNumber", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "RevisionNumber", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_DueDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "DueDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ShipDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Status", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "Status", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_OnlineOrderFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "OnlineOrderFlag", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_SalesOrderNumber", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesOrderNumber", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesOrderNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesOrderNumber", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_PurchaseOrderNumber", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderNumber", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PurchaseOrderNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderNumber", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_AccountNumber", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AccountNumber", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AccountNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "AccountNumber", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_SalesPersonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesPersonID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesPersonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesPersonID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_BillToAddressID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "BillToAddressID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipToAddressID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipToAddressID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipMethodID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipMethodID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_CreditCardID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CreditCardID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CreditCardID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CreditCardID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_CreditCardApprovalCode", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CreditCardApprovalCode", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CreditCardApprovalCode", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CreditCardApprovalCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_CurrencyRateID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CurrencyRateID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CurrencyRateID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CurrencyRateID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SubTotal", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SubTotal", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TaxAmt", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "TaxAmt", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_TotalDue", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TotalDue", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TotalDue", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "TotalDue", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Comment", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Comment", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Comment", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Comment", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Sales].[SalesOrderHeader] ([RevisionNumber], [OrderDate], [DueDate], [ShipDate], [Status], [OnlineOrderFlag], [SalesOrderNumber], [PurchaseOrderNumber], [AccountNumber], [CustomerID], [ContactID], [SalesPersonID], [TerritoryID], [BillToAddressID], [ShipToAddressID], [ShipMethodID], [CreditCardID], [CreditCardApprovalCode], [CurrencyRateID], [SubTotal], [TaxAmt], [Freight], [TotalDue], [Comment], [rowguid], [ModifiedDate]) VALUES (@RevisionNumber, @OrderDate, @DueDate, @ShipDate, @Status, @OnlineOrderFlag, @SalesOrderNumber, @PurchaseOrderNumber, @AccountNumber, @CustomerID, @ContactID, @SalesPersonID, @TerritoryID, @BillToAddressID, @ShipToAddressID, @ShipMethodID, @CreditCardID, @CreditCardApprovalCode, @CurrencyRateID, @SubTotal, @TaxAmt, @Freight, @TotalDue, @Comment, @rowguid, @ModifiedDate);
SELECT SalesOrderID, RevisionNumber, OrderDate, DueDate, ShipDate, Status, OnlineOrderFlag, SalesOrderNumber, PurchaseOrderNumber, AccountNumber, CustomerID, ContactID, SalesPersonID, TerritoryID, BillToAddressID, ShipToAddressID, ShipMethodID, CreditCardID, CreditCardApprovalCode, CurrencyRateID, SubTotal, TaxAmt, Freight, TotalDue, Comment, rowguid, ModifiedDate FROM Sales.SalesOrderHeader WHERE (SalesOrderID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RevisionNumber", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "RevisionNumber", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DueDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "DueDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Status", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "Status", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OnlineOrderFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "OnlineOrderFlag", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesOrderNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesOrderNumber", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PurchaseOrderNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderNumber", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AccountNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "AccountNumber", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesPersonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesPersonID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@BillToAddressID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "BillToAddressID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipToAddressID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipToAddressID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipMethodID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipMethodID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CreditCardID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CreditCardID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CreditCardApprovalCode", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CreditCardApprovalCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CurrencyRateID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CurrencyRateID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SubTotal", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SubTotal", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TaxAmt", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "TaxAmt", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TotalDue", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "TotalDue", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Comment", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Comment", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = "UPDATE [Sales].[SalesOrderHeader] SET [RevisionNumber] = @RevisionNumber, [OrderD" +
                "ate] = @OrderDate, [DueDate] = @DueDate, [ShipDate] = @ShipDate, [Status] = @Sta" +
                "tus, [OnlineOrderFlag] = @OnlineOrderFlag, [SalesOrderNumber] = @SalesOrderNumbe" +
                "r, [PurchaseOrderNumber] = @PurchaseOrderNumber, [AccountNumber] = @AccountNumbe" +
                "r, [CustomerID] = @CustomerID, [ContactID] = @ContactID, [SalesPersonID] = @Sale" +
                "sPersonID, [TerritoryID] = @TerritoryID, [BillToAddressID] = @BillToAddressID, [" +
                "ShipToAddressID] = @ShipToAddressID, [ShipMethodID] = @ShipMethodID, [CreditCard" +
                "ID] = @CreditCardID, [CreditCardApprovalCode] = @CreditCardApprovalCode, [Curren" +
                "cyRateID] = @CurrencyRateID, [SubTotal] = @SubTotal, [TaxAmt] = @TaxAmt, [Freigh" +
                "t] = @Freight, [TotalDue] = @TotalDue, [Comment] = @Comment, [rowguid] = @rowgui" +
                "d, [ModifiedDate] = @ModifiedDate WHERE (([SalesOrderID] = @Original_SalesOrderI" +
                "D) AND ([RevisionNumber] = @Original_RevisionNumber) AND ([OrderDate] = @Origina" +
                "l_OrderDate) AND ([DueDate] = @Original_DueDate) AND ((@IsNull_ShipDate = 1 AND " +
                "[ShipDate] IS NULL) OR ([ShipDate] = @Original_ShipDate)) AND ([Status] = @Origi" +
                "nal_Status) AND ([OnlineOrderFlag] = @Original_OnlineOrderFlag) AND ((@IsNull_Sa" +
                "lesOrderNumber = 1 AND [SalesOrderNumber] IS NULL) OR ([SalesOrderNumber] = @Ori" +
                "ginal_SalesOrderNumber)) AND ((@IsNull_PurchaseOrderNumber = 1 AND [PurchaseOrde" +
                "rNumber] IS NULL) OR ([PurchaseOrderNumber] = @Original_PurchaseOrderNumber)) AN" +
                "D ((@IsNull_AccountNumber = 1 AND [AccountNumber] IS NULL) OR ([AccountNumber] =" +
                " @Original_AccountNumber)) AND ([CustomerID] = @Original_CustomerID) AND ([Conta" +
                "ctID] = @Original_ContactID) AND ((@IsNull_SalesPersonID = 1 AND [SalesPersonID]" +
                " IS NULL) OR ([SalesPersonID] = @Original_SalesPersonID)) AND ((@IsNull_Territor" +
                "yID = 1 AND [TerritoryID] IS NULL) OR ([TerritoryID] = @Original_TerritoryID)) A" +
                "ND ([BillToAddressID] = @Original_BillToAddressID) AND ([ShipToAddressID] = @Ori" +
                "ginal_ShipToAddressID) AND ([ShipMethodID] = @Original_ShipMethodID) AND ((@IsNu" +
                "ll_CreditCardID = 1 AND [CreditCardID] IS NULL) OR ([CreditCardID] = @Original_C" +
                "reditCardID)) AND ((@IsNull_CreditCardApprovalCode = 1 AND [CreditCardApprovalCo" +
                "de] IS NULL) OR ([CreditCardApprovalCode] = @Original_CreditCardApprovalCode)) A" +
                "ND ((@IsNull_CurrencyRateID = 1 AND [CurrencyRateID] IS NULL) OR ([CurrencyRateI" +
                "D] = @Original_CurrencyRateID)) AND ([SubTotal] = @Original_SubTotal) AND ([TaxA" +
                "mt] = @Original_TaxAmt) AND ([Freight] = @Original_Freight) AND ((@IsNull_TotalD" +
                "ue = 1 AND [TotalDue] IS NULL) OR ([TotalDue] = @Original_TotalDue)) AND ((@IsNu" +
                "ll_Comment = 1 AND [Comment] IS NULL) OR ([Comment] = @Original_Comment)) AND ([" +
                "rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));\r\nS" +
                "ELECT SalesOrderID, RevisionNumber, OrderDate, DueDate, ShipDate, Status, Online" +
                "OrderFlag, SalesOrderNumber, PurchaseOrderNumber, AccountNumber, CustomerID, Con" +
                "tactID, SalesPersonID, TerritoryID, BillToAddressID, ShipToAddressID, ShipMethod" +
                "ID, CreditCardID, CreditCardApprovalCode, CurrencyRateID, SubTotal, TaxAmt, Frei" +
                "ght, TotalDue, Comment, rowguid, ModifiedDate FROM Sales.SalesOrderHeader WHERE " +
                "(SalesOrderID = @SalesOrderID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RevisionNumber", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "RevisionNumber", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DueDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "DueDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Status", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "Status", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OnlineOrderFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "OnlineOrderFlag", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesOrderNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesOrderNumber", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PurchaseOrderNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderNumber", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AccountNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "AccountNumber", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesPersonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesPersonID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@BillToAddressID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "BillToAddressID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipToAddressID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipToAddressID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShipMethodID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipMethodID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CreditCardID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CreditCardID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CreditCardApprovalCode", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CreditCardApprovalCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CurrencyRateID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CurrencyRateID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SubTotal", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SubTotal", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TaxAmt", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "TaxAmt", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TotalDue", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "TotalDue", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Comment", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Comment", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesOrderID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_RevisionNumber", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "RevisionNumber", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_DueDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "DueDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_ShipDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Status", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "Status", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_OnlineOrderFlag", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "OnlineOrderFlag", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_SalesOrderNumber", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesOrderNumber", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesOrderNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesOrderNumber", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_PurchaseOrderNumber", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderNumber", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PurchaseOrderNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderNumber", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_AccountNumber", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AccountNumber", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AccountNumber", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "AccountNumber", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_SalesPersonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesPersonID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesPersonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesPersonID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_BillToAddressID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "BillToAddressID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipToAddressID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipToAddressID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShipMethodID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShipMethodID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_CreditCardID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CreditCardID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CreditCardID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CreditCardID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_CreditCardApprovalCode", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CreditCardApprovalCode", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CreditCardApprovalCode", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CreditCardApprovalCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_CurrencyRateID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CurrencyRateID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CurrencyRateID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CurrencyRateID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SubTotal", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SubTotal", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TaxAmt", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "TaxAmt", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_TotalDue", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TotalDue", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TotalDue", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "TotalDue", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Comment", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Comment", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Comment", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Comment", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesOrderID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "SalesOrderID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = @"SELECT SalesOrderID, RevisionNumber, OrderDate, DueDate, ShipDate, Status, OnlineOrderFlag, SalesOrderNumber, PurchaseOrderNumber, AccountNumber, CustomerID, ContactID, SalesPersonID, TerritoryID, BillToAddressID, ShipToAddressID, ShipMethodID, CreditCardID, CreditCardApprovalCode, CurrencyRateID, SubTotal, TaxAmt, Freight, TotalDue, Comment, rowguid, ModifiedDate FROM Sales.SalesOrderHeader";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.SalesOrderHeaderDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.SalesOrderHeaderDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.SalesOrderHeaderDataTable dataTable = new AdventureWorksDataSet.SalesOrderHeaderDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.SalesOrderHeaderDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "SalesOrderHeader");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(
                    int Original_SalesOrderID, 
                    byte Original_RevisionNumber, 
                    System.DateTime Original_OrderDate, 
                    System.DateTime Original_DueDate, 
                    System.Nullable<System.DateTime> Original_ShipDate, 
                    byte Original_Status, 
                    bool Original_OnlineOrderFlag, 
                    string Original_SalesOrderNumber, 
                    string Original_PurchaseOrderNumber, 
                    string Original_AccountNumber, 
                    int Original_CustomerID, 
                    int Original_ContactID, 
                    System.Nullable<int> Original_SalesPersonID, 
                    System.Nullable<int> Original_TerritoryID, 
                    int Original_BillToAddressID, 
                    int Original_ShipToAddressID, 
                    int Original_ShipMethodID, 
                    System.Nullable<int> Original_CreditCardID, 
                    string Original_CreditCardApprovalCode, 
                    System.Nullable<int> Original_CurrencyRateID, 
                    decimal Original_SubTotal, 
                    decimal Original_TaxAmt, 
                    decimal Original_Freight, 
                    System.Nullable<decimal> Original_TotalDue, 
                    string Original_Comment, 
                    System.Guid Original_rowguid, 
                    System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_SalesOrderID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((byte)(Original_RevisionNumber));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((System.DateTime)(Original_OrderDate));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_DueDate));
            if ((Original_ShipDate.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[5].Value = ((System.DateTime)(Original_ShipDate.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[5].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[6].Value = ((byte)(Original_Status));
            this.Adapter.DeleteCommand.Parameters[7].Value = ((bool)(Original_OnlineOrderFlag));
            if ((Original_SalesOrderNumber == null)) {
                this.Adapter.DeleteCommand.Parameters[8].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[9].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[8].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[9].Value = ((string)(Original_SalesOrderNumber));
            }
            if ((Original_PurchaseOrderNumber == null)) {
                this.Adapter.DeleteCommand.Parameters[10].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[11].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[10].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[11].Value = ((string)(Original_PurchaseOrderNumber));
            }
            if ((Original_AccountNumber == null)) {
                this.Adapter.DeleteCommand.Parameters[12].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[13].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[12].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[13].Value = ((string)(Original_AccountNumber));
            }
            this.Adapter.DeleteCommand.Parameters[14].Value = ((int)(Original_CustomerID));
            this.Adapter.DeleteCommand.Parameters[15].Value = ((int)(Original_ContactID));
            if ((Original_SalesPersonID.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[16].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[17].Value = ((int)(Original_SalesPersonID.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[16].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[17].Value = System.DBNull.Value;
            }
            if ((Original_TerritoryID.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[18].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[19].Value = ((int)(Original_TerritoryID.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[18].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[19].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[20].Value = ((int)(Original_BillToAddressID));
            this.Adapter.DeleteCommand.Parameters[21].Value = ((int)(Original_ShipToAddressID));
            this.Adapter.DeleteCommand.Parameters[22].Value = ((int)(Original_ShipMethodID));
            if ((Original_CreditCardID.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[23].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[24].Value = ((int)(Original_CreditCardID.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[23].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[24].Value = System.DBNull.Value;
            }
            if ((Original_CreditCardApprovalCode == null)) {
                this.Adapter.DeleteCommand.Parameters[25].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[26].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[25].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[26].Value = ((string)(Original_CreditCardApprovalCode));
            }
            if ((Original_CurrencyRateID.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[27].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[28].Value = ((int)(Original_CurrencyRateID.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[27].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[28].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[29].Value = ((decimal)(Original_SubTotal));
            this.Adapter.DeleteCommand.Parameters[30].Value = ((decimal)(Original_TaxAmt));
            this.Adapter.DeleteCommand.Parameters[31].Value = ((decimal)(Original_Freight));
            if ((Original_TotalDue.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[32].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[33].Value = ((decimal)(Original_TotalDue.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[32].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[33].Value = System.DBNull.Value;
            }
            if ((Original_Comment == null)) {
                this.Adapter.DeleteCommand.Parameters[34].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[35].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[34].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[35].Value = ((string)(Original_Comment));
            }
            this.Adapter.DeleteCommand.Parameters[36].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[37].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(
                    byte RevisionNumber, 
                    System.DateTime OrderDate, 
                    System.DateTime DueDate, 
                    System.Nullable<System.DateTime> ShipDate, 
                    byte Status, 
                    bool OnlineOrderFlag, 
                    string SalesOrderNumber, 
                    string PurchaseOrderNumber, 
                    string AccountNumber, 
                    int CustomerID, 
                    int ContactID, 
                    System.Nullable<int> SalesPersonID, 
                    System.Nullable<int> TerritoryID, 
                    int BillToAddressID, 
                    int ShipToAddressID, 
                    int ShipMethodID, 
                    System.Nullable<int> CreditCardID, 
                    string CreditCardApprovalCode, 
                    System.Nullable<int> CurrencyRateID, 
                    decimal SubTotal, 
                    decimal TaxAmt, 
                    decimal Freight, 
                    System.Nullable<decimal> TotalDue, 
                    string Comment, 
                    System.Guid rowguid, 
                    System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((byte)(RevisionNumber));
            this.Adapter.InsertCommand.Parameters[1].Value = ((System.DateTime)(OrderDate));
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(DueDate));
            if ((ShipDate.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[3].Value = ((System.DateTime)(ShipDate.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value;
            }
            this.Adapter.InsertCommand.Parameters[4].Value = ((byte)(Status));
            this.Adapter.InsertCommand.Parameters[5].Value = ((bool)(OnlineOrderFlag));
            if ((SalesOrderNumber == null)) {
                this.Adapter.InsertCommand.Parameters[6].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[6].Value = ((string)(SalesOrderNumber));
            }
            if ((PurchaseOrderNumber == null)) {
                this.Adapter.InsertCommand.Parameters[7].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[7].Value = ((string)(PurchaseOrderNumber));
            }
            if ((AccountNumber == null)) {
                this.Adapter.InsertCommand.Parameters[8].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[8].Value = ((string)(AccountNumber));
            }
            this.Adapter.InsertCommand.Parameters[9].Value = ((int)(CustomerID));
            this.Adapter.InsertCommand.Parameters[10].Value = ((int)(ContactID));
            if ((SalesPersonID.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[11].Value = ((int)(SalesPersonID.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[11].Value = System.DBNull.Value;
            }
            if ((TerritoryID.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[12].Value = ((int)(TerritoryID.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[12].Value = System.DBNull.Value;
            }
            this.Adapter.InsertCommand.Parameters[13].Value = ((int)(BillToAddressID));
            this.Adapter.InsertCommand.Parameters[14].Value = ((int)(ShipToAddressID));
            this.Adapter.InsertCommand.Parameters[15].Value = ((int)(ShipMethodID));
            if ((CreditCardID.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[16].Value = ((int)(CreditCardID.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[16].Value = System.DBNull.Value;
            }
            if ((CreditCardApprovalCode == null)) {
                this.Adapter.InsertCommand.Parameters[17].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[17].Value = ((string)(CreditCardApprovalCode));
            }
            if ((CurrencyRateID.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[18].Value = ((int)(CurrencyRateID.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[18].Value = System.DBNull.Value;
            }
            this.Adapter.InsertCommand.Parameters[19].Value = ((decimal)(SubTotal));
            this.Adapter.InsertCommand.Parameters[20].Value = ((decimal)(TaxAmt));
            this.Adapter.InsertCommand.Parameters[21].Value = ((decimal)(Freight));
            if ((TotalDue.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[22].Value = ((decimal)(TotalDue.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[22].Value = System.DBNull.Value;
            }
            if ((Comment == null)) {
                this.Adapter.InsertCommand.Parameters[23].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[23].Value = ((string)(Comment));
            }
            this.Adapter.InsertCommand.Parameters[24].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[25].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    byte RevisionNumber, 
                    System.DateTime OrderDate, 
                    System.DateTime DueDate, 
                    System.Nullable<System.DateTime> ShipDate, 
                    byte Status, 
                    bool OnlineOrderFlag, 
                    string SalesOrderNumber, 
                    string PurchaseOrderNumber, 
                    string AccountNumber, 
                    int CustomerID, 
                    int ContactID, 
                    System.Nullable<int> SalesPersonID, 
                    System.Nullable<int> TerritoryID, 
                    int BillToAddressID, 
                    int ShipToAddressID, 
                    int ShipMethodID, 
                    System.Nullable<int> CreditCardID, 
                    string CreditCardApprovalCode, 
                    System.Nullable<int> CurrencyRateID, 
                    decimal SubTotal, 
                    decimal TaxAmt, 
                    decimal Freight, 
                    System.Nullable<decimal> TotalDue, 
                    string Comment, 
                    System.Guid rowguid, 
                    System.DateTime ModifiedDate, 
                    int Original_SalesOrderID, 
                    byte Original_RevisionNumber, 
                    System.DateTime Original_OrderDate, 
                    System.DateTime Original_DueDate, 
                    System.Nullable<System.DateTime> Original_ShipDate, 
                    byte Original_Status, 
                    bool Original_OnlineOrderFlag, 
                    string Original_SalesOrderNumber, 
                    string Original_PurchaseOrderNumber, 
                    string Original_AccountNumber, 
                    int Original_CustomerID, 
                    int Original_ContactID, 
                    System.Nullable<int> Original_SalesPersonID, 
                    System.Nullable<int> Original_TerritoryID, 
                    int Original_BillToAddressID, 
                    int Original_ShipToAddressID, 
                    int Original_ShipMethodID, 
                    System.Nullable<int> Original_CreditCardID, 
                    string Original_CreditCardApprovalCode, 
                    System.Nullable<int> Original_CurrencyRateID, 
                    decimal Original_SubTotal, 
                    decimal Original_TaxAmt, 
                    decimal Original_Freight, 
                    System.Nullable<decimal> Original_TotalDue, 
                    string Original_Comment, 
                    System.Guid Original_rowguid, 
                    System.DateTime Original_ModifiedDate, 
                    int SalesOrderID) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((byte)(RevisionNumber));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((System.DateTime)(OrderDate));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(DueDate));
            if ((ShipDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(ShipDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[4].Value = ((byte)(Status));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((bool)(OnlineOrderFlag));
            if ((SalesOrderNumber == null)) {
                this.Adapter.UpdateCommand.Parameters[6].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(SalesOrderNumber));
            }
            if ((PurchaseOrderNumber == null)) {
                this.Adapter.UpdateCommand.Parameters[7].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(PurchaseOrderNumber));
            }
            if ((AccountNumber == null)) {
                this.Adapter.UpdateCommand.Parameters[8].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(AccountNumber));
            }
            this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(CustomerID));
            this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(ContactID));
            if ((SalesPersonID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(SalesPersonID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[11].Value = System.DBNull.Value;
            }
            if ((TerritoryID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(TerritoryID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[12].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(BillToAddressID));
            this.Adapter.UpdateCommand.Parameters[14].Value = ((int)(ShipToAddressID));
            this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(ShipMethodID));
            if ((CreditCardID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[16].Value = ((int)(CreditCardID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[16].Value = System.DBNull.Value;
            }
            if ((CreditCardApprovalCode == null)) {
                this.Adapter.UpdateCommand.Parameters[17].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[17].Value = ((string)(CreditCardApprovalCode));
            }
            if ((CurrencyRateID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[18].Value = ((int)(CurrencyRateID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[18].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[19].Value = ((decimal)(SubTotal));
            this.Adapter.UpdateCommand.Parameters[20].Value = ((decimal)(TaxAmt));
            this.Adapter.UpdateCommand.Parameters[21].Value = ((decimal)(Freight));
            if ((TotalDue.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[22].Value = ((decimal)(TotalDue.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[22].Value = System.DBNull.Value;
            }
            if ((Comment == null)) {
                this.Adapter.UpdateCommand.Parameters[23].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[23].Value = ((string)(Comment));
            }
            this.Adapter.UpdateCommand.Parameters[24].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[25].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[26].Value = ((int)(Original_SalesOrderID));
            this.Adapter.UpdateCommand.Parameters[27].Value = ((byte)(Original_RevisionNumber));
            this.Adapter.UpdateCommand.Parameters[28].Value = ((System.DateTime)(Original_OrderDate));
            this.Adapter.UpdateCommand.Parameters[29].Value = ((System.DateTime)(Original_DueDate));
            if ((Original_ShipDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[30].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[31].Value = ((System.DateTime)(Original_ShipDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[30].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[31].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[32].Value = ((byte)(Original_Status));
            this.Adapter.UpdateCommand.Parameters[33].Value = ((bool)(Original_OnlineOrderFlag));
            if ((Original_SalesOrderNumber == null)) {
                this.Adapter.UpdateCommand.Parameters[34].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[35].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[34].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[35].Value = ((string)(Original_SalesOrderNumber));
            }
            if ((Original_PurchaseOrderNumber == null)) {
                this.Adapter.UpdateCommand.Parameters[36].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[37].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[36].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[37].Value = ((string)(Original_PurchaseOrderNumber));
            }
            if ((Original_AccountNumber == null)) {
                this.Adapter.UpdateCommand.Parameters[38].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[39].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[38].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[39].Value = ((string)(Original_AccountNumber));
            }
            this.Adapter.UpdateCommand.Parameters[40].Value = ((int)(Original_CustomerID));
            this.Adapter.UpdateCommand.Parameters[41].Value = ((int)(Original_ContactID));
            if ((Original_SalesPersonID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[42].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[43].Value = ((int)(Original_SalesPersonID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[42].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[43].Value = System.DBNull.Value;
            }
            if ((Original_TerritoryID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[44].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[45].Value = ((int)(Original_TerritoryID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[44].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[45].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[46].Value = ((int)(Original_BillToAddressID));
            this.Adapter.UpdateCommand.Parameters[47].Value = ((int)(Original_ShipToAddressID));
            this.Adapter.UpdateCommand.Parameters[48].Value = ((int)(Original_ShipMethodID));
            if ((Original_CreditCardID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[49].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[50].Value = ((int)(Original_CreditCardID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[49].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[50].Value = System.DBNull.Value;
            }
            if ((Original_CreditCardApprovalCode == null)) {
                this.Adapter.UpdateCommand.Parameters[51].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[52].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[51].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[52].Value = ((string)(Original_CreditCardApprovalCode));
            }
            if ((Original_CurrencyRateID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[53].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[54].Value = ((int)(Original_CurrencyRateID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[53].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[54].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[55].Value = ((decimal)(Original_SubTotal));
            this.Adapter.UpdateCommand.Parameters[56].Value = ((decimal)(Original_TaxAmt));
            this.Adapter.UpdateCommand.Parameters[57].Value = ((decimal)(Original_Freight));
            if ((Original_TotalDue.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[58].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[59].Value = ((decimal)(Original_TotalDue.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[58].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[59].Value = System.DBNull.Value;
            }
            if ((Original_Comment == null)) {
                this.Adapter.UpdateCommand.Parameters[60].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[61].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[60].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[61].Value = ((string)(Original_Comment));
            }
            this.Adapter.UpdateCommand.Parameters[62].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[63].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[64].Value = ((int)(SalesOrderID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 SalesOrderHeaderSalesReasonTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public SalesOrderHeaderSalesReasonTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "SalesOrderHeaderSalesReason";
            tableMapping.ColumnMappings.Add("SalesOrderID", "SalesOrderID");
            tableMapping.ColumnMappings.Add("SalesReasonID", "SalesReasonID");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Sales].[SalesOrderHeaderSalesReason] WHERE (([SalesOrderID] = @Origi" +
                "nal_SalesOrderID) AND ([SalesReasonID] = @Original_SalesReasonID) AND ([Modified" +
                "Date] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesOrderID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesReasonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesReasonID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Sales].[SalesOrderHeaderSalesReason] ([SalesOrderID], [SalesReasonID], [ModifiedDate]) VALUES (@SalesOrderID, @SalesReasonID, @ModifiedDate);
SELECT SalesOrderID, SalesReasonID, ModifiedDate FROM Sales.SalesOrderHeaderSalesReason WHERE (SalesOrderID = @SalesOrderID) AND (SalesReasonID = @SalesReasonID)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesOrderID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesReasonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesReasonID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Sales].[SalesOrderHeaderSalesReason] SET [SalesOrderID] = @SalesOrderID, [SalesReasonID] = @SalesReasonID, [ModifiedDate] = @ModifiedDate WHERE (([SalesOrderID] = @Original_SalesOrderID) AND ([SalesReasonID] = @Original_SalesReasonID) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT SalesOrderID, SalesReasonID, ModifiedDate FROM Sales.SalesOrderHeaderSalesReason WHERE (SalesOrderID = @SalesOrderID) AND (SalesReasonID = @SalesReasonID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesOrderID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesReasonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesReasonID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesOrderID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesOrderID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesReasonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesReasonID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT SalesOrderID, SalesReasonID, ModifiedDate FROM Sales.SalesOrderHeaderSales" +
                "Reason";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.SalesOrderHeaderSalesReasonDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.SalesOrderHeaderSalesReasonDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.SalesOrderHeaderSalesReasonDataTable dataTable = new AdventureWorksDataSet.SalesOrderHeaderSalesReasonDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.SalesOrderHeaderSalesReasonDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "SalesOrderHeaderSalesReason");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_SalesOrderID, int Original_SalesReasonID, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_SalesOrderID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_SalesReasonID));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int SalesOrderID, int SalesReasonID, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(SalesOrderID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((int)(SalesReasonID));
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int SalesOrderID, int SalesReasonID, System.DateTime ModifiedDate, int Original_SalesOrderID, int Original_SalesReasonID, System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(SalesOrderID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(SalesReasonID));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_SalesOrderID));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_SalesReasonID));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 SalesPersonTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public SalesPersonTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "SalesPerson";
            tableMapping.ColumnMappings.Add("SalesPersonID", "SalesPersonID");
            tableMapping.ColumnMappings.Add("TerritoryID", "TerritoryID");
            tableMapping.ColumnMappings.Add("SalesQuota", "SalesQuota");
            tableMapping.ColumnMappings.Add("Bonus", "Bonus");
            tableMapping.ColumnMappings.Add("CommissionPct", "CommissionPct");
            tableMapping.ColumnMappings.Add("SalesYTD", "SalesYTD");
            tableMapping.ColumnMappings.Add("SalesLastYear", "SalesLastYear");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Sales].[SalesPerson] WHERE (([SalesPersonID] = @Original_SalesPersonID) AND ((@IsNull_TerritoryID = 1 AND [TerritoryID] IS NULL) OR ([TerritoryID] = @Original_TerritoryID)) AND ((@IsNull_SalesQuota = 1 AND [SalesQuota] IS NULL) OR ([SalesQuota] = @Original_SalesQuota)) AND ([Bonus] = @Original_Bonus) AND ([CommissionPct] = @Original_CommissionPct) AND ([SalesYTD] = @Original_SalesYTD) AND ([SalesLastYear] = @Original_SalesLastYear) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesPersonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesPersonID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_SalesQuota", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesQuota", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesQuota", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesQuota", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Bonus", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "Bonus", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CommissionPct", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "CommissionPct", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesYTD", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesYTD", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesLastYear", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesLastYear", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Sales].[SalesPerson] ([SalesPersonID], [TerritoryID], [SalesQuota], [Bonus], [CommissionPct], [SalesYTD], [SalesLastYear], [rowguid], [ModifiedDate]) VALUES (@SalesPersonID, @TerritoryID, @SalesQuota, @Bonus, @CommissionPct, @SalesYTD, @SalesLastYear, @rowguid, @ModifiedDate);
SELECT SalesPersonID, TerritoryID, SalesQuota, Bonus, CommissionPct, SalesYTD, SalesLastYear, rowguid, ModifiedDate FROM Sales.SalesPerson WHERE (SalesPersonID = @SalesPersonID)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesPersonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesPersonID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesQuota", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesQuota", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Bonus", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "Bonus", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CommissionPct", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "CommissionPct", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesYTD", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesYTD", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesLastYear", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesLastYear", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Sales].[SalesPerson] SET [SalesPersonID] = @SalesPersonID, [TerritoryID] = @TerritoryID, [SalesQuota] = @SalesQuota, [Bonus] = @Bonus, [CommissionPct] = @CommissionPct, [SalesYTD] = @SalesYTD, [SalesLastYear] = @SalesLastYear, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([SalesPersonID] = @Original_SalesPersonID) AND ((@IsNull_TerritoryID = 1 AND [TerritoryID] IS NULL) OR ([TerritoryID] = @Original_TerritoryID)) AND ((@IsNull_SalesQuota = 1 AND [SalesQuota] IS NULL) OR ([SalesQuota] = @Original_SalesQuota)) AND ([Bonus] = @Original_Bonus) AND ([CommissionPct] = @Original_CommissionPct) AND ([SalesYTD] = @Original_SalesYTD) AND ([SalesLastYear] = @Original_SalesLastYear) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT SalesPersonID, TerritoryID, SalesQuota, Bonus, CommissionPct, SalesYTD, SalesLastYear, rowguid, ModifiedDate FROM Sales.SalesPerson WHERE (SalesPersonID = @SalesPersonID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesPersonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesPersonID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesQuota", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesQuota", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Bonus", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "Bonus", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CommissionPct", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "CommissionPct", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesYTD", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesYTD", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesLastYear", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesLastYear", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesPersonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesPersonID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_SalesQuota", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesQuota", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesQuota", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesQuota", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Bonus", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "Bonus", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CommissionPct", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "CommissionPct", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesYTD", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesYTD", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesLastYear", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesLastYear", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT SalesPersonID, TerritoryID, SalesQuota, Bonus, CommissionPct, SalesYTD, Sa" +
                "lesLastYear, rowguid, ModifiedDate FROM Sales.SalesPerson";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.SalesPersonDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.SalesPersonDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.SalesPersonDataTable dataTable = new AdventureWorksDataSet.SalesPersonDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.SalesPersonDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "SalesPerson");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_SalesPersonID, System.Nullable<int> Original_TerritoryID, System.Nullable<decimal> Original_SalesQuota, decimal Original_Bonus, decimal Original_CommissionPct, decimal Original_SalesYTD, decimal Original_SalesLastYear, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_SalesPersonID));
            if ((Original_TerritoryID.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_TerritoryID.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[2].Value = System.DBNull.Value;
            }
            if ((Original_SalesQuota.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[4].Value = ((decimal)(Original_SalesQuota.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[4].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[5].Value = ((decimal)(Original_Bonus));
            this.Adapter.DeleteCommand.Parameters[6].Value = ((decimal)(Original_CommissionPct));
            this.Adapter.DeleteCommand.Parameters[7].Value = ((decimal)(Original_SalesYTD));
            this.Adapter.DeleteCommand.Parameters[8].Value = ((decimal)(Original_SalesLastYear));
            this.Adapter.DeleteCommand.Parameters[9].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[10].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int SalesPersonID, System.Nullable<int> TerritoryID, System.Nullable<decimal> SalesQuota, decimal Bonus, decimal CommissionPct, decimal SalesYTD, decimal SalesLastYear, System.Guid rowguid, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(SalesPersonID));
            if ((TerritoryID.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[1].Value = ((int)(TerritoryID.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value;
            }
            if ((SalesQuota.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[2].Value = ((decimal)(SalesQuota.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
            }
            this.Adapter.InsertCommand.Parameters[3].Value = ((decimal)(Bonus));
            this.Adapter.InsertCommand.Parameters[4].Value = ((decimal)(CommissionPct));
            this.Adapter.InsertCommand.Parameters[5].Value = ((decimal)(SalesYTD));
            this.Adapter.InsertCommand.Parameters[6].Value = ((decimal)(SalesLastYear));
            this.Adapter.InsertCommand.Parameters[7].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[8].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    int SalesPersonID, 
                    System.Nullable<int> TerritoryID, 
                    System.Nullable<decimal> SalesQuota, 
                    decimal Bonus, 
                    decimal CommissionPct, 
                    decimal SalesYTD, 
                    decimal SalesLastYear, 
                    System.Guid rowguid, 
                    System.DateTime ModifiedDate, 
                    int Original_SalesPersonID, 
                    System.Nullable<int> Original_TerritoryID, 
                    System.Nullable<decimal> Original_SalesQuota, 
                    decimal Original_Bonus, 
                    decimal Original_CommissionPct, 
                    decimal Original_SalesYTD, 
                    decimal Original_SalesLastYear, 
                    System.Guid Original_rowguid, 
                    System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(SalesPersonID));
            if ((TerritoryID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(TerritoryID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value;
            }
            if ((SalesQuota.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[2].Value = ((decimal)(SalesQuota.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[3].Value = ((decimal)(Bonus));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((decimal)(CommissionPct));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((decimal)(SalesYTD));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((decimal)(SalesLastYear));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[8].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_SalesPersonID));
            if ((Original_TerritoryID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Original_TerritoryID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[11].Value = System.DBNull.Value;
            }
            if ((Original_SalesQuota.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[13].Value = ((decimal)(Original_SalesQuota.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[13].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[14].Value = ((decimal)(Original_Bonus));
            this.Adapter.UpdateCommand.Parameters[15].Value = ((decimal)(Original_CommissionPct));
            this.Adapter.UpdateCommand.Parameters[16].Value = ((decimal)(Original_SalesYTD));
            this.Adapter.UpdateCommand.Parameters[17].Value = ((decimal)(Original_SalesLastYear));
            this.Adapter.UpdateCommand.Parameters[18].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[19].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 SalesPersonQuotaHistoryTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public SalesPersonQuotaHistoryTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "SalesPersonQuotaHistory";
            tableMapping.ColumnMappings.Add("SalesPersonID", "SalesPersonID");
            tableMapping.ColumnMappings.Add("QuotaDate", "QuotaDate");
            tableMapping.ColumnMappings.Add("SalesQuota", "SalesQuota");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Sales].[SalesPersonQuotaHistory] WHERE (([SalesPersonID] = @Original_SalesPersonID) AND ([QuotaDate] = @Original_QuotaDate) AND ([SalesQuota] = @Original_SalesQuota) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesPersonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesPersonID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_QuotaDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "QuotaDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesQuota", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesQuota", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Sales].[SalesPersonQuotaHistory] ([SalesPersonID], [QuotaDate], [SalesQuota], [rowguid], [ModifiedDate]) VALUES (@SalesPersonID, @QuotaDate, @SalesQuota, @rowguid, @ModifiedDate);
SELECT SalesPersonID, QuotaDate, SalesQuota, rowguid, ModifiedDate FROM Sales.SalesPersonQuotaHistory WHERE (QuotaDate = @QuotaDate) AND (SalesPersonID = @SalesPersonID)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesPersonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesPersonID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@QuotaDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "QuotaDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesQuota", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesQuota", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Sales].[SalesPersonQuotaHistory] SET [SalesPersonID] = @SalesPersonID, [QuotaDate] = @QuotaDate, [SalesQuota] = @SalesQuota, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([SalesPersonID] = @Original_SalesPersonID) AND ([QuotaDate] = @Original_QuotaDate) AND ([SalesQuota] = @Original_SalesQuota) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT SalesPersonID, QuotaDate, SalesQuota, rowguid, ModifiedDate FROM Sales.SalesPersonQuotaHistory WHERE (QuotaDate = @QuotaDate) AND (SalesPersonID = @SalesPersonID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesPersonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesPersonID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@QuotaDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "QuotaDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesQuota", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesQuota", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesPersonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesPersonID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_QuotaDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "QuotaDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesQuota", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesQuota", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT SalesPersonID, QuotaDate, SalesQuota, rowguid, ModifiedDate FROM Sales.Sal" +
                "esPersonQuotaHistory";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.SalesPersonQuotaHistoryDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.SalesPersonQuotaHistoryDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.SalesPersonQuotaHistoryDataTable dataTable = new AdventureWorksDataSet.SalesPersonQuotaHistoryDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.SalesPersonQuotaHistoryDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "SalesPersonQuotaHistory");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_SalesPersonID, System.DateTime Original_QuotaDate, decimal Original_SalesQuota, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_SalesPersonID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((System.DateTime)(Original_QuotaDate));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((decimal)(Original_SalesQuota));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[4].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int SalesPersonID, System.DateTime QuotaDate, decimal SalesQuota, System.Guid rowguid, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(SalesPersonID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((System.DateTime)(QuotaDate));
            this.Adapter.InsertCommand.Parameters[2].Value = ((decimal)(SalesQuota));
            this.Adapter.InsertCommand.Parameters[3].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int SalesPersonID, System.DateTime QuotaDate, decimal SalesQuota, System.Guid rowguid, System.DateTime ModifiedDate, int Original_SalesPersonID, System.DateTime Original_QuotaDate, decimal Original_SalesQuota, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(SalesPersonID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((System.DateTime)(QuotaDate));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((decimal)(SalesQuota));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_SalesPersonID));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(Original_QuotaDate));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((decimal)(Original_SalesQuota));
            this.Adapter.UpdateCommand.Parameters[8].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 SalesReasonTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public SalesReasonTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "SalesReason";
            tableMapping.ColumnMappings.Add("SalesReasonID", "SalesReasonID");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("ReasonType", "ReasonType");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Sales].[SalesReason] WHERE (([SalesReasonID] = @Original_SalesReason" +
                "ID) AND ([Name] = @Original_Name) AND ([ReasonType] = @Original_ReasonType) AND " +
                "([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesReasonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesReasonID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ReasonType", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ReasonType", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = "INSERT INTO [Sales].[SalesReason] ([Name], [ReasonType], [ModifiedDate]) VALUES (" +
                "@Name, @ReasonType, @ModifiedDate);\r\nSELECT SalesReasonID, Name, ReasonType, Mod" +
                "ifiedDate FROM Sales.SalesReason WHERE (SalesReasonID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ReasonType", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ReasonType", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Sales].[SalesReason] SET [Name] = @Name, [ReasonType] = @ReasonType, [ModifiedDate] = @ModifiedDate WHERE (([SalesReasonID] = @Original_SalesReasonID) AND ([Name] = @Original_Name) AND ([ReasonType] = @Original_ReasonType) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT SalesReasonID, Name, ReasonType, ModifiedDate FROM Sales.SalesReason WHERE (SalesReasonID = @SalesReasonID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ReasonType", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ReasonType", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesReasonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesReasonID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ReasonType", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ReasonType", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesReasonID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "SalesReasonID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT SalesReasonID, Name, ReasonType, ModifiedDate FROM Sales.SalesReason";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.SalesReasonDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.SalesReasonDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.SalesReasonDataTable dataTable = new AdventureWorksDataSet.SalesReasonDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.SalesReasonDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "SalesReason");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_SalesReasonID, string Original_Name, string Original_ReasonType, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_SalesReasonID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name));
            }
            if ((Original_ReasonType == null)) {
                throw new System.ArgumentNullException("Original_ReasonType");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_ReasonType));
            }
            this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string Name, string ReasonType, System.DateTime ModifiedDate) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name));
            }
            if ((ReasonType == null)) {
                throw new System.ArgumentNullException("ReasonType");
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(ReasonType));
            }
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(string Name, string ReasonType, System.DateTime ModifiedDate, int Original_SalesReasonID, string Original_Name, string Original_ReasonType, System.DateTime Original_ModifiedDate, int SalesReasonID) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name));
            }
            if ((ReasonType == null)) {
                throw new System.ArgumentNullException("ReasonType");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(ReasonType));
            }
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_SalesReasonID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_Name));
            }
            if ((Original_ReasonType == null)) {
                throw new System.ArgumentNullException("Original_ReasonType");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Original_ReasonType));
            }
            this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(SalesReasonID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 SalesTaxRateTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public SalesTaxRateTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "SalesTaxRate";
            tableMapping.ColumnMappings.Add("SalesTaxRateID", "SalesTaxRateID");
            tableMapping.ColumnMappings.Add("StateProvinceID", "StateProvinceID");
            tableMapping.ColumnMappings.Add("TaxType", "TaxType");
            tableMapping.ColumnMappings.Add("TaxRate", "TaxRate");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Sales].[SalesTaxRate] WHERE (([SalesTaxRateID] = @Original_SalesTaxRateID) AND ([StateProvinceID] = @Original_StateProvinceID) AND ([TaxType] = @Original_TaxType) AND ([TaxRate] = @Original_TaxRate) AND ([Name] = @Original_Name) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesTaxRateID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesTaxRateID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StateProvinceID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "StateProvinceID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TaxType", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "TaxType", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TaxRate", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "TaxRate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Sales].[SalesTaxRate] ([StateProvinceID], [TaxType], [TaxRate], [Name], [rowguid], [ModifiedDate]) VALUES (@StateProvinceID, @TaxType, @TaxRate, @Name, @rowguid, @ModifiedDate);
SELECT SalesTaxRateID, StateProvinceID, TaxType, TaxRate, Name, rowguid, ModifiedDate FROM Sales.SalesTaxRate WHERE (SalesTaxRateID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StateProvinceID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "StateProvinceID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TaxType", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "TaxType", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TaxRate", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "TaxRate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Sales].[SalesTaxRate] SET [StateProvinceID] = @StateProvinceID, [TaxType] = @TaxType, [TaxRate] = @TaxRate, [Name] = @Name, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([SalesTaxRateID] = @Original_SalesTaxRateID) AND ([StateProvinceID] = @Original_StateProvinceID) AND ([TaxType] = @Original_TaxType) AND ([TaxRate] = @Original_TaxRate) AND ([Name] = @Original_Name) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT SalesTaxRateID, StateProvinceID, TaxType, TaxRate, Name, rowguid, ModifiedDate FROM Sales.SalesTaxRate WHERE (SalesTaxRateID = @SalesTaxRateID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StateProvinceID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "StateProvinceID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TaxType", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "TaxType", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TaxRate", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "TaxRate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesTaxRateID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesTaxRateID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StateProvinceID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "StateProvinceID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TaxType", System.Data.SqlDbType.TinyInt, 0, System.Data.ParameterDirection.Input, 0, 0, "TaxType", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TaxRate", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "TaxRate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesTaxRateID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "SalesTaxRateID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT SalesTaxRateID, StateProvinceID, TaxType, TaxRate, Name, rowguid, Modified" +
                "Date FROM Sales.SalesTaxRate";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.SalesTaxRateDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.SalesTaxRateDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.SalesTaxRateDataTable dataTable = new AdventureWorksDataSet.SalesTaxRateDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.SalesTaxRateDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "SalesTaxRate");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_SalesTaxRateID, int Original_StateProvinceID, byte Original_TaxType, decimal Original_TaxRate, string Original_Name, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_SalesTaxRateID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_StateProvinceID));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((byte)(Original_TaxType));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((decimal)(Original_TaxRate));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_Name));
            }
            this.Adapter.DeleteCommand.Parameters[5].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[6].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int StateProvinceID, byte TaxType, decimal TaxRate, string Name, System.Guid rowguid, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(StateProvinceID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((byte)(TaxType));
            this.Adapter.InsertCommand.Parameters[2].Value = ((decimal)(TaxRate));
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Name));
            }
            this.Adapter.InsertCommand.Parameters[4].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[5].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int StateProvinceID, byte TaxType, decimal TaxRate, string Name, System.Guid rowguid, System.DateTime ModifiedDate, int Original_SalesTaxRateID, int Original_StateProvinceID, byte Original_TaxType, decimal Original_TaxRate, string Original_Name, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate, int SalesTaxRateID) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(StateProvinceID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((byte)(TaxType));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((decimal)(TaxRate));
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Name));
            }
            this.Adapter.UpdateCommand.Parameters[4].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_SalesTaxRateID));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_StateProvinceID));
            this.Adapter.UpdateCommand.Parameters[8].Value = ((byte)(Original_TaxType));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((decimal)(Original_TaxRate));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_Name));
            }
            this.Adapter.UpdateCommand.Parameters[11].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[12].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(SalesTaxRateID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 SalesTerritoryTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public SalesTerritoryTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "SalesTerritory";
            tableMapping.ColumnMappings.Add("TerritoryID", "TerritoryID");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("CountryRegionCode", "CountryRegionCode");
            tableMapping.ColumnMappings.Add("Group", "Group");
            tableMapping.ColumnMappings.Add("SalesYTD", "SalesYTD");
            tableMapping.ColumnMappings.Add("SalesLastYear", "SalesLastYear");
            tableMapping.ColumnMappings.Add("CostYTD", "CostYTD");
            tableMapping.ColumnMappings.Add("CostLastYear", "CostLastYear");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Sales].[SalesTerritory] WHERE (([TerritoryID] = @Original_TerritoryID) AND ([Name] = @Original_Name) AND ([CountryRegionCode] = @Original_CountryRegionCode) AND ([Group] = @Original_Group) AND ([SalesYTD] = @Original_SalesYTD) AND ([SalesLastYear] = @Original_SalesLastYear) AND ([CostYTD] = @Original_CostYTD) AND ([CostLastYear] = @Original_CostLastYear) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CountryRegionCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CountryRegionCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Group", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Group", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesYTD", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesYTD", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesLastYear", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesLastYear", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CostYTD", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "CostYTD", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CostLastYear", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "CostLastYear", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Sales].[SalesTerritory] ([Name], [CountryRegionCode], [Group], [SalesYTD], [SalesLastYear], [CostYTD], [CostLastYear], [rowguid], [ModifiedDate]) VALUES (@Name, @CountryRegionCode, @Group, @SalesYTD, @SalesLastYear, @CostYTD, @CostLastYear, @rowguid, @ModifiedDate);
SELECT TerritoryID, Name, CountryRegionCode, [Group], SalesYTD, SalesLastYear, CostYTD, CostLastYear, rowguid, ModifiedDate FROM Sales.SalesTerritory WHERE (TerritoryID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CountryRegionCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CountryRegionCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Group", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Group", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesYTD", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesYTD", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesLastYear", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesLastYear", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CostYTD", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "CostYTD", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CostLastYear", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "CostLastYear", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Sales].[SalesTerritory] SET [Name] = @Name, [CountryRegionCode] = @CountryRegionCode, [Group] = @Group, [SalesYTD] = @SalesYTD, [SalesLastYear] = @SalesLastYear, [CostYTD] = @CostYTD, [CostLastYear] = @CostLastYear, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([TerritoryID] = @Original_TerritoryID) AND ([Name] = @Original_Name) AND ([CountryRegionCode] = @Original_CountryRegionCode) AND ([Group] = @Original_Group) AND ([SalesYTD] = @Original_SalesYTD) AND ([SalesLastYear] = @Original_SalesLastYear) AND ([CostYTD] = @Original_CostYTD) AND ([CostLastYear] = @Original_CostLastYear) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT TerritoryID, Name, CountryRegionCode, [Group], SalesYTD, SalesLastYear, CostYTD, CostLastYear, rowguid, ModifiedDate FROM Sales.SalesTerritory WHERE (TerritoryID = @TerritoryID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CountryRegionCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CountryRegionCode", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Group", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Group", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesYTD", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesYTD", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesLastYear", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesLastYear", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CostYTD", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "CostYTD", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CostLastYear", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "CostLastYear", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CountryRegionCode", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "CountryRegionCode", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Group", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Group", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesYTD", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesYTD", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesLastYear", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesLastYear", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CostYTD", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "CostYTD", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CostLastYear", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "CostLastYear", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TerritoryID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT TerritoryID, Name, CountryRegionCode, [Group], SalesYTD, SalesLastYear, Co" +
                "stYTD, CostLastYear, rowguid, ModifiedDate FROM Sales.SalesTerritory";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.SalesTerritoryDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.SalesTerritoryDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.SalesTerritoryDataTable dataTable = new AdventureWorksDataSet.SalesTerritoryDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.SalesTerritoryDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "SalesTerritory");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_TerritoryID, string Original_Name, string Original_CountryRegionCode, string Original_Group, decimal Original_SalesYTD, decimal Original_SalesLastYear, decimal Original_CostYTD, decimal Original_CostLastYear, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_TerritoryID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name));
            }
            if ((Original_CountryRegionCode == null)) {
                throw new System.ArgumentNullException("Original_CountryRegionCode");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_CountryRegionCode));
            }
            if ((Original_Group == null)) {
                throw new System.ArgumentNullException("Original_Group");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_Group));
            }
            this.Adapter.DeleteCommand.Parameters[4].Value = ((decimal)(Original_SalesYTD));
            this.Adapter.DeleteCommand.Parameters[5].Value = ((decimal)(Original_SalesLastYear));
            this.Adapter.DeleteCommand.Parameters[6].Value = ((decimal)(Original_CostYTD));
            this.Adapter.DeleteCommand.Parameters[7].Value = ((decimal)(Original_CostLastYear));
            this.Adapter.DeleteCommand.Parameters[8].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[9].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string Name, string CountryRegionCode, string Group, decimal SalesYTD, decimal SalesLastYear, decimal CostYTD, decimal CostLastYear, System.Guid rowguid, System.DateTime ModifiedDate) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name));
            }
            if ((CountryRegionCode == null)) {
                throw new System.ArgumentNullException("CountryRegionCode");
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(CountryRegionCode));
            }
            if ((Group == null)) {
                throw new System.ArgumentNullException("Group");
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Group));
            }
            this.Adapter.InsertCommand.Parameters[3].Value = ((decimal)(SalesYTD));
            this.Adapter.InsertCommand.Parameters[4].Value = ((decimal)(SalesLastYear));
            this.Adapter.InsertCommand.Parameters[5].Value = ((decimal)(CostYTD));
            this.Adapter.InsertCommand.Parameters[6].Value = ((decimal)(CostLastYear));
            this.Adapter.InsertCommand.Parameters[7].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[8].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    string Name, 
                    string CountryRegionCode, 
                    string Group, 
                    decimal SalesYTD, 
                    decimal SalesLastYear, 
                    decimal CostYTD, 
                    decimal CostLastYear, 
                    System.Guid rowguid, 
                    System.DateTime ModifiedDate, 
                    int Original_TerritoryID, 
                    string Original_Name, 
                    string Original_CountryRegionCode, 
                    string Original_Group, 
                    decimal Original_SalesYTD, 
                    decimal Original_SalesLastYear, 
                    decimal Original_CostYTD, 
                    decimal Original_CostLastYear, 
                    System.Guid Original_rowguid, 
                    System.DateTime Original_ModifiedDate, 
                    int TerritoryID) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name));
            }
            if ((CountryRegionCode == null)) {
                throw new System.ArgumentNullException("CountryRegionCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(CountryRegionCode));
            }
            if ((Group == null)) {
                throw new System.ArgumentNullException("Group");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Group));
            }
            this.Adapter.UpdateCommand.Parameters[3].Value = ((decimal)(SalesYTD));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((decimal)(SalesLastYear));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((decimal)(CostYTD));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((decimal)(CostLastYear));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[8].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_TerritoryID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_Name));
            }
            if ((Original_CountryRegionCode == null)) {
                throw new System.ArgumentNullException("Original_CountryRegionCode");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_CountryRegionCode));
            }
            if ((Original_Group == null)) {
                throw new System.ArgumentNullException("Original_Group");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Original_Group));
            }
            this.Adapter.UpdateCommand.Parameters[13].Value = ((decimal)(Original_SalesYTD));
            this.Adapter.UpdateCommand.Parameters[14].Value = ((decimal)(Original_SalesLastYear));
            this.Adapter.UpdateCommand.Parameters[15].Value = ((decimal)(Original_CostYTD));
            this.Adapter.UpdateCommand.Parameters[16].Value = ((decimal)(Original_CostLastYear));
            this.Adapter.UpdateCommand.Parameters[17].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[18].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(TerritoryID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 SalesTerritoryHistoryTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public SalesTerritoryHistoryTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "SalesTerritoryHistory";
            tableMapping.ColumnMappings.Add("SalesPersonID", "SalesPersonID");
            tableMapping.ColumnMappings.Add("TerritoryID", "TerritoryID");
            tableMapping.ColumnMappings.Add("StartDate", "StartDate");
            tableMapping.ColumnMappings.Add("EndDate", "EndDate");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Sales].[SalesTerritoryHistory] WHERE (([SalesPersonID] = @Original_SalesPersonID) AND ([TerritoryID] = @Original_TerritoryID) AND ([StartDate] = @Original_StartDate) AND ((@IsNull_EndDate = 1 AND [EndDate] IS NULL) OR ([EndDate] = @Original_EndDate)) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesPersonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesPersonID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_EndDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Sales].[SalesTerritoryHistory] ([SalesPersonID], [TerritoryID], [StartDate], [EndDate], [rowguid], [ModifiedDate]) VALUES (@SalesPersonID, @TerritoryID, @StartDate, @EndDate, @rowguid, @ModifiedDate);
SELECT SalesPersonID, TerritoryID, StartDate, EndDate, rowguid, ModifiedDate FROM Sales.SalesTerritoryHistory WHERE (SalesPersonID = @SalesPersonID) AND (StartDate = @StartDate) AND (TerritoryID = @TerritoryID)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesPersonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesPersonID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Sales].[SalesTerritoryHistory] SET [SalesPersonID] = @SalesPersonID, [TerritoryID] = @TerritoryID, [StartDate] = @StartDate, [EndDate] = @EndDate, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([SalesPersonID] = @Original_SalesPersonID) AND ([TerritoryID] = @Original_TerritoryID) AND ([StartDate] = @Original_StartDate) AND ((@IsNull_EndDate = 1 AND [EndDate] IS NULL) OR ([EndDate] = @Original_EndDate)) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT SalesPersonID, TerritoryID, StartDate, EndDate, rowguid, ModifiedDate FROM Sales.SalesTerritoryHistory WHERE (SalesPersonID = @SalesPersonID) AND (StartDate = @StartDate) AND (TerritoryID = @TerritoryID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesPersonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesPersonID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesPersonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesPersonID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TerritoryID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TerritoryID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_EndDate", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT SalesPersonID, TerritoryID, StartDate, EndDate, rowguid, ModifiedDate FROM" +
                " Sales.SalesTerritoryHistory";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.SalesTerritoryHistoryDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.SalesTerritoryHistoryDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.SalesTerritoryHistoryDataTable dataTable = new AdventureWorksDataSet.SalesTerritoryHistoryDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.SalesTerritoryHistoryDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "SalesTerritoryHistory");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_SalesPersonID, int Original_TerritoryID, System.DateTime Original_StartDate, System.Nullable<System.DateTime> Original_EndDate, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_SalesPersonID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_TerritoryID));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((System.DateTime)(Original_StartDate));
            if ((Original_EndDate.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[4].Value = ((System.DateTime)(Original_EndDate.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[4].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[5].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[6].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int SalesPersonID, int TerritoryID, System.DateTime StartDate, System.Nullable<System.DateTime> EndDate, System.Guid rowguid, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(SalesPersonID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((int)(TerritoryID));
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(StartDate));
            if ((EndDate.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[3].Value = ((System.DateTime)(EndDate.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value;
            }
            this.Adapter.InsertCommand.Parameters[4].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[5].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int SalesPersonID, int TerritoryID, System.DateTime StartDate, System.Nullable<System.DateTime> EndDate, System.Guid rowguid, System.DateTime ModifiedDate, int Original_SalesPersonID, int Original_TerritoryID, System.DateTime Original_StartDate, System.Nullable<System.DateTime> Original_EndDate, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(SalesPersonID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(TerritoryID));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(StartDate));
            if ((EndDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(EndDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[4].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_SalesPersonID));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_TerritoryID));
            this.Adapter.UpdateCommand.Parameters[8].Value = ((System.DateTime)(Original_StartDate));
            if ((Original_EndDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[10].Value = ((System.DateTime)(Original_EndDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[10].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[11].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[12].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 ShoppingCartItemTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public ShoppingCartItemTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "ShoppingCartItem";
            tableMapping.ColumnMappings.Add("ShoppingCartItemID", "ShoppingCartItemID");
            tableMapping.ColumnMappings.Add("ShoppingCartID", "ShoppingCartID");
            tableMapping.ColumnMappings.Add("Quantity", "Quantity");
            tableMapping.ColumnMappings.Add("ProductID", "ProductID");
            tableMapping.ColumnMappings.Add("DateCreated", "DateCreated");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Sales].[ShoppingCartItem] WHERE (([ShoppingCartItemID] = @Original_ShoppingCartItemID) AND ([ShoppingCartID] = @Original_ShoppingCartID) AND ([Quantity] = @Original_Quantity) AND ([ProductID] = @Original_ProductID) AND ([DateCreated] = @Original_DateCreated) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShoppingCartItemID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShoppingCartItemID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShoppingCartID", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShoppingCartID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Quantity", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Quantity", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_DateCreated", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "DateCreated", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Sales].[ShoppingCartItem] ([ShoppingCartID], [Quantity], [ProductID], [DateCreated], [ModifiedDate]) VALUES (@ShoppingCartID, @Quantity, @ProductID, @DateCreated, @ModifiedDate);
SELECT ShoppingCartItemID, ShoppingCartID, Quantity, ProductID, DateCreated, ModifiedDate FROM Sales.ShoppingCartItem WHERE (ShoppingCartItemID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShoppingCartID", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShoppingCartID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Quantity", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Quantity", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DateCreated", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "DateCreated", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Sales].[ShoppingCartItem] SET [ShoppingCartID] = @ShoppingCartID, [Quantity] = @Quantity, [ProductID] = @ProductID, [DateCreated] = @DateCreated, [ModifiedDate] = @ModifiedDate WHERE (([ShoppingCartItemID] = @Original_ShoppingCartItemID) AND ([ShoppingCartID] = @Original_ShoppingCartID) AND ([Quantity] = @Original_Quantity) AND ([ProductID] = @Original_ProductID) AND ([DateCreated] = @Original_DateCreated) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT ShoppingCartItemID, ShoppingCartID, Quantity, ProductID, DateCreated, ModifiedDate FROM Sales.ShoppingCartItem WHERE (ShoppingCartItemID = @ShoppingCartItemID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShoppingCartID", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShoppingCartID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Quantity", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Quantity", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DateCreated", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "DateCreated", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShoppingCartItemID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ShoppingCartItemID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ShoppingCartID", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "ShoppingCartID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Quantity", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Quantity", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_DateCreated", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "DateCreated", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ShoppingCartItemID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "ShoppingCartItemID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT ShoppingCartItemID, ShoppingCartID, Quantity, ProductID, DateCreated, Modi" +
                "fiedDate FROM Sales.ShoppingCartItem";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.ShoppingCartItemDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.ShoppingCartItemDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.ShoppingCartItemDataTable dataTable = new AdventureWorksDataSet.ShoppingCartItemDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.ShoppingCartItemDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "ShoppingCartItem");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_ShoppingCartItemID, string Original_ShoppingCartID, int Original_Quantity, int Original_ProductID, System.DateTime Original_DateCreated, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ShoppingCartItemID));
            if ((Original_ShoppingCartID == null)) {
                throw new System.ArgumentNullException("Original_ShoppingCartID");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_ShoppingCartID));
            }
            this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_Quantity));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(Original_ProductID));
            this.Adapter.DeleteCommand.Parameters[4].Value = ((System.DateTime)(Original_DateCreated));
            this.Adapter.DeleteCommand.Parameters[5].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string ShoppingCartID, int Quantity, int ProductID, System.DateTime DateCreated, System.DateTime ModifiedDate) {
            if ((ShoppingCartID == null)) {
                throw new System.ArgumentNullException("ShoppingCartID");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(ShoppingCartID));
            }
            this.Adapter.InsertCommand.Parameters[1].Value = ((int)(Quantity));
            this.Adapter.InsertCommand.Parameters[2].Value = ((int)(ProductID));
            this.Adapter.InsertCommand.Parameters[3].Value = ((System.DateTime)(DateCreated));
            this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(string ShoppingCartID, int Quantity, int ProductID, System.DateTime DateCreated, System.DateTime ModifiedDate, int Original_ShoppingCartItemID, string Original_ShoppingCartID, int Original_Quantity, int Original_ProductID, System.DateTime Original_DateCreated, System.DateTime Original_ModifiedDate, int ShoppingCartItemID) {
            if ((ShoppingCartID == null)) {
                throw new System.ArgumentNullException("ShoppingCartID");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(ShoppingCartID));
            }
            this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Quantity));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(ProductID));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(DateCreated));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_ShoppingCartItemID));
            if ((Original_ShoppingCartID == null)) {
                throw new System.ArgumentNullException("Original_ShoppingCartID");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_ShoppingCartID));
            }
            this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_Quantity));
            this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Original_ProductID));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((System.DateTime)(Original_DateCreated));
            this.Adapter.UpdateCommand.Parameters[10].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(ShoppingCartItemID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 SpecialOfferTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public SpecialOfferTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "SpecialOffer";
            tableMapping.ColumnMappings.Add("SpecialOfferID", "SpecialOfferID");
            tableMapping.ColumnMappings.Add("Description", "Description");
            tableMapping.ColumnMappings.Add("DiscountPct", "DiscountPct");
            tableMapping.ColumnMappings.Add("Type", "Type");
            tableMapping.ColumnMappings.Add("Category", "Category");
            tableMapping.ColumnMappings.Add("StartDate", "StartDate");
            tableMapping.ColumnMappings.Add("EndDate", "EndDate");
            tableMapping.ColumnMappings.Add("MinQty", "MinQty");
            tableMapping.ColumnMappings.Add("MaxQty", "MaxQty");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Sales].[SpecialOffer] WHERE (([SpecialOfferID] = @Original_SpecialOfferID) AND ([Description] = @Original_Description) AND ([DiscountPct] = @Original_DiscountPct) AND ([Type] = @Original_Type) AND ([Category] = @Original_Category) AND ([StartDate] = @Original_StartDate) AND ([EndDate] = @Original_EndDate) AND ([MinQty] = @Original_MinQty) AND ((@IsNull_MaxQty = 1 AND [MaxQty] IS NULL) OR ([MaxQty] = @Original_MaxQty)) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SpecialOfferID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SpecialOfferID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Description", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Description", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_DiscountPct", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "DiscountPct", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Type", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Type", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Category", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Category", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_MinQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "MinQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_MaxQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "MaxQty", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_MaxQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "MaxQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Sales].[SpecialOffer] ([Description], [DiscountPct], [Type], [Category], [StartDate], [EndDate], [MinQty], [MaxQty], [rowguid], [ModifiedDate]) VALUES (@Description, @DiscountPct, @Type, @Category, @StartDate, @EndDate, @MinQty, @MaxQty, @rowguid, @ModifiedDate);
SELECT SpecialOfferID, Description, DiscountPct, Type, Category, StartDate, EndDate, MinQty, MaxQty, rowguid, ModifiedDate FROM Sales.SpecialOffer WHERE (SpecialOfferID = @@IDENTITY)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Description", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Description", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DiscountPct", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "DiscountPct", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Type", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Type", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Category", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Category", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MinQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "MinQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MaxQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "MaxQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Sales].[SpecialOffer] SET [Description] = @Description, [DiscountPct] = @DiscountPct, [Type] = @Type, [Category] = @Category, [StartDate] = @StartDate, [EndDate] = @EndDate, [MinQty] = @MinQty, [MaxQty] = @MaxQty, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([SpecialOfferID] = @Original_SpecialOfferID) AND ([Description] = @Original_Description) AND ([DiscountPct] = @Original_DiscountPct) AND ([Type] = @Original_Type) AND ([Category] = @Original_Category) AND ([StartDate] = @Original_StartDate) AND ([EndDate] = @Original_EndDate) AND ([MinQty] = @Original_MinQty) AND ((@IsNull_MaxQty = 1 AND [MaxQty] IS NULL) OR ([MaxQty] = @Original_MaxQty)) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT SpecialOfferID, Description, DiscountPct, Type, Category, StartDate, EndDate, MinQty, MaxQty, rowguid, ModifiedDate FROM Sales.SpecialOffer WHERE (SpecialOfferID = @SpecialOfferID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Description", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Description", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DiscountPct", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "DiscountPct", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Type", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Type", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Category", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Category", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MinQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "MinQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MaxQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "MaxQty", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SpecialOfferID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SpecialOfferID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Description", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Description", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_DiscountPct", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "DiscountPct", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Type", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Type", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Category", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Category", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StartDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "StartDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_EndDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "EndDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_MinQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "MinQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_MaxQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "MaxQty", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_MaxQty", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "MaxQty", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SpecialOfferID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "SpecialOfferID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT SpecialOfferID, Description, DiscountPct, Type, Category, StartDate, EndDa" +
                "te, MinQty, MaxQty, rowguid, ModifiedDate FROM Sales.SpecialOffer";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.SpecialOfferDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.SpecialOfferDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.SpecialOfferDataTable dataTable = new AdventureWorksDataSet.SpecialOfferDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.SpecialOfferDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "SpecialOffer");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_SpecialOfferID, string Original_Description, decimal Original_DiscountPct, string Original_Type, string Original_Category, System.DateTime Original_StartDate, System.DateTime Original_EndDate, int Original_MinQty, System.Nullable<int> Original_MaxQty, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_SpecialOfferID));
            if ((Original_Description == null)) {
                throw new System.ArgumentNullException("Original_Description");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Description));
            }
            this.Adapter.DeleteCommand.Parameters[2].Value = ((decimal)(Original_DiscountPct));
            if ((Original_Type == null)) {
                throw new System.ArgumentNullException("Original_Type");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_Type));
            }
            if ((Original_Category == null)) {
                throw new System.ArgumentNullException("Original_Category");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_Category));
            }
            this.Adapter.DeleteCommand.Parameters[5].Value = ((System.DateTime)(Original_StartDate));
            this.Adapter.DeleteCommand.Parameters[6].Value = ((System.DateTime)(Original_EndDate));
            this.Adapter.DeleteCommand.Parameters[7].Value = ((int)(Original_MinQty));
            if ((Original_MaxQty.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[8].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[9].Value = ((int)(Original_MaxQty.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[8].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[9].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[10].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[11].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string Description, decimal DiscountPct, string Type, string Category, System.DateTime StartDate, System.DateTime EndDate, int MinQty, System.Nullable<int> MaxQty, System.Guid rowguid, System.DateTime ModifiedDate) {
            if ((Description == null)) {
                throw new System.ArgumentNullException("Description");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Description));
            }
            this.Adapter.InsertCommand.Parameters[1].Value = ((decimal)(DiscountPct));
            if ((Type == null)) {
                throw new System.ArgumentNullException("Type");
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Type));
            }
            if ((Category == null)) {
                throw new System.ArgumentNullException("Category");
            }
            else {
                this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Category));
            }
            this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(StartDate));
            this.Adapter.InsertCommand.Parameters[5].Value = ((System.DateTime)(EndDate));
            this.Adapter.InsertCommand.Parameters[6].Value = ((int)(MinQty));
            if ((MaxQty.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[7].Value = ((int)(MaxQty.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[7].Value = System.DBNull.Value;
            }
            this.Adapter.InsertCommand.Parameters[8].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[9].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    string Description, 
                    decimal DiscountPct, 
                    string Type, 
                    string Category, 
                    System.DateTime StartDate, 
                    System.DateTime EndDate, 
                    int MinQty, 
                    System.Nullable<int> MaxQty, 
                    System.Guid rowguid, 
                    System.DateTime ModifiedDate, 
                    int Original_SpecialOfferID, 
                    string Original_Description, 
                    decimal Original_DiscountPct, 
                    string Original_Type, 
                    string Original_Category, 
                    System.DateTime Original_StartDate, 
                    System.DateTime Original_EndDate, 
                    int Original_MinQty, 
                    System.Nullable<int> Original_MaxQty, 
                    System.Guid Original_rowguid, 
                    System.DateTime Original_ModifiedDate, 
                    int SpecialOfferID) {
            if ((Description == null)) {
                throw new System.ArgumentNullException("Description");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Description));
            }
            this.Adapter.UpdateCommand.Parameters[1].Value = ((decimal)(DiscountPct));
            if ((Type == null)) {
                throw new System.ArgumentNullException("Type");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Type));
            }
            if ((Category == null)) {
                throw new System.ArgumentNullException("Category");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Category));
            }
            this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(StartDate));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(EndDate));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(MinQty));
            if ((MaxQty.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(MaxQty.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[7].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[8].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_SpecialOfferID));
            if ((Original_Description == null)) {
                throw new System.ArgumentNullException("Original_Description");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_Description));
            }
            this.Adapter.UpdateCommand.Parameters[12].Value = ((decimal)(Original_DiscountPct));
            if ((Original_Type == null)) {
                throw new System.ArgumentNullException("Original_Type");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[13].Value = ((string)(Original_Type));
            }
            if ((Original_Category == null)) {
                throw new System.ArgumentNullException("Original_Category");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_Category));
            }
            this.Adapter.UpdateCommand.Parameters[15].Value = ((System.DateTime)(Original_StartDate));
            this.Adapter.UpdateCommand.Parameters[16].Value = ((System.DateTime)(Original_EndDate));
            this.Adapter.UpdateCommand.Parameters[17].Value = ((int)(Original_MinQty));
            if ((Original_MaxQty.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[18].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(Original_MaxQty.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[18].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[19].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[20].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[21].Value = ((System.DateTime)(Original_ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[22].Value = ((int)(SpecialOfferID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 SpecialOfferProductTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public SpecialOfferProductTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "SpecialOfferProduct";
            tableMapping.ColumnMappings.Add("SpecialOfferID", "SpecialOfferID");
            tableMapping.ColumnMappings.Add("ProductID", "ProductID");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Sales].[SpecialOfferProduct] WHERE (([SpecialOfferID] = @Original_Sp" +
                "ecialOfferID) AND ([ProductID] = @Original_ProductID) AND ([rowguid] = @Original" +
                "_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SpecialOfferID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SpecialOfferID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Sales].[SpecialOfferProduct] ([SpecialOfferID], [ProductID], [rowguid], [ModifiedDate]) VALUES (@SpecialOfferID, @ProductID, @rowguid, @ModifiedDate);
SELECT SpecialOfferID, ProductID, rowguid, ModifiedDate FROM Sales.SpecialOfferProduct WHERE (ProductID = @ProductID) AND (SpecialOfferID = @SpecialOfferID)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SpecialOfferID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SpecialOfferID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Sales].[SpecialOfferProduct] SET [SpecialOfferID] = @SpecialOfferID, [ProductID] = @ProductID, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([SpecialOfferID] = @Original_SpecialOfferID) AND ([ProductID] = @Original_ProductID) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT SpecialOfferID, ProductID, rowguid, ModifiedDate FROM Sales.SpecialOfferProduct WHERE (ProductID = @ProductID) AND (SpecialOfferID = @SpecialOfferID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SpecialOfferID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SpecialOfferID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SpecialOfferID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SpecialOfferID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_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.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT SpecialOfferID, ProductID, rowguid, ModifiedDate FROM Sales.SpecialOfferPr" +
                "oduct";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.SpecialOfferProductDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.SpecialOfferProductDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.SpecialOfferProductDataTable dataTable = new AdventureWorksDataSet.SpecialOfferProductDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.SpecialOfferProductDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "SpecialOfferProduct");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_SpecialOfferID, int Original_ProductID, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_SpecialOfferID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_ProductID));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int SpecialOfferID, int ProductID, System.Guid rowguid, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(SpecialOfferID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((int)(ProductID));
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[3].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int SpecialOfferID, int ProductID, System.Guid rowguid, System.DateTime ModifiedDate, int Original_SpecialOfferID, int Original_ProductID, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(SpecialOfferID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(ProductID));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_SpecialOfferID));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_ProductID));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 StoreTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public StoreTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "Store";
            tableMapping.ColumnMappings.Add("CustomerID", "CustomerID");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("SalesPersonID", "SalesPersonID");
            tableMapping.ColumnMappings.Add("Demographics", "Demographics");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [Sales].[Store] WHERE (([CustomerID] = @Original_CustomerID) AND ([Name] = @Original_Name) AND ((@IsNull_SalesPersonID = 1 AND [SalesPersonID] IS NULL) OR ([SalesPersonID] = @Original_SalesPersonID)) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_SalesPersonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesPersonID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesPersonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesPersonID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Sales].[Store] ([CustomerID], [Name], [SalesPersonID], [Demographics], [rowguid], [ModifiedDate]) VALUES (@CustomerID, @Name, @SalesPersonID, @Demographics, @rowguid, @ModifiedDate);
SELECT CustomerID, Name, SalesPersonID, Demographics, rowguid, ModifiedDate FROM Sales.Store WHERE (CustomerID = @CustomerID)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesPersonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesPersonID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Demographics", System.Data.SqlDbType.Xml, 0, System.Data.ParameterDirection.Input, 0, 0, "Demographics", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Sales].[Store] SET [CustomerID] = @CustomerID, [Name] = @Name, [SalesPersonID] = @SalesPersonID, [Demographics] = @Demographics, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([CustomerID] = @Original_CustomerID) AND ([Name] = @Original_Name) AND ((@IsNull_SalesPersonID = 1 AND [SalesPersonID] IS NULL) OR ([SalesPersonID] = @Original_SalesPersonID)) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT CustomerID, Name, SalesPersonID, Demographics, rowguid, ModifiedDate FROM Sales.Store WHERE (CustomerID = @CustomerID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SalesPersonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesPersonID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Demographics", System.Data.SqlDbType.Xml, 0, System.Data.ParameterDirection.Input, 0, 0, "Demographics", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_SalesPersonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesPersonID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SalesPersonID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SalesPersonID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT CustomerID, Name, SalesPersonID, Demographics, rowguid, ModifiedDate FROM " +
                "Sales.Store";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.StoreDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.StoreDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.StoreDataTable dataTable = new AdventureWorksDataSet.StoreDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.StoreDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "Store");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_CustomerID, string Original_Name, System.Nullable<int> Original_SalesPersonID, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_CustomerID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name));
            }
            if ((Original_SalesPersonID.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(Original_SalesPersonID.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[3].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[4].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[5].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int CustomerID, string Name, System.Nullable<int> SalesPersonID, object Demographics, System.Guid rowguid, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(CustomerID));
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Name));
            }
            if ((SalesPersonID.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[2].Value = ((int)(SalesPersonID.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
            }
            if ((Demographics == null)) {
                this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[3].Value = ((object)(Demographics));
            }
            this.Adapter.InsertCommand.Parameters[4].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[5].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int CustomerID, string Name, System.Nullable<int> SalesPersonID, object Demographics, System.Guid rowguid, System.DateTime ModifiedDate, int Original_CustomerID, string Original_Name, System.Nullable<int> Original_SalesPersonID, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(CustomerID));
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Name));
            }
            if ((SalesPersonID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(SalesPersonID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value;
            }
            if ((Demographics == null)) {
                this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(Demographics));
            }
            this.Adapter.UpdateCommand.Parameters[4].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_CustomerID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_Name));
            }
            if ((Original_SalesPersonID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_SalesPersonID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[9].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[10].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[11].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 StoreContactTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public StoreContactTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "StoreContact";
            tableMapping.ColumnMappings.Add("CustomerID", "CustomerID");
            tableMapping.ColumnMappings.Add("ContactID", "ContactID");
            tableMapping.ColumnMappings.Add("ContactTypeID", "ContactTypeID");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [Sales].[StoreContact] WHERE (([CustomerID] = @Original_CustomerID) A" +
                "ND ([ContactID] = @Original_ContactID) AND ([ContactTypeID] = @Original_ContactT" +
                "ypeID) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_Modif" +
                "iedDate))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactTypeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactTypeID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = @"INSERT INTO [Sales].[StoreContact] ([CustomerID], [ContactID], [ContactTypeID], [rowguid], [ModifiedDate]) VALUES (@CustomerID, @ContactID, @ContactTypeID, @rowguid, @ModifiedDate);
SELECT CustomerID, ContactID, ContactTypeID, rowguid, ModifiedDate FROM Sales.StoreContact WHERE (ContactID = @ContactID) AND (CustomerID = @CustomerID)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactTypeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactTypeID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE [Sales].[StoreContact] SET [CustomerID] = @CustomerID, [ContactID] = @ContactID, [ContactTypeID] = @ContactTypeID, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([CustomerID] = @Original_CustomerID) AND ([ContactID] = @Original_ContactID) AND ([ContactTypeID] = @Original_ContactTypeID) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_ModifiedDate));
SELECT CustomerID, ContactID, ContactTypeID, rowguid, ModifiedDate FROM Sales.StoreContact WHERE (ContactID = @ContactID) AND (CustomerID = @CustomerID)";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactTypeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactTypeID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ContactTypeID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ContactTypeID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_rowguid", System.Data.SqlDbType.UniqueIdentifier, 0, System.Data.ParameterDirection.Input, 0, 0, "rowguid", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ModifiedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "ModifiedDate", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT CustomerID, ContactID, ContactTypeID, rowguid, ModifiedDate FROM Sales.Sto" +
                "reContact";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.StoreContactDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.StoreContactDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.StoreContactDataTable dataTable = new AdventureWorksDataSet.StoreContactDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.StoreContactDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "StoreContact");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_CustomerID, int Original_ContactID, int Original_ContactTypeID, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_CustomerID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_ContactID));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_ContactTypeID));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.DeleteCommand.Parameters[4].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int CustomerID, int ContactID, int ContactTypeID, System.Guid rowguid, System.DateTime ModifiedDate) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(CustomerID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((int)(ContactID));
            this.Adapter.InsertCommand.Parameters[2].Value = ((int)(ContactTypeID));
            this.Adapter.InsertCommand.Parameters[3].Value = ((System.Guid)(rowguid));
            this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int CustomerID, int ContactID, int ContactTypeID, System.Guid rowguid, System.DateTime ModifiedDate, int Original_CustomerID, int Original_ContactID, int Original_ContactTypeID, System.Guid Original_rowguid, System.DateTime Original_ModifiedDate) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(CustomerID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(ContactID));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(ContactTypeID));
            this.Adapter.UpdateCommand.Parameters[3].Value = ((System.Guid)(rowguid));
            this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(ModifiedDate));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_CustomerID));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_ContactID));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_ContactTypeID));
            this.Adapter.UpdateCommand.Parameters[8].Value = ((System.Guid)(Original_rowguid));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((System.DateTime)(Original_ModifiedDate));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [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 vEmployeeTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public vEmployeeTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "vEmployee";
            tableMapping.ColumnMappings.Add("EmployeeID", "EmployeeID");
            tableMapping.ColumnMappings.Add("Title", "Title");
            tableMapping.ColumnMappings.Add("FirstName", "FirstName");
            tableMapping.ColumnMappings.Add("MiddleName", "MiddleName");
            tableMapping.ColumnMappings.Add("LastName", "LastName");
            tableMapping.ColumnMappings.Add("Suffix", "Suffix");
            tableMapping.ColumnMappings.Add("JobTitle", "JobTitle");
            tableMapping.ColumnMappings.Add("Phone", "Phone");
            tableMapping.ColumnMappings.Add("EmailAddress", "EmailAddress");
            tableMapping.ColumnMappings.Add("EmailPromotion", "EmailPromotion");
            tableMapping.ColumnMappings.Add("AddressLine1", "AddressLine1");
            tableMapping.ColumnMappings.Add("AddressLine2", "AddressLine2");
            tableMapping.ColumnMappings.Add("City", "City");
            tableMapping.ColumnMappings.Add("StateProvinceName", "StateProvinceName");
            tableMapping.ColumnMappings.Add("PostalCode", "PostalCode");
            tableMapping.ColumnMappings.Add("CountryRegionName", "CountryRegionName");
            tableMapping.ColumnMappings.Add("AdditionalContactInfo", "AdditionalContactInfo");
            this.m_adapter.TableMappings.Add(tableMapping);
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT EmployeeID, Title, FirstName, MiddleName, LastName, Suffix, JobTitle, Phon" +
                "e, EmailAddress, EmailPromotion, AddressLine1, AddressLine2, City, StateProvince" +
                "Name, PostalCode, CountryRegionName, AdditionalContactInfo FROM HumanResources.v" +
                "Employee";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.vEmployeeDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.vEmployeeDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.vEmployeeDataTable dataTable = new AdventureWorksDataSet.vEmployeeDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.vEmployeeDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "vEmployee");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
    }
    
    [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 vEmployeeDepartmentTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public vEmployeeDepartmentTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "vEmployeeDepartment";
            tableMapping.ColumnMappings.Add("EmployeeID", "EmployeeID");
            tableMapping.ColumnMappings.Add("Title", "Title");
            tableMapping.ColumnMappings.Add("FirstName", "FirstName");
            tableMapping.ColumnMappings.Add("MiddleName", "MiddleName");
            tableMapping.ColumnMappings.Add("LastName", "LastName");
            tableMapping.ColumnMappings.Add("Suffix", "Suffix");
            tableMapping.ColumnMappings.Add("JobTitle", "JobTitle");
            tableMapping.ColumnMappings.Add("Department", "Department");
            tableMapping.ColumnMappings.Add("GroupName", "GroupName");
            tableMapping.ColumnMappings.Add("StartDate", "StartDate");
            this.m_adapter.TableMappings.Add(tableMapping);
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT EmployeeID, Title, FirstName, MiddleName, LastName, Suffix, JobTitle, Depa" +
                "rtment, GroupName, StartDate FROM HumanResources.vEmployeeDepartment";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.vEmployeeDepartmentDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.vEmployeeDepartmentDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.vEmployeeDepartmentDataTable dataTable = new AdventureWorksDataSet.vEmployeeDepartmentDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.vEmployeeDepartmentDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "vEmployeeDepartment");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
    }
    
    [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 vEmployeeDepartmentHistoryTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public vEmployeeDepartmentHistoryTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "vEmployeeDepartmentHistory";
            tableMapping.ColumnMappings.Add("EmployeeID", "EmployeeID");
            tableMapping.ColumnMappings.Add("Title", "Title");
            tableMapping.ColumnMappings.Add("FirstName", "FirstName");
            tableMapping.ColumnMappings.Add("MiddleName", "MiddleName");
            tableMapping.ColumnMappings.Add("LastName", "LastName");
            tableMapping.ColumnMappings.Add("Suffix", "Suffix");
            tableMapping.ColumnMappings.Add("Shift", "Shift");
            tableMapping.ColumnMappings.Add("Department", "Department");
            tableMapping.ColumnMappings.Add("GroupName", "GroupName");
            tableMapping.ColumnMappings.Add("StartDate", "StartDate");
            tableMapping.ColumnMappings.Add("EndDate", "EndDate");
            this.m_adapter.TableMappings.Add(tableMapping);
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT EmployeeID, Title, FirstName, MiddleName, LastName, Suffix, Shift, Departm" +
                "ent, GroupName, StartDate, EndDate FROM HumanResources.vEmployeeDepartmentHistor" +
                "y";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.vEmployeeDepartmentHistoryDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.vEmployeeDepartmentHistoryDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.vEmployeeDepartmentHistoryDataTable dataTable = new AdventureWorksDataSet.vEmployeeDepartmentHistoryDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.vEmployeeDepartmentHistoryDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "vEmployeeDepartmentHistory");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
    }
    
    [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 vJobCandidateTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public vJobCandidateTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "vJobCandidate";
            tableMapping.ColumnMappings.Add("JobCandidateID", "JobCandidateID");
            tableMapping.ColumnMappings.Add("EmployeeID", "EmployeeID");
            tableMapping.ColumnMappings.Add("Name.Prefix", "Name.Prefix");
            tableMapping.ColumnMappings.Add("Name.First", "Name.First");
            tableMapping.ColumnMappings.Add("Name.Middle", "Name.Middle");
            tableMapping.ColumnMappings.Add("Name.Last", "Name.Last");
            tableMapping.ColumnMappings.Add("Name.Suffix", "Name.Suffix");
            tableMapping.ColumnMappings.Add("Skills", "Skills");
            tableMapping.ColumnMappings.Add("Addr.Type", "Addr.Type");
            tableMapping.ColumnMappings.Add("Addr.Loc.CountryRegion", "Addr.Loc.CountryRegion");
            tableMapping.ColumnMappings.Add("Addr.Loc.State", "Addr.Loc.State");
            tableMapping.ColumnMappings.Add("Addr.Loc.City", "Addr.Loc.City");
            tableMapping.ColumnMappings.Add("Addr.PostalCode", "Addr.PostalCode");
            tableMapping.ColumnMappings.Add("EMail", "EMail");
            tableMapping.ColumnMappings.Add("WebSite", "WebSite");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = @"SELECT JobCandidateID, EmployeeID, [Name.Prefix], [Name.First], [Name.Middle], [Name.Last], [Name.Suffix], Skills, [Addr.Type], [Addr.Loc.CountryRegion], [Addr.Loc.State], [Addr.Loc.City], [Addr.PostalCode], EMail, WebSite, ModifiedDate FROM HumanResources.vJobCandidate";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.vJobCandidateDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.vJobCandidateDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.vJobCandidateDataTable dataTable = new AdventureWorksDataSet.vJobCandidateDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.vJobCandidateDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "vJobCandidate");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
    }
    
    [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 vJobCandidateEducationTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public vJobCandidateEducationTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "vJobCandidateEducation";
            tableMapping.ColumnMappings.Add("JobCandidateID", "JobCandidateID");
            tableMapping.ColumnMappings.Add("Edu.Level", "Edu.Level");
            tableMapping.ColumnMappings.Add("Edu.StartDate", "Edu.StartDate");
            tableMapping.ColumnMappings.Add("Edu.EndDate", "Edu.EndDate");
            tableMapping.ColumnMappings.Add("Edu.Degree", "Edu.Degree");
            tableMapping.ColumnMappings.Add("Edu.Major", "Edu.Major");
            tableMapping.ColumnMappings.Add("Edu.Minor", "Edu.Minor");
            tableMapping.ColumnMappings.Add("Edu.GPA", "Edu.GPA");
            tableMapping.ColumnMappings.Add("Edu.GPAScale", "Edu.GPAScale");
            tableMapping.ColumnMappings.Add("Edu.School", "Edu.School");
            tableMapping.ColumnMappings.Add("Edu.Loc.CountryRegion", "Edu.Loc.CountryRegion");
            tableMapping.ColumnMappings.Add("Edu.Loc.State", "Edu.Loc.State");
            tableMapping.ColumnMappings.Add("Edu.Loc.City", "Edu.Loc.City");
            this.m_adapter.TableMappings.Add(tableMapping);
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT JobCandidateID, [Edu.Level], [Edu.StartDate], [Edu.EndDate], [Edu.Degree]," +
                " [Edu.Major], [Edu.Minor], [Edu.GPA], [Edu.GPAScale], [Edu.School], [Edu.Loc.Cou" +
                "ntryRegion], [Edu.Loc.State], [Edu.Loc.City] FROM HumanResources.vJobCandidateEd" +
                "ucation";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.vJobCandidateEducationDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.vJobCandidateEducationDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.vJobCandidateEducationDataTable dataTable = new AdventureWorksDataSet.vJobCandidateEducationDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.vJobCandidateEducationDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "vJobCandidateEducation");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
    }
    
    [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 vJobCandidateEmploymentTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public vJobCandidateEmploymentTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "vJobCandidateEmployment";
            tableMapping.ColumnMappings.Add("JobCandidateID", "JobCandidateID");
            tableMapping.ColumnMappings.Add("Emp.StartDate", "Emp.StartDate");
            tableMapping.ColumnMappings.Add("Emp.EndDate", "Emp.EndDate");
            tableMapping.ColumnMappings.Add("Emp.OrgName", "Emp.OrgName");
            tableMapping.ColumnMappings.Add("Emp.JobTitle", "Emp.JobTitle");
            tableMapping.ColumnMappings.Add("Emp.Responsibility", "Emp.Responsibility");
            tableMapping.ColumnMappings.Add("Emp.FunctionCategory", "Emp.FunctionCategory");
            tableMapping.ColumnMappings.Add("Emp.IndustryCategory", "Emp.IndustryCategory");
            tableMapping.ColumnMappings.Add("Emp.Loc.CountryRegion", "Emp.Loc.CountryRegion");
            tableMapping.ColumnMappings.Add("Emp.Loc.State", "Emp.Loc.State");
            tableMapping.ColumnMappings.Add("Emp.Loc.City", "Emp.Loc.City");
            this.m_adapter.TableMappings.Add(tableMapping);
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = @"SELECT JobCandidateID, [Emp.StartDate], [Emp.EndDate], [Emp.OrgName], [Emp.JobTitle], [Emp.Responsibility], [Emp.FunctionCategory], [Emp.IndustryCategory], [Emp.Loc.CountryRegion], [Emp.Loc.State], [Emp.Loc.City] FROM HumanResources.vJobCandidateEmployment";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.vJobCandidateEmploymentDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.vJobCandidateEmploymentDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.vJobCandidateEmploymentDataTable dataTable = new AdventureWorksDataSet.vJobCandidateEmploymentDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.vJobCandidateEmploymentDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "vJobCandidateEmployment");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
    }
    
    [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 vAdditionalContactInfoTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public vAdditionalContactInfoTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "vAdditionalContactInfo";
            tableMapping.ColumnMappings.Add("ContactID", "ContactID");
            tableMapping.ColumnMappings.Add("FirstName", "FirstName");
            tableMapping.ColumnMappings.Add("MiddleName", "MiddleName");
            tableMapping.ColumnMappings.Add("LastName", "LastName");
            tableMapping.ColumnMappings.Add("TelephoneNumber", "TelephoneNumber");
            tableMapping.ColumnMappings.Add("TelephoneSpecialInstructions", "TelephoneSpecialInstructions");
            tableMapping.ColumnMappings.Add("Street", "Street");
            tableMapping.ColumnMappings.Add("City", "City");
            tableMapping.ColumnMappings.Add("StateProvince", "StateProvince");
            tableMapping.ColumnMappings.Add("PostalCode", "PostalCode");
            tableMapping.ColumnMappings.Add("CountryRegion", "CountryRegion");
            tableMapping.ColumnMappings.Add("HomeAddressSpecialInstructions", "HomeAddressSpecialInstructions");
            tableMapping.ColumnMappings.Add("EMailAddress", "EMailAddress");
            tableMapping.ColumnMappings.Add("EMailSpecialInstructions", "EMailSpecialInstructions");
            tableMapping.ColumnMappings.Add("EMailTelephoneNumber", "EMailTelephoneNumber");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = @"SELECT ContactID, FirstName, MiddleName, LastName, TelephoneNumber, TelephoneSpecialInstructions, Street, City, StateProvince, PostalCode, CountryRegion, HomeAddressSpecialInstructions, EMailAddress, EMailSpecialInstructions, EMailTelephoneNumber, rowguid, ModifiedDate FROM Person.vAdditionalContactInfo";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.vAdditionalContactInfoDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.vAdditionalContactInfoDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.vAdditionalContactInfoDataTable dataTable = new AdventureWorksDataSet.vAdditionalContactInfoDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.vAdditionalContactInfoDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "vAdditionalContactInfo");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
    }
    
    [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 vStateProvinceCountryRegionTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public vStateProvinceCountryRegionTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "vStateProvinceCountryRegion";
            tableMapping.ColumnMappings.Add("StateProvinceID", "StateProvinceID");
            tableMapping.ColumnMappings.Add("StateProvinceCode", "StateProvinceCode");
            tableMapping.ColumnMappings.Add("IsOnlyStateProvinceFlag", "IsOnlyStateProvinceFlag");
            tableMapping.ColumnMappings.Add("StateProvinceName", "StateProvinceName");
            tableMapping.ColumnMappings.Add("TerritoryID", "TerritoryID");
            tableMapping.ColumnMappings.Add("CountryRegionCode", "CountryRegionCode");
            tableMapping.ColumnMappings.Add("CountryRegionName", "CountryRegionName");
            this.m_adapter.TableMappings.Add(tableMapping);
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT StateProvinceID, StateProvinceCode, IsOnlyStateProvinceFlag, StateProvince" +
                "Name, TerritoryID, CountryRegionCode, CountryRegionName FROM Person.vStateProvin" +
                "ceCountryRegion";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.vStateProvinceCountryRegionDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.vStateProvinceCountryRegionDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.vStateProvinceCountryRegionDataTable dataTable = new AdventureWorksDataSet.vStateProvinceCountryRegionDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.vStateProvinceCountryRegionDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "vStateProvinceCountryRegion");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
    }
    
    [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 vProductAndDescriptionTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public vProductAndDescriptionTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "vProductAndDescription";
            tableMapping.ColumnMappings.Add("ProductID", "ProductID");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("ProductModel", "ProductModel");
            tableMapping.ColumnMappings.Add("CultureID", "CultureID");
            tableMapping.ColumnMappings.Add("Description", "Description");
            this.m_adapter.TableMappings.Add(tableMapping);
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT ProductID, Name, ProductModel, CultureID, Description FROM Production.vPro" +
                "ductAndDescription";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.vProductAndDescriptionDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.vProductAndDescriptionDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.vProductAndDescriptionDataTable dataTable = new AdventureWorksDataSet.vProductAndDescriptionDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.vProductAndDescriptionDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "vProductAndDescription");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
    }
    
    [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 vProductModelCatalogDescriptionTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public vProductModelCatalogDescriptionTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "vProductModelCatalogDescription";
            tableMapping.ColumnMappings.Add("ProductModelID", "ProductModelID");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("Summary", "Summary");
            tableMapping.ColumnMappings.Add("Manufacturer", "Manufacturer");
            tableMapping.ColumnMappings.Add("Copyright", "Copyright");
            tableMapping.ColumnMappings.Add("ProductURL", "ProductURL");
            tableMapping.ColumnMappings.Add("WarrantyPeriod", "WarrantyPeriod");
            tableMapping.ColumnMappings.Add("WarrantyDescription", "WarrantyDescription");
            tableMapping.ColumnMappings.Add("NoOfYears", "NoOfYears");
            tableMapping.ColumnMappings.Add("MaintenanceDescription", "MaintenanceDescription");
            tableMapping.ColumnMappings.Add("Wheel", "Wheel");
            tableMapping.ColumnMappings.Add("Saddle", "Saddle");
            tableMapping.ColumnMappings.Add("Pedal", "Pedal");
            tableMapping.ColumnMappings.Add("BikeFrame", "BikeFrame");
            tableMapping.ColumnMappings.Add("Crankset", "Crankset");
            tableMapping.ColumnMappings.Add("PictureAngle", "PictureAngle");
            tableMapping.ColumnMappings.Add("PictureSize", "PictureSize");
            tableMapping.ColumnMappings.Add("ProductPhotoID", "ProductPhotoID");
            tableMapping.ColumnMappings.Add("Material", "Material");
            tableMapping.ColumnMappings.Add("Color", "Color");
            tableMapping.ColumnMappings.Add("ProductLine", "ProductLine");
            tableMapping.ColumnMappings.Add("Style", "Style");
            tableMapping.ColumnMappings.Add("RiderExperience", "RiderExperience");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = @"SELECT ProductModelID, Name, Summary, Manufacturer, Copyright, ProductURL, WarrantyPeriod, WarrantyDescription, NoOfYears, MaintenanceDescription, Wheel, Saddle, Pedal, BikeFrame, Crankset, PictureAngle, PictureSize, ProductPhotoID, Material, Color, ProductLine, Style, RiderExperience, rowguid, ModifiedDate FROM Production.vProductModelCatalogDescription";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.vProductModelCatalogDescriptionDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.vProductModelCatalogDescriptionDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.vProductModelCatalogDescriptionDataTable dataTable = new AdventureWorksDataSet.vProductModelCatalogDescriptionDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.vProductModelCatalogDescriptionDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "vProductModelCatalogDescription");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
    }
    
    [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 vProductModelInstructionsTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public vProductModelInstructionsTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "vProductModelInstructions";
            tableMapping.ColumnMappings.Add("ProductModelID", "ProductModelID");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("Instructions", "Instructions");
            tableMapping.ColumnMappings.Add("LocationID", "LocationID");
            tableMapping.ColumnMappings.Add("SetupHours", "SetupHours");
            tableMapping.ColumnMappings.Add("MachineHours", "MachineHours");
            tableMapping.ColumnMappings.Add("LaborHours", "LaborHours");
            tableMapping.ColumnMappings.Add("LotSize", "LotSize");
            tableMapping.ColumnMappings.Add("Step", "Step");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this.m_adapter.TableMappings.Add(tableMapping);
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT ProductModelID, Name, Instructions, LocationID, SetupHours, MachineHours, " +
                "LaborHours, LotSize, Step, rowguid, ModifiedDate FROM Production.vProductModelIn" +
                "structions";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.vProductModelInstructionsDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.vProductModelInstructionsDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.vProductModelInstructionsDataTable dataTable = new AdventureWorksDataSet.vProductModelInstructionsDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.vProductModelInstructionsDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "vProductModelInstructions");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
    }
    
    [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 vVendorTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public vVendorTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "vVendor";
            tableMapping.ColumnMappings.Add("VendorID", "VendorID");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("ContactType", "ContactType");
            tableMapping.ColumnMappings.Add("Title", "Title");
            tableMapping.ColumnMappings.Add("FirstName", "FirstName");
            tableMapping.ColumnMappings.Add("MiddleName", "MiddleName");
            tableMapping.ColumnMappings.Add("LastName", "LastName");
            tableMapping.ColumnMappings.Add("Suffix", "Suffix");
            tableMapping.ColumnMappings.Add("Phone", "Phone");
            tableMapping.ColumnMappings.Add("EmailAddress", "EmailAddress");
            tableMapping.ColumnMappings.Add("EmailPromotion", "EmailPromotion");
            tableMapping.ColumnMappings.Add("AddressLine1", "AddressLine1");
            tableMapping.ColumnMappings.Add("AddressLine2", "AddressLine2");
            tableMapping.ColumnMappings.Add("City", "City");
            tableMapping.ColumnMappings.Add("StateProvinceName", "StateProvinceName");
            tableMapping.ColumnMappings.Add("PostalCode", "PostalCode");
            tableMapping.ColumnMappings.Add("CountryRegionName", "CountryRegionName");
            this.m_adapter.TableMappings.Add(tableMapping);
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT VendorID, Name, ContactType, Title, FirstName, MiddleName, LastName, Suffi" +
                "x, Phone, EmailAddress, EmailPromotion, AddressLine1, AddressLine2, City, StateP" +
                "rovinceName, PostalCode, CountryRegionName FROM Purchasing.vVendor";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.vVendorDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.vVendorDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.vVendorDataTable dataTable = new AdventureWorksDataSet.vVendorDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.vVendorDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "vVendor");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
    }
    
    [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 vIndividualTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public vIndividualTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "vIndividual";
            tableMapping.ColumnMappings.Add("CustomerID", "CustomerID");
            tableMapping.ColumnMappings.Add("Title", "Title");
            tableMapping.ColumnMappings.Add("FirstName", "FirstName");
            tableMapping.ColumnMappings.Add("MiddleName", "MiddleName");
            tableMapping.ColumnMappings.Add("LastName", "LastName");
            tableMapping.ColumnMappings.Add("Suffix", "Suffix");
            tableMapping.ColumnMappings.Add("Phone", "Phone");
            tableMapping.ColumnMappings.Add("EmailAddress", "EmailAddress");
            tableMapping.ColumnMappings.Add("EmailPromotion", "EmailPromotion");
            tableMapping.ColumnMappings.Add("AddressLine1", "AddressLine1");
            tableMapping.ColumnMappings.Add("AddressLine2", "AddressLine2");
            tableMapping.ColumnMappings.Add("City", "City");
            tableMapping.ColumnMappings.Add("StateProvinceName", "StateProvinceName");
            tableMapping.ColumnMappings.Add("PostalCode", "PostalCode");
            tableMapping.ColumnMappings.Add("CountryRegionName", "CountryRegionName");
            tableMapping.ColumnMappings.Add("Demographics", "Demographics");
            this.m_adapter.TableMappings.Add(tableMapping);
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT CustomerID, Title, FirstName, MiddleName, LastName, Suffix, Phone, EmailAd" +
                "dress, EmailPromotion, AddressLine1, AddressLine2, City, StateProvinceName, Post" +
                "alCode, CountryRegionName, Demographics FROM Sales.vIndividual";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.vIndividualDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.vIndividualDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.vIndividualDataTable dataTable = new AdventureWorksDataSet.vIndividualDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.vIndividualDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "vIndividual");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
    }
    
    [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 vIndividualDemographicsTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public vIndividualDemographicsTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "vIndividualDemographics";
            tableMapping.ColumnMappings.Add("CustomerID", "CustomerID");
            tableMapping.ColumnMappings.Add("TotalPurchaseYTD", "TotalPurchaseYTD");
            tableMapping.ColumnMappings.Add("DateFirstPurchase", "DateFirstPurchase");
            tableMapping.ColumnMappings.Add("BirthDate", "BirthDate");
            tableMapping.ColumnMappings.Add("MaritalStatus", "MaritalStatus");
            tableMapping.ColumnMappings.Add("YearlyIncome", "YearlyIncome");
            tableMapping.ColumnMappings.Add("Gender", "Gender");
            tableMapping.ColumnMappings.Add("TotalChildren", "TotalChildren");
            tableMapping.ColumnMappings.Add("NumberChildrenAtHome", "NumberChildrenAtHome");
            tableMapping.ColumnMappings.Add("Education", "Education");
            tableMapping.ColumnMappings.Add("Occupation", "Occupation");
            tableMapping.ColumnMappings.Add("HomeOwnerFlag", "HomeOwnerFlag");
            tableMapping.ColumnMappings.Add("NumberCarsOwned", "NumberCarsOwned");
            tableMapping.ColumnMappings.Add("Hobby", "Hobby");
            this.m_adapter.TableMappings.Add(tableMapping);
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT CustomerID, TotalPurchaseYTD, DateFirstPurchase, BirthDate, MaritalStatus," +
                " YearlyIncome, Gender, TotalChildren, NumberChildrenAtHome, Education, Occupatio" +
                "n, HomeOwnerFlag, NumberCarsOwned, Hobby FROM Sales.vIndividualDemographics";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.vIndividualDemographicsDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.vIndividualDemographicsDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.vIndividualDemographicsDataTable dataTable = new AdventureWorksDataSet.vIndividualDemographicsDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.vIndividualDemographicsDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "vIndividualDemographics");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
    }
    
    [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 vSalesPersonTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public vSalesPersonTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "vSalesPerson";
            tableMapping.ColumnMappings.Add("SalesPersonID", "SalesPersonID");
            tableMapping.ColumnMappings.Add("Title", "Title");
            tableMapping.ColumnMappings.Add("FirstName", "FirstName");
            tableMapping.ColumnMappings.Add("MiddleName", "MiddleName");
            tableMapping.ColumnMappings.Add("LastName", "LastName");
            tableMapping.ColumnMappings.Add("Suffix", "Suffix");
            tableMapping.ColumnMappings.Add("JobTitle", "JobTitle");
            tableMapping.ColumnMappings.Add("Phone", "Phone");
            tableMapping.ColumnMappings.Add("EmailAddress", "EmailAddress");
            tableMapping.ColumnMappings.Add("EmailPromotion", "EmailPromotion");
            tableMapping.ColumnMappings.Add("AddressLine1", "AddressLine1");
            tableMapping.ColumnMappings.Add("AddressLine2", "AddressLine2");
            tableMapping.ColumnMappings.Add("City", "City");
            tableMapping.ColumnMappings.Add("StateProvinceName", "StateProvinceName");
            tableMapping.ColumnMappings.Add("PostalCode", "PostalCode");
            tableMapping.ColumnMappings.Add("CountryRegionName", "CountryRegionName");
            tableMapping.ColumnMappings.Add("TerritoryName", "TerritoryName");
            tableMapping.ColumnMappings.Add("TerritoryGroup", "TerritoryGroup");
            tableMapping.ColumnMappings.Add("SalesQuota", "SalesQuota");
            tableMapping.ColumnMappings.Add("SalesYTD", "SalesYTD");
            tableMapping.ColumnMappings.Add("SalesLastYear", "SalesLastYear");
            this.m_adapter.TableMappings.Add(tableMapping);
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = @"SELECT SalesPersonID, Title, FirstName, MiddleName, LastName, Suffix, JobTitle, Phone, EmailAddress, EmailPromotion, AddressLine1, AddressLine2, City, StateProvinceName, PostalCode, CountryRegionName, TerritoryName, TerritoryGroup, SalesQuota, SalesYTD, SalesLastYear FROM Sales.vSalesPerson";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.vSalesPersonDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.vSalesPersonDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.vSalesPersonDataTable dataTable = new AdventureWorksDataSet.vSalesPersonDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.vSalesPersonDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "vSalesPerson");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
    }
    
    [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 vSalesPersonSalesByFiscalYearsTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public vSalesPersonSalesByFiscalYearsTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "vSalesPersonSalesByFiscalYears";
            tableMapping.ColumnMappings.Add("SalesPersonID", "SalesPersonID");
            tableMapping.ColumnMappings.Add("FullName", "FullName");
            tableMapping.ColumnMappings.Add("Title", "Title");
            tableMapping.ColumnMappings.Add("SalesTerritory", "SalesTerritory");
            tableMapping.ColumnMappings.Add("2002", "2002");
            tableMapping.ColumnMappings.Add("2003", "2003");
            tableMapping.ColumnMappings.Add("2004", "2004");
            this.m_adapter.TableMappings.Add(tableMapping);
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT SalesPersonID, FullName, Title, SalesTerritory, [2002], [2003], [2004] FRO" +
                "M Sales.vSalesPersonSalesByFiscalYears";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.vSalesPersonSalesByFiscalYearsDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.vSalesPersonSalesByFiscalYearsDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.vSalesPersonSalesByFiscalYearsDataTable dataTable = new AdventureWorksDataSet.vSalesPersonSalesByFiscalYearsDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.vSalesPersonSalesByFiscalYearsDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "vSalesPersonSalesByFiscalYears");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
    }
    
    [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 vStoreWithDemographicsTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public vStoreWithDemographicsTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "vStoreWithDemographics";
            tableMapping.ColumnMappings.Add("CustomerID", "CustomerID");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("ContactType", "ContactType");
            tableMapping.ColumnMappings.Add("Title", "Title");
            tableMapping.ColumnMappings.Add("FirstName", "FirstName");
            tableMapping.ColumnMappings.Add("MiddleName", "MiddleName");
            tableMapping.ColumnMappings.Add("LastName", "LastName");
            tableMapping.ColumnMappings.Add("Suffix", "Suffix");
            tableMapping.ColumnMappings.Add("Phone", "Phone");
            tableMapping.ColumnMappings.Add("EmailAddress", "EmailAddress");
            tableMapping.ColumnMappings.Add("EmailPromotion", "EmailPromotion");
            tableMapping.ColumnMappings.Add("AddressLine1", "AddressLine1");
            tableMapping.ColumnMappings.Add("AddressLine2", "AddressLine2");
            tableMapping.ColumnMappings.Add("City", "City");
            tableMapping.ColumnMappings.Add("StateProvinceName", "StateProvinceName");
            tableMapping.ColumnMappings.Add("PostalCode", "PostalCode");
            tableMapping.ColumnMappings.Add("CountryRegionName", "CountryRegionName");
            tableMapping.ColumnMappings.Add("AnnualSales", "AnnualSales");
            tableMapping.ColumnMappings.Add("AnnualRevenue", "AnnualRevenue");
            tableMapping.ColumnMappings.Add("BankName", "BankName");
            tableMapping.ColumnMappings.Add("BusinessType", "BusinessType");
            tableMapping.ColumnMappings.Add("YearOpened", "YearOpened");
            tableMapping.ColumnMappings.Add("Specialty", "Specialty");
            tableMapping.ColumnMappings.Add("SquareFeet", "SquareFeet");
            tableMapping.ColumnMappings.Add("Brands", "Brands");
            tableMapping.ColumnMappings.Add("Internet", "Internet");
            tableMapping.ColumnMappings.Add("NumberEmployees", "NumberEmployees");
            this.m_adapter.TableMappings.Add(tableMapping);
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = @"SELECT CustomerID, Name, ContactType, Title, FirstName, MiddleName, LastName, Suffix, Phone, EmailAddress, EmailPromotion, AddressLine1, AddressLine2, City, StateProvinceName, PostalCode, CountryRegionName, AnnualSales, AnnualRevenue, BankName, BusinessType, YearOpened, Specialty, SquareFeet, Brands, Internet, NumberEmployees FROM Sales.vStoreWithDemographics";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.vStoreWithDemographicsDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.vStoreWithDemographicsDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorksDataSet.vStoreWithDemographicsDataTable dataTable = new AdventureWorksDataSet.vStoreWithDemographicsDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.vStoreWithDemographicsDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "vStoreWithDemographics");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
    }
    
    [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 uspGetBillOfMaterialsTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public uspGetBillOfMaterialsTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "uspGetBillOfMaterials";
            tableMapping.ColumnMappings.Add("ProductAssemblyID", "ProductAssemblyID");
            tableMapping.ColumnMappings.Add("ComponentID", "ComponentID");
            tableMapping.ColumnMappings.Add("ComponentDesc", "ComponentDesc");
            tableMapping.ColumnMappings.Add("TotalQuantity", "TotalQuantity");
            tableMapping.ColumnMappings.Add("StandardCost", "StandardCost");
            tableMapping.ColumnMappings.Add("ListPrice", "ListPrice");
            tableMapping.ColumnMappings.Add("BOMLevel", "BOMLevel");
            tableMapping.ColumnMappings.Add("RecursionLevel", "RecursionLevel");
            this.m_adapter.TableMappings.Add(tableMapping);
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "dbo.uspGetBillOfMaterials";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.StoredProcedure;
            this.m_commandCollection[0].Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, 10, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_commandCollection[0].Parameters.Add(new System.Data.SqlClient.SqlParameter("@StartProductID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 10, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_commandCollection[0].Parameters.Add(new System.Data.SqlClient.SqlParameter("@CheckDate", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, 23, 3, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual System.Nullable<int> Fill(AdventureWorksDataSet.uspGetBillOfMaterialsDataTable dataTable, System.Nullable<int> StartProductID, System.Nullable<System.DateTime> CheckDate) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((StartProductID.HasValue == true)) {
                this.Adapter.SelectCommand.Parameters[1].Value = ((int)(StartProductID.Value));
            }
            else {
                this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
            }
            if ((CheckDate.HasValue == true)) {
                this.Adapter.SelectCommand.Parameters[2].Value = ((System.DateTime)(CheckDate.Value));
            }
            else {
                this.Adapter.SelectCommand.Parameters[2].Value = System.DBNull.Value;
            }
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            this.Adapter.Fill(dataTable);
            if (((this.Adapter.SelectCommand.Parameters[0].Value == null) 
                        || (this.Adapter.SelectCommand.Parameters[0].Value.GetType() == typeof(System.DBNull)))) {
                return System.Nullable.FromObject<int>(null);
            }
            else {
                return new System.Nullable<int>(((int)(this.Adapter.SelectCommand.Parameters[0].Value)));
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.uspGetBillOfMaterialsDataTable GetData(System.Nullable<int> StartProductID, System.Nullable<System.DateTime> CheckDate) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((StartProductID.HasValue == true)) {
                this.Adapter.SelectCommand.Parameters[1].Value = ((int)(StartProductID.Value));
            }
            else {
                this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
            }
            if ((CheckDate.HasValue == true)) {
                this.Adapter.SelectCommand.Parameters[2].Value = ((System.DateTime)(CheckDate.Value));
            }
            else {
                this.Adapter.SelectCommand.Parameters[2].Value = System.DBNull.Value;
            }
            AdventureWorksDataSet.uspGetBillOfMaterialsDataTable dataTable = new AdventureWorksDataSet.uspGetBillOfMaterialsDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.uspGetBillOfMaterialsDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "uspGetBillOfMaterials");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
    }
    
    [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 uspGetEmployeeManagersTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public uspGetEmployeeManagersTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "uspGetEmployeeManagers";
            tableMapping.ColumnMappings.Add("RecursionLevel", "RecursionLevel");
            tableMapping.ColumnMappings.Add("EmployeeID", "EmployeeID");
            tableMapping.ColumnMappings.Add("FirstName", "FirstName");
            tableMapping.ColumnMappings.Add("LastName", "LastName");
            tableMapping.ColumnMappings.Add("ManagerID", "ManagerID");
            tableMapping.ColumnMappings.Add("ManagerFirstName", "ManagerFirstName");
            tableMapping.ColumnMappings.Add("ManagerLastName", "ManagerLastName");
            this.m_adapter.TableMappings.Add(tableMapping);
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "dbo.uspGetEmployeeManagers";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.StoredProcedure;
            this.m_commandCollection[0].Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, 10, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_commandCollection[0].Parameters.Add(new System.Data.SqlClient.SqlParameter("@EmployeeID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 10, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual System.Nullable<int> Fill(AdventureWorksDataSet.uspGetEmployeeManagersDataTable dataTable, System.Nullable<int> EmployeeID) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((EmployeeID.HasValue == true)) {
                this.Adapter.SelectCommand.Parameters[1].Value = ((int)(EmployeeID.Value));
            }
            else {
                this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
            }
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            this.Adapter.Fill(dataTable);
            if (((this.Adapter.SelectCommand.Parameters[0].Value == null) 
                        || (this.Adapter.SelectCommand.Parameters[0].Value.GetType() == typeof(System.DBNull)))) {
                return System.Nullable.FromObject<int>(null);
            }
            else {
                return new System.Nullable<int>(((int)(this.Adapter.SelectCommand.Parameters[0].Value)));
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.uspGetEmployeeManagersDataTable GetData(System.Nullable<int> EmployeeID) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((EmployeeID.HasValue == true)) {
                this.Adapter.SelectCommand.Parameters[1].Value = ((int)(EmployeeID.Value));
            }
            else {
                this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
            }
            AdventureWorksDataSet.uspGetEmployeeManagersDataTable dataTable = new AdventureWorksDataSet.uspGetEmployeeManagersDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.uspGetEmployeeManagersDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "uspGetEmployeeManagers");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
    }
    
    [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 uspGetManagerEmployeesTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public uspGetManagerEmployeesTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "uspGetManagerEmployees";
            tableMapping.ColumnMappings.Add("RecursionLevel", "RecursionLevel");
            tableMapping.ColumnMappings.Add("ManagerID", "ManagerID");
            tableMapping.ColumnMappings.Add("ManagerFirstName", "ManagerFirstName");
            tableMapping.ColumnMappings.Add("ManagerLastName", "ManagerLastName");
            tableMapping.ColumnMappings.Add("EmployeeID", "EmployeeID");
            tableMapping.ColumnMappings.Add("FirstName", "FirstName");
            tableMapping.ColumnMappings.Add("LastName", "LastName");
            this.m_adapter.TableMappings.Add(tableMapping);
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "dbo.uspGetManagerEmployees";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.StoredProcedure;
            this.m_commandCollection[0].Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, 10, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_commandCollection[0].Parameters.Add(new System.Data.SqlClient.SqlParameter("@ManagerID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 10, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual System.Nullable<int> Fill(AdventureWorksDataSet.uspGetManagerEmployeesDataTable dataTable, System.Nullable<int> ManagerID) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((ManagerID.HasValue == true)) {
                this.Adapter.SelectCommand.Parameters[1].Value = ((int)(ManagerID.Value));
            }
            else {
                this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
            }
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            this.Adapter.Fill(dataTable);
            if (((this.Adapter.SelectCommand.Parameters[0].Value == null) 
                        || (this.Adapter.SelectCommand.Parameters[0].Value.GetType() == typeof(System.DBNull)))) {
                return System.Nullable.FromObject<int>(null);
            }
            else {
                return new System.Nullable<int>(((int)(this.Adapter.SelectCommand.Parameters[0].Value)));
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.uspGetManagerEmployeesDataTable GetData(System.Nullable<int> ManagerID) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((ManagerID.HasValue == true)) {
                this.Adapter.SelectCommand.Parameters[1].Value = ((int)(ManagerID.Value));
            }
            else {
                this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
            }
            AdventureWorksDataSet.uspGetManagerEmployeesDataTable dataTable = new AdventureWorksDataSet.uspGetManagerEmployeesDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.uspGetManagerEmployeesDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "uspGetManagerEmployees");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
    }
    
    [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 uspGetWhereUsedProductIDTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public uspGetWhereUsedProductIDTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "uspGetWhereUsedProductID";
            tableMapping.ColumnMappings.Add("ProductAssemblyID", "ProductAssemblyID");
            tableMapping.ColumnMappings.Add("ComponentID", "ComponentID");
            tableMapping.ColumnMappings.Add("ComponentDesc", "ComponentDesc");
            tableMapping.ColumnMappings.Add("TotalQuantity", "TotalQuantity");
            tableMapping.ColumnMappings.Add("StandardCost", "StandardCost");
            tableMapping.ColumnMappings.Add("ListPrice", "ListPrice");
            tableMapping.ColumnMappings.Add("BOMLevel", "BOMLevel");
            tableMapping.ColumnMappings.Add("RecursionLevel", "RecursionLevel");
            this.m_adapter.TableMappings.Add(tableMapping);
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "dbo.uspGetWhereUsedProductID";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.StoredProcedure;
            this.m_commandCollection[0].Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, 10, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_commandCollection[0].Parameters.Add(new System.Data.SqlClient.SqlParameter("@StartProductID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 10, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_commandCollection[0].Parameters.Add(new System.Data.SqlClient.SqlParameter("@CheckDate", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, 23, 3, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual System.Nullable<int> Fill(AdventureWorksDataSet.uspGetWhereUsedProductIDDataTable dataTable, System.Nullable<int> StartProductID, System.Nullable<System.DateTime> CheckDate) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((StartProductID.HasValue == true)) {
                this.Adapter.SelectCommand.Parameters[1].Value = ((int)(StartProductID.Value));
            }
            else {
                this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
            }
            if ((CheckDate.HasValue == true)) {
                this.Adapter.SelectCommand.Parameters[2].Value = ((System.DateTime)(CheckDate.Value));
            }
            else {
                this.Adapter.SelectCommand.Parameters[2].Value = System.DBNull.Value;
            }
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            this.Adapter.Fill(dataTable);
            if (((this.Adapter.SelectCommand.Parameters[0].Value == null) 
                        || (this.Adapter.SelectCommand.Parameters[0].Value.GetType() == typeof(System.DBNull)))) {
                return System.Nullable.FromObject<int>(null);
            }
            else {
                return new System.Nullable<int>(((int)(this.Adapter.SelectCommand.Parameters[0].Value)));
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.uspGetWhereUsedProductIDDataTable GetData(System.Nullable<int> StartProductID, System.Nullable<System.DateTime> CheckDate) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((StartProductID.HasValue == true)) {
                this.Adapter.SelectCommand.Parameters[1].Value = ((int)(StartProductID.Value));
            }
            else {
                this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
            }
            if ((CheckDate.HasValue == true)) {
                this.Adapter.SelectCommand.Parameters[2].Value = ((System.DateTime)(CheckDate.Value));
            }
            else {
                this.Adapter.SelectCommand.Parameters[2].Value = System.DBNull.Value;
            }
            AdventureWorksDataSet.uspGetWhereUsedProductIDDataTable dataTable = new AdventureWorksDataSet.uspGetWhereUsedProductIDDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.uspGetWhereUsedProductIDDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "uspGetWhereUsedProductID");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
    }
    
    [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 ufnGetContactInformationTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter m_adapter;
        
        private System.Data.SqlClient.SqlConnection m_connection;
        
        private System.Data.SqlClient.SqlCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public ufnGetContactInformationTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_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;
                    }
                }
            }
        }
        
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "ufnGetContactInformation";
            tableMapping.ColumnMappings.Add("ContactID", "ContactID");
            tableMapping.ColumnMappings.Add("FirstName", "FirstName");
            tableMapping.ColumnMappings.Add("LastName", "LastName");
            tableMapping.ColumnMappings.Add("JobTitle", "JobTitle");
            tableMapping.ColumnMappings.Add("ContactType", "ContactType");
            this.m_adapter.TableMappings.Add(tableMapping);
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.SqlClient.SqlConnection();
            this.m_connection.ConnectionString = DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT ContactID, FirstName, LastName, JobTitle, ContactType FROM dbo.ufnGetConta" +
                "ctInformation(@ContactID)";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
            this.m_commandCollection[0].Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorksDataSet.ufnGetContactInformationDataTable dataTable, int ContactID) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            this.Adapter.SelectCommand.Parameters[0].Value = ((int)(ContactID));
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorksDataSet.ufnGetContactInformationDataTable GetData(int ContactID) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            this.Adapter.SelectCommand.Parameters[0].Value = ((int)(ContactID));
            AdventureWorksDataSet.ufnGetContactInformationDataTable dataTable = new AdventureWorksDataSet.ufnGetContactInformationDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(AdventureWorksDataSet.ufnGetContactInformationDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(AdventureWorksDataSet dataSet) {
            return this.Adapter.Update(dataSet, "ufnGetContactInformation");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
    }
    
    [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 QueriesTableAdapter : System.ComponentModel.Component {
        
        private System.Data.IDbCommand[] m_commandCollection;
        
        protected System.Data.IDbCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.IDbCommand[13];
            this.m_commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[0])).Connection = new System.Data.SqlClient.SqlConnection(DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString);
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[0])).CommandText = "HumanResources.uspUpdateEmployeeHireInfo";
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[0])).CommandType = System.Data.CommandType.StoredProcedure;
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[0])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, 10, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[0])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@EmployeeID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 10, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[0])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@Title", System.Data.SqlDbType.NVarChar, 50, System.Data.ParameterDirection.Input, 0, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[0])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@HireDate", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, 23, 3, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[0])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@RateChangeDate", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, 23, 3, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[0])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@Rate", System.Data.SqlDbType.Money, 8, System.Data.ParameterDirection.Input, 19, 4, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[0])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@PayFrequency", System.Data.SqlDbType.TinyInt, 1, System.Data.ParameterDirection.Input, 3, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[0])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@CurrentFlag", System.Data.SqlDbType.Bit, 1, System.Data.ParameterDirection.Input, 1, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_commandCollection[1] = new System.Data.SqlClient.SqlCommand();
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[1])).Connection = new System.Data.SqlClient.SqlConnection(DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString);
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[1])).CommandText = "HumanResources.uspUpdateEmployeeLogin";
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[1])).CommandType = System.Data.CommandType.StoredProcedure;
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[1])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, 10, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[1])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@EmployeeID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 10, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[1])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@ManagerID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 10, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[1])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@LoginID", System.Data.SqlDbType.NVarChar, 256, System.Data.ParameterDirection.Input, 0, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[1])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@Title", System.Data.SqlDbType.NVarChar, 50, System.Data.ParameterDirection.Input, 0, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[1])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@HireDate", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, 23, 3, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[1])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@CurrentFlag", System.Data.SqlDbType.Bit, 1, System.Data.ParameterDirection.Input, 1, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_commandCollection[2] = new System.Data.SqlClient.SqlCommand();
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[2])).Connection = new System.Data.SqlClient.SqlConnection(DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString);
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[2])).CommandText = "HumanResources.uspUpdateEmployeePersonalInfo";
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[2])).CommandType = System.Data.CommandType.StoredProcedure;
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[2])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, 10, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[2])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@EmployeeID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 10, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[2])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@NationalIDNumber", System.Data.SqlDbType.NVarChar, 15, System.Data.ParameterDirection.Input, 0, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[2])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@BirthDate", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, 23, 3, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[2])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@MaritalStatus", System.Data.SqlDbType.NChar, 1, System.Data.ParameterDirection.Input, 0, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[2])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@Gender", System.Data.SqlDbType.NChar, 1, System.Data.ParameterDirection.Input, 0, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_commandCollection[3] = new System.Data.SqlClient.SqlCommand();
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[3])).Connection = new System.Data.SqlClient.SqlConnection(DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString);
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[3])).CommandText = "dbo.ufnGetAccountingEndDate";
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[3])).CommandType = System.Data.CommandType.StoredProcedure;
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[3])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Variant, 0, System.Data.ParameterDirection.ReturnValue, 0, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_commandCollection[4] = new System.Data.SqlClient.SqlCommand();
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[4])).Connection = new System.Data.SqlClient.SqlConnection(DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString);
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[4])).CommandText = "dbo.ufnGetAccountingStartDate";
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[4])).CommandType = System.Data.CommandType.StoredProcedure;
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[4])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Variant, 0, System.Data.ParameterDirection.ReturnValue, 0, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_commandCollection[5] = new System.Data.SqlClient.SqlCommand();
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[5])).Connection = new System.Data.SqlClient.SqlConnection(DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString);
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[5])).CommandText = "dbo.ufnGetDocumentStatusText";
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[5])).CommandType = System.Data.CommandType.StoredProcedure;
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[5])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Variant, 0, System.Data.ParameterDirection.ReturnValue, 0, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[5])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@Status", System.Data.SqlDbType.TinyInt, 1, System.Data.ParameterDirection.Input, 3, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_commandCollection[6] = new System.Data.SqlClient.SqlCommand();
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[6])).Connection = new System.Data.SqlClient.SqlConnection(DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString);
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[6])).CommandText = "dbo.ufnGetProductDealerPrice";
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[6])).CommandType = System.Data.CommandType.StoredProcedure;
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[6])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Variant, 0, System.Data.ParameterDirection.ReturnValue, 0, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[6])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 10, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[6])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@OrderDate", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, 23, 3, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_commandCollection[7] = new System.Data.SqlClient.SqlCommand();
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[7])).Connection = new System.Data.SqlClient.SqlConnection(DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString);
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[7])).CommandText = "dbo.ufnGetProductListPrice";
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[7])).CommandType = System.Data.CommandType.StoredProcedure;
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[7])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Variant, 0, System.Data.ParameterDirection.ReturnValue, 0, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[7])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 10, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[7])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@OrderDate", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, 23, 3, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_commandCollection[8] = new System.Data.SqlClient.SqlCommand();
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[8])).Connection = new System.Data.SqlClient.SqlConnection(DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString);
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[8])).CommandText = "dbo.ufnGetProductStandardCost";
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[8])).CommandType = System.Data.CommandType.StoredProcedure;
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[8])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Variant, 0, System.Data.ParameterDirection.ReturnValue, 0, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[8])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 10, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[8])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@OrderDate", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, 23, 3, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_commandCollection[9] = new System.Data.SqlClient.SqlCommand();
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[9])).Connection = new System.Data.SqlClient.SqlConnection(DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString);
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[9])).CommandText = "dbo.ufnGetPurchaseOrderStatusText";
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[9])).CommandType = System.Data.CommandType.StoredProcedure;
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[9])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Variant, 0, System.Data.ParameterDirection.ReturnValue, 0, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[9])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@Status", System.Data.SqlDbType.TinyInt, 1, System.Data.ParameterDirection.Input, 3, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_commandCollection[10] = new System.Data.SqlClient.SqlCommand();
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[10])).Connection = new System.Data.SqlClient.SqlConnection(DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString);
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[10])).CommandText = "dbo.ufnGetSalesOrderStatusText";
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[10])).CommandType = System.Data.CommandType.StoredProcedure;
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[10])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Variant, 0, System.Data.ParameterDirection.ReturnValue, 0, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[10])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@Status", System.Data.SqlDbType.TinyInt, 1, System.Data.ParameterDirection.Input, 3, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_commandCollection[11] = new System.Data.SqlClient.SqlCommand();
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[11])).Connection = new System.Data.SqlClient.SqlConnection(DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString);
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[11])).CommandText = "dbo.ufnGetStock";
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[11])).CommandType = System.Data.CommandType.StoredProcedure;
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[11])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Variant, 0, System.Data.ParameterDirection.ReturnValue, 0, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[11])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 10, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this.m_commandCollection[12] = new System.Data.SqlClient.SqlCommand();
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[12])).Connection = new System.Data.SqlClient.SqlConnection(DataGridApplication.Properties.Settings.Default.AdventureWorksConnectionString);
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[12])).CommandText = "dbo.ufnLeadingZeros";
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[12])).CommandType = System.Data.CommandType.StoredProcedure;
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[12])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Variant, 0, System.Data.ParameterDirection.ReturnValue, 0, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
            ((System.Data.SqlClient.SqlCommand)(this.m_commandCollection[12])).Parameters.Add(new System.Data.SqlClient.SqlParameter("@Value", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 10, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        public virtual System.Nullable<int> uspUpdateEmployeeHireInfo(System.Nullable<int> EmployeeID, string Title, System.Nullable<System.DateTime> HireDate, System.Nullable<System.DateTime> RateChangeDate, System.Nullable<decimal> Rate, System.Nullable<byte> PayFrequency, System.Nullable<bool> CurrentFlag) {
            System.Data.SqlClient.SqlCommand command = ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[0]));
            if ((EmployeeID.HasValue == true)) {
                command.Parameters[1].Value = ((int)(EmployeeID.Value));
            }
            else {
                command.Parameters[1].Value = System.DBNull.Value;
            }
            if ((Title == null)) {
                command.Parameters[2].Value = System.DBNull.Value;
            }
            else {
                command.Parameters[2].Value = ((string)(Title));
            }
            if ((HireDate.HasValue == true)) {
                command.Parameters[3].Value = ((System.DateTime)(HireDate.Value));
            }
            else {
                command.Parameters[3].Value = System.DBNull.Value;
            }
            if ((RateChangeDate.HasValue == true)) {
                command.Parameters[4].Value = ((System.DateTime)(RateChangeDate.Value));
            }
            else {
                command.Parameters[4].Value = System.DBNull.Value;
            }
            if ((Rate.HasValue == true)) {
                command.Parameters[5].Value = ((decimal)(Rate.Value));
            }
            else {
                command.Parameters[5].Value = System.DBNull.Value;
            }
            if ((PayFrequency.HasValue == true)) {
                command.Parameters[6].Value = ((byte)(PayFrequency.Value));
            }
            else {
                command.Parameters[6].Value = System.DBNull.Value;
            }
            if ((CurrentFlag.HasValue == true)) {
                command.Parameters[7].Value = ((bool)(CurrentFlag.Value));
            }
            else {
                command.Parameters[7].Value = System.DBNull.Value;
            }
            System.Data.ConnectionState previousConnectionState = command.Connection.State;
            command.Connection.Open();
            try {
                command.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    command.Connection.Close();
                }
            }
            if (((command.Parameters[0].Value == null) 
                        || (command.Parameters[0].Value.GetType() == typeof(System.DBNull)))) {
                return System.Nullable.FromObject<int>(null);
            }
            else {
                return new System.Nullable<int>(((int)(command.Parameters[0].Value)));
            }
        }
        
        public virtual System.Nullable<int> uspUpdateEmployeeLogin(System.Nullable<int> EmployeeID, System.Nullable<int> ManagerID, string LoginID, string Title, System.Nullable<System.DateTime> HireDate, System.Nullable<bool> CurrentFlag) {
            System.Data.SqlClient.SqlCommand command = ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[1]));
            if ((EmployeeID.HasValue == true)) {
                command.Parameters[1].Value = ((int)(EmployeeID.Value));
            }
            else {
                command.Parameters[1].Value = System.DBNull.Value;
            }
            if ((ManagerID.HasValue == true)) {
                command.Parameters[2].Value = ((int)(ManagerID.Value));
            }
            else {
                command.Parameters[2].Value = System.DBNull.Value;
            }
            if ((LoginID == null)) {
                command.Parameters[3].Value = System.DBNull.Value;
            }
            else {
                command.Parameters[3].Value = ((string)(LoginID));
            }
            if ((Title == null)) {
                command.Parameters[4].Value = System.DBNull.Value;
            }
            else {
                command.Parameters[4].Value = ((string)(Title));
            }
            if ((HireDate.HasValue == true)) {
                command.Parameters[5].Value = ((System.DateTime)(HireDate.Value));
            }
            else {
                command.Parameters[5].Value = System.DBNull.Value;
            }
            if ((CurrentFlag.HasValue == true)) {
                command.Parameters[6].Value = ((bool)(CurrentFlag.Value));
            }
            else {
                command.Parameters[6].Value = System.DBNull.Value;
            }
            System.Data.ConnectionState previousConnectionState = command.Connection.State;
            command.Connection.Open();
            try {
                command.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    command.Connection.Close();
                }
            }
            if (((command.Parameters[0].Value == null) 
                        || (command.Parameters[0].Value.GetType() == typeof(System.DBNull)))) {
                return System.Nullable.FromObject<int>(null);
            }
            else {
                return new System.Nullable<int>(((int)(command.Parameters[0].Value)));
            }
        }
        
        public virtual System.Nullable<int> uspUpdateEmployeePersonalInfo(System.Nullable<int> EmployeeID, string NationalIDNumber, System.Nullable<System.DateTime> BirthDate, string MaritalStatus, string Gender) {
            System.Data.SqlClient.SqlCommand command = ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[2]));
            if ((EmployeeID.HasValue == true)) {
                command.Parameters[1].Value = ((int)(EmployeeID.Value));
            }
            else {
                command.Parameters[1].Value = System.DBNull.Value;
            }
            if ((NationalIDNumber == null)) {
                command.Parameters[2].Value = System.DBNull.Value;
            }
            else {
                command.Parameters[2].Value = ((string)(NationalIDNumber));
            }
            if ((BirthDate.HasValue == true)) {
                command.Parameters[3].Value = ((System.DateTime)(BirthDate.Value));
            }
            else {
                command.Parameters[3].Value = System.DBNull.Value;
            }
            if ((MaritalStatus == null)) {
                command.Parameters[4].Value = System.DBNull.Value;
            }
            else {
                command.Parameters[4].Value = ((string)(MaritalStatus));
            }
            if ((Gender == null)) {
                command.Parameters[5].Value = System.DBNull.Value;
            }
            else {
                command.Parameters[5].Value = ((string)(Gender));
            }
            System.Data.ConnectionState previousConnectionState = command.Connection.State;
            command.Connection.Open();
            try {
                command.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    command.Connection.Close();
                }
            }
            if (((command.Parameters[0].Value == null) 
                        || (command.Parameters[0].Value.GetType() == typeof(System.DBNull)))) {
                return System.Nullable.FromObject<int>(null);
            }
            else {
                return new System.Nullable<int>(((int)(command.Parameters[0].Value)));
            }
        }
        
        public virtual object ufnGetAccountingEndDate() {
            System.Data.SqlClient.SqlCommand command = ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[3]));
            System.Data.ConnectionState previousConnectionState = command.Connection.State;
            command.Connection.Open();
            try {
                command.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    command.Connection.Close();
                }
            }
            if (((command.Parameters[0].Value == null) 
                        || (command.Parameters[0].Value.GetType() == typeof(System.DBNull)))) {
                return System.DBNull.Value;
            }
            else {
                return command.Parameters[0].Value;
            }
        }
        
        public virtual object ufnGetAccountingStartDate() {
            System.Data.SqlClient.SqlCommand command = ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[4]));
            System.Data.ConnectionState previousConnectionState = command.Connection.State;
            command.Connection.Open();
            try {
                command.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    command.Connection.Close();
                }
            }
            if (((command.Parameters[0].Value == null) 
                        || (command.Parameters[0].Value.GetType() == typeof(System.DBNull)))) {
                return System.DBNull.Value;
            }
            else {
                return command.Parameters[0].Value;
            }
        }
        
        public virtual object ufnGetDocumentStatusText(System.Nullable<byte> Status) {
            System.Data.SqlClient.SqlCommand command = ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[5]));
            if ((Status.HasValue == true)) {
                command.Parameters[1].Value = ((byte)(Status.Value));
            }
            else {
                command.Parameters[1].Value = System.DBNull.Value;
            }
            System.Data.ConnectionState previousConnectionState = command.Connection.State;
            command.Connection.Open();
            try {
                command.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    command.Connection.Close();
                }
            }
            if (((command.Parameters[0].Value == null) 
                        || (command.Parameters[0].Value.GetType() == typeof(System.DBNull)))) {
                return System.DBNull.Value;
            }
            else {
                return command.Parameters[0].Value;
            }
        }
        
        public virtual object ufnGetProductDealerPrice(System.Nullable<int> ProductID, System.Nullable<System.DateTime> OrderDate) {
            System.Data.SqlClient.SqlCommand command = ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[6]));
            if ((ProductID.HasValue == true)) {
                command.Parameters[1].Value = ((int)(ProductID.Value));
            }
            else {
                command.Parameters[1].Value = System.DBNull.Value;
            }
            if ((OrderDate.HasValue == true)) {
                command.Parameters[2].Value = ((System.DateTime)(OrderDate.Value));
            }
            else {
                command.Parameters[2].Value = System.DBNull.Value;
            }
            System.Data.ConnectionState previousConnectionState = command.Connection.State;
            command.Connection.Open();
            try {
                command.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    command.Connection.Close();
                }
            }
            if (((command.Parameters[0].Value == null) 
                        || (command.Parameters[0].Value.GetType() == typeof(System.DBNull)))) {
                return System.DBNull.Value;
            }
            else {
                return command.Parameters[0].Value;
            }
        }
        
        public virtual object ufnGetProductListPrice(System.Nullable<int> ProductID, System.Nullable<System.DateTime> OrderDate) {
            System.Data.SqlClient.SqlCommand command = ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[7]));
            if ((ProductID.HasValue == true)) {
                command.Parameters[1].Value = ((int)(ProductID.Value));
            }
            else {
                command.Parameters[1].Value = System.DBNull.Value;
            }
            if ((OrderDate.HasValue == true)) {
                command.Parameters[2].Value = ((System.DateTime)(OrderDate.Value));
            }
            else {
                command.Parameters[2].Value = System.DBNull.Value;
            }
            System.Data.ConnectionState previousConnectionState = command.Connection.State;
            command.Connection.Open();
            try {
                command.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    command.Connection.Close();
                }
            }
            if (((command.Parameters[0].Value == null) 
                        || (command.Parameters[0].Value.GetType() == typeof(System.DBNull)))) {
                return System.DBNull.Value;
            }
            else {
                return command.Parameters[0].Value;
            }
        }
        
        public virtual object ufnGetProductStandardCost(System.Nullable<int> ProductID, System.Nullable<System.DateTime> OrderDate) {
            System.Data.SqlClient.SqlCommand command = ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[8]));
            if ((ProductID.HasValue == true)) {
                command.Parameters[1].Value = ((int)(ProductID.Value));
            }
            else {
                command.Parameters[1].Value = System.DBNull.Value;
            }
            if ((OrderDate.HasValue == true)) {
                command.Parameters[2].Value = ((System.DateTime)(OrderDate.Value));
            }
            else {
                command.Parameters[2].Value = System.DBNull.Value;
            }
            System.Data.ConnectionState previousConnectionState = command.Connection.State;
            command.Connection.Open();
            try {
                command.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    command.Connection.Close();
                }
            }
            if (((command.Parameters[0].Value == null) 
                        || (command.Parameters[0].Value.GetType() == typeof(System.DBNull)))) {
                return System.DBNull.Value;
            }
            else {
                return command.Parameters[0].Value;
            }
        }
        
        public virtual object ufnGetPurchaseOrderStatusText(System.Nullable<byte> Status) {
            System.Data.SqlClient.SqlCommand command = ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[9]));
            if ((Status.HasValue == true)) {
                command.Parameters[1].Value = ((byte)(Status.Value));
            }
            else {
                command.Parameters[1].Value = System.DBNull.Value;
            }
            System.Data.ConnectionState previousConnectionState = command.Connection.State;
            command.Connection.Open();
            try {
                command.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    command.Connection.Close();
                }
            }
            if (((command.Parameters[0].Value == null) 
                        || (command.Parameters[0].Value.GetType() == typeof(System.DBNull)))) {
                return System.DBNull.Value;
            }
            else {
                return command.Parameters[0].Value;
            }
        }
        
        public virtual object ufnGetSalesOrderStatusText(System.Nullable<byte> Status) {
            System.Data.SqlClient.SqlCommand command = ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[10]));
            if ((Status.HasValue == true)) {
                command.Parameters[1].Value = ((byte)(Status.Value));
            }
            else {
                command.Parameters[1].Value = System.DBNull.Value;
            }
            System.Data.ConnectionState previousConnectionState = command.Connection.State;
            command.Connection.Open();
            try {
                command.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    command.Connection.Close();
                }
            }
            if (((command.Parameters[0].Value == null) 
                        || (command.Parameters[0].Value.GetType() == typeof(System.DBNull)))) {
                return System.DBNull.Value;
            }
            else {
                return command.Parameters[0].Value;
            }
        }
        
        public virtual object ufnGetStock(System.Nullable<int> ProductID) {
            System.Data.SqlClient.SqlCommand command = ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[11]));
            if ((ProductID.HasValue == true)) {
                command.Parameters[1].Value = ((int)(ProductID.Value));
            }
            else {
                command.Parameters[1].Value = System.DBNull.Value;
            }
            System.Data.ConnectionState previousConnectionState = command.Connection.State;
            command.Connection.Open();
            try {
                command.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    command.Connection.Close();
                }
            }
            if (((command.Parameters[0].Value == null) 
                        || (command.Parameters[0].Value.GetType() == typeof(System.DBNull)))) {
                return System.DBNull.Value;
            }
            else {
                return command.Parameters[0].Value;
            }
        }
        
        public virtual object ufnLeadingZeros(System.Nullable<int> Value) {
            System.Data.SqlClient.SqlCommand command = ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[12]));
            if ((Value.HasValue == true)) {
                command.Parameters[1].Value = ((int)(Value.Value));
            }
            else {
                command.Parameters[1].Value = System.DBNull.Value;
            }
            System.Data.ConnectionState previousConnectionState = command.Connection.State;
            command.Connection.Open();
            try {
                command.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    command.Connection.Close();
                }
            }
            if (((command.Parameters[0].Value == null) 
                        || (command.Parameters[0].Value.GetType() == typeof(System.DBNull)))) {
                return System.DBNull.Value;
            }
            else {
                return command.Parameters[0].Value;
            }
        }
    }
}
