The DejaVU Framework -- hush 3.1

include: basic-program-code-22-Ex22-04-DataSet1.h /cygdrive/d/www/media


- [up] [top] - index make include source logic grammar scripts html configure mx slides talks scenes reports projects
<body bgcolor="#FFFFFF" text="#000000">

#pragma once

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

using namespace System::Security::Permissions;
[assembly:SecurityPermissionAttribute(SecurityAction::RequestMinimum, SkipVerification=false)];
// 
// This source code was auto-generated by xsd, Version=2.0.50727.26.
// 
namespace Ex22_04 {
    using namespace System;
    
    using namespace System;
    ref
<h4 align=right text=red> DataSet1;</h4><hr>
   class DataSet1;
    
    
    [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"DataSet1"), 
    System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.DataSet")]
    public ref
<hr>

DataSet1</h4>
   class DataSet1 : public System::Data::DataSet {
          public : ref

Order_DetailsDataTable;</h4>
   class Order_DetailsDataTable;
          public : ref

Order_DetailsRow;</h4>
   class Order_DetailsRow;
          public : ref

Order_DetailsRowChangeEvent;</h4>
   class Order_DetailsRowChangeEvent;
          
          private: Ex22_04::DataSet1::Order_DetailsDataTable^  tableOrder_Details;
          
          private: System::Data::SchemaSerializationMode _schemaSerializationMode;
          
          public : delegate System::Void Order_DetailsRowChangeEventHandler(System::Object^  sender, Ex22_04::DataSet1::Order_DetailsRowChangeEvent^  e);
          
          public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
          DataSet1();
          protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
          DataSet1(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 Ex22_04::DataSet1::Order_DetailsDataTable^  Order_Details {
              Ex22_04::DataSet1::Order_DetailsDataTable^  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 ShouldSerializeOrder_Details();
          
          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

Order_DetailsDataTable</h4>
   class Order_DetailsDataTable : public System::Data::DataTable, public System::Collections::IEnumerable {
              
              private: System::Data::DataColumn^  columnOrderID;
              
              private: System::Data::DataColumn^  columnProductID;
              
              private: System::Data::DataColumn^  columnUnitPrice;
              
              private: System::Data::DataColumn^  columnQuantity;
              
              private: System::Data::DataColumn^  columnDiscount;
              
              public: event Ex22_04::DataSet1::Order_DetailsRowChangeEventHandler^  Order_DetailsRowChanging;
              
              public: event Ex22_04::DataSet1::Order_DetailsRowChangeEventHandler^  Order_DetailsRowChanged;
              
              public: event Ex22_04::DataSet1::Order_DetailsRowChangeEventHandler^  Order_DetailsRowDeleting;
              
              public: event Ex22_04::DataSet1::Order_DetailsRowChangeEventHandler^  Order_DetailsRowDeleted;
              
              public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
              Order_DetailsDataTable();
              internal: [System::Diagnostics::DebuggerNonUserCodeAttribute]
              Order_DetailsDataTable(System::Data::DataTable^  table);
              protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
              Order_DetailsDataTable(System::Runtime::Serialization::SerializationInfo^  info, System::Runtime::Serialization::StreamingContext context);
              public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
               property System::Data::DataColumn^  OrderIDColumn {
                  System::Data::DataColumn^  get();
              }
              
              public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
               property System::Data::DataColumn^  ProductIDColumn {
                  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^  QuantityColumn {
                  System::Data::DataColumn^  get();
              }
              
              public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
               property System::Data::DataColumn^  DiscountColumn {
                  System::Data::DataColumn^  get();
              }
              
              public: [System::Diagnostics::DebuggerNonUserCodeAttribute, 
              System::ComponentModel::Browsable(false)]
               property System::Int32 Count {
                  System::Int32 get();
              }
              
              public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
               property Ex22_04::DataSet1::Order_DetailsRow^  default [System::Int32 ] {
                  Ex22_04::DataSet1::Order_DetailsRow^  get(System::Int32 index);
              }
              
              public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
              System::Void AddOrder_DetailsRow(Ex22_04::DataSet1::Order_DetailsRow^  row);
              
              public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
              Ex22_04::DataSet1::Order_DetailsRow^  AddOrder_DetailsRow(System::Int32 OrderID, System::Int32 ProductID, System::Decimal UnitPrice, 
                          System::Int16 Quantity, System::Single Discount);
              
              public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
              Ex22_04::DataSet1::Order_DetailsRow^  FindByOrderIDProductID(System::Int32 OrderID, 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]
              Ex22_04::DataSet1::Order_DetailsRow^  NewOrder_DetailsRow();
              
              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 RemoveOrder_DetailsRow(Ex22_04::DataSet1::Order_DetailsRow^  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

Order_DetailsRow</h4>
   class Order_DetailsRow : public System::Data::DataRow {
              
              private: Ex22_04::DataSet1::Order_DetailsDataTable^  tableOrder_Details;
              
              internal: [System::Diagnostics::DebuggerNonUserCodeAttribute]
              Order_DetailsRow(System::Data::DataRowBuilder^  rb);
              public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
               property System::Int32 OrderID {
                  System::Int32 get();
                  System::Void set(System::Int32 value);
              }
              
              public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
               property System::Int32 ProductID {
                  System::Int32 get();
                  System::Void set(System::Int32 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 Quantity {
                  System::Int16 get();
                  System::Void set(System::Int16 value);
              }
              
              public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
               property System::Single Discount {
                  System::Single get();
                  System::Void set(System::Single value);
              }
              
              public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
              System::Boolean IsUnitPriceNull();
              
              public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
              System::Void SetUnitPriceNull();
              
              public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
              System::Boolean IsQuantityNull();
              
              public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
              System::Void SetQuantityNull();
              
              public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
              System::Boolean IsDiscountNull();
              
              public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
              System::Void SetDiscountNull();
          };


          
          public : [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0")]
          ref

Order_DetailsRowChangeEvent</h4>
   class Order_DetailsRowChangeEvent : public System::EventArgs {
              
              private: Ex22_04::DataSet1::Order_DetailsRow^  eventRow;
              
              private: System::Data::DataRowAction eventAction;
              
              public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
              Order_DetailsRowChangeEvent(Ex22_04::DataSet1::Order_DetailsRow^  row, System::Data::DataRowAction action);
              public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
               property Ex22_04::DataSet1::Order_DetailsRow^  Row {
                  Ex22_04::DataSet1::Order_DetailsRow^  get();
              }
              
              public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
               property System::Data::DataRowAction Action {
                  System::Data::DataRowAction get();
              }
          };


      };


  }
  namespace Ex22_04 {
      
      
      inline DataSet1::DataSet1() {
          this->BeginInit();
          this->InitClass();
          System::ComponentModel::CollectionChangeEventHandler^  schemaChangedHandler = gcnew System::ComponentModel::CollectionChangeEventHandler(this, &Ex22_04::DataSet1::SchemaChanged);
          __super::Tables->CollectionChanged += schemaChangedHandler;
          __super::Relations->CollectionChanged += schemaChangedHandler;
          this->EndInit();
      }
      
      inline DataSet1::DataSet1(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, &Ex22_04::DataSet1::SchemaChanged);
              this->Tables->CollectionChanged += schemaChangedHandler1;
              this->Relations->CollectionChanged += schemaChangedHandler1;
              return;
          }
          System::String^  strSchema = (cli::safe_cast(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"Order Details"] != nullptr) {
                  __super::Tables->Add((gcnew Ex22_04::DataSet1::Order_DetailsDataTable(ds->Tables[L"Order Details"])));
              }
              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, &Ex22_04::DataSet1::SchemaChanged);
          __super::Tables->CollectionChanged += schemaChangedHandler;
          this->Relations->CollectionChanged += schemaChangedHandler;
      }
      
      inline Ex22_04::DataSet1::Order_DetailsDataTable^  DataSet1::Order_Details::get() {
          return this->tableOrder_Details;
      }
      
      inline System::Data::SchemaSerializationMode DataSet1::SchemaSerializationMode::get() {
          return this->_schemaSerializationMode;
      }
      inline System::Void DataSet1::SchemaSerializationMode::set(System::Data::SchemaSerializationMode value) {
          this->_schemaSerializationMode = __identifier(value);
      }
      
      inline System::Data::DataTableCollection^  DataSet1::Tables::get() {
          return __super::Tables;
      }
      
      inline System::Data::DataRelationCollection^  DataSet1::Relations::get() {
          return __super::Relations;
      }
      
      inline System::Void DataSet1::InitializeDerivedDataSet() {
          this->BeginInit();
          this->InitClass();
          this->EndInit();
      }
      
      inline System::Data::DataSet^  DataSet1::Clone() {
          Ex22_04::DataSet1^  cln = (cli::safe_cast(__super::Clone()));
          cln->InitVars();
          cln->SchemaSerializationMode = this->SchemaSerializationMode;
          return cln;
      }
      
      inline System::Boolean DataSet1::ShouldSerializeTables() {
          return false;
      }
      
      inline System::Boolean DataSet1::ShouldSerializeRelations() {
          return false;
      }
      
      inline System::Void DataSet1::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"Order Details"] != nullptr) {
                  __super::Tables->Add((gcnew Ex22_04::DataSet1::Order_DetailsDataTable(ds->Tables[L"Order Details"])));
              }
              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^  DataSet1::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 DataSet1::InitVars() {
          this->InitVars(true);
      }
      
      inline System::Void DataSet1::InitVars(System::Boolean initTable) {
          this->tableOrder_Details = (cli::safe_cast(__super::Tables[L"Order Details"]));
          if (initTable == true) {
              if (this->tableOrder_Details != nullptr) {
                  this->tableOrder_Details->InitVars();
              }
          }
      }
      
      inline System::Void DataSet1::InitClass() {
          this->DataSetName = L"DataSet1";
          this->Prefix = L"";
          this->Namespace = L"http://tempuri.org/DataSet1.xsd";
          this->EnforceConstraints = true;
          this->SchemaSerializationMode = System::Data::SchemaSerializationMode::IncludeSchema;
          this->tableOrder_Details = (gcnew Ex22_04::DataSet1::Order_DetailsDataTable());
          __super::Tables->Add(this->tableOrder_Details);
      }
      
      inline System::Boolean DataSet1::ShouldSerializeOrder_Details() {
          return false;
      }
      
      inline System::Void DataSet1::SchemaChanged(System::Object^  sender, System::ComponentModel::CollectionChangeEventArgs^  e) {
          if (e->Action == System::ComponentModel::CollectionChangeAction::Remove) {
              this->InitVars();
          }
      }
      
      inline System::Xml::Schema::XmlSchemaComplexType^  DataSet1::GetTypedDataSetSchema(System::Xml::Schema::XmlSchemaSet^  xs) {
          Ex22_04::DataSet1^  ds = (gcnew Ex22_04::DataSet1());
          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 DataSet1::Order_DetailsDataTable::Order_DetailsDataTable() {
          this->TableName = L"Order Details";
          this->BeginInit();
          this->InitClass();
          this->EndInit();
      }
      
      inline DataSet1::Order_DetailsDataTable::Order_DetailsDataTable(System::Data::DataTable^  table) {
          this->TableName = table->TableName;
          if (table->CaseSensitive != table->DataSet->CaseSensitive) {
              this->CaseSensitive = table->CaseSensitive;
          }
          if (table->Locale->ToString() != table->DataSet->Locale->ToString()) {
              this->Locale = table->Locale;
          }
          if (table->Namespace != table->DataSet->Namespace) {
              this->Namespace = table->Namespace;
          }
          this->Prefix = table->Prefix;
          this->MinimumCapacity = table->MinimumCapacity;
      }
      
      inline DataSet1::Order_DetailsDataTable::Order_DetailsDataTable(System::Runtime::Serialization::SerializationInfo^  info, 
                  System::Runtime::Serialization::StreamingContext context) : 
              System::Data::DataTable(info, context) {
          this->InitVars();
      }
      
      inline System::Data::DataColumn^  DataSet1::Order_DetailsDataTable::OrderIDColumn::get() {
          return this->columnOrderID;
      }
      
      inline System::Data::DataColumn^  DataSet1::Order_DetailsDataTable::ProductIDColumn::get() {
          return this->columnProductID;
      }
      
      inline System::Data::DataColumn^  DataSet1::Order_DetailsDataTable::UnitPriceColumn::get() {
          return this->columnUnitPrice;
      }
      
      inline System::Data::DataColumn^  DataSet1::Order_DetailsDataTable::QuantityColumn::get() {
          return this->columnQuantity;
      }
      
      inline System::Data::DataColumn^  DataSet1::Order_DetailsDataTable::DiscountColumn::get() {
          return this->columnDiscount;
      }
      
      inline System::Int32 DataSet1::Order_DetailsDataTable::Count::get() {
          return this->Rows->Count;
      }
      
      inline Ex22_04::DataSet1::Order_DetailsRow^  DataSet1::Order_DetailsDataTable::default::get(System::Int32 index) {
          return (cli::safe_cast(this->Rows[index]));
      }
      
      inline System::Void DataSet1::Order_DetailsDataTable::AddOrder_DetailsRow(Ex22_04::DataSet1::Order_DetailsRow^  row) {
          this->Rows->Add(row);
      }
      
      inline Ex22_04::DataSet1::Order_DetailsRow^  DataSet1::Order_DetailsDataTable::AddOrder_DetailsRow(System::Int32 OrderID, 
                  System::Int32 ProductID, System::Decimal UnitPrice, System::Int16 Quantity, System::Single Discount) {
          Ex22_04::DataSet1::Order_DetailsRow^  rowOrder_DetailsRow = (cli::safe_cast(this->NewRow()));
          rowOrder_DetailsRow->ItemArray = gcnew cli::array< System::Object^  >(5) {OrderID, ProductID, UnitPrice, Quantity, Discount};


          this->Rows->Add(rowOrder_DetailsRow);
          return rowOrder_DetailsRow;
      }
      
      inline Ex22_04::DataSet1::Order_DetailsRow^  DataSet1::Order_DetailsDataTable::FindByOrderIDProductID(System::Int32 OrderID, 
                  System::Int32 ProductID) {
          return (cli::safe_cast(this->Rows->Find(gcnew cli::array< System::Object^  >(2) {OrderID, 
                  ProductID})));
      }
      
      inline System::Collections::IEnumerator^  DataSet1::Order_DetailsDataTable::GetEnumerator() {
          return this->Rows->GetEnumerator();
      }
      
      inline System::Data::DataTable^  DataSet1::Order_DetailsDataTable::Clone() {
          Ex22_04::DataSet1::Order_DetailsDataTable^  cln = (cli::safe_cast(__super::Clone()));
          cln->InitVars();
          return cln;
      }
      
      inline System::Data::DataTable^  DataSet1::Order_DetailsDataTable::CreateInstance() {
          return (gcnew Ex22_04::DataSet1::Order_DetailsDataTable());
      }
      
      inline System::Void DataSet1::Order_DetailsDataTable::InitVars() {
          this->columnOrderID = __super::Columns[L"OrderID"];
          this->columnProductID = __super::Columns[L"ProductID"];
          this->columnUnitPrice = __super::Columns[L"UnitPrice"];
          this->columnQuantity = __super::Columns[L"Quantity"];
          this->columnDiscount = __super::Columns[L"Discount"];
      }
      
      inline System::Void DataSet1::Order_DetailsDataTable::InitClass() {
          this->columnOrderID = (gcnew System::Data::DataColumn(L"OrderID", System::Int32::typeid, nullptr, System::Data::MappingType::Element));
          __super::Columns->Add(this->columnOrderID);
          this->columnProductID = (gcnew System::Data::DataColumn(L"ProductID", System::Int32::typeid, nullptr, System::Data::MappingType::Element));
          __super::Columns->Add(this->columnProductID);
          this->columnUnitPrice = (gcnew System::Data::DataColumn(L"UnitPrice", System::Decimal::typeid, nullptr, System::Data::MappingType::Element));
          __super::Columns->Add(this->columnUnitPrice);
          this->columnQuantity = (gcnew System::Data::DataColumn(L"Quantity", System::Int16::typeid, nullptr, System::Data::MappingType::Element));
          __super::Columns->Add(this->columnQuantity);
          this->columnDiscount = (gcnew System::Data::DataColumn(L"Discount", System::Single::typeid, nullptr, System::Data::MappingType::Element));
          __super::Columns->Add(this->columnDiscount);
          this->Constraints->Add((gcnew System::Data::UniqueConstraint(L"Constraint1", gcnew cli::array< System::Data::DataColumn^  >(2) {this->columnOrderID, 
                      this->columnProductID}, true)));
          this->columnOrderID->AllowDBNull = false;
          this->columnProductID->AllowDBNull = false;
          this->ExtendedProperties->Add(L"Generator_RowClassName", L"Order_DetailsRow");
          this->ExtendedProperties->Add(L"Generator_RowEvArgName", L"Order_DetailsRowChangeEvent");
          this->ExtendedProperties->Add(L"Generator_RowEvHandlerName", L"Order_DetailsRowChangeEventHandler");
          this->ExtendedProperties->Add(L"Generator_TableClassName", L"Order_DetailsDataTable");
          this->ExtendedProperties->Add(L"Generator_TablePropName", L"Order_Details");
          this->ExtendedProperties->Add(L"Generator_TableVarName", L"tableOrder_Details");
          this->ExtendedProperties->Add(L"Generator_UserTableName", L"Order Details");
      }
      
      inline Ex22_04::DataSet1::Order_DetailsRow^  DataSet1::Order_DetailsDataTable::NewOrder_DetailsRow() {
          return (cli::safe_cast(this->NewRow()));
      }
      
      inline System::Data::DataRow^  DataSet1::Order_DetailsDataTable::NewRowFromBuilder(System::Data::DataRowBuilder^  builder) {
          return (gcnew Ex22_04::DataSet1::Order_DetailsRow(builder));
      }
      
      inline System::Type^  DataSet1::Order_DetailsDataTable::GetRowType() {
          return Ex22_04::DataSet1::Order_DetailsRow::typeid;
      }
      
      inline System::Void DataSet1::Order_DetailsDataTable::OnRowChanged(System::Data::DataRowChangeEventArgs^  e) {
          __super::OnRowChanged(e);
          {
              this->Order_DetailsRowChanged(this, (gcnew Ex22_04::DataSet1::Order_DetailsRowChangeEvent((cli::safe_cast(e->Row)), 
                      e->Action)));
          }
      }
      
      inline System::Void DataSet1::Order_DetailsDataTable::OnRowChanging(System::Data::DataRowChangeEventArgs^  e) {
          __super::OnRowChanging(e);
          {
              this->Order_DetailsRowChanging(this, (gcnew Ex22_04::DataSet1::Order_DetailsRowChangeEvent((cli::safe_cast(e->Row)), 
                      e->Action)));
          }
      }
      
      inline System::Void DataSet1::Order_DetailsDataTable::OnRowDeleted(System::Data::DataRowChangeEventArgs^  e) {
          __super::OnRowDeleted(e);
          {
              this->Order_DetailsRowDeleted(this, (gcnew Ex22_04::DataSet1::Order_DetailsRowChangeEvent((cli::safe_cast(e->Row)), 
                      e->Action)));
          }
      }
      
      inline System::Void DataSet1::Order_DetailsDataTable::OnRowDeleting(System::Data::DataRowChangeEventArgs^  e) {
          __super::OnRowDeleting(e);
          {
              this->Order_DetailsRowDeleting(this, (gcnew Ex22_04::DataSet1::Order_DetailsRowChangeEvent((cli::safe_cast(e->Row)), 
                      e->Action)));
          }
      }
      
      inline System::Void DataSet1::Order_DetailsDataTable::RemoveOrder_DetailsRow(Ex22_04::DataSet1::Order_DetailsRow^  row) {
          this->Rows->Remove(row);
      }
      
      inline System::Xml::Schema::XmlSchemaComplexType^  DataSet1::Order_DetailsDataTable::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());
          Ex22_04::DataSet1^  ds = (gcnew Ex22_04::DataSet1());
          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"Order_DetailsDataTable";
          type->Attributes->Add(attribute2);
          type->Particle = sequence;
          return type;
      }
      
      
      inline DataSet1::Order_DetailsRow::Order_DetailsRow(System::Data::DataRowBuilder^  rb) : 
              System::Data::DataRow(rb) {
          this->tableOrder_Details = (cli::safe_cast(this->Table));
      }
      
      inline System::Int32 DataSet1::Order_DetailsRow::OrderID::get() {
          return (*cli::safe_cast(this[this->tableOrder_Details->OrderIDColumn]));
      }
      inline System::Void DataSet1::Order_DetailsRow::OrderID::set(System::Int32 value) {
          this[this->tableOrder_Details->OrderIDColumn] = value;
      }
      
      inline System::Int32 DataSet1::Order_DetailsRow::ProductID::get() {
          return (*cli::safe_cast(this[this->tableOrder_Details->ProductIDColumn]));
      }
      inline System::Void DataSet1::Order_DetailsRow::ProductID::set(System::Int32 value) {
          this[this->tableOrder_Details->ProductIDColumn] = value;
      }
      
      inline System::Decimal DataSet1::Order_DetailsRow::UnitPrice::get() {
          try {
              return (*cli::safe_cast(this[this->tableOrder_Details->UnitPriceColumn]));
          }
          catch (System::InvalidCastException^ e) {
              throw (gcnew System::Data::StrongTypingException(L"The value for column \'UnitPrice\' in table \'Order Details\' is DBNull.", 
                  e));
          }
      }
      inline System::Void DataSet1::Order_DetailsRow::UnitPrice::set(System::Decimal value) {
          this[this->tableOrder_Details->UnitPriceColumn] = value;
      }
      
      inline System::Int16 DataSet1::Order_DetailsRow::Quantity::get() {
          try {
              return (*cli::safe_cast(this[this->tableOrder_Details->QuantityColumn]));
          }
          catch (System::InvalidCastException^ e) {
              throw (gcnew System::Data::StrongTypingException(L"The value for column \'Quantity\' in table \'Order Details\' is DBNull.", 
                  e));
          }
      }
      inline System::Void DataSet1::Order_DetailsRow::Quantity::set(System::Int16 value) {
          this[this->tableOrder_Details->QuantityColumn] = value;
      }
      
      inline System::Single DataSet1::Order_DetailsRow::Discount::get() {
          try {
              return (*cli::safe_cast(this[this->tableOrder_Details->DiscountColumn]));
          }
          catch (System::InvalidCastException^ e) {
              throw (gcnew System::Data::StrongTypingException(L"The value for column \'Discount\' in table \'Order Details\' is DBNull.", 
                  e));
          }
      }
      inline System::Void DataSet1::Order_DetailsRow::Discount::set(System::Single value) {
          this[this->tableOrder_Details->DiscountColumn] = value;
      }
      
      inline System::Boolean DataSet1::Order_DetailsRow::IsUnitPriceNull() {
          return this->IsNull(this->tableOrder_Details->UnitPriceColumn);
      }
      
      inline System::Void DataSet1::Order_DetailsRow::SetUnitPriceNull() {
          this[this->tableOrder_Details->UnitPriceColumn] = System::Convert::DBNull;
      }
      
      inline System::Boolean DataSet1::Order_DetailsRow::IsQuantityNull() {
          return this->IsNull(this->tableOrder_Details->QuantityColumn);
      }
      
      inline System::Void DataSet1::Order_DetailsRow::SetQuantityNull() {
          this[this->tableOrder_Details->QuantityColumn] = System::Convert::DBNull;
      }
      
      inline System::Boolean DataSet1::Order_DetailsRow::IsDiscountNull() {
          return this->IsNull(this->tableOrder_Details->DiscountColumn);
      }
      
      inline System::Void DataSet1::Order_DetailsRow::SetDiscountNull() {
          this[this->tableOrder_Details->DiscountColumn] = System::Convert::DBNull;
      }
      
      
      inline DataSet1::Order_DetailsRowChangeEvent::Order_DetailsRowChangeEvent(Ex22_04::DataSet1::Order_DetailsRow^  row, 
                  System::Data::DataRowAction action) {
          this->eventRow = row;
          this->eventAction = action;
      }
      
      inline Ex22_04::DataSet1::Order_DetailsRow^  DataSet1::Order_DetailsRowChangeEvent::Row::get() {
          return this->eventRow;
      }
      
      inline System::Data::DataRowAction DataSet1::Order_DetailsRowChangeEvent::Action::get() {
          return this->eventAction;
      }
  }
  namespace Ex22_04 {
      namespace DataSet1TableAdapters {
      
      using namespace System;
      ref

Order_DetailsTableAdapter;</h4>
   class Order_DetailsTableAdapter;
      
      
      [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

Order_DetailsTableAdapter</h4>
   class Order_DetailsTableAdapter : public System::ComponentModel::Component {
          
          private: System::Data::Odbc::OdbcDataAdapter^  _adapter;
          
          private: System::Data::Odbc::OdbcConnection^  _connection;
          
          private: cli::array< System::Data::Odbc::OdbcCommand^  >^  _commandCollection;
          
          private: System::Boolean _clearBeforeFill;
          
          public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
          Order_DetailsTableAdapter();
          private: [System::Diagnostics::DebuggerNonUserCodeAttribute]
           property System::Data::Odbc::OdbcDataAdapter^  Adapter {
              System::Data::Odbc::OdbcDataAdapter^  get();
          }
          
          internal: [System::Diagnostics::DebuggerNonUserCodeAttribute]
           property System::Data::Odbc::OdbcConnection^  Connection {
              System::Data::Odbc::OdbcConnection^  get();
              System::Void set(System::Data::Odbc::OdbcConnection^  value);
          }
          
          protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
           property cli::array< System::Data::Odbc::OdbcCommand^  >^  CommandCollection {
              cli::array< System::Data::Odbc::OdbcCommand^  >^  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(Ex22_04::DataSet1::Order_DetailsDataTable^  dataTable);
          
          public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
          [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
          [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Select, true)]
          virtual Ex22_04::DataSet1::Order_DetailsDataTable^  GetData();
          
          public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
          [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
          virtual System::Int32 Update(Ex22_04::DataSet1::Order_DetailsDataTable^  dataTable);
          
          public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
          [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
          virtual System::Int32 Update(Ex22_04::DataSet1^  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::Nullable Original_OrderID, System::Nullable Original_ProductID, 
                      System::Nullable Original_UnitPrice, System::Nullable Original_Quantity, System::Nullable Original_Discount);
          
          public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
          [System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
          [System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Insert, true)]
          virtual System::Int32 Insert(System::Nullable OrderID, System::Nullable ProductID, 
                      System::Nullable UnitPrice, System::Nullable Quantity, System::Nullable Discount);
          
          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::Nullable OrderID, 
                      System::Nullable ProductID, 
                      System::Nullable UnitPrice, 
                      System::Nullable Quantity, 
                      System::Nullable Discount, 
                      System::Nullable Original_OrderID, 
                      System::Nullable Original_ProductID, 
                      System::Nullable Original_UnitPrice, 
                      System::Nullable Original_Quantity, 
                      System::Nullable Original_Discount);
      };


      }
  }
  namespace Ex22_04 {
      namespace DataSet1TableAdapters {
      
      
      inline Order_DetailsTableAdapter::Order_DetailsTableAdapter() {
          this->ClearBeforeFill = true;
      }
      
      inline System::Data::Odbc::OdbcDataAdapter^  Order_DetailsTableAdapter::Adapter::get() {
          if (this->_adapter == nullptr) {
              this->InitAdapter();
          }
          return this->_adapter;
      }
      
      inline System::Data::Odbc::OdbcConnection^  Order_DetailsTableAdapter::Connection::get() {
          if (this->_connection == nullptr) {
              this->InitConnection();
          }
          return this->_connection;
      }
      inline System::Void Order_DetailsTableAdapter::Connection::set(System::Data::Odbc::OdbcConnection^  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(this->CommandCollection[i]))->Connection = __identifier(value);
              }
          }
      }
      
      inline cli::array< System::Data::Odbc::OdbcCommand^  >^  Order_DetailsTableAdapter::CommandCollection::get() {
          if (this->_commandCollection == nullptr) {
              this->InitCommandCollection();
          }
          return this->_commandCollection;
      }
      
      inline System::Boolean Order_DetailsTableAdapter::ClearBeforeFill::get() {
          return this->_clearBeforeFill;
      }
      inline System::Void Order_DetailsTableAdapter::ClearBeforeFill::set(System::Boolean value) {
          this->_clearBeforeFill = __identifier(value);
      }
      
      inline System::Void Order_DetailsTableAdapter::InitAdapter() {
          this->_adapter = (gcnew System::Data::Odbc::OdbcDataAdapter());
          System::Data::Common::DataTableMapping^  tableMapping = (gcnew System::Data::Common::DataTableMapping());
          tableMapping->SourceTable = L"Table";
          tableMapping->DataSetTable = L"Order Details";
          tableMapping->ColumnMappings->Add(L"OrderID", L"OrderID");
          tableMapping->ColumnMappings->Add(L"ProductID", L"ProductID");
          tableMapping->ColumnMappings->Add(L"UnitPrice", L"UnitPrice");
          tableMapping->ColumnMappings->Add(L"Quantity", L"Quantity");
          tableMapping->ColumnMappings->Add(L"Discount", L"Discount");
          this->_adapter->TableMappings->Add(tableMapping);
          this->_adapter->DeleteCommand = (gcnew System::Data::Odbc::OdbcCommand());
          this->_adapter->DeleteCommand->Connection = this->Connection;
          this->_adapter->DeleteCommand->CommandText = L"DELETE FROM [Order Details] WHERE (([OrderID] = \?) AND ([ProductID] = \?) AND ((\? " 
  L"= 1 AND [UnitPrice] IS NULL) OR ([UnitPrice] = \?)) AND ((\? = 1 AND [Quantity] IS" 
  L" NULL) OR ([Quantity] = \?)) AND ((\? = 1 AND [Discount] IS NULL) OR ([Discount] =" 
  L" \?)))";
          this->_adapter->DeleteCommand->CommandType = System::Data::CommandType::Text;
          this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_OrderID", System::Data::Odbc::OdbcType::Int, 
                  0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"OrderID", System::Data::DataRowVersion::Original, 
                  false, nullptr)));
          this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_ProductID", System::Data::Odbc::OdbcType::Int, 
                  0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"ProductID", 
                  System::Data::DataRowVersion::Original, false, nullptr)));
          this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_UnitPrice", System::Data::Odbc::OdbcType::Int, 
                  0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"UnitPrice", 
                  System::Data::DataRowVersion::Original, true, nullptr)));
          this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_UnitPrice", System::Data::Odbc::OdbcType::Numeric, 
                  0, System::Data::ParameterDirection::Input, static_cast(19), static_cast(4), L"UnitPrice", 
                  System::Data::DataRowVersion::Original, false, nullptr)));
          this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_Quantity", System::Data::Odbc::OdbcType::Int, 
                  0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Quantity", 
                  System::Data::DataRowVersion::Original, true, nullptr)));
          this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_Quantity", System::Data::Odbc::OdbcType::SmallInt, 
                  0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Quantity", 
                  System::Data::DataRowVersion::Original, false, nullptr)));
          this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_Discount", System::Data::Odbc::OdbcType::Int, 
                  0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Discount", 
                  System::Data::DataRowVersion::Original, true, nullptr)));
          this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_Discount", System::Data::Odbc::OdbcType::Real, 
                  0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Discount", 
                  System::Data::DataRowVersion::Original, false, nullptr)));
          this->_adapter->InsertCommand = (gcnew System::Data::Odbc::OdbcCommand());
          this->_adapter->InsertCommand->Connection = this->Connection;
          this->_adapter->InsertCommand->CommandText = L"INSERT INTO [Order Details] ([OrderID], [ProductID], [UnitPrice], [Quantity], [Di" 
  L"scount]) VALUES (\?, \?, \?, \?, \?)";
          this->_adapter->InsertCommand->CommandType = System::Data::CommandType::Text;
          this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"OrderID", System::Data::Odbc::OdbcType::Int, 
                  0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"OrderID", System::Data::DataRowVersion::Current, 
                  false, nullptr)));
          this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"ProductID", System::Data::Odbc::OdbcType::Int, 
                  0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"ProductID", 
                  System::Data::DataRowVersion::Current, false, nullptr)));
          this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"UnitPrice", System::Data::Odbc::OdbcType::Numeric, 
                  0, System::Data::ParameterDirection::Input, static_cast(19), static_cast(4), L"UnitPrice", 
                  System::Data::DataRowVersion::Current, false, nullptr)));
          this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Quantity", System::Data::Odbc::OdbcType::SmallInt, 
                  0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Quantity", 
                  System::Data::DataRowVersion::Current, false, nullptr)));
          this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Discount", System::Data::Odbc::OdbcType::Real, 
                  0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Discount", 
                  System::Data::DataRowVersion::Current, false, nullptr)));
          this->_adapter->UpdateCommand = (gcnew System::Data::Odbc::OdbcCommand());
          this->_adapter->UpdateCommand->Connection = this->Connection;
          this->_adapter->UpdateCommand->CommandText = L"UPDATE [Order Details] SET [OrderID] = \?, [ProductID] = \?, [UnitPrice] = \?, [Quan" 
  L"tity] = \?, [Discount] = \? WHERE (([OrderID] = \?) AND ([ProductID] = \?) AND ((\? =" 
  L" 1 AND [UnitPrice] IS NULL) OR ([UnitPrice] = \?)) AND ((\? = 1 AND [Quantity] IS " 
  L"NULL) OR ([Quantity] = \?)) AND ((\? = 1 AND [Discount] IS NULL) OR ([Discount] = " 
  L"\?)))";
          this->_adapter->UpdateCommand->CommandType = System::Data::CommandType::Text;
          this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"OrderID", System::Data::Odbc::OdbcType::Int, 
                  0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"OrderID", System::Data::DataRowVersion::Current, 
                  false, nullptr)));
          this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"ProductID", System::Data::Odbc::OdbcType::Int, 
                  0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"ProductID", 
                  System::Data::DataRowVersion::Current, false, nullptr)));
          this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"UnitPrice", System::Data::Odbc::OdbcType::Numeric, 
                  0, System::Data::ParameterDirection::Input, static_cast(19), static_cast(4), L"UnitPrice", 
                  System::Data::DataRowVersion::Current, false, nullptr)));
          this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Quantity", System::Data::Odbc::OdbcType::SmallInt, 
                  0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Quantity", 
                  System::Data::DataRowVersion::Current, false, nullptr)));
          this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Discount", System::Data::Odbc::OdbcType::Real, 
                  0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Discount", 
                  System::Data::DataRowVersion::Current, false, nullptr)));
          this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_OrderID", System::Data::Odbc::OdbcType::Int, 
                  0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"OrderID", System::Data::DataRowVersion::Original, 
                  false, nullptr)));
          this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_ProductID", System::Data::Odbc::OdbcType::Int, 
                  0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"ProductID", 
                  System::Data::DataRowVersion::Original, false, nullptr)));
          this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_UnitPrice", System::Data::Odbc::OdbcType::Int, 
                  0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"UnitPrice", 
                  System::Data::DataRowVersion::Original, true, nullptr)));
          this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_UnitPrice", System::Data::Odbc::OdbcType::Numeric, 
                  0, System::Data::ParameterDirection::Input, static_cast(19), static_cast(4), L"UnitPrice", 
                  System::Data::DataRowVersion::Original, false, nullptr)));
          this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_Quantity", System::Data::Odbc::OdbcType::Int, 
                  0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Quantity", 
                  System::Data::DataRowVersion::Original, true, nullptr)));
          this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_Quantity", System::Data::Odbc::OdbcType::SmallInt, 
                  0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Quantity", 
                  System::Data::DataRowVersion::Original, false, nullptr)));
          this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_Discount", System::Data::Odbc::OdbcType::Int, 
                  0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Discount", 
                  System::Data::DataRowVersion::Original, true, nullptr)));
          this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_Discount", System::Data::Odbc::OdbcType::Real, 
                  0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Discount", 
                  System::Data::DataRowVersion::Original, false, nullptr)));
      }
      
      inline System::Void Order_DetailsTableAdapter::InitConnection() {
          this->_connection = (gcnew System::Data::Odbc::OdbcConnection());
          this->_connection->ConnectionString = L"Dsn=Northwind;dbq=D:\\Beginning Visual C++ 2005\\Model Access DB\\Northwind.mdb;driv" 
  L"erid=25;fil=MS Access;maxbuffersize=2048;pagetimeout=5";
      }
      
      inline System::Void Order_DetailsTableAdapter::InitCommandCollection() {
          this->_commandCollection = gcnew cli::array< System::Data::Odbc::OdbcCommand^  >(1);
          this->_commandCollection[0] = (gcnew System::Data::Odbc::OdbcCommand());
          this->_commandCollection[0]->Connection = this->Connection;
          this->_commandCollection[0]->CommandText = L"SELECT OrderID, ProductID, UnitPrice, Quantity, Discount FROM [Order Details]";
          this->_commandCollection[0]->CommandType = System::Data::CommandType::Text;
      }
      
      inline System::Int32 Order_DetailsTableAdapter::Fill(Ex22_04::DataSet1::Order_DetailsDataTable^  dataTable) {
          this->Adapter->SelectCommand = this->CommandCollection[0];
          if (this->ClearBeforeFill == true) {
              dataTable->Clear();
          }
          System::Int32 returnValue = this->Adapter->Fill(dataTable);
          return returnValue;
      }
      
      inline Ex22_04::DataSet1::Order_DetailsDataTable^  Order_DetailsTableAdapter::GetData() {
          this->Adapter->SelectCommand = this->CommandCollection[0];
          Ex22_04::DataSet1::Order_DetailsDataTable^  dataTable = (gcnew Ex22_04::DataSet1::Order_DetailsDataTable());
          this->Adapter->Fill(dataTable);
          return dataTable;
      }
      
      inline System::Int32 Order_DetailsTableAdapter::Update(Ex22_04::DataSet1::Order_DetailsDataTable^  dataTable) {
          return this->Adapter->Update(dataTable);
      }
      
      inline System::Int32 Order_DetailsTableAdapter::Update(Ex22_04::DataSet1^  dataSet) {
          return this->Adapter->Update(dataSet, L"Order Details");
      }
      
      inline System::Int32 Order_DetailsTableAdapter::Update(System::Data::DataRow^  dataRow) {
          return this->Adapter->Update(gcnew cli::array< System::Data::DataRow^  >(1) {dataRow});
      }
      
      inline System::Int32 Order_DetailsTableAdapter::Update(cli::array< System::Data::DataRow^  >^  dataRows) {
          return this->Adapter->Update(dataRows);
      }
      
      inline System::Int32 Order_DetailsTableAdapter::Delete(System::Nullable Original_OrderID, System::Nullable Original_ProductID, 
                  System::Nullable Original_UnitPrice, System::Nullable Original_Quantity, System::Nullable Original_Discount) {
          if (Original_OrderID.HasValue == true) {
              this->Adapter->DeleteCommand->Parameters[0]->Value = static_cast(Original_OrderID.Value);
          }
          else {
              this->Adapter->DeleteCommand->Parameters[0]->Value = System::DBNull::Value;
          }
          if (Original_ProductID.HasValue == true) {
              this->Adapter->DeleteCommand->Parameters[1]->Value = static_cast(Original_ProductID.Value);
          }
          else {
              this->Adapter->DeleteCommand->Parameters[1]->Value = System::DBNull::Value;
          }
          if (Original_UnitPrice.HasValue == true) {
              this->Adapter->DeleteCommand->Parameters[2]->Value = cli::safe_cast(0);
              this->Adapter->DeleteCommand->Parameters[3]->Value = static_cast(Original_UnitPrice.Value);
          }
          else {
              this->Adapter->DeleteCommand->Parameters[2]->Value = cli::safe_cast(1);
              this->Adapter->DeleteCommand->Parameters[3]->Value = System::DBNull::Value;
          }
          if (Original_Quantity.HasValue == true) {
              this->Adapter->DeleteCommand->Parameters[4]->Value = cli::safe_cast(0);
              this->Adapter->DeleteCommand->Parameters[5]->Value = static_cast(Original_Quantity.Value);
          }
          else {
              this->Adapter->DeleteCommand->Parameters[4]->Value = cli::safe_cast(1);
              this->Adapter->DeleteCommand->Parameters[5]->Value = System::DBNull::Value;
          }
          if (Original_Discount.HasValue == true) {
              this->Adapter->DeleteCommand->Parameters[6]->Value = cli::safe_cast(0);
              this->Adapter->DeleteCommand->Parameters[7]->Value = static_cast(Original_Discount.Value);
          }
          else {
              this->Adapter->DeleteCommand->Parameters[6]->Value = cli::safe_cast(1);
              this->Adapter->DeleteCommand->Parameters[7]->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 Order_DetailsTableAdapter::Insert(System::Nullable OrderID, System::Nullable ProductID, 
                  System::Nullable UnitPrice, System::Nullable Quantity, System::Nullable Discount) {
          if (OrderID.HasValue == true) {
              this->Adapter->InsertCommand->Parameters[0]->Value = static_cast(OrderID.Value);
          }
          else {
              this->Adapter->InsertCommand->Parameters[0]->Value = System::DBNull::Value;
          }
          if (ProductID.HasValue == true) {
              this->Adapter->InsertCommand->Parameters[1]->Value = static_cast(ProductID.Value);
          }
          else {
              this->Adapter->InsertCommand->Parameters[1]->Value = System::DBNull::Value;
          }
          if (UnitPrice.HasValue == true) {
              this->Adapter->InsertCommand->Parameters[2]->Value = static_cast(UnitPrice.Value);
          }
          else {
              this->Adapter->InsertCommand->Parameters[2]->Value = System::DBNull::Value;
          }
          if (Quantity.HasValue == true) {
              this->Adapter->InsertCommand->Parameters[3]->Value = static_cast(Quantity.Value);
          }
          else {
              this->Adapter->InsertCommand->Parameters[3]->Value = System::DBNull::Value;
          }
          if (Discount.HasValue == true) {
              this->Adapter->InsertCommand->Parameters[4]->Value = static_cast(Discount.Value);
          }
          else {
              this->Adapter->InsertCommand->Parameters[4]->Value = System::DBNull::Value;
          }
          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 {
              System::Int32 returnValue = this->Adapter->InsertCommand->ExecuteNonQuery();
              return returnValue;
          }
          finally {
              if (previousConnectionState == System::Data::ConnectionState::Closed) {
                  this->Adapter->InsertCommand->Connection->Close();
              }
          }
      }
      
      inline System::Int32 Order_DetailsTableAdapter::Update(
                  System::Nullable OrderID, 
                  System::Nullable ProductID, 
                  System::Nullable UnitPrice, 
                  System::Nullable Quantity, 
                  System::Nullable Discount, 
                  System::Nullable Original_OrderID, 
                  System::Nullable Original_ProductID, 
                  System::Nullable Original_UnitPrice, 
                  System::Nullable Original_Quantity, 
                  System::Nullable Original_Discount) {
          if (OrderID.HasValue == true) {
              this->Adapter->UpdateCommand->Parameters[0]->Value = static_cast(OrderID.Value);
          }
          else {
              this->Adapter->UpdateCommand->Parameters[0]->Value = System::DBNull::Value;
          }
          if (ProductID.HasValue == true) {
              this->Adapter->UpdateCommand->Parameters[1]->Value = static_cast(ProductID.Value);
          }
          else {
              this->Adapter->UpdateCommand->Parameters[1]->Value = System::DBNull::Value;
          }
          if (UnitPrice.HasValue == true) {
              this->Adapter->UpdateCommand->Parameters[2]->Value = static_cast(UnitPrice.Value);
          }
          else {
              this->Adapter->UpdateCommand->Parameters[2]->Value = System::DBNull::Value;
          }
          if (Quantity.HasValue == true) {
              this->Adapter->UpdateCommand->Parameters[3]->Value = static_cast(Quantity.Value);
          }
          else {
              this->Adapter->UpdateCommand->Parameters[3]->Value = System::DBNull::Value;
          }
          if (Discount.HasValue == true) {
              this->Adapter->UpdateCommand->Parameters[4]->Value = static_cast(Discount.Value);
          }
          else {
              this->Adapter->UpdateCommand->Parameters[4]->Value = System::DBNull::Value;
          }
          if (Original_OrderID.HasValue == true) {
              this->Adapter->UpdateCommand->Parameters[5]->Value = static_cast(Original_OrderID.Value);
          }
          else {
              this->Adapter->UpdateCommand->Parameters[5]->Value = System::DBNull::Value;
          }
          if (Original_ProductID.HasValue == true) {
              this->Adapter->UpdateCommand->Parameters[6]->Value = static_cast(Original_ProductID.Value);
          }
          else {
              this->Adapter->UpdateCommand->Parameters[6]->Value = System::DBNull::Value;
          }
          if (Original_UnitPrice.HasValue == true) {
              this->Adapter->UpdateCommand->Parameters[7]->Value = cli::safe_cast(0);
              this->Adapter->UpdateCommand->Parameters[8]->Value = static_cast(Original_UnitPrice.Value);
          }
          else {
              this->Adapter->UpdateCommand->Parameters[7]->Value = cli::safe_cast(1);
              this->Adapter->UpdateCommand->Parameters[8]->Value = System::DBNull::Value;
          }
          if (Original_Quantity.HasValue == true) {
              this->Adapter->UpdateCommand->Parameters[9]->Value = cli::safe_cast(0);
              this->Adapter->UpdateCommand->Parameters[10]->Value = static_cast(Original_Quantity.Value);
          }
          else {
              this->Adapter->UpdateCommand->Parameters[9]->Value = cli::safe_cast(1);
              this->Adapter->UpdateCommand->Parameters[10]->Value = System::DBNull::Value;
          }
          if (Original_Discount.HasValue == true) {
              this->Adapter->UpdateCommand->Parameters[11]->Value = cli::safe_cast(0);
              this->Adapter->UpdateCommand->Parameters[12]->Value = static_cast(Original_Discount.Value);
          }
          else {
              this->Adapter->UpdateCommand->Parameters[11]->Value = cli::safe_cast(1);
              this->Adapter->UpdateCommand->Parameters[12]->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();
              }
          }
      }
      }
  }
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author. <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "UA-2780434-1"; urchinTracker(); </script>

Hush Online Technology
hush@cs.vu.nl
10/17/08