#pragma once

#using <mscorlib.dll>
#using <System.dll>
#using <System.Data.dll>
#using <System.Xml.dll>
#using <System.Data.dll>

using namespace System::Security::Permissions;
[assembly:SecurityPermissionAttribute(SecurityAction::RequestMinimum, SkipVerification=false)];
// 
// This source code was auto-generated by xsd, Version=2.0.50727.42.
// 
namespace DisconnectedApplication {
    using namespace System;
    
    using namespace System;
    ref class NorthwindDataSet;
    
    
    [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0"), 
    Serializable, 
    System::ComponentModel::DesignerCategoryAttribute(L"code"), 
    System::ComponentModel::ToolboxItem(true), 
    System::Xml::Serialization::XmlSchemaProviderAttribute(L"GetTypedDataSetSchema"), 
    System::Xml::Serialization::XmlRootAttribute(L"NorthwindDataSet"), 
    System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.DataSet")]
    public ref class NorthwindDataSet : public System::Data::DataSet {
        public : ref class ProductsDataTable;
        public : ref class ProductsRow;
        public : ref class ProductsRowChangeEvent;
        
        private: DisconnectedApplication::NorthwindDataSet::ProductsDataTable^  tableProducts;
        
        private: System::Data::SchemaSerializationMode _schemaSerializationMode;
        
        public : delegate System::Void ProductsRowChangeEventHandler(System::Object^  sender, DisconnectedApplication::NorthwindDataSet::ProductsRowChangeEvent^  e);
        
        public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        NorthwindDataSet();
        protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        NorthwindDataSet(System::Runtime::Serialization::SerializationInfo^  info, System::Runtime::Serialization::StreamingContext context);
        public: [System::Diagnostics::DebuggerNonUserCodeAttribute, 
        System::ComponentModel::Browsable(false), 
        System::ComponentModel::DesignerSerializationVisibility(System::ComponentModel::DesignerSerializationVisibility::Content)]
         property DisconnectedApplication::NorthwindDataSet::ProductsDataTable^  Products {
            DisconnectedApplication::NorthwindDataSet::ProductsDataTable^  get();
        }
        
        public: [System::Diagnostics::DebuggerNonUserCodeAttribute, 
        System::ComponentModel::BrowsableAttribute(true), 
        System::ComponentModel::DesignerSerializationVisibilityAttribute(System::ComponentModel::DesignerSerializationVisibility::Visible)]
        virtual  property System::Data::SchemaSerializationMode SchemaSerializationMode {
            System::Data::SchemaSerializationMode get() override;
            System::Void set(System::Data::SchemaSerializationMode value) override;
        }
        
        public: [System::Diagnostics::DebuggerNonUserCodeAttribute, 
        System::ComponentModel::DesignerSerializationVisibilityAttribute(System::ComponentModel::DesignerSerializationVisibility::Hidden)]
         property System::Data::DataTableCollection^  Tables {
            System::Data::DataTableCollection^  get() new;
        }
        
        public: [System::Diagnostics::DebuggerNonUserCodeAttribute, 
        System::ComponentModel::DesignerSerializationVisibilityAttribute(System::ComponentModel::DesignerSerializationVisibility::Hidden)]
         property System::Data::DataRelationCollection^  Relations {
            System::Data::DataRelationCollection^  get() new;
        }
        
        protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        virtual System::Void InitializeDerivedDataSet() override;
        
        public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        virtual System::Data::DataSet^  Clone() override;
        
        protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        virtual System::Boolean ShouldSerializeTables() override;
        
        protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        virtual System::Boolean ShouldSerializeRelations() override;
        
        protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        virtual System::Void ReadXmlSerializable(System::Xml::XmlReader^  reader) override;
        
        protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        virtual System::Xml::Schema::XmlSchema^  GetSchemaSerializable() override;
        
        internal: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        System::Void InitVars();
        
        internal: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        System::Void InitVars(System::Boolean initTable);
        
        private: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        System::Void InitClass();
        
        private: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        System::Boolean ShouldSerializeProducts();
        
        private: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        System::Void SchemaChanged(System::Object^  sender, System::ComponentModel::CollectionChangeEventArgs^  e);
        
        public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        static System::Xml::Schema::XmlSchemaComplexType^  GetTypedDataSetSchema(System::Xml::Schema::XmlSchemaSet^  xs);
        
        public : [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0"), 
        System::Serializable, 
        System::Xml::Serialization::XmlSchemaProviderAttribute(L"GetTypedTableSchema")]
        ref class ProductsDataTable : public System::Data::DataTable, public System::Collections::IEnumerable {
            
            private: System::Data::DataColumn^  columnProductID;
            
            private: System::Data::DataColumn^  columnProductName;
            
            private: System::Data::DataColumn^  columnUnitPrice;
            
            private: System::Data::DataColumn^  columnUnitsInStock;
            
            public: event DisconnectedApplication::NorthwindDataSet::ProductsRowChangeEventHandler^  ProductsRowChanging;
            
            public: event DisconnectedApplication::NorthwindDataSet::ProductsRowChangeEventHandler^  ProductsRowChanged;
            
            public: event DisconnectedApplication::NorthwindDataSet::ProductsRowChangeEventHandler^  ProductsRowDeleting;
            
            public: event DisconnectedApplication::NorthwindDataSet::ProductsRowChangeEventHandler^  ProductsRowDeleted;
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            ProductsDataTable();
            internal: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            ProductsDataTable(System::Data::DataTable^  table);
            protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            ProductsDataTable(System::Runtime::Serialization::SerializationInfo^  info, System::Runtime::Serialization::StreamingContext context);
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
             property System::Data::DataColumn^  ProductIDColumn {
                System::Data::DataColumn^  get();
            }
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
             property System::Data::DataColumn^  ProductNameColumn {
                System::Data::DataColumn^  get();
            }
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
             property System::Data::DataColumn^  UnitPriceColumn {
                System::Data::DataColumn^  get();
            }
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
             property System::Data::DataColumn^  UnitsInStockColumn {
                System::Data::DataColumn^  get();
            }
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute, 
            System::ComponentModel::Browsable(false)]
             property System::Int32 Count {
                System::Int32 get();
            }
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
             property DisconnectedApplication::NorthwindDataSet::ProductsRow^  default [System::Int32 ] {
                DisconnectedApplication::NorthwindDataSet::ProductsRow^  get(System::Int32 index);
            }
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            System::Void AddProductsRow(DisconnectedApplication::NorthwindDataSet::ProductsRow^  row);
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            DisconnectedApplication::NorthwindDataSet::ProductsRow^  AddProductsRow(System::String^  ProductName, System::Decimal UnitPrice, 
                        System::Int16 UnitsInStock);
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            DisconnectedApplication::NorthwindDataSet::ProductsRow^  FindByProductID(System::Int32 ProductID);
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            virtual System::Collections::IEnumerator^  GetEnumerator();
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            virtual System::Data::DataTable^  Clone() override;
            
            protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            virtual System::Data::DataTable^  CreateInstance() override;
            
            internal: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            System::Void InitVars();
            
            private: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            System::Void InitClass();
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            DisconnectedApplication::NorthwindDataSet::ProductsRow^  NewProductsRow();
            
            protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            virtual System::Data::DataRow^  NewRowFromBuilder(System::Data::DataRowBuilder^  builder) override;
            
            protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            virtual System::Type^  GetRowType() override;
            
            protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            virtual System::Void OnRowChanged(System::Data::DataRowChangeEventArgs^  e) override;
            
            protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            virtual System::Void OnRowChanging(System::Data::DataRowChangeEventArgs^  e) override;
            
            protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            virtual System::Void OnRowDeleted(System::Data::DataRowChangeEventArgs^  e) override;
            
            protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            virtual System::Void OnRowDeleting(System::Data::DataRowChangeEventArgs^  e) override;
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            System::Void RemoveProductsRow(DisconnectedApplication::NorthwindDataSet::ProductsRow^  row);
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            static System::Xml::Schema::XmlSchemaComplexType^  GetTypedTableSchema(System::Xml::Schema::XmlSchemaSet^  xs);
        };
        
        public : [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0")]
        ref class ProductsRow : public System::Data::DataRow {
            
            private: DisconnectedApplication::NorthwindDataSet::ProductsDataTable^  tableProducts;
            
            internal: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            ProductsRow(System::Data::DataRowBuilder^  rb);
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
             property System::Int32 ProductID {
                System::Int32 get();
                System::Void set(System::Int32 value);
            }
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
             property System::String^  ProductName {
                System::String^  get();
                System::Void set(System::String^  value);
            }
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
             property System::Decimal UnitPrice {
                System::Decimal get();
                System::Void set(System::Decimal value);
            }
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
             property System::Int16 UnitsInStock {
                System::Int16 get();
                System::Void set(System::Int16 value);
            }
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            System::Boolean IsProductNameNull();
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            System::Void SetProductNameNull();
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            System::Boolean IsUnitPriceNull();
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            System::Void SetUnitPriceNull();
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            System::Boolean IsUnitsInStockNull();
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            System::Void SetUnitsInStockNull();
        };
        
        public : [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0")]
        ref class ProductsRowChangeEvent : public System::EventArgs {
            
            private: DisconnectedApplication::NorthwindDataSet::ProductsRow^  eventRow;
            
            private: System::Data::DataRowAction eventAction;
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            ProductsRowChangeEvent(DisconnectedApplication::NorthwindDataSet::ProductsRow^  row, System::Data::DataRowAction action);
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
             property DisconnectedApplication::NorthwindDataSet::ProductsRow^  Row {
                DisconnectedApplication::NorthwindDataSet::ProductsRow^  get();
            }
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
             property System::Data::DataRowAction Action {
                System::Data::DataRowAction get();
            }
        };
    };
}
namespace DisconnectedApplication {
    
    
    inline NorthwindDataSet::NorthwindDataSet() {
        this->BeginInit();
        this->InitClass();
        System::ComponentModel::CollectionChangeEventHandler^  schemaChangedHandler = gcnew System::ComponentModel::CollectionChangeEventHandler(this, &DisconnectedApplication::NorthwindDataSet::SchemaChanged);
        __super::Tables->CollectionChanged += schemaChangedHandler;
        __super::Relations->CollectionChanged += schemaChangedHandler;
        this->EndInit();
    }
    
    inline NorthwindDataSet::NorthwindDataSet(System::Runtime::Serialization::SerializationInfo^  info, System::Runtime::Serialization::StreamingContext context) : 
            System::Data::DataSet(info, context, false) {
        if (this->IsBinarySerialized(info, context) == true) {
            this->InitVars(false);
            System::ComponentModel::CollectionChangeEventHandler^  schemaChangedHandler1 = gcnew System::ComponentModel::CollectionChangeEventHandler(this, &DisconnectedApplication::NorthwindDataSet::SchemaChanged);
            this->Tables->CollectionChanged += schemaChangedHandler1;
            this->Relations->CollectionChanged += schemaChangedHandler1;
            return;
        }
        System::String^  strSchema = (cli::safe_cast<System::String^  >(info->GetValue(L"XmlSchema", System::String::typeid)));
        if (this->DetermineSchemaSerializationMode(info, context) == System::Data::SchemaSerializationMode::IncludeSchema) {
            System::Data::DataSet^  ds = (gcnew System::Data::DataSet());
            ds->ReadXmlSchema((gcnew System::Xml::XmlTextReader((gcnew System::IO::StringReader(strSchema)))));
            if (ds->Tables[L"Products"] != nullptr) {
                __super::Tables->Add((gcnew DisconnectedApplication::NorthwindDataSet::ProductsDataTable(ds->Tables[L"Products"])));
            }
            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((gcnew System::Xml::XmlTextReader((gcnew System::IO::StringReader(strSchema)))));
        }
        this->GetSerializationData(info, context);
        System::ComponentModel::CollectionChangeEventHandler^  schemaChangedHandler = gcnew System::ComponentModel::CollectionChangeEventHandler(this, &DisconnectedApplication::NorthwindDataSet::SchemaChanged);
        __super::Tables->CollectionChanged += schemaChangedHandler;
        this->Relations->CollectionChanged += schemaChangedHandler;
    }
    
    inline DisconnectedApplication::NorthwindDataSet::ProductsDataTable^  NorthwindDataSet::Products::get() {
        return this->tableProducts;
    }
    
    inline System::Data::SchemaSerializationMode NorthwindDataSet::SchemaSerializationMode::get() {
        return this->_schemaSerializationMode;
    }
    inline System::Void NorthwindDataSet::SchemaSerializationMode::set(System::Data::SchemaSerializationMode value) {
        this->_schemaSerializationMode = __identifier(value);
    }
    
    inline System::Data::DataTableCollection^  NorthwindDataSet::Tables::get() {
        return __super::Tables;
    }
    
    inline System::Data::DataRelationCollection^  NorthwindDataSet::Relations::get() {
        return __super::Relations;
    }
    
    inline System::Void NorthwindDataSet::InitializeDerivedDataSet() {
        this->BeginInit();
        this->InitClass();
        this->EndInit();
    }
    
    inline System::Data::DataSet^  NorthwindDataSet::Clone() {
        DisconnectedApplication::NorthwindDataSet^  cln = (cli::safe_cast<DisconnectedApplication::NorthwindDataSet^  >(__super::Clone()));
        cln->InitVars();
        cln->SchemaSerializationMode = this->SchemaSerializationMode;
        return cln;
    }
    
    inline System::Boolean NorthwindDataSet::ShouldSerializeTables() {
        return false;
    }
    
    inline System::Boolean NorthwindDataSet::ShouldSerializeRelations() {
        return false;
    }
    
    inline System::Void NorthwindDataSet::ReadXmlSerializable(System::Xml::XmlReader^  reader) {
        if (this->DetermineSchemaSerializationMode(reader) == System::Data::SchemaSerializationMode::IncludeSchema) {
            this->Reset();
            System::Data::DataSet^  ds = (gcnew System::Data::DataSet());
            ds->ReadXml(reader);
            if (ds->Tables[L"Products"] != nullptr) {
                __super::Tables->Add((gcnew DisconnectedApplication::NorthwindDataSet::ProductsDataTable(ds->Tables[L"Products"])));
            }
            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();
        }
    }
    
    inline System::Xml::Schema::XmlSchema^  NorthwindDataSet::GetSchemaSerializable() {
        System::IO::MemoryStream^  stream = (gcnew System::IO::MemoryStream());
        this->WriteXmlSchema((gcnew System::Xml::XmlTextWriter(stream, nullptr)));
        stream->Position = 0;
        return System::Xml::Schema::XmlSchema::Read((gcnew System::Xml::XmlTextReader(stream)), nullptr);
    }
    
    inline System::Void NorthwindDataSet::InitVars() {
        this->InitVars(true);
    }
    
    inline System::Void NorthwindDataSet::InitVars(System::Boolean initTable) {
        this->tableProducts = (cli::safe_cast<DisconnectedApplication::NorthwindDataSet::ProductsDataTable^  >(__super::Tables[L"Products"]));
        if (initTable == true) {
            if (this->tableProducts != nullptr) {
                this->tableProducts->InitVars();
            }
        }
    }
    
    inline System::Void NorthwindDataSet::InitClass() {
        this->DataSetName = L"NorthwindDataSet";
        this->Prefix = L"";
        this->Namespace = L"http://tempuri.org/NorthwindDataSet.xsd";
        this->EnforceConstraints = true;
        this->SchemaSerializationMode = System::Data::SchemaSerializationMode::IncludeSchema;
        this->tableProducts = (gcnew DisconnectedApplication::NorthwindDataSet::ProductsDataTable());
        __super::Tables->Add(this->tableProducts);
    }
    
    inline System::Boolean NorthwindDataSet::ShouldSerializeProducts() {
        return false;
    }
    
    inline System::Void NorthwindDataSet::SchemaChanged(System::Object^  sender, System::ComponentModel::CollectionChangeEventArgs^  e) {
        if (e->Action == System::ComponentModel::CollectionChangeAction::Remove) {
            this->InitVars();
        }
    }
    
    inline System::Xml::Schema::XmlSchemaComplexType^  NorthwindDataSet::GetTypedDataSetSchema(System::Xml::Schema::XmlSchemaSet^  xs) {
        DisconnectedApplication::NorthwindDataSet^  ds = (gcnew DisconnectedApplication::NorthwindDataSet());
        System::Xml::Schema::XmlSchemaComplexType^  type = (gcnew System::Xml::Schema::XmlSchemaComplexType());
        System::Xml::Schema::XmlSchemaSequence^  sequence = (gcnew System::Xml::Schema::XmlSchemaSequence());
        xs->Add(ds->GetSchemaSerializable());
        System::Xml::Schema::XmlSchemaAny^  any = (gcnew System::Xml::Schema::XmlSchemaAny());
        any->Namespace = ds->Namespace;
        sequence->Items->Add(any);
        type->Particle = sequence;
        return type;
    }
    
    
    inline NorthwindDataSet::ProductsDataTable::ProductsDataTable() {
        this->TableName = L"Products";
        this->BeginInit();
        this->InitClass();
        this->EndInit();
    }
    
    inline NorthwindDataSet::ProductsDataTable::ProductsDataTable(System::Data::DataTable^  table) {
        this->TableName = table->TableName;
        if (table->CaseSensitive != table->DataSet->CaseSensitive) {
            this->CaseSensitive = table->CaseSensitive;
        }
        if (table->Locale->ToString() != table->DataSet->Locale->ToString()) {
            this->Locale = table->Locale;
        }
        if (table->Namespace != table->DataSet->Namespace) {
            this->Namespace = table->Namespace;
        }
        this->Prefix = table->Prefix;
        this->MinimumCapacity = table->MinimumCapacity;
    }
    
    inline NorthwindDataSet::ProductsDataTable::ProductsDataTable(System::Runtime::Serialization::SerializationInfo^  info, 
                System::Runtime::Serialization::StreamingContext context) : 
            System::Data::DataTable(info, context) {
        this->InitVars();
    }
    
    inline System::Data::DataColumn^  NorthwindDataSet::ProductsDataTable::ProductIDColumn::get() {
        return this->columnProductID;
    }
    
    inline System::Data::DataColumn^  NorthwindDataSet::ProductsDataTable::ProductNameColumn::get() {
        return this->columnProductName;
    }
    
    inline System::Data::DataColumn^  NorthwindDataSet::ProductsDataTable::UnitPriceColumn::get() {
        return this->columnUnitPrice;
    }
    
    inline System::Data::DataColumn^  NorthwindDataSet::ProductsDataTable::UnitsInStockColumn::get() {
        return this->columnUnitsInStock;
    }
    
    inline System::Int32 NorthwindDataSet::ProductsDataTable::Count::get() {
        return this->Rows->Count;
    }
    
    inline DisconnectedApplication::NorthwindDataSet::ProductsRow^  NorthwindDataSet::ProductsDataTable::default::get(System::Int32 index) {
        return (cli::safe_cast<DisconnectedApplication::NorthwindDataSet::ProductsRow^  >(this->Rows[index]));
    }
    
    inline System::Void NorthwindDataSet::ProductsDataTable::AddProductsRow(DisconnectedApplication::NorthwindDataSet::ProductsRow^  row) {
        this->Rows->Add(row);
    }
    
    inline DisconnectedApplication::NorthwindDataSet::ProductsRow^  NorthwindDataSet::ProductsDataTable::AddProductsRow(System::String^  ProductName, 
                System::Decimal UnitPrice, System::Int16 UnitsInStock) {
        DisconnectedApplication::NorthwindDataSet::ProductsRow^  rowProductsRow = (cli::safe_cast<DisconnectedApplication::NorthwindDataSet::ProductsRow^  >(this->NewRow()));
        rowProductsRow->ItemArray = gcnew cli::array< System::Object^  >(4) {nullptr, ProductName, UnitPrice, UnitsInStock};
        this->Rows->Add(rowProductsRow);
        return rowProductsRow;
    }
    
    inline DisconnectedApplication::NorthwindDataSet::ProductsRow^  NorthwindDataSet::ProductsDataTable::FindByProductID(
                System::Int32 ProductID) {
        return (cli::safe_cast<DisconnectedApplication::NorthwindDataSet::ProductsRow^  >(this->Rows->Find(gcnew cli::array< System::Object^  >(1) {ProductID})));
    }
    
    inline System::Collections::IEnumerator^  NorthwindDataSet::ProductsDataTable::GetEnumerator() {
        return this->Rows->GetEnumerator();
    }
    
    inline System::Data::DataTable^  NorthwindDataSet::ProductsDataTable::Clone() {
        DisconnectedApplication::NorthwindDataSet::ProductsDataTable^  cln = (cli::safe_cast<DisconnectedApplication::NorthwindDataSet::ProductsDataTable^  >(__super::Clone()));
        cln->InitVars();
        return cln;
    }
    
    inline System::Data::DataTable^  NorthwindDataSet::ProductsDataTable::CreateInstance() {
        return (gcnew DisconnectedApplication::NorthwindDataSet::ProductsDataTable());
    }
    
    inline System::Void NorthwindDataSet::ProductsDataTable::InitVars() {
        this->columnProductID = __super::Columns[L"ProductID"];
        this->columnProductName = __super::Columns[L"ProductName"];
        this->columnUnitPrice = __super::Columns[L"UnitPrice"];
        this->columnUnitsInStock = __super::Columns[L"UnitsInStock"];
    }
    
    inline System::Void NorthwindDataSet::ProductsDataTable::InitClass() {
        this->columnProductID = (gcnew System::Data::DataColumn(L"ProductID", System::Int32::typeid, nullptr, System::Data::MappingType::Element));
        __super::Columns->Add(this->columnProductID);
        this->columnProductName = (gcnew System::Data::DataColumn(L"ProductName", System::String::typeid, nullptr, System::Data::MappingType::Element));
        __super::Columns->Add(this->columnProductName);
        this->columnUnitPrice = (gcnew System::Data::DataColumn(L"UnitPrice", System::Decimal::typeid, nullptr, System::Data::MappingType::Element));
        __super::Columns->Add(this->columnUnitPrice);
        this->columnUnitsInStock = (gcnew System::Data::DataColumn(L"UnitsInStock", System::Int16::typeid, nullptr, System::Data::MappingType::Element));
        __super::Columns->Add(this->columnUnitsInStock);
        this->Constraints->Add((gcnew System::Data::UniqueConstraint(L"Constraint1", gcnew cli::array< System::Data::DataColumn^  >(1) {this->columnProductID}, 
                true)));
        this->columnProductID->AutoIncrement = true;
        this->columnProductID->AllowDBNull = false;
        this->columnProductID->Unique = true;
        this->columnProductName->MaxLength = 40;
    }
    
    inline DisconnectedApplication::NorthwindDataSet::ProductsRow^  NorthwindDataSet::ProductsDataTable::NewProductsRow() {
        return (cli::safe_cast<DisconnectedApplication::NorthwindDataSet::ProductsRow^  >(this->NewRow()));
    }
    
    inline System::Data::DataRow^  NorthwindDataSet::ProductsDataTable::NewRowFromBuilder(System::Data::DataRowBuilder^  builder) {
        return (gcnew DisconnectedApplication::NorthwindDataSet::ProductsRow(builder));
    }
    
    inline System::Type^  NorthwindDataSet::ProductsDataTable::GetRowType() {
        return DisconnectedApplication::NorthwindDataSet::ProductsRow::typeid;
    }
    
    inline System::Void NorthwindDataSet::ProductsDataTable::OnRowChanged(System::Data::DataRowChangeEventArgs^  e) {
        __super::OnRowChanged(e);
        {
            this->ProductsRowChanged(this, (gcnew DisconnectedApplication::NorthwindDataSet::ProductsRowChangeEvent((cli::safe_cast<DisconnectedApplication::NorthwindDataSet::ProductsRow^  >(e->Row)), 
                    e->Action)));
        }
    }
    
    inline System::Void NorthwindDataSet::ProductsDataTable::OnRowChanging(System::Data::DataRowChangeEventArgs^  e) {
        __super::OnRowChanging(e);
        {
            this->ProductsRowChanging(this, (gcnew DisconnectedApplication::NorthwindDataSet::ProductsRowChangeEvent((cli::safe_cast<DisconnectedApplication::NorthwindDataSet::ProductsRow^  >(e->Row)), 
                    e->Action)));
        }
    }
    
    inline System::Void NorthwindDataSet::ProductsDataTable::OnRowDeleted(System::Data::DataRowChangeEventArgs^  e) {
        __super::OnRowDeleted(e);
        {
            this->ProductsRowDeleted(this, (gcnew DisconnectedApplication::NorthwindDataSet::ProductsRowChangeEvent((cli::safe_cast<DisconnectedApplication::NorthwindDataSet::ProductsRow^  >(e->Row)), 
                    e->Action)));
        }
    }
    
    inline System::Void NorthwindDataSet::ProductsDataTable::OnRowDeleting(System::Data::DataRowChangeEventArgs^  e) {
        __super::OnRowDeleting(e);
        {
            this->ProductsRowDeleting(this, (gcnew DisconnectedApplication::NorthwindDataSet::ProductsRowChangeEvent((cli::safe_cast<DisconnectedApplication::NorthwindDataSet::ProductsRow^  >(e->Row)), 
                    e->Action)));
        }
    }
    
    inline System::Void NorthwindDataSet::ProductsDataTable::RemoveProductsRow(DisconnectedApplication::NorthwindDataSet::ProductsRow^  row) {
        this->Rows->Remove(row);
    }
    
    inline System::Xml::Schema::XmlSchemaComplexType^  NorthwindDataSet::ProductsDataTable::GetTypedTableSchema(System::Xml::Schema::XmlSchemaSet^  xs) {
        System::Xml::Schema::XmlSchemaComplexType^  type = (gcnew System::Xml::Schema::XmlSchemaComplexType());
        System::Xml::Schema::XmlSchemaSequence^  sequence = (gcnew System::Xml::Schema::XmlSchemaSequence());
        DisconnectedApplication::NorthwindDataSet^  ds = (gcnew DisconnectedApplication::NorthwindDataSet());
        xs->Add(ds->GetSchemaSerializable());
        System::Xml::Schema::XmlSchemaAny^  any1 = (gcnew System::Xml::Schema::XmlSchemaAny());
        any1->Namespace = L"http://www.w3.org/2001/XMLSchema";
        any1->MinOccurs = System::Decimal(0);
        any1->MaxOccurs = System::Decimal::MaxValue;
        any1->ProcessContents = System::Xml::Schema::XmlSchemaContentProcessing::Lax;
        sequence->Items->Add(any1);
        System::Xml::Schema::XmlSchemaAny^  any2 = (gcnew System::Xml::Schema::XmlSchemaAny());
        any2->Namespace = L"urn:schemas-microsoft-com:xml-diffgram-v1";
        any2->MinOccurs = System::Decimal(1);
        any2->ProcessContents = System::Xml::Schema::XmlSchemaContentProcessing::Lax;
        sequence->Items->Add(any2);
        System::Xml::Schema::XmlSchemaAttribute^  attribute1 = (gcnew System::Xml::Schema::XmlSchemaAttribute());
        attribute1->Name = L"namespace";
        attribute1->FixedValue = ds->Namespace;
        type->Attributes->Add(attribute1);
        System::Xml::Schema::XmlSchemaAttribute^  attribute2 = (gcnew System::Xml::Schema::XmlSchemaAttribute());
        attribute2->Name = L"tableTypeName";
        attribute2->FixedValue = L"ProductsDataTable";
        type->Attributes->Add(attribute2);
        type->Particle = sequence;
        return type;
    }
    
    
    inline NorthwindDataSet::ProductsRow::ProductsRow(System::Data::DataRowBuilder^  rb) : 
            System::Data::DataRow(rb) {
        this->tableProducts = (cli::safe_cast<DisconnectedApplication::NorthwindDataSet::ProductsDataTable^  >(this->Table));
    }
    
    inline System::Int32 NorthwindDataSet::ProductsRow::ProductID::get() {
        return (*cli::safe_cast<System::Int32^>(this[this->tableProducts->ProductIDColumn]));
    }
    inline System::Void NorthwindDataSet::ProductsRow::ProductID::set(System::Int32 value) {
        this[this->tableProducts->ProductIDColumn] = value;
    }
    
    inline System::String^  NorthwindDataSet::ProductsRow::ProductName::get() {
        try {
            return (cli::safe_cast<System::String^  >(this[this->tableProducts->ProductNameColumn]));
        }
        catch (System::InvalidCastException^ e) {
            throw (gcnew System::Data::StrongTypingException(L"The value for column \'ProductName\' in table \'Products\' is DBNull.", 
                e));
        }
    }
    inline System::Void NorthwindDataSet::ProductsRow::ProductName::set(System::String^  value) {
        this[this->tableProducts->ProductNameColumn] = value;
    }
    
    inline System::Decimal NorthwindDataSet::ProductsRow::UnitPrice::get() {
        try {
            return (*cli::safe_cast<System::Decimal^>(this[this->tableProducts->UnitPriceColumn]));
        }
        catch (System::InvalidCastException^ e) {
            throw (gcnew System::Data::StrongTypingException(L"The value for column \'UnitPrice\' in table \'Products\' is DBNull.", 
                e));
        }
    }
    inline System::Void NorthwindDataSet::ProductsRow::UnitPrice::set(System::Decimal value) {
        this[this->tableProducts->UnitPriceColumn] = value;
    }
    
    inline System::Int16 NorthwindDataSet::ProductsRow::UnitsInStock::get() {
        try {
            return (*cli::safe_cast<System::Int16^>(this[this->tableProducts->UnitsInStockColumn]));
        }
        catch (System::InvalidCastException^ e) {
            throw (gcnew System::Data::StrongTypingException(L"The value for column \'UnitsInStock\' in table \'Products\' is DBNull.", 
                e));
        }
    }
    inline System::Void NorthwindDataSet::ProductsRow::UnitsInStock::set(System::Int16 value) {
        this[this->tableProducts->UnitsInStockColumn] = value;
    }
    
    inline System::Boolean NorthwindDataSet::ProductsRow::IsProductNameNull() {
        return this->IsNull(this->tableProducts->ProductNameColumn);
    }
    
    inline System::Void NorthwindDataSet::ProductsRow::SetProductNameNull() {
        this[this->tableProducts->ProductNameColumn] = System::Convert::DBNull;
    }
    
    inline System::Boolean NorthwindDataSet::ProductsRow::IsUnitPriceNull() {
        return this->IsNull(this->tableProducts->UnitPriceColumn);
    }
    
    inline System::Void NorthwindDataSet::ProductsRow::SetUnitPriceNull() {
        this[this->tableProducts->UnitPriceColumn] = System::Convert::DBNull;
    }
    
    inline System::Boolean NorthwindDataSet::ProductsRow::IsUnitsInStockNull() {
        return this->IsNull(this->tableProducts->UnitsInStockColumn);
    }
    
    inline System::Void NorthwindDataSet::ProductsRow::SetUnitsInStockNull() {
        this[this->tableProducts->UnitsInStockColumn] = System::Convert::DBNull;
    }
    
    
    inline NorthwindDataSet::ProductsRowChangeEvent::ProductsRowChangeEvent(DisconnectedApplication::NorthwindDataSet::ProductsRow^  row, 
                System::Data::DataRowAction action) {
        this->eventRow = row;
        this->eventAction = action;
    }
    
    inline DisconnectedApplication::NorthwindDataSet::ProductsRow^  NorthwindDataSet::ProductsRowChangeEvent::Row::get() {
        return this->eventRow;
    }
    
    inline System::Data::DataRowAction NorthwindDataSet::ProductsRowChangeEvent::Action::get() {
        return this->eventAction;
    }
}
namespace DisconnectedApplication {
    namespace NorthwindDataSetTableAdapters {
    
    using namespace System;
    ref class ProductsTableAdapter;
    
    
    [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0"), 
    System::ComponentModel::DesignerCategoryAttribute(L"code"), 
    System::ComponentModel::ToolboxItem(true), 
    System::ComponentModel::DataObjectAttribute(true), 
    System::ComponentModel::DesignerAttribute(L"Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" 
L", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), 
    System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
    public ref class ProductsTableAdapter : public System::ComponentModel::Component {
        
        private: System::Data::OleDb::OleDbDataAdapter^  _adapter;
        
        private: System::Data::OleDb::OleDbConnection^  _connection;
        
        private: cli::array< System::Data::OleDb::OleDbCommand^  >^  _commandCollection;
        
        private: System::Boolean _clearBeforeFill;
        
        public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        ProductsTableAdapter();
        private: [System::Diagnostics::DebuggerNonUserCodeAttribute]
         property System::Data::OleDb::OleDbDataAdapter^  Adapter {
            System::Data::OleDb::OleDbDataAdapter^  get();
        }
        
        internal: [System::Diagnostics::DebuggerNonUserCodeAttribute]
         property System::Data::OleDb::OleDbConnection^  Connection {
            System::Data::OleDb::OleDbConnection^  get();
            System::Void set(System::Data::OleDb::OleDbConnection^  value);
        }
        
        protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
         property cli::array< System::Data::OleDb::OleDbCommand^  >^  CommandCollection {
            cli::array< System::Data::OleDb::OleDbCommand^  >^  get();
        }
        
        public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
         property System::Boolean ClearBeforeFill {
            System::Boolean get();
            System::Void set(System::Boolean value);
        }
        
        private: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        System::Void InitAdapter();
        
        private: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        System::Void InitConnection();
        
        private: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        System::Void InitCommandCollection();
        
        public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
        [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Fill, true)]
        virtual System::Int32 Fill(DisconnectedApplication::NorthwindDataSet::ProductsDataTable^  dataTable);
        
        public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
        [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Select, true)]
        virtual DisconnectedApplication::NorthwindDataSet::ProductsDataTable^  GetData();
        
        public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
        [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Fill, false)]
        virtual System::Int32 MyQuery1(DisconnectedApplication::NorthwindDataSet::ProductsDataTable^  dataTable);
        
        public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
        virtual System::Int32 Update(DisconnectedApplication::NorthwindDataSet::ProductsDataTable^  dataTable);
        
        public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
        virtual System::Int32 Update(DisconnectedApplication::NorthwindDataSet^  dataSet);
        
        public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
        virtual System::Int32 Update(System::Data::DataRow^  dataRow);
        
        public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
        virtual System::Int32 Update(cli::array< System::Data::DataRow^  >^  dataRows);
        
        public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
        [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Delete, true)]
        virtual System::Int32 Delete(System::Int32 Original_ProductID, System::String^  Original_ProductName, System::Nullable<System::Decimal > Original_UnitPrice, 
                    System::Nullable<System::Int16 > Original_UnitsInStock);
        
        public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
        [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
        [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Update, true)]
        virtual System::Int32 Update(
                    System::String^  ProductName, 
                    System::Nullable<System::Decimal > UnitPrice, 
                    System::Nullable<System::Int16 > UnitsInStock, 
                    System::Int32 Original_ProductID, 
                    System::String^  Original_ProductName, 
                    System::Nullable<System::Decimal > Original_UnitPrice, 
                    System::Nullable<System::Int16 > Original_UnitsInStock);
    };
    }
}
namespace DisconnectedApplication {
    namespace NorthwindDataSetTableAdapters {
    
    
    inline ProductsTableAdapter::ProductsTableAdapter() {
        this->ClearBeforeFill = true;
    }
    
    inline System::Data::OleDb::OleDbDataAdapter^  ProductsTableAdapter::Adapter::get() {
        if (this->_adapter == nullptr) {
            this->InitAdapter();
        }
        return this->_adapter;
    }
    
    inline System::Data::OleDb::OleDbConnection^  ProductsTableAdapter::Connection::get() {
        if (this->_connection == nullptr) {
            this->InitConnection();
        }
        return this->_connection;
    }
    inline System::Void ProductsTableAdapter::Connection::set(System::Data::OleDb::OleDbConnection^  value) {
        this->_connection = __identifier(value);
        if (this->Adapter->InsertCommand != nullptr) {
            this->Adapter->InsertCommand->Connection = __identifier(value);
        }
        if (this->Adapter->DeleteCommand != nullptr) {
            this->Adapter->DeleteCommand->Connection = __identifier(value);
        }
        if (this->Adapter->UpdateCommand != nullptr) {
            this->Adapter->UpdateCommand->Connection = __identifier(value);
        }
        for (        System::Int32 i = 0; (i < this->CommandCollection->Length);         i = (i + 1)) {
            if (this->CommandCollection[i] != nullptr) {
                (cli::safe_cast<System::Data::OleDb::OleDbCommand^  >(this->CommandCollection[i]))->Connection = __identifier(value);
            }
        }
    }
    
    inline cli::array< System::Data::OleDb::OleDbCommand^  >^  ProductsTableAdapter::CommandCollection::get() {
        if (this->_commandCollection == nullptr) {
            this->InitCommandCollection();
        }
        return this->_commandCollection;
    }
    
    inline System::Boolean ProductsTableAdapter::ClearBeforeFill::get() {
        return this->_clearBeforeFill;
    }
    inline System::Void ProductsTableAdapter::ClearBeforeFill::set(System::Boolean value) {
        this->_clearBeforeFill = __identifier(value);
    }
    
    inline System::Void ProductsTableAdapter::InitAdapter() {
        this->_adapter = (gcnew System::Data::OleDb::OleDbDataAdapter());
        System::Data::Common::DataTableMapping^  tableMapping = (gcnew System::Data::Common::DataTableMapping());
        tableMapping->SourceTable = L"Table";
        tableMapping->DataSetTable = L"Products";
        tableMapping->ColumnMappings->Add(L"ProductID", L"ProductID");
        tableMapping->ColumnMappings->Add(L"ProductName", L"ProductName");
        tableMapping->ColumnMappings->Add(L"UnitPrice", L"UnitPrice");
        tableMapping->ColumnMappings->Add(L"UnitsInStock", L"UnitsInStock");
        this->_adapter->TableMappings->Add(tableMapping);
        this->_adapter->DeleteCommand = (gcnew System::Data::OleDb::OleDbCommand());
        this->_adapter->DeleteCommand->Connection = this->Connection;
        this->_adapter->DeleteCommand->CommandText = L"DELETE FROM `Products` WHERE ((`ProductID` = \?) AND ((\? = 1 AND `ProductName` IS " 
L"NULL) OR (`ProductName` = \?)) AND ((\? = 1 AND `UnitPrice` IS NULL) OR (`UnitPric" 
L"e` = \?)) AND ((\? = 1 AND `UnitsInStock` IS NULL) OR (`UnitsInStock` = \?)))";
        this->_adapter->DeleteCommand->CommandType = System::Data::CommandType::Text;
        this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_ProductID", System::Data::OleDb::OleDbType::Integer, 
                0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"ProductID", 
                System::Data::DataRowVersion::Original, false, nullptr)));
        this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_ProductName", System::Data::OleDb::OleDbType::Integer, 
                0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"ProductName", 
                System::Data::DataRowVersion::Original, true, nullptr)));
        this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_ProductName", System::Data::OleDb::OleDbType::VarWChar, 
                0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"ProductName", 
                System::Data::DataRowVersion::Original, false, nullptr)));
        this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_UnitPrice", System::Data::OleDb::OleDbType::Integer, 
                0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"UnitPrice", 
                System::Data::DataRowVersion::Original, true, nullptr)));
        this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_UnitPrice", System::Data::OleDb::OleDbType::Currency, 
                0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"UnitPrice", 
                System::Data::DataRowVersion::Original, false, nullptr)));
        this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_UnitsInStock", System::Data::OleDb::OleDbType::Integer, 
                0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"UnitsInStock", 
                System::Data::DataRowVersion::Original, true, nullptr)));
        this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_UnitsInStock", System::Data::OleDb::OleDbType::SmallInt, 
                0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"UnitsInStock", 
                System::Data::DataRowVersion::Original, false, nullptr)));
        this->_adapter->UpdateCommand = (gcnew System::Data::OleDb::OleDbCommand());
        this->_adapter->UpdateCommand->Connection = this->Connection;
        this->_adapter->UpdateCommand->CommandText = L"UPDATE `Products` SET `ProductName` = \?, `UnitPrice` = \?, `UnitsInStock` = \? WHER" 
L"E ((`ProductID` = \?) AND ((\? = 1 AND `ProductName` IS NULL) OR (`ProductName` = " 
L"\?)) AND ((\? = 1 AND `UnitPrice` IS NULL) OR (`UnitPrice` = \?)) AND ((\? = 1 AND `" 
L"UnitsInStock` IS NULL) OR (`UnitsInStock` = \?)))";
        this->_adapter->UpdateCommand->CommandType = System::Data::CommandType::Text;
        this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"ProductName", System::Data::OleDb::OleDbType::VarWChar, 
                0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"ProductName", 
                System::Data::DataRowVersion::Current, false, nullptr)));
        this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"UnitPrice", System::Data::OleDb::OleDbType::Currency, 
                0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"UnitPrice", 
                System::Data::DataRowVersion::Current, false, nullptr)));
        this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"UnitsInStock", System::Data::OleDb::OleDbType::SmallInt, 
                0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"UnitsInStock", 
                System::Data::DataRowVersion::Current, false, nullptr)));
        this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_ProductID", System::Data::OleDb::OleDbType::Integer, 
                0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"ProductID", 
                System::Data::DataRowVersion::Original, false, nullptr)));
        this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_ProductName", System::Data::OleDb::OleDbType::Integer, 
                0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"ProductName", 
                System::Data::DataRowVersion::Original, true, nullptr)));
        this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_ProductName", System::Data::OleDb::OleDbType::VarWChar, 
                0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"ProductName", 
                System::Data::DataRowVersion::Original, false, nullptr)));
        this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_UnitPrice", System::Data::OleDb::OleDbType::Integer, 
                0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"UnitPrice", 
                System::Data::DataRowVersion::Original, true, nullptr)));
        this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_UnitPrice", System::Data::OleDb::OleDbType::Currency, 
                0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"UnitPrice", 
                System::Data::DataRowVersion::Original, false, nullptr)));
        this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"IsNull_UnitsInStock", System::Data::OleDb::OleDbType::Integer, 
                0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"UnitsInStock", 
                System::Data::DataRowVersion::Original, true, nullptr)));
        this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::OleDb::OleDbParameter(L"Original_UnitsInStock", System::Data::OleDb::OleDbType::SmallInt, 
                0, System::Data::ParameterDirection::Input, static_cast<System::Byte>(0), static_cast<System::Byte>(0), L"UnitsInStock", 
                System::Data::DataRowVersion::Original, false, nullptr)));
    }
    
    inline System::Void ProductsTableAdapter::InitConnection() {
        this->_connection = (gcnew System::Data::OleDb::OleDbConnection());
        this->_connection->ConnectionString = L"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\temp\\Northwind.mdb";
    }
    
    inline System::Void ProductsTableAdapter::InitCommandCollection() {
        this->_commandCollection = gcnew cli::array< System::Data::OleDb::OleDbCommand^  >(2);
        this->_commandCollection[0] = (gcnew System::Data::OleDb::OleDbCommand());
        this->_commandCollection[0]->Connection = this->Connection;
        this->_commandCollection[0]->CommandText = L"SELECT ProductID, ProductName, UnitPrice, UnitsInStock FROM Products";
        this->_commandCollection[0]->CommandType = System::Data::CommandType::Text;
        this->_commandCollection[1] = (gcnew System::Data::OleDb::OleDbCommand());
        this->_commandCollection[1]->Connection = this->Connection;
        this->_commandCollection[1]->CommandText = L"SELECT     ProductID, ProductName, UnitPrice, UnitsInStock\r\nFROM         Products" 
L"\r\nORDER BY UnitPrice";
        this->_commandCollection[1]->CommandType = System::Data::CommandType::Text;
    }
    
    inline System::Int32 ProductsTableAdapter::Fill(DisconnectedApplication::NorthwindDataSet::ProductsDataTable^  dataTable) {
        this->Adapter->SelectCommand = this->CommandCollection[0];
        if (this->ClearBeforeFill == true) {
            dataTable->Clear();
        }
        System::Int32 returnValue = this->Adapter->Fill(dataTable);
        return returnValue;
    }
    
    inline DisconnectedApplication::NorthwindDataSet::ProductsDataTable^  ProductsTableAdapter::GetData() {
        this->Adapter->SelectCommand = this->CommandCollection[0];
        DisconnectedApplication::NorthwindDataSet::ProductsDataTable^  dataTable = (gcnew DisconnectedApplication::NorthwindDataSet::ProductsDataTable());
        this->Adapter->Fill(dataTable);
        return dataTable;
    }
    
    inline System::Int32 ProductsTableAdapter::MyQuery1(DisconnectedApplication::NorthwindDataSet::ProductsDataTable^  dataTable) {
        this->Adapter->SelectCommand = this->CommandCollection[1];
        if (this->ClearBeforeFill == true) {
            dataTable->Clear();
        }
        System::Int32 returnValue = this->Adapter->Fill(dataTable);
        return returnValue;
    }
    
    inline System::Int32 ProductsTableAdapter::Update(DisconnectedApplication::NorthwindDataSet::ProductsDataTable^  dataTable) {
        return this->Adapter->Update(dataTable);
    }
    
    inline System::Int32 ProductsTableAdapter::Update(DisconnectedApplication::NorthwindDataSet^  dataSet) {
        return this->Adapter->Update(dataSet, L"Products");
    }
    
    inline System::Int32 ProductsTableAdapter::Update(System::Data::DataRow^  dataRow) {
        return this->Adapter->Update(gcnew cli::array< System::Data::DataRow^  >(1) {dataRow});
    }
    
    inline System::Int32 ProductsTableAdapter::Update(cli::array< System::Data::DataRow^  >^  dataRows) {
        return this->Adapter->Update(dataRows);
    }
    
    inline System::Int32 ProductsTableAdapter::Delete(System::Int32 Original_ProductID, System::String^  Original_ProductName, 
                System::Nullable<System::Decimal > Original_UnitPrice, System::Nullable<System::Int16 > Original_UnitsInStock) {
        this->Adapter->DeleteCommand->Parameters[0]->Value = static_cast<System::Int32>(Original_ProductID);
        if (Original_ProductName == nullptr) {
            throw (gcnew System::ArgumentNullException(L"Original_ProductName"));
        }
        else {
            this->Adapter->DeleteCommand->Parameters[1]->Value = cli::safe_cast<System::Object^>(0);
            this->Adapter->DeleteCommand->Parameters[2]->Value = (cli::safe_cast<System::String^  >(Original_ProductName));
        }
        if (Original_UnitPrice.HasValue == true) {
            this->Adapter->DeleteCommand->Parameters[3]->Value = cli::safe_cast<System::Object^>(0);
            this->Adapter->DeleteCommand->Parameters[4]->Value = static_cast<System::Decimal>(Original_UnitPrice.Value);
        }
        else {
            this->Adapter->DeleteCommand->Parameters[3]->Value = cli::safe_cast<System::Object^>(1);
            this->Adapter->DeleteCommand->Parameters[4]->Value = System::DBNull::Value;
        }
        if (Original_UnitsInStock.HasValue == true) {
            this->Adapter->DeleteCommand->Parameters[5]->Value = cli::safe_cast<System::Object^>(0);
            this->Adapter->DeleteCommand->Parameters[6]->Value = static_cast<System::Int16>(Original_UnitsInStock.Value);
        }
        else {
            this->Adapter->DeleteCommand->Parameters[5]->Value = cli::safe_cast<System::Object^>(1);
            this->Adapter->DeleteCommand->Parameters[6]->Value = System::DBNull::Value;
        }
        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 {
            System::Int32 returnValue = this->Adapter->DeleteCommand->ExecuteNonQuery();
            return returnValue;
        }
        finally {
            if (previousConnectionState == System::Data::ConnectionState::Closed) {
                this->Adapter->DeleteCommand->Connection->Close();
            }
        }
    }
    
    inline System::Int32 ProductsTableAdapter::Update(
                System::String^  ProductName, 
                System::Nullable<System::Decimal > UnitPrice, 
                System::Nullable<System::Int16 > UnitsInStock, 
                System::Int32 Original_ProductID, 
                System::String^  Original_ProductName, 
                System::Nullable<System::Decimal > Original_UnitPrice, 
                System::Nullable<System::Int16 > Original_UnitsInStock) {
        if (ProductName == nullptr) {
            throw (gcnew System::ArgumentNullException(L"ProductName"));
        }
        else {
            this->Adapter->UpdateCommand->Parameters[0]->Value = (cli::safe_cast<System::String^  >(ProductName));
        }
        if (UnitPrice.HasValue == true) {
            this->Adapter->UpdateCommand->Parameters[1]->Value = static_cast<System::Decimal>(UnitPrice.Value);
        }
        else {
            this->Adapter->UpdateCommand->Parameters[1]->Value = System::DBNull::Value;
        }
        if (UnitsInStock.HasValue == true) {
            this->Adapter->UpdateCommand->Parameters[2]->Value = static_cast<System::Int16>(UnitsInStock.Value);
        }
        else {
            this->Adapter->UpdateCommand->Parameters[2]->Value = System::DBNull::Value;
        }
        this->Adapter->UpdateCommand->Parameters[3]->Value = static_cast<System::Int32>(Original_ProductID);
        if (Original_ProductName == nullptr) {
            throw (gcnew System::ArgumentNullException(L"Original_ProductName"));
        }
        else {
            this->Adapter->UpdateCommand->Parameters[4]->Value = cli::safe_cast<System::Object^>(0);
            this->Adapter->UpdateCommand->Parameters[5]->Value = (cli::safe_cast<System::String^  >(Original_ProductName));
        }
        if (Original_UnitPrice.HasValue == true) {
            this->Adapter->UpdateCommand->Parameters[6]->Value = cli::safe_cast<System::Object^>(0);
            this->Adapter->UpdateCommand->Parameters[7]->Value = static_cast<System::Decimal>(Original_UnitPrice.Value);
        }
        else {
            this->Adapter->UpdateCommand->Parameters[6]->Value = cli::safe_cast<System::Object^>(1);
            this->Adapter->UpdateCommand->Parameters[7]->Value = System::DBNull::Value;
        }
        if (Original_UnitsInStock.HasValue == true) {
            this->Adapter->UpdateCommand->Parameters[8]->Value = cli::safe_cast<System::Object^>(0);
            this->Adapter->UpdateCommand->Parameters[9]->Value = static_cast<System::Int16>(Original_UnitsInStock.Value);
        }
        else {
            this->Adapter->UpdateCommand->Parameters[8]->Value = cli::safe_cast<System::Object^>(1);
            this->Adapter->UpdateCommand->Parameters[9]->Value = System::DBNull::Value;
        }
        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 {
            System::Int32 returnValue = this->Adapter->UpdateCommand->ExecuteNonQuery();
            return returnValue;
        }
        finally {
            if (previousConnectionState == System::Data::ConnectionState::Closed) {
                this->Adapter->UpdateCommand->Connection->Close();
            }
        }
    }
    }
}
