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

#pragma warning disable 1591

namespace MaestroDetalle {
    using System;
    
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
    [Serializable()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.ComponentModel.ToolboxItem(true)]
    [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")]
    [System.Xml.Serialization.XmlRootAttribute("AdventureWorks_DataDataSet")]
    [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
    public partial class AdventureWorks_DataDataSet : System.Data.DataSet {
        
        private ProductDataTable tableProduct;
        
        private ProductSubcategoryDataTable tableProductSubcategory;
        
        private System.Data.DataRelation relationFK_Product_ProductSubcategory_ProductSubcategoryID;
        
        private System.Data.SchemaSerializationMode _schemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public AdventureWorks_DataDataSet() {
            this.BeginInit();
            this.InitClass();
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            base.Tables.CollectionChanged += schemaChangedHandler;
            base.Relations.CollectionChanged += schemaChangedHandler;
            this.EndInit();
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected AdventureWorks_DataDataSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                base(info, context, false) {
            if ((this.IsBinarySerialized(info, context) == true)) {
                this.InitVars(false);
                System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
                this.Tables.CollectionChanged += schemaChangedHandler1;
                this.Relations.CollectionChanged += schemaChangedHandler1;
                return;
            }
            string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
            if ((this.DetermineSchemaSerializationMode(info, context) == System.Data.SchemaSerializationMode.IncludeSchema)) {
                System.Data.DataSet ds = new System.Data.DataSet();
                ds.ReadXmlSchema(new System.Xml.XmlTextReader(new System.IO.StringReader(strSchema)));
                if ((ds.Tables["Product"] != null)) {
                    base.Tables.Add(new ProductDataTable(ds.Tables["Product"]));
                }
                if ((ds.Tables["ProductSubcategory"] != null)) {
                    base.Tables.Add(new ProductSubcategoryDataTable(ds.Tables["ProductSubcategory"]));
                }
                this.DataSetName = ds.DataSetName;
                this.Prefix = ds.Prefix;
                this.Namespace = ds.Namespace;
                this.Locale = ds.Locale;
                this.CaseSensitive = ds.CaseSensitive;
                this.EnforceConstraints = ds.EnforceConstraints;
                this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
                this.InitVars();
            }
            else {
                this.ReadXmlSchema(new System.Xml.XmlTextReader(new System.IO.StringReader(strSchema)));
            }
            this.GetSerializationData(info, context);
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            base.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ProductDataTable Product {
            get {
                return this.tableProduct;
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ProductSubcategoryDataTable ProductSubcategory {
            get {
                return this.tableProductSubcategory;
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.BrowsableAttribute(true)]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)]
        public override System.Data.SchemaSerializationMode SchemaSerializationMode {
            get {
                return this._schemaSerializationMode;
            }
            set {
                this._schemaSerializationMode = value;
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
        public new System.Data.DataTableCollection Tables {
            get {
                return base.Tables;
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
        public new System.Data.DataRelationCollection Relations {
            get {
                return base.Relations;
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected override void InitializeDerivedDataSet() {
            this.BeginInit();
            this.InitClass();
            this.EndInit();
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public override System.Data.DataSet Clone() {
            AdventureWorks_DataDataSet cln = ((AdventureWorks_DataDataSet)(base.Clone()));
            cln.InitVars();
            cln.SchemaSerializationMode = this.SchemaSerializationMode;
            return cln;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected override bool ShouldSerializeTables() {
            return false;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected override bool ShouldSerializeRelations() {
            return false;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected override void ReadXmlSerializable(System.Xml.XmlReader reader) {
            if ((this.DetermineSchemaSerializationMode(reader) == System.Data.SchemaSerializationMode.IncludeSchema)) {
                this.Reset();
                System.Data.DataSet ds = new System.Data.DataSet();
                ds.ReadXml(reader);
                if ((ds.Tables["Product"] != null)) {
                    base.Tables.Add(new ProductDataTable(ds.Tables["Product"]));
                }
                if ((ds.Tables["ProductSubcategory"] != null)) {
                    base.Tables.Add(new ProductSubcategoryDataTable(ds.Tables["ProductSubcategory"]));
                }
                this.DataSetName = ds.DataSetName;
                this.Prefix = ds.Prefix;
                this.Namespace = ds.Namespace;
                this.Locale = ds.Locale;
                this.CaseSensitive = ds.CaseSensitive;
                this.EnforceConstraints = ds.EnforceConstraints;
                this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
                this.InitVars();
            }
            else {
                this.ReadXml(reader);
                this.InitVars();
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected override System.Xml.Schema.XmlSchema GetSchemaSerializable() {
            System.IO.MemoryStream stream = new System.IO.MemoryStream();
            this.WriteXmlSchema(new System.Xml.XmlTextWriter(stream, null));
            stream.Position = 0;
            return System.Xml.Schema.XmlSchema.Read(new System.Xml.XmlTextReader(stream), null);
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        internal void InitVars() {
            this.InitVars(true);
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        internal void InitVars(bool initTable) {
            this.tableProduct = ((ProductDataTable)(base.Tables["Product"]));
            if ((initTable == true)) {
                if ((this.tableProduct != null)) {
                    this.tableProduct.InitVars();
                }
            }
            this.tableProductSubcategory = ((ProductSubcategoryDataTable)(base.Tables["ProductSubcategory"]));
            if ((initTable == true)) {
                if ((this.tableProductSubcategory != null)) {
                    this.tableProductSubcategory.InitVars();
                }
            }
            this.relationFK_Product_ProductSubcategory_ProductSubcategoryID = this.Relations["FK_Product_ProductSubcategory_ProductSubcategoryID"];
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void InitClass() {
            this.DataSetName = "AdventureWorks_DataDataSet";
            this.Prefix = "";
            this.Namespace = "http://tempuri.org/AdventureWorks_DataDataSet.xsd";
            this.EnforceConstraints = true;
            this.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
            this.tableProduct = new ProductDataTable();
            base.Tables.Add(this.tableProduct);
            this.tableProductSubcategory = new ProductSubcategoryDataTable();
            base.Tables.Add(this.tableProductSubcategory);
            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);
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private bool ShouldSerializeProduct() {
            return false;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private bool ShouldSerializeProductSubcategory() {
            return false;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
            if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
                this.InitVars();
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public static System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(System.Xml.Schema.XmlSchemaSet xs) {
            AdventureWorks_DataDataSet ds = new AdventureWorks_DataDataSet();
            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 ProductRowChangeEventHandler(object sender, ProductRowChangeEvent e);
        
        public delegate void ProductSubcategoryRowChangeEventHandler(object sender, ProductSubcategoryRowChangeEvent e);
        
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
        [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;
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public ProductDataTable() {
                this.TableName = "Product";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            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;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected ProductDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn ProductIDColumn {
                get {
                    return this.columnProductID;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn ProductNumberColumn {
                get {
                    return this.columnProductNumber;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn MakeFlagColumn {
                get {
                    return this.columnMakeFlag;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn FinishedGoodsFlagColumn {
                get {
                    return this.columnFinishedGoodsFlag;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn ColorColumn {
                get {
                    return this.columnColor;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn SafetyStockLevelColumn {
                get {
                    return this.columnSafetyStockLevel;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn ReorderPointColumn {
                get {
                    return this.columnReorderPoint;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn StandardCostColumn {
                get {
                    return this.columnStandardCost;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn ListPriceColumn {
                get {
                    return this.columnListPrice;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn SizeColumn {
                get {
                    return this.columnSize;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn SizeUnitMeasureCodeColumn {
                get {
                    return this.columnSizeUnitMeasureCode;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn WeightUnitMeasureCodeColumn {
                get {
                    return this.columnWeightUnitMeasureCode;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn WeightColumn {
                get {
                    return this.columnWeight;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn DaysToManufactureColumn {
                get {
                    return this.columnDaysToManufacture;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn ProductLineColumn {
                get {
                    return this.columnProductLine;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn ClassColumn {
                get {
                    return this.columnClass;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn StyleColumn {
                get {
                    return this.columnStyle;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn ProductSubcategoryIDColumn {
                get {
                    return this.columnProductSubcategoryID;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn ProductModelIDColumn {
                get {
                    return this.columnProductModelID;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn SellStartDateColumn {
                get {
                    return this.columnSellStartDate;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn SellEndDateColumn {
                get {
                    return this.columnSellEndDate;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn DiscontinuedDateColumn {
                get {
                    return this.columnDiscontinuedDate;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn rowguidColumn {
                get {
                    return this.columnrowguid;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn ModifiedDateColumn {
                get {
                    return this.columnModifiedDate;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public ProductRow this[int index] {
                get {
                    return ((ProductRow)(this.Rows[index]));
                }
            }
            
            public event ProductRowChangeEventHandler ProductRowChanging;
            
            public event ProductRowChangeEventHandler ProductRowChanged;
            
            public event ProductRowChangeEventHandler ProductRowDeleting;
            
            public event ProductRowChangeEventHandler ProductRowDeleted;
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void AddProductRow(ProductRow row) {
                this.Rows.Add(row);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public ProductRow AddProductRow(
                        string Name, 
                        string ProductNumber, 
                        bool MakeFlag, 
                        bool FinishedGoodsFlag, 
                        string Color, 
                        short SafetyStockLevel, 
                        short ReorderPoint, 
                        decimal StandardCost, 
                        decimal ListPrice, 
                        string Size, 
                        string SizeUnitMeasureCode, 
                        string WeightUnitMeasureCode, 
                        decimal Weight, 
                        int DaysToManufacture, 
                        string ProductLine, 
                        string Class, 
                        string Style, 
                        ProductSubcategoryRow parentProductSubcategoryRowByFK_Product_ProductSubcategory_ProductSubcategoryID, 
                        int 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,
                        SizeUnitMeasureCode,
                        WeightUnitMeasureCode,
                        Weight,
                        DaysToManufacture,
                        ProductLine,
                        Class,
                        Style,
                        parentProductSubcategoryRowByFK_Product_ProductSubcategory_ProductSubcategoryID[0],
                        ProductModelID,
                        SellStartDate,
                        SellEndDate,
                        DiscontinuedDate,
                        rowguid,
                        ModifiedDate};
                this.Rows.Add(rowProductRow);
                return rowProductRow;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public ProductRow FindByProductID(int ProductID) {
                return ((ProductRow)(this.Rows.Find(new object[] {
                            ProductID})));
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public override System.Data.DataTable Clone() {
                ProductDataTable cln = ((ProductDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override System.Data.DataTable CreateInstance() {
                return new ProductDataTable();
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            internal void InitVars() {
                this.columnProductID = base.Columns["ProductID"];
                this.columnName = base.Columns["Name"];
                this.columnProductNumber = base.Columns["ProductNumber"];
                this.columnMakeFlag = base.Columns["MakeFlag"];
                this.columnFinishedGoodsFlag = base.Columns["FinishedGoodsFlag"];
                this.columnColor = base.Columns["Color"];
                this.columnSafetyStockLevel = base.Columns["SafetyStockLevel"];
                this.columnReorderPoint = base.Columns["ReorderPoint"];
                this.columnStandardCost = base.Columns["StandardCost"];
                this.columnListPrice = base.Columns["ListPrice"];
                this.columnSize = base.Columns["Size"];
                this.columnSizeUnitMeasureCode = base.Columns["SizeUnitMeasureCode"];
                this.columnWeightUnitMeasureCode = base.Columns["WeightUnitMeasureCode"];
                this.columnWeight = base.Columns["Weight"];
                this.columnDaysToManufacture = base.Columns["DaysToManufacture"];
                this.columnProductLine = base.Columns["ProductLine"];
                this.columnClass = base.Columns["Class"];
                this.columnStyle = base.Columns["Style"];
                this.columnProductSubcategoryID = base.Columns["ProductSubcategoryID"];
                this.columnProductModelID = base.Columns["ProductModelID"];
                this.columnSellStartDate = base.Columns["SellStartDate"];
                this.columnSellEndDate = base.Columns["SellEndDate"];
                this.columnDiscontinuedDate = base.Columns["DiscontinuedDate"];
                this.columnrowguid = base.Columns["rowguid"];
                this.columnModifiedDate = base.Columns["ModifiedDate"];
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            private void InitClass() {
                this.columnProductID = new System.Data.DataColumn("ProductID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductID);
                this.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;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public ProductRow NewProductRow() {
                return ((ProductRow)(this.NewRow()));
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ProductRow(builder);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override System.Type GetRowType() {
                return typeof(ProductRow);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            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));
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            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));
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            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));
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            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));
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void RemoveProductRow(ProductRow row) {
                this.Rows.Remove(row);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) {
                System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType();
                System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence();
                AdventureWorks_DataDataSet ds = new AdventureWorks_DataDataSet();
                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.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
        [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 columnName;
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public ProductSubcategoryDataTable() {
                this.TableName = "ProductSubcategory";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            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;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected ProductSubcategoryDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn ProductSubcategoryIDColumn {
                get {
                    return this.columnProductSubcategoryID;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public ProductSubcategoryRow this[int index] {
                get {
                    return ((ProductSubcategoryRow)(this.Rows[index]));
                }
            }
            
            public event ProductSubcategoryRowChangeEventHandler ProductSubcategoryRowChanging;
            
            public event ProductSubcategoryRowChangeEventHandler ProductSubcategoryRowChanged;
            
            public event ProductSubcategoryRowChangeEventHandler ProductSubcategoryRowDeleting;
            
            public event ProductSubcategoryRowChangeEventHandler ProductSubcategoryRowDeleted;
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void AddProductSubcategoryRow(ProductSubcategoryRow row) {
                this.Rows.Add(row);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public ProductSubcategoryRow AddProductSubcategoryRow(string Name) {
                ProductSubcategoryRow rowProductSubcategoryRow = ((ProductSubcategoryRow)(this.NewRow()));
                rowProductSubcategoryRow.ItemArray = new object[] {
                        null,
                        Name};
                this.Rows.Add(rowProductSubcategoryRow);
                return rowProductSubcategoryRow;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public ProductSubcategoryRow FindByProductSubcategoryID(int ProductSubcategoryID) {
                return ((ProductSubcategoryRow)(this.Rows.Find(new object[] {
                            ProductSubcategoryID})));
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public override System.Data.DataTable Clone() {
                ProductSubcategoryDataTable cln = ((ProductSubcategoryDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override System.Data.DataTable CreateInstance() {
                return new ProductSubcategoryDataTable();
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            internal void InitVars() {
                this.columnProductSubcategoryID = base.Columns["ProductSubcategoryID"];
                this.columnName = base.Columns["Name"];
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            private void InitClass() {
                this.columnProductSubcategoryID = new System.Data.DataColumn("ProductSubcategoryID", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnProductSubcategoryID);
                this.columnName = new System.Data.DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnName);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnProductSubcategoryID}, true));
                this.columnProductSubcategoryID.AutoIncrement = true;
                this.columnProductSubcategoryID.AllowDBNull = false;
                this.columnProductSubcategoryID.ReadOnly = true;
                this.columnProductSubcategoryID.Unique = true;
                this.columnName.AllowDBNull = false;
                this.columnName.MaxLength = 50;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public ProductSubcategoryRow NewProductSubcategoryRow() {
                return ((ProductSubcategoryRow)(this.NewRow()));
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ProductSubcategoryRow(builder);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override System.Type GetRowType() {
                return typeof(ProductSubcategoryRow);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            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));
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            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));
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            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));
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            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));
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void RemoveProductSubcategoryRow(ProductSubcategoryRow row) {
                this.Rows.Remove(row);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) {
                System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType();
                System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence();
                AdventureWorks_DataDataSet ds = new AdventureWorks_DataDataSet();
                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.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
        public partial class ProductRow : System.Data.DataRow {
            
            private ProductDataTable tableProduct;
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            internal ProductRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableProduct = ((ProductDataTable)(this.Table));
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public int ProductID {
                get {
                    return ((int)(this[this.tableProduct.ProductIDColumn]));
                }
                set {
                    this[this.tableProduct.ProductIDColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string Name {
                get {
                    return ((string)(this[this.tableProduct.NameColumn]));
                }
                set {
                    this[this.tableProduct.NameColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string ProductNumber {
                get {
                    return ((string)(this[this.tableProduct.ProductNumberColumn]));
                }
                set {
                    this[this.tableProduct.ProductNumberColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool MakeFlag {
                get {
                    return ((bool)(this[this.tableProduct.MakeFlagColumn]));
                }
                set {
                    this[this.tableProduct.MakeFlagColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool FinishedGoodsFlag {
                get {
                    return ((bool)(this[this.tableProduct.FinishedGoodsFlagColumn]));
                }
                set {
                    this[this.tableProduct.FinishedGoodsFlagColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            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;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public short SafetyStockLevel {
                get {
                    return ((short)(this[this.tableProduct.SafetyStockLevelColumn]));
                }
                set {
                    this[this.tableProduct.SafetyStockLevelColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public short ReorderPoint {
                get {
                    return ((short)(this[this.tableProduct.ReorderPointColumn]));
                }
                set {
                    this[this.tableProduct.ReorderPointColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public decimal StandardCost {
                get {
                    return ((decimal)(this[this.tableProduct.StandardCostColumn]));
                }
                set {
                    this[this.tableProduct.StandardCostColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public decimal ListPrice {
                get {
                    return ((decimal)(this[this.tableProduct.ListPriceColumn]));
                }
                set {
                    this[this.tableProduct.ListPriceColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            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;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            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;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            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;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            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;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public int DaysToManufacture {
                get {
                    return ((int)(this[this.tableProduct.DaysToManufactureColumn]));
                }
                set {
                    this[this.tableProduct.DaysToManufactureColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            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;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            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;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            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;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            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;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            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;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.DateTime SellStartDate {
                get {
                    return ((System.DateTime)(this[this.tableProduct.SellStartDateColumn]));
                }
                set {
                    this[this.tableProduct.SellStartDateColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            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;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            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;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Guid rowguid {
                get {
                    return ((System.Guid)(this[this.tableProduct.rowguidColumn]));
                }
                set {
                    this[this.tableProduct.rowguidColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.DateTime ModifiedDate {
                get {
                    return ((System.DateTime)(this[this.tableProduct.ModifiedDateColumn]));
                }
                set {
                    this[this.tableProduct.ModifiedDateColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            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"]);
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool IsColorNull() {
                return this.IsNull(this.tableProduct.ColorColumn);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void SetColorNull() {
                this[this.tableProduct.ColorColumn] = System.Convert.DBNull;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool IsSizeNull() {
                return this.IsNull(this.tableProduct.SizeColumn);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void SetSizeNull() {
                this[this.tableProduct.SizeColumn] = System.Convert.DBNull;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool IsSizeUnitMeasureCodeNull() {
                return this.IsNull(this.tableProduct.SizeUnitMeasureCodeColumn);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void SetSizeUnitMeasureCodeNull() {
                this[this.tableProduct.SizeUnitMeasureCodeColumn] = System.Convert.DBNull;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool IsWeightUnitMeasureCodeNull() {
                return this.IsNull(this.tableProduct.WeightUnitMeasureCodeColumn);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void SetWeightUnitMeasureCodeNull() {
                this[this.tableProduct.WeightUnitMeasureCodeColumn] = System.Convert.DBNull;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool IsWeightNull() {
                return this.IsNull(this.tableProduct.WeightColumn);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void SetWeightNull() {
                this[this.tableProduct.WeightColumn] = System.Convert.DBNull;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool IsProductLineNull() {
                return this.IsNull(this.tableProduct.ProductLineColumn);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void SetProductLineNull() {
                this[this.tableProduct.ProductLineColumn] = System.Convert.DBNull;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool IsClassNull() {
                return this.IsNull(this.tableProduct.ClassColumn);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void SetClassNull() {
                this[this.tableProduct.ClassColumn] = System.Convert.DBNull;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool IsStyleNull() {
                return this.IsNull(this.tableProduct.StyleColumn);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void SetStyleNull() {
                this[this.tableProduct.StyleColumn] = System.Convert.DBNull;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool IsProductSubcategoryIDNull() {
                return this.IsNull(this.tableProduct.ProductSubcategoryIDColumn);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void SetProductSubcategoryIDNull() {
                this[this.tableProduct.ProductSubcategoryIDColumn] = System.Convert.DBNull;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool IsProductModelIDNull() {
                return this.IsNull(this.tableProduct.ProductModelIDColumn);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void SetProductModelIDNull() {
                this[this.tableProduct.ProductModelIDColumn] = System.Convert.DBNull;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool IsSellEndDateNull() {
                return this.IsNull(this.tableProduct.SellEndDateColumn);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void SetSellEndDateNull() {
                this[this.tableProduct.SellEndDateColumn] = System.Convert.DBNull;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool IsDiscontinuedDateNull() {
                return this.IsNull(this.tableProduct.DiscontinuedDateColumn);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void SetDiscontinuedDateNull() {
                this[this.tableProduct.DiscontinuedDateColumn] = System.Convert.DBNull;
            }
        }
        
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
        public partial class ProductSubcategoryRow : System.Data.DataRow {
            
            private ProductSubcategoryDataTable tableProductSubcategory;
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            internal ProductSubcategoryRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableProductSubcategory = ((ProductSubcategoryDataTable)(this.Table));
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public int ProductSubcategoryID {
                get {
                    return ((int)(this[this.tableProductSubcategory.ProductSubcategoryIDColumn]));
                }
                set {
                    this[this.tableProductSubcategory.ProductSubcategoryIDColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string Name {
                get {
                    return ((string)(this[this.tableProductSubcategory.NameColumn]));
                }
                set {
                    this[this.tableProductSubcategory.NameColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public ProductRow[] GetProductRows() {
                return ((ProductRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Product_ProductSubcategory_ProductSubcategoryID"])));
            }
        }
        
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
        public class ProductRowChangeEvent : System.EventArgs {
            
            private ProductRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public ProductRowChangeEvent(ProductRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public ProductRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
        public class ProductSubcategoryRowChangeEvent : System.EventArgs {
            
            private ProductSubcategoryRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public ProductSubcategoryRowChangeEvent(ProductSubcategoryRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public ProductSubcategoryRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}
namespace MaestroDetalle.AdventureWorks_DataDataSetTableAdapters {
    
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.ComponentModel.ToolboxItem(true)]
    [System.ComponentModel.DataObjectAttribute(true)]
    [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
        ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
    [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
    public partial class ProductTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter _adapter;
        
        private System.Data.SqlClient.SqlConnection _connection;
        
        private System.Data.SqlClient.SqlCommand[] _commandCollection;
        
        private bool _clearBeforeFill;
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public ProductTableAdapter() {
            this.ClearBeforeFill = true;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this._adapter == null)) {
                    this.InitAdapter();
                }
                return this._adapter;
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this._connection == null)) {
                    this.InitConnection();
                }
                return this._connection;
            }
            set {
                this._connection = value;
                if ((this.Adapter.InsertCommand != null)) {
                    this.Adapter.InsertCommand.Connection = value;
                }
                if ((this.Adapter.DeleteCommand != null)) {
                    this.Adapter.DeleteCommand.Connection = value;
                }
                if ((this.Adapter.UpdateCommand != null)) {
                    this.Adapter.UpdateCommand.Connection = value;
                }
                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
                    if ((this.CommandCollection[i] != null)) {
                        ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
                    }
                }
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this._commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this._commandCollection;
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public bool ClearBeforeFill {
            get {
                return this._clearBeforeFill;
            }
            set {
                this._clearBeforeFill = value;
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void InitAdapter() {
            this._adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "Product";
            tableMapping.ColumnMappings.Add("ProductID", "ProductID");
            tableMapping.ColumnMappings.Add("Name", "Name");
            tableMapping.ColumnMappings.Add("ProductNumber", "ProductNumber");
            tableMapping.ColumnMappings.Add("MakeFlag", "MakeFlag");
            tableMapping.ColumnMappings.Add("FinishedGoodsFlag", "FinishedGoodsFlag");
            tableMapping.ColumnMappings.Add("Color", "Color");
            tableMapping.ColumnMappings.Add("SafetyStockLevel", "SafetyStockLevel");
            tableMapping.ColumnMappings.Add("ReorderPoint", "ReorderPoint");
            tableMapping.ColumnMappings.Add("StandardCost", "StandardCost");
            tableMapping.ColumnMappings.Add("ListPrice", "ListPrice");
            tableMapping.ColumnMappings.Add("Size", "Size");
            tableMapping.ColumnMappings.Add("SizeUnitMeasureCode", "SizeUnitMeasureCode");
            tableMapping.ColumnMappings.Add("WeightUnitMeasureCode", "WeightUnitMeasureCode");
            tableMapping.ColumnMappings.Add("Weight", "Weight");
            tableMapping.ColumnMappings.Add("DaysToManufacture", "DaysToManufacture");
            tableMapping.ColumnMappings.Add("ProductLine", "ProductLine");
            tableMapping.ColumnMappings.Add("Class", "Class");
            tableMapping.ColumnMappings.Add("Style", "Style");
            tableMapping.ColumnMappings.Add("ProductSubcategoryID", "ProductSubcategoryID");
            tableMapping.ColumnMappings.Add("ProductModelID", "ProductModelID");
            tableMapping.ColumnMappings.Add("SellStartDate", "SellStartDate");
            tableMapping.ColumnMappings.Add("SellEndDate", "SellEndDate");
            tableMapping.ColumnMappings.Add("DiscontinuedDate", "DiscontinuedDate");
            tableMapping.ColumnMappings.Add("rowguid", "rowguid");
            tableMapping.ColumnMappings.Add("ModifiedDate", "ModifiedDate");
            this._adapter.TableMappings.Add(tableMapping);
            this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this._adapter.DeleteCommand.Connection = this.Connection;
            this._adapter.DeleteCommand.CommandText = "DELETE FROM [Production].[Product] WHERE (([ProductID] = @Original_ProductID) AND" +
                " ([Name] = @Original_Name) AND ([ProductNumber] = @Original_ProductNumber) AND (" +
                "[MakeFlag] = @Original_MakeFlag) AND ([FinishedGoodsFlag] = @Original_FinishedGo" +
                "odsFlag) AND ((@IsNull_Color = 1 AND [Color] IS NULL) OR ([Color] = @Original_Co" +
                "lor)) AND ([SafetyStockLevel] = @Original_SafetyStockLevel) AND ([ReorderPoint] " +
                "= @Original_ReorderPoint) AND ([StandardCost] = @Original_StandardCost) AND ([Li" +
                "stPrice] = @Original_ListPrice) AND ((@IsNull_Size = 1 AND [Size] IS NULL) OR ([" +
                "Size] = @Original_Size)) AND ((@IsNull_SizeUnitMeasureCode = 1 AND [SizeUnitMeas" +
                "ureCode] IS NULL) OR ([SizeUnitMeasureCode] = @Original_SizeUnitMeasureCode)) AN" +
                "D ((@IsNull_WeightUnitMeasureCode = 1 AND [WeightUnitMeasureCode] IS NULL) OR ([" +
                "WeightUnitMeasureCode] = @Original_WeightUnitMeasureCode)) AND ((@IsNull_Weight " +
                "= 1 AND [Weight] IS NULL) OR ([Weight] = @Original_Weight)) AND ([DaysToManufact" +
                "ure] = @Original_DaysToManufacture) AND ((@IsNull_ProductLine = 1 AND [ProductLi" +
                "ne] IS NULL) OR ([ProductLine] = @Original_ProductLine)) AND ((@IsNull_Class = 1" +
                " AND [Class] IS NULL) OR ([Class] = @Original_Class)) AND ((@IsNull_Style = 1 AN" +
                "D [Style] IS NULL) OR ([Style] = @Original_Style)) AND ((@IsNull_ProductSubcateg" +
                "oryID = 1 AND [ProductSubcategoryID] IS NULL) OR ([ProductSubcategoryID] = @Orig" +
                "inal_ProductSubcategoryID)) AND ((@IsNull_ProductModelID = 1 AND [ProductModelID" +
                "] IS NULL) OR ([ProductModelID] = @Original_ProductModelID)) AND ([SellStartDate" +
                "] = @Original_SellStartDate) AND ((@IsNull_SellEndDate = 1 AND [SellEndDate] IS " +
                "NULL) OR ([SellEndDate] = @Original_SellEndDate)) AND ((@IsNull_DiscontinuedDate" +
                " = 1 AND [DiscontinuedDate] IS NULL) OR ([DiscontinuedDate] = @Original_Disconti" +
                "nuedDate)) AND ([rowguid] = @Original_rowguid) AND ([ModifiedDate] = @Original_M" +
                "odifiedDate))";
            this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
            this._adapter.InsertCommand.Connection = this.Connection;
            this._adapter.InsertCommand.CommandText = @"INSERT INTO [Production].[Product] ([Name], [ProductNumber], [MakeFlag], [FinishedGoodsFlag], [Color], [SafetyStockLevel], [ReorderPoint], [StandardCost], [ListPrice], [Size], [SizeUnitMeasureCode], [WeightUnitMeasureCode], [Weight], [DaysToManufacture], [ProductLine], [Class], [Style], [ProductSubcategoryID], [ProductModelID], [SellStartDate], [SellEndDate], [DiscontinuedDate], [rowguid], [ModifiedDate]) VALUES (@Name, @ProductNumber, @MakeFlag, @FinishedGoodsFlag, @Color, @SafetyStockLevel, @ReorderPoint, @StandardCost, @ListPrice, @Size, @SizeUnitMeasureCode, @WeightUnitMeasureCode, @Weight, @DaysToManufacture, @ProductLine, @Class, @Style, @ProductSubcategoryID, @ProductModelID, @SellStartDate, @SellEndDate, @DiscontinuedDate, @rowguid, @ModifiedDate);
SELECT ProductID, Name, ProductNumber, MakeFlag, FinishedGoodsFlag, Color, SafetyStockLevel, ReorderPoint, StandardCost, ListPrice, Size, SizeUnitMeasureCode, WeightUnitMeasureCode, Weight, DaysToManufacture, ProductLine, Class, Style, ProductSubcategoryID, ProductModelID, SellStartDate, SellEndDate, DiscontinuedDate, rowguid, ModifiedDate FROM Production.Product WHERE (ProductID = SCOPE_IDENTITY())";
            this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this._adapter.UpdateCommand.Connection = this.Connection;
            this._adapter.UpdateCommand.CommandText = "UPDATE [Production].[Product] SET [Name] = @Name, [ProductNumber] = @ProductNumbe" +
                "r, [MakeFlag] = @MakeFlag, [FinishedGoodsFlag] = @FinishedGoodsFlag, [Color] = @" +
                "Color, [SafetyStockLevel] = @SafetyStockLevel, [ReorderPoint] = @ReorderPoint, [" +
                "StandardCost] = @StandardCost, [ListPrice] = @ListPrice, [Size] = @Size, [SizeUn" +
                "itMeasureCode] = @SizeUnitMeasureCode, [WeightUnitMeasureCode] = @WeightUnitMeas" +
                "ureCode, [Weight] = @Weight, [DaysToManufacture] = @DaysToManufacture, [ProductL" +
                "ine] = @ProductLine, [Class] = @Class, [Style] = @Style, [ProductSubcategoryID] " +
                "= @ProductSubcategoryID, [ProductModelID] = @ProductModelID, [SellStartDate] = @" +
                "SellStartDate, [SellEndDate] = @SellEndDate, [DiscontinuedDate] = @DiscontinuedD" +
                "ate, [rowguid] = @rowguid, [ModifiedDate] = @ModifiedDate WHERE (([ProductID] = " +
                "@Original_ProductID) AND ([Name] = @Original_Name) AND ([ProductNumber] = @Origi" +
                "nal_ProductNumber) AND ([MakeFlag] = @Original_MakeFlag) AND ([FinishedGoodsFlag" +
                "] = @Original_FinishedGoodsFlag) AND ((@IsNull_Color = 1 AND [Color] IS NULL) OR" +
                " ([Color] = @Original_Color)) AND ([SafetyStockLevel] = @Original_SafetyStockLev" +
                "el) AND ([ReorderPoint] = @Original_ReorderPoint) AND ([StandardCost] = @Origina" +
                "l_StandardCost) AND ([ListPrice] = @Original_ListPrice) AND ((@IsNull_Size = 1 A" +
                "ND [Size] IS NULL) OR ([Size] = @Original_Size)) AND ((@IsNull_SizeUnitMeasureCo" +
                "de = 1 AND [SizeUnitMeasureCode] IS NULL) OR ([SizeUnitMeasureCode] = @Original_" +
                "SizeUnitMeasureCode)) AND ((@IsNull_WeightUnitMeasureCode = 1 AND [WeightUnitMea" +
                "sureCode] IS NULL) OR ([WeightUnitMeasureCode] = @Original_WeightUnitMeasureCode" +
                ")) AND ((@IsNull_Weight = 1 AND [Weight] IS NULL) OR ([Weight] = @Original_Weigh" +
                "t)) AND ([DaysToManufacture] = @Original_DaysToManufacture) AND ((@IsNull_Produc" +
                "tLine = 1 AND [ProductLine] IS NULL) OR ([ProductLine] = @Original_ProductLine))" +
                " AND ((@IsNull_Class = 1 AND [Class] IS NULL) OR ([Class] = @Original_Class)) AN" +
                "D ((@IsNull_Style = 1 AND [Style] IS NULL) OR ([Style] = @Original_Style)) AND (" +
                "(@IsNull_ProductSubcategoryID = 1 AND [ProductSubcategoryID] IS NULL) OR ([Produ" +
                "ctSubcategoryID] = @Original_ProductSubcategoryID)) AND ((@IsNull_ProductModelID" +
                " = 1 AND [ProductModelID] IS NULL) OR ([ProductModelID] = @Original_ProductModel" +
                "ID)) AND ([SellStartDate] = @Original_SellStartDate) AND ((@IsNull_SellEndDate =" +
                " 1 AND [SellEndDate] IS NULL) OR ([SellEndDate] = @Original_SellEndDate)) AND ((" +
                "@IsNull_DiscontinuedDate = 1 AND [DiscontinuedDate] IS NULL) OR ([DiscontinuedDa" +
                "te] = @Original_DiscontinuedDate)) AND ([rowguid] = @Original_rowguid) AND ([Mod" +
                "ifiedDate] = @Original_ModifiedDate));\r\nSELECT ProductID, Name, ProductNumber, M" +
                "akeFlag, FinishedGoodsFlag, Color, SafetyStockLevel, ReorderPoint, StandardCost," +
                " ListPrice, Size, SizeUnitMeasureCode, WeightUnitMeasureCode, Weight, DaysToManu" +
                "facture, ProductLine, Class, Style, ProductSubcategoryID, ProductModelID, SellSt" +
                "artDate, SellEndDate, DiscontinuedDate, rowguid, ModifiedDate FROM Production.Pr" +
                "oduct WHERE (ProductID = @ProductID)";
            this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ProductID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ProductID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._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._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ProductID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "ProductID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void InitConnection() {
            this._connection = new System.Data.SqlClient.SqlConnection();
            this._connection.ConnectionString = global::MaestroDetalle.Properties.Settings.Default.AdventureWorks_DataConnectionString;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void InitCommandCollection() {
            this._commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this._commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this._commandCollection[0].Connection = this.Connection;
            this._commandCollection[0].CommandText = @"SELECT ProductID, Name, ProductNumber, MakeFlag, FinishedGoodsFlag, Color, SafetyStockLevel, ReorderPoint, StandardCost, ListPrice, Size, SizeUnitMeasureCode, WeightUnitMeasureCode, Weight, DaysToManufacture, ProductLine, Class, Style, ProductSubcategoryID, ProductModelID, SellStartDate, SellEndDate, DiscontinuedDate, rowguid, ModifiedDate FROM Production.Product";
            this._commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorks_DataDataSet.ProductDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.ClearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorks_DataDataSet.ProductDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorks_DataDataSet.ProductDataTable dataTable = new AdventureWorks_DataDataSet.ProductDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        public virtual int Update(AdventureWorks_DataDataSet.ProductDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        public virtual int Update(AdventureWorks_DataDataSet dataSet) {
            return this.Adapter.Update(dataSet, "Product");
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(
                    int Original_ProductID, 
                    string Original_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 = ((object)(1));
                this.Adapter.DeleteCommand.Parameters[6].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0));
                this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_Color));
            }
            this.Adapter.DeleteCommand.Parameters[7].Value = ((short)(Original_SafetyStockLevel));
            this.Adapter.DeleteCommand.Parameters[8].Value = ((short)(Original_ReorderPoint));
            this.Adapter.DeleteCommand.Parameters[9].Value = ((decimal)(Original_StandardCost));
            this.Adapter.DeleteCommand.Parameters[10].Value = ((decimal)(Original_ListPrice));
            if ((Original_Size == null)) {
                this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1));
                this.Adapter.DeleteCommand.Parameters[12].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0));
                this.Adapter.DeleteCommand.Parameters[12].Value = ((string)(Original_Size));
            }
            if ((Original_SizeUnitMeasureCode == null)) {
                this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(1));
                this.Adapter.DeleteCommand.Parameters[14].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(0));
                this.Adapter.DeleteCommand.Parameters[14].Value = ((string)(Original_SizeUnitMeasureCode));
            }
            if ((Original_WeightUnitMeasureCode == null)) {
                this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(1));
                this.Adapter.DeleteCommand.Parameters[16].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(0));
                this.Adapter.DeleteCommand.Parameters[16].Value = ((string)(Original_WeightUnitMeasureCode));
            }
            if ((Original_Weight.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[17].Value = ((object)(0));
                this.Adapter.DeleteCommand.Parameters[18].Value = ((decimal)(Original_Weight.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[17].Value = ((object)(1));
                this.Adapter.DeleteCommand.Parameters[18].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[19].Value = ((int)(Original_DaysToManufacture));
            if ((Original_ProductLine == null)) {
                this.Adapter.DeleteCommand.Parameters[20].Value = ((object)(1));
                this.Adapter.DeleteCommand.Parameters[21].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[20].Value = ((object)(0));
                this.Adapter.DeleteCommand.Parameters[21].Value = ((string)(Original_ProductLine));
            }
            if ((Original_Class == null)) {
                this.Adapter.DeleteCommand.Parameters[22].Value = ((object)(1));
                this.Adapter.DeleteCommand.Parameters[23].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[22].Value = ((object)(0));
                this.Adapter.DeleteCommand.Parameters[23].Value = ((string)(Original_Class));
            }
            if ((Original_Style == null)) {
                this.Adapter.DeleteCommand.Parameters[24].Value = ((object)(1));
                this.Adapter.DeleteCommand.Parameters[25].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[24].Value = ((object)(0));
                this.Adapter.DeleteCommand.Parameters[25].Value = ((string)(Original_Style));
            }
            if ((Original_ProductSubcategoryID.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[26].Value = ((object)(0));
                this.Adapter.DeleteCommand.Parameters[27].Value = ((int)(Original_ProductSubcategoryID.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[26].Value = ((object)(1));
                this.Adapter.DeleteCommand.Parameters[27].Value = System.DBNull.Value;
            }
            if ((Original_ProductModelID.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[28].Value = ((object)(0));
                this.Adapter.DeleteCommand.Parameters[29].Value = ((int)(Original_ProductModelID.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[28].Value = ((object)(1));
                this.Adapter.DeleteCommand.Parameters[29].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[30].Value = ((System.DateTime)(Original_SellStartDate));
            if ((Original_SellEndDate.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[31].Value = ((object)(0));
                this.Adapter.DeleteCommand.Parameters[32].Value = ((System.DateTime)(Original_SellEndDate.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[31].Value = ((object)(1));
                this.Adapter.DeleteCommand.Parameters[32].Value = System.DBNull.Value;
            }
            if ((Original_DiscontinuedDate.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[33].Value = ((object)(0));
                this.Adapter.DeleteCommand.Parameters[34].Value = ((System.DateTime)(Original_DiscontinuedDate.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[33].Value = ((object)(1));
                this.Adapter.DeleteCommand.Parameters[34].Value = 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;
            if (((this.Adapter.DeleteCommand.Connection.State & System.Data.ConnectionState.Open) 
                        != System.Data.ConnectionState.Open)) {
                this.Adapter.DeleteCommand.Connection.Open();
            }
            try {
                int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
                return returnValue;
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(
                    string Name, 
                    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;
            if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open) 
                        != System.Data.ConnectionState.Open)) {
                this.Adapter.InsertCommand.Connection.Open();
            }
            try {
                int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
                return returnValue;
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    string Name, 
                    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 = ((object)(1));
                this.Adapter.UpdateCommand.Parameters[30].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[29].Value = ((object)(0));
                this.Adapter.UpdateCommand.Parameters[30].Value = ((string)(Original_Color));
            }
            this.Adapter.UpdateCommand.Parameters[31].Value = ((short)(Original_SafetyStockLevel));
            this.Adapter.UpdateCommand.Parameters[32].Value = ((short)(Original_ReorderPoint));
            this.Adapter.UpdateCommand.Parameters[33].Value = ((decimal)(Original_StandardCost));
            this.Adapter.UpdateCommand.Parameters[34].Value = ((decimal)(Original_ListPrice));
            if ((Original_Size == null)) {
                this.Adapter.UpdateCommand.Parameters[35].Value = ((object)(1));
                this.Adapter.UpdateCommand.Parameters[36].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[35].Value = ((object)(0));
                this.Adapter.UpdateCommand.Parameters[36].Value = ((string)(Original_Size));
            }
            if ((Original_SizeUnitMeasureCode == null)) {
                this.Adapter.UpdateCommand.Parameters[37].Value = ((object)(1));
                this.Adapter.UpdateCommand.Parameters[38].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[37].Value = ((object)(0));
                this.Adapter.UpdateCommand.Parameters[38].Value = ((string)(Original_SizeUnitMeasureCode));
            }
            if ((Original_WeightUnitMeasureCode == null)) {
                this.Adapter.UpdateCommand.Parameters[39].Value = ((object)(1));
                this.Adapter.UpdateCommand.Parameters[40].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[39].Value = ((object)(0));
                this.Adapter.UpdateCommand.Parameters[40].Value = ((string)(Original_WeightUnitMeasureCode));
            }
            if ((Original_Weight.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[41].Value = ((object)(0));
                this.Adapter.UpdateCommand.Parameters[42].Value = ((decimal)(Original_Weight.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[41].Value = ((object)(1));
                this.Adapter.UpdateCommand.Parameters[42].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[43].Value = ((int)(Original_DaysToManufacture));
            if ((Original_ProductLine == null)) {
                this.Adapter.UpdateCommand.Parameters[44].Value = ((object)(1));
                this.Adapter.UpdateCommand.Parameters[45].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[44].Value = ((object)(0));
                this.Adapter.UpdateCommand.Parameters[45].Value = ((string)(Original_ProductLine));
            }
            if ((Original_Class == null)) {
                this.Adapter.UpdateCommand.Parameters[46].Value = ((object)(1));
                this.Adapter.UpdateCommand.Parameters[47].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[46].Value = ((object)(0));
                this.Adapter.UpdateCommand.Parameters[47].Value = ((string)(Original_Class));
            }
            if ((Original_Style == null)) {
                this.Adapter.UpdateCommand.Parameters[48].Value = ((object)(1));
                this.Adapter.UpdateCommand.Parameters[49].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[48].Value = ((object)(0));
                this.Adapter.UpdateCommand.Parameters[49].Value = ((string)(Original_Style));
            }
            if ((Original_ProductSubcategoryID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[50].Value = ((object)(0));
                this.Adapter.UpdateCommand.Parameters[51].Value = ((int)(Original_ProductSubcategoryID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[50].Value = ((object)(1));
                this.Adapter.UpdateCommand.Parameters[51].Value = System.DBNull.Value;
            }
            if ((Original_ProductModelID.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[52].Value = ((object)(0));
                this.Adapter.UpdateCommand.Parameters[53].Value = ((int)(Original_ProductModelID.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[52].Value = ((object)(1));
                this.Adapter.UpdateCommand.Parameters[53].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[54].Value = ((System.DateTime)(Original_SellStartDate));
            if ((Original_SellEndDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[55].Value = ((object)(0));
                this.Adapter.UpdateCommand.Parameters[56].Value = ((System.DateTime)(Original_SellEndDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[55].Value = ((object)(1));
                this.Adapter.UpdateCommand.Parameters[56].Value = System.DBNull.Value;
            }
            if ((Original_DiscontinuedDate.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[57].Value = ((object)(0));
                this.Adapter.UpdateCommand.Parameters[58].Value = ((System.DateTime)(Original_DiscontinuedDate.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[57].Value = ((object)(1));
                this.Adapter.UpdateCommand.Parameters[58].Value = 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;
            if (((this.Adapter.UpdateCommand.Connection.State & System.Data.ConnectionState.Open) 
                        != System.Data.ConnectionState.Open)) {
                this.Adapter.UpdateCommand.Connection.Open();
            }
            try {
                int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
                return returnValue;
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.ComponentModel.ToolboxItem(true)]
    [System.ComponentModel.DataObjectAttribute(true)]
    [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
        ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
    [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
    public partial class ProductSubcategoryTableAdapter : System.ComponentModel.Component {
        
        private System.Data.SqlClient.SqlDataAdapter _adapter;
        
        private System.Data.SqlClient.SqlConnection _connection;
        
        private System.Data.SqlClient.SqlCommand[] _commandCollection;
        
        private bool _clearBeforeFill;
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public ProductSubcategoryTableAdapter() {
            this.ClearBeforeFill = true;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this._adapter == null)) {
                    this.InitAdapter();
                }
                return this._adapter;
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        internal System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this._connection == null)) {
                    this.InitConnection();
                }
                return this._connection;
            }
            set {
                this._connection = value;
                if ((this.Adapter.InsertCommand != null)) {
                    this.Adapter.InsertCommand.Connection = value;
                }
                if ((this.Adapter.DeleteCommand != null)) {
                    this.Adapter.DeleteCommand.Connection = value;
                }
                if ((this.Adapter.UpdateCommand != null)) {
                    this.Adapter.UpdateCommand.Connection = value;
                }
                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
                    if ((this.CommandCollection[i] != null)) {
                        ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
                    }
                }
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this._commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this._commandCollection;
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public bool ClearBeforeFill {
            get {
                return this._clearBeforeFill;
            }
            set {
                this._clearBeforeFill = value;
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void InitAdapter() {
            this._adapter = new System.Data.SqlClient.SqlDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "ProductSubcategory";
            tableMapping.ColumnMappings.Add("ProductSubcategoryID", "ProductSubcategoryID");
            tableMapping.ColumnMappings.Add("Name", "Name");
            this._adapter.TableMappings.Add(tableMapping);
            this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this._adapter.DeleteCommand.Connection = this.Connection;
            this._adapter.DeleteCommand.CommandText = "DELETE FROM [Production].[ProductSubcategory] WHERE (([ProductSubcategoryID] = @O" +
                "riginal_ProductSubcategoryID) AND ([Name] = @Original_Name))";
            this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this._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._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._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this._adapter.UpdateCommand.Connection = this.Connection;
            this._adapter.UpdateCommand.CommandText = @"UPDATE [Production].[ProductSubcategory] SET [Name] = @Name WHERE (([ProductSubcategoryID] = @Original_ProductSubcategoryID) AND ([Name] = @Original_Name));
SELECT ProductSubcategoryID, Name FROM Production.ProductSubcategory WHERE (ProductSubcategoryID = @ProductSubcategoryID)";
            this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this._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._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._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._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, "", "", ""));
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void InitConnection() {
            this._connection = new System.Data.SqlClient.SqlConnection();
            this._connection.ConnectionString = global::MaestroDetalle.Properties.Settings.Default.AdventureWorks_DataConnectionString;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void InitCommandCollection() {
            this._commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this._commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this._commandCollection[0].Connection = this.Connection;
            this._commandCollection[0].CommandText = "SELECT ProductSubcategoryID, Name FROM Production.ProductSubcategory";
            this._commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(AdventureWorks_DataDataSet.ProductSubcategoryDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.ClearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual AdventureWorks_DataDataSet.ProductSubcategoryDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            AdventureWorks_DataDataSet.ProductSubcategoryDataTable dataTable = new AdventureWorks_DataDataSet.ProductSubcategoryDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        public virtual int Update(AdventureWorks_DataDataSet.ProductSubcategoryDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        public virtual int Update(AdventureWorks_DataDataSet dataSet) {
            return this.Adapter.Update(dataSet, "ProductSubcategory");
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_ProductSubcategoryID, string Original_Name) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ProductSubcategoryID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name));
            }
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            if (((this.Adapter.DeleteCommand.Connection.State & System.Data.ConnectionState.Open) 
                        != System.Data.ConnectionState.Open)) {
                this.Adapter.DeleteCommand.Connection.Open();
            }
            try {
                int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
                return returnValue;
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(string Name, int Original_ProductSubcategoryID, string Original_Name, int ProductSubcategoryID) {
            if ((Name == null)) {
                throw new System.ArgumentNullException("Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name));
            }
            this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Original_ProductSubcategoryID));
            if ((Original_Name == null)) {
                throw new System.ArgumentNullException("Original_Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Original_Name));
            }
            this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(ProductSubcategoryID));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            if (((this.Adapter.UpdateCommand.Connection.State & System.Data.ConnectionState.Open) 
                        != System.Data.ConnectionState.Open)) {
                this.Adapter.UpdateCommand.Connection.Open();
            }
            try {
                int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
                return returnValue;
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
}

#pragma warning restore 1591