The DejaVU Framework --
hush 3.1
-
[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_03 {
using namespace System;
using namespace System;
ref
<h4 align=right text=red> Customers;</h4><hr>
class Customers;
[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"Customers"),
System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.DataSet")]
public ref<hr>
Customers</h4>
class Customers : public System::Data::DataSet {
public : ref
CustomersDataTable;</h4>
class CustomersDataTable;
public : ref
CustomersRow;</h4>
class CustomersRow;
public : ref
CustomersRowChangeEvent;</h4>
class CustomersRowChangeEvent;
private: Ex22_03::Customers::CustomersDataTable^ tableCustomers;
private: System::Data::SchemaSerializationMode _schemaSerializationMode;
public : delegate System::Void CustomersRowChangeEventHandler(System::Object^ sender, Ex22_03::Customers::CustomersRowChangeEvent^ e);
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
Customers();
protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
Customers(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_03::Customers::CustomersDataTable^ _Customers {
Ex22_03::Customers::CustomersDataTable^ 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 ShouldSerialize_Customers();
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
CustomersDataTable</h4>
class CustomersDataTable : public System::Data::DataTable, public System::Collections::IEnumerable {
private: System::Data::DataColumn^ columnCustomerID;
private: System::Data::DataColumn^ columnCompanyName;
private: System::Data::DataColumn^ columnContactName;
private: System::Data::DataColumn^ columnContactTitle;
private: System::Data::DataColumn^ columnAddress;
private: System::Data::DataColumn^ columnCity;
private: System::Data::DataColumn^ columnRegion;
private: System::Data::DataColumn^ columnPostalCode;
private: System::Data::DataColumn^ columnCountry;
private: System::Data::DataColumn^ columnPhone;
private: System::Data::DataColumn^ columnFax;
public: event Ex22_03::Customers::CustomersRowChangeEventHandler^ CustomersRowChanging;
public: event Ex22_03::Customers::CustomersRowChangeEventHandler^ CustomersRowChanged;
public: event Ex22_03::Customers::CustomersRowChangeEventHandler^ CustomersRowDeleting;
public: event Ex22_03::Customers::CustomersRowChangeEventHandler^ CustomersRowDeleted;
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
CustomersDataTable();
internal: [System::Diagnostics::DebuggerNonUserCodeAttribute]
CustomersDataTable(System::Data::DataTable^ table);
protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
CustomersDataTable(System::Runtime::Serialization::SerializationInfo^ info, System::Runtime::Serialization::StreamingContext context);
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::Data::DataColumn^ CustomerIDColumn {
System::Data::DataColumn^ get();
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::Data::DataColumn^ CompanyNameColumn {
System::Data::DataColumn^ get();
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::Data::DataColumn^ ContactNameColumn {
System::Data::DataColumn^ get();
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::Data::DataColumn^ ContactTitleColumn {
System::Data::DataColumn^ get();
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::Data::DataColumn^ AddressColumn {
System::Data::DataColumn^ get();
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::Data::DataColumn^ CityColumn {
System::Data::DataColumn^ get();
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::Data::DataColumn^ RegionColumn {
System::Data::DataColumn^ get();
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::Data::DataColumn^ PostalCodeColumn {
System::Data::DataColumn^ get();
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::Data::DataColumn^ CountryColumn {
System::Data::DataColumn^ get();
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::Data::DataColumn^ PhoneColumn {
System::Data::DataColumn^ get();
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::Data::DataColumn^ FaxColumn {
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_03::Customers::CustomersRow^ default [System::Int32 ] {
Ex22_03::Customers::CustomersRow^ get(System::Int32 index);
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
System::Void AddCustomersRow(Ex22_03::Customers::CustomersRow^ row);
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
Ex22_03::Customers::CustomersRow^ AddCustomersRow(
System::String^ CustomerID,
System::String^ CompanyName,
System::String^ ContactName,
System::String^ ContactTitle,
System::String^ Address,
System::String^ City,
System::String^ Region,
System::String^ PostalCode,
System::String^ Country,
System::String^ Phone,
System::String^ Fax);
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
Ex22_03::Customers::CustomersRow^ FindByCustomerID(System::String^ CustomerID);
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_03::Customers::CustomersRow^ NewCustomersRow();
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 RemoveCustomersRow(Ex22_03::Customers::CustomersRow^ 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
CustomersRow</h4>
class CustomersRow : public System::Data::DataRow {
private: Ex22_03::Customers::CustomersDataTable^ tableCustomers;
internal: [System::Diagnostics::DebuggerNonUserCodeAttribute]
CustomersRow(System::Data::DataRowBuilder^ rb);
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::String^ CustomerID {
System::String^ get();
System::Void set(System::String^ value);
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::String^ CompanyName {
System::String^ get();
System::Void set(System::String^ value);
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::String^ ContactName {
System::String^ get();
System::Void set(System::String^ value);
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::String^ ContactTitle {
System::String^ get();
System::Void set(System::String^ value);
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::String^ Address {
System::String^ get();
System::Void set(System::String^ value);
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::String^ City {
System::String^ get();
System::Void set(System::String^ value);
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::String^ Region {
System::String^ get();
System::Void set(System::String^ value);
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::String^ PostalCode {
System::String^ get();
System::Void set(System::String^ value);
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::String^ Country {
System::String^ get();
System::Void set(System::String^ value);
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::String^ Phone {
System::String^ get();
System::Void set(System::String^ value);
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::String^ Fax {
System::String^ get();
System::Void set(System::String^ value);
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
System::Boolean IsCompanyNameNull();
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
System::Void SetCompanyNameNull();
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
System::Boolean IsContactNameNull();
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
System::Void SetContactNameNull();
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
System::Boolean IsContactTitleNull();
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
System::Void SetContactTitleNull();
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
System::Boolean IsAddressNull();
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
System::Void SetAddressNull();
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
System::Boolean IsCityNull();
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
System::Void SetCityNull();
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
System::Boolean IsRegionNull();
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
System::Void SetRegionNull();
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
System::Boolean IsPostalCodeNull();
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
System::Void SetPostalCodeNull();
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
System::Boolean IsCountryNull();
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
System::Void SetCountryNull();
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
System::Boolean IsPhoneNull();
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
System::Void SetPhoneNull();
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
System::Boolean IsFaxNull();
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
System::Void SetFaxNull();
};
public : [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0")]
ref
CustomersRowChangeEvent</h4>
class CustomersRowChangeEvent : public System::EventArgs {
private: Ex22_03::Customers::CustomersRow^ eventRow;
private: System::Data::DataRowAction eventAction;
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
CustomersRowChangeEvent(Ex22_03::Customers::CustomersRow^ row, System::Data::DataRowAction action);
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property Ex22_03::Customers::CustomersRow^ Row {
Ex22_03::Customers::CustomersRow^ get();
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::Data::DataRowAction Action {
System::Data::DataRowAction get();
}
};
};
}
namespace Ex22_03 {
inline Customers::Customers() {
this->BeginInit();
this->InitClass();
System::ComponentModel::CollectionChangeEventHandler^ schemaChangedHandler = gcnew System::ComponentModel::CollectionChangeEventHandler(this, &Ex22_03::Customers::SchemaChanged);
__super::Tables->CollectionChanged += schemaChangedHandler;
__super::Relations->CollectionChanged += schemaChangedHandler;
this->EndInit();
}
inline Customers::Customers(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_03::Customers::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"Customers"] != nullptr) {
__super::Tables->Add((gcnew Ex22_03::Customers::CustomersDataTable(ds->Tables[L"Customers"])));
}
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_03::Customers::SchemaChanged);
__super::Tables->CollectionChanged += schemaChangedHandler;
this->Relations->CollectionChanged += schemaChangedHandler;
}
inline Ex22_03::Customers::CustomersDataTable^ Customers::_Customers::get() {
return this->tableCustomers;
}
inline System::Data::SchemaSerializationMode Customers::SchemaSerializationMode::get() {
return this->_schemaSerializationMode;
}
inline System::Void Customers::SchemaSerializationMode::set(System::Data::SchemaSerializationMode value) {
this->_schemaSerializationMode = __identifier(value);
}
inline System::Data::DataTableCollection^ Customers::Tables::get() {
return __super::Tables;
}
inline System::Data::DataRelationCollection^ Customers::Relations::get() {
return __super::Relations;
}
inline System::Void Customers::InitializeDerivedDataSet() {
this->BeginInit();
this->InitClass();
this->EndInit();
}
inline System::Data::DataSet^ Customers::Clone() {
Ex22_03::Customers^ cln = (cli::safe_cast(__super::Clone()));
cln->InitVars();
cln->SchemaSerializationMode = this->SchemaSerializationMode;
return cln;
}
inline System::Boolean Customers::ShouldSerializeTables() {
return false;
}
inline System::Boolean Customers::ShouldSerializeRelations() {
return false;
}
inline System::Void Customers::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"Customers"] != nullptr) {
__super::Tables->Add((gcnew Ex22_03::Customers::CustomersDataTable(ds->Tables[L"Customers"])));
}
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^ Customers::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 Customers::InitVars() {
this->InitVars(true);
}
inline System::Void Customers::InitVars(System::Boolean initTable) {
this->tableCustomers = (cli::safe_cast(__super::Tables[L"Customers"]));
if (initTable == true) {
if (this->tableCustomers != nullptr) {
this->tableCustomers->InitVars();
}
}
}
inline System::Void Customers::InitClass() {
this->DataSetName = L"Customers";
this->Prefix = L"";
this->Namespace = L"http://tempuri.org/Customers.xsd";
this->EnforceConstraints = true;
this->SchemaSerializationMode = System::Data::SchemaSerializationMode::IncludeSchema;
this->tableCustomers = (gcnew Ex22_03::Customers::CustomersDataTable());
__super::Tables->Add(this->tableCustomers);
}
inline System::Boolean Customers::ShouldSerialize_Customers() {
return false;
}
inline System::Void Customers::SchemaChanged(System::Object^ sender, System::ComponentModel::CollectionChangeEventArgs^ e) {
if (e->Action == System::ComponentModel::CollectionChangeAction::Remove) {
this->InitVars();
}
}
inline System::Xml::Schema::XmlSchemaComplexType^ Customers::GetTypedDataSetSchema(System::Xml::Schema::XmlSchemaSet^ xs) {
Ex22_03::Customers^ ds = (gcnew Ex22_03::Customers());
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 Customers::CustomersDataTable::CustomersDataTable() {
this->TableName = L"Customers";
this->BeginInit();
this->InitClass();
this->EndInit();
}
inline Customers::CustomersDataTable::CustomersDataTable(System::Data::DataTable^ table) {
this->TableName = table->TableName;
if (table->CaseSensitive != table->DataSet->CaseSensitive) {
this->CaseSensitive = table->CaseSensitive;
}
if (table->Locale->ToString() != table->DataSet->Locale->ToString()) {
this->Locale = table->Locale;
}
if (table->Namespace != table->DataSet->Namespace) {
this->Namespace = table->Namespace;
}
this->Prefix = table->Prefix;
this->MinimumCapacity = table->MinimumCapacity;
}
inline Customers::CustomersDataTable::CustomersDataTable(System::Runtime::Serialization::SerializationInfo^ info, System::Runtime::Serialization::StreamingContext context) :
System::Data::DataTable(info, context) {
this->InitVars();
}
inline System::Data::DataColumn^ Customers::CustomersDataTable::CustomerIDColumn::get() {
return this->columnCustomerID;
}
inline System::Data::DataColumn^ Customers::CustomersDataTable::CompanyNameColumn::get() {
return this->columnCompanyName;
}
inline System::Data::DataColumn^ Customers::CustomersDataTable::ContactNameColumn::get() {
return this->columnContactName;
}
inline System::Data::DataColumn^ Customers::CustomersDataTable::ContactTitleColumn::get() {
return this->columnContactTitle;
}
inline System::Data::DataColumn^ Customers::CustomersDataTable::AddressColumn::get() {
return this->columnAddress;
}
inline System::Data::DataColumn^ Customers::CustomersDataTable::CityColumn::get() {
return this->columnCity;
}
inline System::Data::DataColumn^ Customers::CustomersDataTable::RegionColumn::get() {
return this->columnRegion;
}
inline System::Data::DataColumn^ Customers::CustomersDataTable::PostalCodeColumn::get() {
return this->columnPostalCode;
}
inline System::Data::DataColumn^ Customers::CustomersDataTable::CountryColumn::get() {
return this->columnCountry;
}
inline System::Data::DataColumn^ Customers::CustomersDataTable::PhoneColumn::get() {
return this->columnPhone;
}
inline System::Data::DataColumn^ Customers::CustomersDataTable::FaxColumn::get() {
return this->columnFax;
}
inline System::Int32 Customers::CustomersDataTable::Count::get() {
return this->Rows->Count;
}
inline Ex22_03::Customers::CustomersRow^ Customers::CustomersDataTable::default::get(System::Int32 index) {
return (cli::safe_cast(this->Rows[index]));
}
inline System::Void Customers::CustomersDataTable::AddCustomersRow(Ex22_03::Customers::CustomersRow^ row) {
this->Rows->Add(row);
}
inline Ex22_03::Customers::CustomersRow^ Customers::CustomersDataTable::AddCustomersRow(
System::String^ CustomerID,
System::String^ CompanyName,
System::String^ ContactName,
System::String^ ContactTitle,
System::String^ Address,
System::String^ City,
System::String^ Region,
System::String^ PostalCode,
System::String^ Country,
System::String^ Phone,
System::String^ Fax) {
Ex22_03::Customers::CustomersRow^ rowCustomersRow = (cli::safe_cast(this->NewRow()));
rowCustomersRow->ItemArray = gcnew cli::array< System::Object^ >(11) {CustomerID, CompanyName, ContactName, ContactTitle,
Address, City, Region, PostalCode, Country, Phone, Fax};
this->Rows->Add(rowCustomersRow);
return rowCustomersRow;
}
inline Ex22_03::Customers::CustomersRow^ Customers::CustomersDataTable::FindByCustomerID(System::String^ CustomerID) {
return (cli::safe_cast(this->Rows->Find(gcnew cli::array< System::Object^ >(1) {CustomerID})));
}
inline System::Collections::IEnumerator^ Customers::CustomersDataTable::GetEnumerator() {
return this->Rows->GetEnumerator();
}
inline System::Data::DataTable^ Customers::CustomersDataTable::Clone() {
Ex22_03::Customers::CustomersDataTable^ cln = (cli::safe_cast(__super::Clone()));
cln->InitVars();
return cln;
}
inline System::Data::DataTable^ Customers::CustomersDataTable::CreateInstance() {
return (gcnew Ex22_03::Customers::CustomersDataTable());
}
inline System::Void Customers::CustomersDataTable::InitVars() {
this->columnCustomerID = __super::Columns[L"CustomerID"];
this->columnCompanyName = __super::Columns[L"CompanyName"];
this->columnContactName = __super::Columns[L"ContactName"];
this->columnContactTitle = __super::Columns[L"ContactTitle"];
this->columnAddress = __super::Columns[L"Address"];
this->columnCity = __super::Columns[L"City"];
this->columnRegion = __super::Columns[L"Region"];
this->columnPostalCode = __super::Columns[L"PostalCode"];
this->columnCountry = __super::Columns[L"Country"];
this->columnPhone = __super::Columns[L"Phone"];
this->columnFax = __super::Columns[L"Fax"];
}
inline System::Void Customers::CustomersDataTable::InitClass() {
this->columnCustomerID = (gcnew System::Data::DataColumn(L"CustomerID", System::String::typeid, nullptr, System::Data::MappingType::Element));
__super::Columns->Add(this->columnCustomerID);
this->columnCompanyName = (gcnew System::Data::DataColumn(L"CompanyName", System::String::typeid, nullptr, System::Data::MappingType::Element));
__super::Columns->Add(this->columnCompanyName);
this->columnContactName = (gcnew System::Data::DataColumn(L"ContactName", System::String::typeid, nullptr, System::Data::MappingType::Element));
__super::Columns->Add(this->columnContactName);
this->columnContactTitle = (gcnew System::Data::DataColumn(L"ContactTitle", System::String::typeid, nullptr, System::Data::MappingType::Element));
__super::Columns->Add(this->columnContactTitle);
this->columnAddress = (gcnew System::Data::DataColumn(L"Address", System::String::typeid, nullptr, System::Data::MappingType::Element));
__super::Columns->Add(this->columnAddress);
this->columnCity = (gcnew System::Data::DataColumn(L"City", System::String::typeid, nullptr, System::Data::MappingType::Element));
__super::Columns->Add(this->columnCity);
this->columnRegion = (gcnew System::Data::DataColumn(L"Region", System::String::typeid, nullptr, System::Data::MappingType::Element));
__super::Columns->Add(this->columnRegion);
this->columnPostalCode = (gcnew System::Data::DataColumn(L"PostalCode", System::String::typeid, nullptr, System::Data::MappingType::Element));
__super::Columns->Add(this->columnPostalCode);
this->columnCountry = (gcnew System::Data::DataColumn(L"Country", System::String::typeid, nullptr, System::Data::MappingType::Element));
__super::Columns->Add(this->columnCountry);
this->columnPhone = (gcnew System::Data::DataColumn(L"Phone", System::String::typeid, nullptr, System::Data::MappingType::Element));
__super::Columns->Add(this->columnPhone);
this->columnFax = (gcnew System::Data::DataColumn(L"Fax", System::String::typeid, nullptr, System::Data::MappingType::Element));
__super::Columns->Add(this->columnFax);
this->Constraints->Add((gcnew System::Data::UniqueConstraint(L"Constraint1", gcnew cli::array< System::Data::DataColumn^ >(1) {this->columnCustomerID},
true)));
this->columnCustomerID->AllowDBNull = false;
this->columnCustomerID->Unique = true;
this->columnCustomerID->MaxLength = 5;
this->columnCompanyName->MaxLength = 40;
this->columnContactName->MaxLength = 30;
this->columnContactTitle->MaxLength = 30;
this->columnAddress->MaxLength = 60;
this->columnCity->MaxLength = 15;
this->columnRegion->MaxLength = 15;
this->columnPostalCode->MaxLength = 10;
this->columnCountry->MaxLength = 15;
this->columnPhone->MaxLength = 24;
this->columnFax->MaxLength = 24;
this->ExtendedProperties->Add(L"Generator_TablePropName", L"_Customers");
this->ExtendedProperties->Add(L"Generator_UserTableName", L"Customers");
}
inline Ex22_03::Customers::CustomersRow^ Customers::CustomersDataTable::NewCustomersRow() {
return (cli::safe_cast(this->NewRow()));
}
inline System::Data::DataRow^ Customers::CustomersDataTable::NewRowFromBuilder(System::Data::DataRowBuilder^ builder) {
return (gcnew Ex22_03::Customers::CustomersRow(builder));
}
inline System::Type^ Customers::CustomersDataTable::GetRowType() {
return Ex22_03::Customers::CustomersRow::typeid;
}
inline System::Void Customers::CustomersDataTable::OnRowChanged(System::Data::DataRowChangeEventArgs^ e) {
__super::OnRowChanged(e);
{
this->CustomersRowChanged(this, (gcnew Ex22_03::Customers::CustomersRowChangeEvent((cli::safe_cast(e->Row)),
e->Action)));
}
}
inline System::Void Customers::CustomersDataTable::OnRowChanging(System::Data::DataRowChangeEventArgs^ e) {
__super::OnRowChanging(e);
{
this->CustomersRowChanging(this, (gcnew Ex22_03::Customers::CustomersRowChangeEvent((cli::safe_cast(e->Row)),
e->Action)));
}
}
inline System::Void Customers::CustomersDataTable::OnRowDeleted(System::Data::DataRowChangeEventArgs^ e) {
__super::OnRowDeleted(e);
{
this->CustomersRowDeleted(this, (gcnew Ex22_03::Customers::CustomersRowChangeEvent((cli::safe_cast(e->Row)),
e->Action)));
}
}
inline System::Void Customers::CustomersDataTable::OnRowDeleting(System::Data::DataRowChangeEventArgs^ e) {
__super::OnRowDeleting(e);
{
this->CustomersRowDeleting(this, (gcnew Ex22_03::Customers::CustomersRowChangeEvent((cli::safe_cast(e->Row)),
e->Action)));
}
}
inline System::Void Customers::CustomersDataTable::RemoveCustomersRow(Ex22_03::Customers::CustomersRow^ row) {
this->Rows->Remove(row);
}
inline System::Xml::Schema::XmlSchemaComplexType^ Customers::CustomersDataTable::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_03::Customers^ ds = (gcnew Ex22_03::Customers());
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"CustomersDataTable";
type->Attributes->Add(attribute2);
type->Particle = sequence;
return type;
}
inline Customers::CustomersRow::CustomersRow(System::Data::DataRowBuilder^ rb) :
System::Data::DataRow(rb) {
this->tableCustomers = (cli::safe_cast(this->Table));
}
inline System::String^ Customers::CustomersRow::CustomerID::get() {
return (cli::safe_cast(this[this->tableCustomers->CustomerIDColumn]));
}
inline System::Void Customers::CustomersRow::CustomerID::set(System::String^ value) {
this[this->tableCustomers->CustomerIDColumn] = value;
}
inline System::String^ Customers::CustomersRow::CompanyName::get() {
try {
return (cli::safe_cast(this[this->tableCustomers->CompanyNameColumn]));
}
catch (System::InvalidCastException^ e) {
throw (gcnew System::Data::StrongTypingException(L"The value for column \'CompanyName\' in table \'Customers\' is DBNull.",
e));
}
}
inline System::Void Customers::CustomersRow::CompanyName::set(System::String^ value) {
this[this->tableCustomers->CompanyNameColumn] = value;
}
inline System::String^ Customers::CustomersRow::ContactName::get() {
try {
return (cli::safe_cast(this[this->tableCustomers->ContactNameColumn]));
}
catch (System::InvalidCastException^ e) {
throw (gcnew System::Data::StrongTypingException(L"The value for column \'ContactName\' in table \'Customers\' is DBNull.",
e));
}
}
inline System::Void Customers::CustomersRow::ContactName::set(System::String^ value) {
this[this->tableCustomers->ContactNameColumn] = value;
}
inline System::String^ Customers::CustomersRow::ContactTitle::get() {
try {
return (cli::safe_cast(this[this->tableCustomers->ContactTitleColumn]));
}
catch (System::InvalidCastException^ e) {
throw (gcnew System::Data::StrongTypingException(L"The value for column \'ContactTitle\' in table \'Customers\' is DBNull.",
e));
}
}
inline System::Void Customers::CustomersRow::ContactTitle::set(System::String^ value) {
this[this->tableCustomers->ContactTitleColumn] = value;
}
inline System::String^ Customers::CustomersRow::Address::get() {
try {
return (cli::safe_cast(this[this->tableCustomers->AddressColumn]));
}
catch (System::InvalidCastException^ e) {
throw (gcnew System::Data::StrongTypingException(L"The value for column \'Address\' in table \'Customers\' is DBNull.",
e));
}
}
inline System::Void Customers::CustomersRow::Address::set(System::String^ value) {
this[this->tableCustomers->AddressColumn] = value;
}
inline System::String^ Customers::CustomersRow::City::get() {
try {
return (cli::safe_cast(this[this->tableCustomers->CityColumn]));
}
catch (System::InvalidCastException^ e) {
throw (gcnew System::Data::StrongTypingException(L"The value for column \'City\' in table \'Customers\' is DBNull.",
e));
}
}
inline System::Void Customers::CustomersRow::City::set(System::String^ value) {
this[this->tableCustomers->CityColumn] = value;
}
inline System::String^ Customers::CustomersRow::Region::get() {
try {
return (cli::safe_cast(this[this->tableCustomers->RegionColumn]));
}
catch (System::InvalidCastException^ e) {
throw (gcnew System::Data::StrongTypingException(L"The value for column \'Region\' in table \'Customers\' is DBNull.",
e));
}
}
inline System::Void Customers::CustomersRow::Region::set(System::String^ value) {
this[this->tableCustomers->RegionColumn] = value;
}
inline System::String^ Customers::CustomersRow::PostalCode::get() {
try {
return (cli::safe_cast(this[this->tableCustomers->PostalCodeColumn]));
}
catch (System::InvalidCastException^ e) {
throw (gcnew System::Data::StrongTypingException(L"The value for column \'PostalCode\' in table \'Customers\' is DBNull.",
e));
}
}
inline System::Void Customers::CustomersRow::PostalCode::set(System::String^ value) {
this[this->tableCustomers->PostalCodeColumn] = value;
}
inline System::String^ Customers::CustomersRow::Country::get() {
try {
return (cli::safe_cast(this[this->tableCustomers->CountryColumn]));
}
catch (System::InvalidCastException^ e) {
throw (gcnew System::Data::StrongTypingException(L"The value for column \'Country\' in table \'Customers\' is DBNull.",
e));
}
}
inline System::Void Customers::CustomersRow::Country::set(System::String^ value) {
this[this->tableCustomers->CountryColumn] = value;
}
inline System::String^ Customers::CustomersRow::Phone::get() {
try {
return (cli::safe_cast(this[this->tableCustomers->PhoneColumn]));
}
catch (System::InvalidCastException^ e) {
throw (gcnew System::Data::StrongTypingException(L"The value for column \'Phone\' in table \'Customers\' is DBNull.",
e));
}
}
inline System::Void Customers::CustomersRow::Phone::set(System::String^ value) {
this[this->tableCustomers->PhoneColumn] = value;
}
inline System::String^ Customers::CustomersRow::Fax::get() {
try {
return (cli::safe_cast(this[this->tableCustomers->FaxColumn]));
}
catch (System::InvalidCastException^ e) {
throw (gcnew System::Data::StrongTypingException(L"The value for column \'Fax\' in table \'Customers\' is DBNull.", e));
}
}
inline System::Void Customers::CustomersRow::Fax::set(System::String^ value) {
this[this->tableCustomers->FaxColumn] = value;
}
inline System::Boolean Customers::CustomersRow::IsCompanyNameNull() {
return this->IsNull(this->tableCustomers->CompanyNameColumn);
}
inline System::Void Customers::CustomersRow::SetCompanyNameNull() {
this[this->tableCustomers->CompanyNameColumn] = System::Convert::DBNull;
}
inline System::Boolean Customers::CustomersRow::IsContactNameNull() {
return this->IsNull(this->tableCustomers->ContactNameColumn);
}
inline System::Void Customers::CustomersRow::SetContactNameNull() {
this[this->tableCustomers->ContactNameColumn] = System::Convert::DBNull;
}
inline System::Boolean Customers::CustomersRow::IsContactTitleNull() {
return this->IsNull(this->tableCustomers->ContactTitleColumn);
}
inline System::Void Customers::CustomersRow::SetContactTitleNull() {
this[this->tableCustomers->ContactTitleColumn] = System::Convert::DBNull;
}
inline System::Boolean Customers::CustomersRow::IsAddressNull() {
return this->IsNull(this->tableCustomers->AddressColumn);
}
inline System::Void Customers::CustomersRow::SetAddressNull() {
this[this->tableCustomers->AddressColumn] = System::Convert::DBNull;
}
inline System::Boolean Customers::CustomersRow::IsCityNull() {
return this->IsNull(this->tableCustomers->CityColumn);
}
inline System::Void Customers::CustomersRow::SetCityNull() {
this[this->tableCustomers->CityColumn] = System::Convert::DBNull;
}
inline System::Boolean Customers::CustomersRow::IsRegionNull() {
return this->IsNull(this->tableCustomers->RegionColumn);
}
inline System::Void Customers::CustomersRow::SetRegionNull() {
this[this->tableCustomers->RegionColumn] = System::Convert::DBNull;
}
inline System::Boolean Customers::CustomersRow::IsPostalCodeNull() {
return this->IsNull(this->tableCustomers->PostalCodeColumn);
}
inline System::Void Customers::CustomersRow::SetPostalCodeNull() {
this[this->tableCustomers->PostalCodeColumn] = System::Convert::DBNull;
}
inline System::Boolean Customers::CustomersRow::IsCountryNull() {
return this->IsNull(this->tableCustomers->CountryColumn);
}
inline System::Void Customers::CustomersRow::SetCountryNull() {
this[this->tableCustomers->CountryColumn] = System::Convert::DBNull;
}
inline System::Boolean Customers::CustomersRow::IsPhoneNull() {
return this->IsNull(this->tableCustomers->PhoneColumn);
}
inline System::Void Customers::CustomersRow::SetPhoneNull() {
this[this->tableCustomers->PhoneColumn] = System::Convert::DBNull;
}
inline System::Boolean Customers::CustomersRow::IsFaxNull() {
return this->IsNull(this->tableCustomers->FaxColumn);
}
inline System::Void Customers::CustomersRow::SetFaxNull() {
this[this->tableCustomers->FaxColumn] = System::Convert::DBNull;
}
inline Customers::CustomersRowChangeEvent::CustomersRowChangeEvent(Ex22_03::Customers::CustomersRow^ row, System::Data::DataRowAction action) {
this->eventRow = row;
this->eventAction = action;
}
inline Ex22_03::Customers::CustomersRow^ Customers::CustomersRowChangeEvent::Row::get() {
return this->eventRow;
}
inline System::Data::DataRowAction Customers::CustomersRowChangeEvent::Action::get() {
return this->eventAction;
}
}
namespace Ex22_03 {
namespace CustomersTableAdapters {
using namespace System;
ref
CustomersTableAdapter;</h4>
class CustomersTableAdapter;
[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
CustomersTableAdapter</h4>
class CustomersTableAdapter : 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]
CustomersTableAdapter();
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_03::Customers::CustomersDataTable^ dataTable);
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
[System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Select, true)]
virtual Ex22_03::Customers::CustomersDataTable^ GetData();
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
virtual System::Int32 Update(Ex22_03::Customers::CustomersDataTable^ dataTable);
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
virtual System::Int32 Update(Ex22_03::Customers^ 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::String^ Original_CustomerID,
System::String^ Original_CompanyName,
System::String^ Original_ContactName,
System::String^ Original_ContactTitle,
System::String^ Original_Address,
System::String^ Original_City,
System::String^ Original_Region,
System::String^ Original_PostalCode,
System::String^ Original_Country,
System::String^ Original_Phone,
System::String^ Original_Fax);
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::String^ CustomerID,
System::String^ CompanyName,
System::String^ ContactName,
System::String^ ContactTitle,
System::String^ Address,
System::String^ City,
System::String^ Region,
System::String^ PostalCode,
System::String^ Country,
System::String^ Phone,
System::String^ Fax);
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^ CustomerID,
System::String^ CompanyName,
System::String^ ContactName,
System::String^ ContactTitle,
System::String^ Address,
System::String^ City,
System::String^ Region,
System::String^ PostalCode,
System::String^ Country,
System::String^ Phone,
System::String^ Fax,
System::String^ Original_CustomerID,
System::String^ Original_CompanyName,
System::String^ Original_ContactName,
System::String^ Original_ContactTitle,
System::String^ Original_Address,
System::String^ Original_City,
System::String^ Original_Region,
System::String^ Original_PostalCode,
System::String^ Original_Country,
System::String^ Original_Phone,
System::String^ Original_Fax);
};
}
}
namespace Ex22_03 {
namespace CustomersTableAdapters {
inline CustomersTableAdapter::CustomersTableAdapter() {
this->ClearBeforeFill = true;
}
inline System::Data::Odbc::OdbcDataAdapter^ CustomersTableAdapter::Adapter::get() {
if (this->_adapter == nullptr) {
this->InitAdapter();
}
return this->_adapter;
}
inline System::Data::Odbc::OdbcConnection^ CustomersTableAdapter::Connection::get() {
if (this->_connection == nullptr) {
this->InitConnection();
}
return this->_connection;
}
inline System::Void CustomersTableAdapter::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^ >^ CustomersTableAdapter::CommandCollection::get() {
if (this->_commandCollection == nullptr) {
this->InitCommandCollection();
}
return this->_commandCollection;
}
inline System::Boolean CustomersTableAdapter::ClearBeforeFill::get() {
return this->_clearBeforeFill;
}
inline System::Void CustomersTableAdapter::ClearBeforeFill::set(System::Boolean value) {
this->_clearBeforeFill = __identifier(value);
}
inline System::Void CustomersTableAdapter::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"Customers";
tableMapping->ColumnMappings->Add(L"CustomerID", L"CustomerID");
tableMapping->ColumnMappings->Add(L"CompanyName", L"CompanyName");
tableMapping->ColumnMappings->Add(L"ContactName", L"ContactName");
tableMapping->ColumnMappings->Add(L"ContactTitle", L"ContactTitle");
tableMapping->ColumnMappings->Add(L"Address", L"Address");
tableMapping->ColumnMappings->Add(L"City", L"City");
tableMapping->ColumnMappings->Add(L"Region", L"Region");
tableMapping->ColumnMappings->Add(L"PostalCode", L"PostalCode");
tableMapping->ColumnMappings->Add(L"Country", L"Country");
tableMapping->ColumnMappings->Add(L"Phone", L"Phone");
tableMapping->ColumnMappings->Add(L"Fax", L"Fax");
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 [Customers] WHERE (([CustomerID] = \?) AND ((\? = 1 AND [CompanyName] I"
L"S NULL) OR ([CompanyName] = \?)) AND ((\? = 1 AND [ContactName] IS NULL) OR ([Cont"
L"actName] = \?)) AND ((\? = 1 AND [ContactTitle] IS NULL) OR ([ContactTitle] = \?)) "
L"AND ((\? = 1 AND [Address] IS NULL) OR ([Address] = \?)) AND ((\? = 1 AND [City] IS"
L" NULL) OR ([City] = \?)) AND ((\? = 1 AND [Region] IS NULL) OR ([Region] = \?)) AND"
L" ((\? = 1 AND [PostalCode] IS NULL) OR ([PostalCode] = \?)) AND ((\? = 1 AND [Count"
L"ry] IS NULL) OR ([Country] = \?)) AND ((\? = 1 AND [Phone] IS NULL) OR ([Phone] = "
L"\?)) AND ((\? = 1 AND [Fax] IS NULL) OR ([Fax] = \?)))";
this->_adapter->DeleteCommand->CommandType = System::Data::CommandType::Text;
this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_CustomerID", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"CustomerID",
System::Data::DataRowVersion::Original, false, nullptr)));
this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_CompanyName", System::Data::Odbc::OdbcType::Int,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"CompanyName",
System::Data::DataRowVersion::Original, true, nullptr)));
this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_CompanyName", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"CompanyName",
System::Data::DataRowVersion::Original, false, nullptr)));
this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_ContactName", System::Data::Odbc::OdbcType::Int,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"ContactName",
System::Data::DataRowVersion::Original, true, nullptr)));
this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_ContactName", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"ContactName",
System::Data::DataRowVersion::Original, false, nullptr)));
this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_ContactTitle", System::Data::Odbc::OdbcType::Int,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"ContactTitle",
System::Data::DataRowVersion::Original, true, nullptr)));
this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_ContactTitle", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"ContactTitle",
System::Data::DataRowVersion::Original, false, nullptr)));
this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_Address", System::Data::Odbc::OdbcType::Int,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Address", System::Data::DataRowVersion::Original,
true, nullptr)));
this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_Address", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Address", System::Data::DataRowVersion::Original,
false, nullptr)));
this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_City", System::Data::Odbc::OdbcType::Int,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"City", System::Data::DataRowVersion::Original,
true, nullptr)));
this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_City", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"City", System::Data::DataRowVersion::Original,
false, nullptr)));
this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_Region", System::Data::Odbc::OdbcType::Int,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Region", System::Data::DataRowVersion::Original,
true, nullptr)));
this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_Region", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Region", System::Data::DataRowVersion::Original,
false, nullptr)));
this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_PostalCode", System::Data::Odbc::OdbcType::Int,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"PostalCode",
System::Data::DataRowVersion::Original, true, nullptr)));
this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_PostalCode", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"PostalCode",
System::Data::DataRowVersion::Original, false, nullptr)));
this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_Country", System::Data::Odbc::OdbcType::Int,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Country", System::Data::DataRowVersion::Original,
true, nullptr)));
this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_Country", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Country", System::Data::DataRowVersion::Original,
false, nullptr)));
this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_Phone", System::Data::Odbc::OdbcType::Int,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Phone", System::Data::DataRowVersion::Original,
true, nullptr)));
this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_Phone", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Phone", System::Data::DataRowVersion::Original,
false, nullptr)));
this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_Fax", System::Data::Odbc::OdbcType::Int,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Fax", System::Data::DataRowVersion::Original,
true, nullptr)));
this->_adapter->DeleteCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_Fax", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Fax", 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 [Customers] ([CustomerID], [CompanyName], [ContactName], [ContactTitl"
L"e], [Address], [City], [Region], [PostalCode], [Country], [Phone], [Fax]) VALUES"
L" (\?, \?, \?, \?, \?, \?, \?, \?, \?, \?, \?)";
this->_adapter->InsertCommand->CommandType = System::Data::CommandType::Text;
this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"CustomerID", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"CustomerID",
System::Data::DataRowVersion::Current, false, nullptr)));
this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"CompanyName", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"CompanyName",
System::Data::DataRowVersion::Current, false, nullptr)));
this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"ContactName", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"ContactName",
System::Data::DataRowVersion::Current, false, nullptr)));
this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"ContactTitle", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"ContactTitle",
System::Data::DataRowVersion::Current, false, nullptr)));
this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Address", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Address", System::Data::DataRowVersion::Current,
false, nullptr)));
this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"City", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"City", System::Data::DataRowVersion::Current,
false, nullptr)));
this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Region", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Region", System::Data::DataRowVersion::Current,
false, nullptr)));
this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"PostalCode", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"PostalCode",
System::Data::DataRowVersion::Current, false, nullptr)));
this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Country", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Country", System::Data::DataRowVersion::Current,
false, nullptr)));
this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Phone", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Phone", System::Data::DataRowVersion::Current,
false, nullptr)));
this->_adapter->InsertCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Fax", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Fax", 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 [Customers] SET [CustomerID] = \?, [CompanyName] = \?, [ContactName] = \?, [C"
L"ontactTitle] = \?, [Address] = \?, [City] = \?, [Region] = \?, [PostalCode] = \?, [Co"
L"untry] = \?, [Phone] = \?, [Fax] = \? WHERE (([CustomerID] = \?) AND ((\? = 1 AND [Co"
L"mpanyName] IS NULL) OR ([CompanyName] = \?)) AND ((\? = 1 AND [ContactName] IS NUL"
L"L) OR ([ContactName] = \?)) AND ((\? = 1 AND [ContactTitle] IS NULL) OR ([ContactT"
L"itle] = \?)) AND ((\? = 1 AND [Address] IS NULL) OR ([Address] = \?)) AND ((\? = 1 A"
L"ND [City] IS NULL) OR ([City] = \?)) AND ((\? = 1 AND [Region] IS NULL) OR ([Regio"
L"n] = \?)) AND ((\? = 1 AND [PostalCode] IS NULL) OR ([PostalCode] = \?)) AND ((\? = "
L"1 AND [Country] IS NULL) OR ([Country] = \?)) AND ((\? = 1 AND [Phone] IS NULL) OR"
L" ([Phone] = \?)) AND ((\? = 1 AND [Fax] IS NULL) OR ([Fax] = \?)))";
this->_adapter->UpdateCommand->CommandType = System::Data::CommandType::Text;
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"CustomerID", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"CustomerID",
System::Data::DataRowVersion::Current, false, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"CompanyName", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"CompanyName",
System::Data::DataRowVersion::Current, false, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"ContactName", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"ContactName",
System::Data::DataRowVersion::Current, false, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"ContactTitle", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"ContactTitle",
System::Data::DataRowVersion::Current, false, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Address", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Address", System::Data::DataRowVersion::Current,
false, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"City", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"City", System::Data::DataRowVersion::Current,
false, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Region", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Region", System::Data::DataRowVersion::Current,
false, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"PostalCode", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"PostalCode",
System::Data::DataRowVersion::Current, false, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Country", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Country", System::Data::DataRowVersion::Current,
false, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Phone", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Phone", System::Data::DataRowVersion::Current,
false, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Fax", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Fax", System::Data::DataRowVersion::Current,
false, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_CustomerID", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"CustomerID",
System::Data::DataRowVersion::Original, false, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_CompanyName", System::Data::Odbc::OdbcType::Int,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"CompanyName",
System::Data::DataRowVersion::Original, true, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_CompanyName", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"CompanyName",
System::Data::DataRowVersion::Original, false, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_ContactName", System::Data::Odbc::OdbcType::Int,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"ContactName",
System::Data::DataRowVersion::Original, true, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_ContactName", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"ContactName",
System::Data::DataRowVersion::Original, false, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_ContactTitle", System::Data::Odbc::OdbcType::Int,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"ContactTitle",
System::Data::DataRowVersion::Original, true, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_ContactTitle", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"ContactTitle",
System::Data::DataRowVersion::Original, false, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_Address", System::Data::Odbc::OdbcType::Int,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Address", System::Data::DataRowVersion::Original,
true, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_Address", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Address", System::Data::DataRowVersion::Original,
false, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_City", System::Data::Odbc::OdbcType::Int,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"City", System::Data::DataRowVersion::Original,
true, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_City", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"City", System::Data::DataRowVersion::Original,
false, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_Region", System::Data::Odbc::OdbcType::Int,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Region", System::Data::DataRowVersion::Original,
true, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_Region", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Region", System::Data::DataRowVersion::Original,
false, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_PostalCode", System::Data::Odbc::OdbcType::Int,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"PostalCode",
System::Data::DataRowVersion::Original, true, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_PostalCode", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"PostalCode",
System::Data::DataRowVersion::Original, false, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_Country", System::Data::Odbc::OdbcType::Int,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Country", System::Data::DataRowVersion::Original,
true, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_Country", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Country", System::Data::DataRowVersion::Original,
false, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_Phone", System::Data::Odbc::OdbcType::Int,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Phone", System::Data::DataRowVersion::Original,
true, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_Phone", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Phone", System::Data::DataRowVersion::Original,
false, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"IsNull_Fax", System::Data::Odbc::OdbcType::Int,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Fax", System::Data::DataRowVersion::Original,
true, nullptr)));
this->_adapter->UpdateCommand->Parameters->Add((gcnew System::Data::Odbc::OdbcParameter(L"Original_Fax", System::Data::Odbc::OdbcType::NVarChar,
0, System::Data::ParameterDirection::Input, static_cast(0), static_cast(0), L"Fax", System::Data::DataRowVersion::Original,
false, nullptr)));
}
inline System::Void CustomersTableAdapter::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 CustomersTableAdapter::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 CustomerID, CompanyName, ContactName, ContactTitle, Address, City, Region,"
L" PostalCode, Country, Phone, Fax FROM Customers";
this->_commandCollection[0]->CommandType = System::Data::CommandType::Text;
}
inline System::Int32 CustomersTableAdapter::Fill(Ex22_03::Customers::CustomersDataTable^ dataTable) {
this->Adapter->SelectCommand = this->CommandCollection[0];
if (this->ClearBeforeFill == true) {
dataTable->Clear();
}
System::Int32 returnValue = this->Adapter->Fill(dataTable);
return returnValue;
}
inline Ex22_03::Customers::CustomersDataTable^ CustomersTableAdapter::GetData() {
this->Adapter->SelectCommand = this->CommandCollection[0];
Ex22_03::Customers::CustomersDataTable^ dataTable = (gcnew Ex22_03::Customers::CustomersDataTable());
this->Adapter->Fill(dataTable);
return dataTable;
}
inline System::Int32 CustomersTableAdapter::Update(Ex22_03::Customers::CustomersDataTable^ dataTable) {
return this->Adapter->Update(dataTable);
}
inline System::Int32 CustomersTableAdapter::Update(Ex22_03::Customers^ dataSet) {
return this->Adapter->Update(dataSet, L"Customers");
}
inline System::Int32 CustomersTableAdapter::Update(System::Data::DataRow^ dataRow) {
return this->Adapter->Update(gcnew cli::array< System::Data::DataRow^ >(1) {dataRow});
}
inline System::Int32 CustomersTableAdapter::Update(cli::array< System::Data::DataRow^ >^ dataRows) {
return this->Adapter->Update(dataRows);
}
inline System::Int32 CustomersTableAdapter::Delete(
System::String^ Original_CustomerID,
System::String^ Original_CompanyName,
System::String^ Original_ContactName,
System::String^ Original_ContactTitle,
System::String^ Original_Address,
System::String^ Original_City,
System::String^ Original_Region,
System::String^ Original_PostalCode,
System::String^ Original_Country,
System::String^ Original_Phone,
System::String^ Original_Fax) {
if (Original_CustomerID == nullptr) {
this->Adapter->DeleteCommand->Parameters[0]->Value = System::DBNull::Value;
}
else {
this->Adapter->DeleteCommand->Parameters[0]->Value = (cli::safe_cast(Original_CustomerID));
}
if (Original_CompanyName == nullptr) {
this->Adapter->DeleteCommand->Parameters[1]->Value = cli::safe_cast(1);
this->Adapter->DeleteCommand->Parameters[2]->Value = System::DBNull::Value;
}
else {
this->Adapter->DeleteCommand->Parameters[1]->Value = cli::safe_cast(0);
this->Adapter->DeleteCommand->Parameters[2]->Value = (cli::safe_cast(Original_CompanyName));
}
if (Original_ContactName == nullptr) {
this->Adapter->DeleteCommand->Parameters[3]->Value = cli::safe_cast(1);
this->Adapter->DeleteCommand->Parameters[4]->Value = System::DBNull::Value;
}
else {
this->Adapter->DeleteCommand->Parameters[3]->Value = cli::safe_cast(0);
this->Adapter->DeleteCommand->Parameters[4]->Value = (cli::safe_cast(Original_ContactName));
}
if (Original_ContactTitle == nullptr) {
this->Adapter->DeleteCommand->Parameters[5]->Value = cli::safe_cast(1);
this->Adapter->DeleteCommand->Parameters[6]->Value = System::DBNull::Value;
}
else {
this->Adapter->DeleteCommand->Parameters[5]->Value = cli::safe_cast(0);
this->Adapter->DeleteCommand->Parameters[6]->Value = (cli::safe_cast(Original_ContactTitle));
}
if (Original_Address == nullptr) {
this->Adapter->DeleteCommand->Parameters[7]->Value = cli::safe_cast(1);
this->Adapter->DeleteCommand->Parameters[8]->Value = System::DBNull::Value;
}
else {
this->Adapter->DeleteCommand->Parameters[7]->Value = cli::safe_cast(0);
this->Adapter->DeleteCommand->Parameters[8]->Value = (cli::safe_cast(Original_Address));
}
if (Original_City == nullptr) {
this->Adapter->DeleteCommand->Parameters[9]->Value = cli::safe_cast(1);
this->Adapter->DeleteCommand->Parameters[10]->Value = System::DBNull::Value;
}
else {
this->Adapter->DeleteCommand->Parameters[9]->Value = cli::safe_cast(0);
this->Adapter->DeleteCommand->Parameters[10]->Value = (cli::safe_cast(Original_City));
}
if (Original_Region == nullptr) {
this->Adapter->DeleteCommand->Parameters[11]->Value = cli::safe_cast(1);
this->Adapter->DeleteCommand->Parameters[12]->Value = System::DBNull::Value;
}
else {
this->Adapter->DeleteCommand->Parameters[11]->Value = cli::safe_cast(0);
this->Adapter->DeleteCommand->Parameters[12]->Value = (cli::safe_cast(Original_Region));
}
if (Original_PostalCode == nullptr) {
this->Adapter->DeleteCommand->Parameters[13]->Value = cli::safe_cast(1);
this->Adapter->DeleteCommand->Parameters[14]->Value = System::DBNull::Value;
}
else {
this->Adapter->DeleteCommand->Parameters[13]->Value = cli::safe_cast(0);
this->Adapter->DeleteCommand->Parameters[14]->Value = (cli::safe_cast(Original_PostalCode));
}
if (Original_Country == nullptr) {
this->Adapter->DeleteCommand->Parameters[15]->Value = cli::safe_cast(1);
this->Adapter->DeleteCommand->Parameters[16]->Value = System::DBNull::Value;
}
else {
this->Adapter->DeleteCommand->Parameters[15]->Value = cli::safe_cast(0);
this->Adapter->DeleteCommand->Parameters[16]->Value = (cli::safe_cast(Original_Country));
}
if (Original_Phone == nullptr) {
this->Adapter->DeleteCommand->Parameters[17]->Value = cli::safe_cast(1);
this->Adapter->DeleteCommand->Parameters[18]->Value = System::DBNull::Value;
}
else {
this->Adapter->DeleteCommand->Parameters[17]->Value = cli::safe_cast(0);
this->Adapter->DeleteCommand->Parameters[18]->Value = (cli::safe_cast(Original_Phone));
}
if (Original_Fax == nullptr) {
this->Adapter->DeleteCommand->Parameters[19]->Value = cli::safe_cast(1);
this->Adapter->DeleteCommand->Parameters[20]->Value = System::DBNull::Value;
}
else {
this->Adapter->DeleteCommand->Parameters[19]->Value = cli::safe_cast(0);
this->Adapter->DeleteCommand->Parameters[20]->Value = (cli::safe_cast(Original_Fax));
}
System::Data::ConnectionState previousConnectionState = this->Adapter->DeleteCommand->Connection->State;
if ((this->Adapter->DeleteCommand->Connection->State & System::Data::ConnectionState::Open)
!= System::Data::ConnectionState::Open) {
this->Adapter->DeleteCommand->Connection->Open();
}
try {
System::Int32 returnValue = this->Adapter->DeleteCommand->ExecuteNonQuery();
return returnValue;
}
finally {
if (previousConnectionState == System::Data::ConnectionState::Closed) {
this->Adapter->DeleteCommand->Connection->Close();
}
}
}
inline System::Int32 CustomersTableAdapter::Insert(
System::String^ CustomerID,
System::String^ CompanyName,
System::String^ ContactName,
System::String^ ContactTitle,
System::String^ Address,
System::String^ City,
System::String^ Region,
System::String^ PostalCode,
System::String^ Country,
System::String^ Phone,
System::String^ Fax) {
if (CustomerID == nullptr) {
this->Adapter->InsertCommand->Parameters[0]->Value = System::DBNull::Value;
}
else {
this->Adapter->InsertCommand->Parameters[0]->Value = (cli::safe_cast(CustomerID));
}
if (CompanyName == nullptr) {
this->Adapter->InsertCommand->Parameters[1]->Value = System::DBNull::Value;
}
else {
this->Adapter->InsertCommand->Parameters[1]->Value = (cli::safe_cast(CompanyName));
}
if (ContactName == nullptr) {
this->Adapter->InsertCommand->Parameters[2]->Value = System::DBNull::Value;
}
else {
this->Adapter->InsertCommand->Parameters[2]->Value = (cli::safe_cast(ContactName));
}
if (ContactTitle == nullptr) {
this->Adapter->InsertCommand->Parameters[3]->Value = System::DBNull::Value;
}
else {
this->Adapter->InsertCommand->Parameters[3]->Value = (cli::safe_cast(ContactTitle));
}
if (Address == nullptr) {
this->Adapter->InsertCommand->Parameters[4]->Value = System::DBNull::Value;
}
else {
this->Adapter->InsertCommand->Parameters[4]->Value = (cli::safe_cast(Address));
}
if (City == nullptr) {
this->Adapter->InsertCommand->Parameters[5]->Value = System::DBNull::Value;
}
else {
this->Adapter->InsertCommand->Parameters[5]->Value = (cli::safe_cast(City));
}
if (Region == nullptr) {
this->Adapter->InsertCommand->Parameters[6]->Value = System::DBNull::Value;
}
else {
this->Adapter->InsertCommand->Parameters[6]->Value = (cli::safe_cast(Region));
}
if (PostalCode == nullptr) {
this->Adapter->InsertCommand->Parameters[7]->Value = System::DBNull::Value;
}
else {
this->Adapter->InsertCommand->Parameters[7]->Value = (cli::safe_cast(PostalCode));
}
if (Country == nullptr) {
this->Adapter->InsertCommand->Parameters[8]->Value = System::DBNull::Value;
}
else {
this->Adapter->InsertCommand->Parameters[8]->Value = (cli::safe_cast(Country));
}
if (Phone == nullptr) {
this->Adapter->InsertCommand->Parameters[9]->Value = System::DBNull::Value;
}
else {
this->Adapter->InsertCommand->Parameters[9]->Value = (cli::safe_cast(Phone));
}
if (Fax == nullptr) {
this->Adapter->InsertCommand->Parameters[10]->Value = System::DBNull::Value;
}
else {
this->Adapter->InsertCommand->Parameters[10]->Value = (cli::safe_cast(Fax));
}
System::Data::ConnectionState previousConnectionState = this->Adapter->InsertCommand->Connection->State;
if ((this->Adapter->InsertCommand->Connection->State & System::Data::ConnectionState::Open)
!= System::Data::ConnectionState::Open) {
this->Adapter->InsertCommand->Connection->Open();
}
try {
System::Int32 returnValue = this->Adapter->InsertCommand->ExecuteNonQuery();
return returnValue;
}
finally {
if (previousConnectionState == System::Data::ConnectionState::Closed) {
this->Adapter->InsertCommand->Connection->Close();
}
}
}
inline System::Int32 CustomersTableAdapter::Update(
System::String^ CustomerID,
System::String^ CompanyName,
System::String^ ContactName,
System::String^ ContactTitle,
System::String^ Address,
System::String^ City,
System::String^ Region,
System::String^ PostalCode,
System::String^ Country,
System::String^ Phone,
System::String^ Fax,
System::String^ Original_CustomerID,
System::String^ Original_CompanyName,
System::String^ Original_ContactName,
System::String^ Original_ContactTitle,
System::String^ Original_Address,
System::String^ Original_City,
System::String^ Original_Region,
System::String^ Original_PostalCode,
System::String^ Original_Country,
System::String^ Original_Phone,
System::String^ Original_Fax) {
if (CustomerID == nullptr) {
this->Adapter->UpdateCommand->Parameters[0]->Value = System::DBNull::Value;
}
else {
this->Adapter->UpdateCommand->Parameters[0]->Value = (cli::safe_cast(CustomerID));
}
if (CompanyName == nullptr) {
this->Adapter->UpdateCommand->Parameters[1]->Value = System::DBNull::Value;
}
else {
this->Adapter->UpdateCommand->Parameters[1]->Value = (cli::safe_cast(CompanyName));
}
if (ContactName == nullptr) {
this->Adapter->UpdateCommand->Parameters[2]->Value = System::DBNull::Value;
}
else {
this->Adapter->UpdateCommand->Parameters[2]->Value = (cli::safe_cast(ContactName));
}
if (ContactTitle == nullptr) {
this->Adapter->UpdateCommand->Parameters[3]->Value = System::DBNull::Value;
}
else {
this->Adapter->UpdateCommand->Parameters[3]->Value = (cli::safe_cast(ContactTitle));
}
if (Address == nullptr) {
this->Adapter->UpdateCommand->Parameters[4]->Value = System::DBNull::Value;
}
else {
this->Adapter->UpdateCommand->Parameters[4]->Value = (cli::safe_cast(Address));
}
if (City == nullptr) {
this->Adapter->UpdateCommand->Parameters[5]->Value = System::DBNull::Value;
}
else {
this->Adapter->UpdateCommand->Parameters[5]->Value = (cli::safe_cast(City));
}
if (Region == nullptr) {
this->Adapter->UpdateCommand->Parameters[6]->Value = System::DBNull::Value;
}
else {
this->Adapter->UpdateCommand->Parameters[6]->Value = (cli::safe_cast(Region));
}
if (PostalCode == nullptr) {
this->Adapter->UpdateCommand->Parameters[7]->Value = System::DBNull::Value;
}
else {
this->Adapter->UpdateCommand->Parameters[7]->Value = (cli::safe_cast(PostalCode));
}
if (Country == nullptr) {
this->Adapter->UpdateCommand->Parameters[8]->Value = System::DBNull::Value;
}
else {
this->Adapter->UpdateCommand->Parameters[8]->Value = (cli::safe_cast(Country));
}
if (Phone == nullptr) {
this->Adapter->UpdateCommand->Parameters[9]->Value = System::DBNull::Value;
}
else {
this->Adapter->UpdateCommand->Parameters[9]->Value = (cli::safe_cast(Phone));
}
if (Fax == nullptr) {
this->Adapter->UpdateCommand->Parameters[10]->Value = System::DBNull::Value;
}
else {
this->Adapter->UpdateCommand->Parameters[10]->Value = (cli::safe_cast(Fax));
}
if (Original_CustomerID == nullptr) {
this->Adapter->UpdateCommand->Parameters[11]->Value = System::DBNull::Value;
}
else {
this->Adapter->UpdateCommand->Parameters[11]->Value = (cli::safe_cast(Original_CustomerID));
}
if (Original_CompanyName == nullptr) {
this->Adapter->UpdateCommand->Parameters[12]->Value = cli::safe_cast(1);
this->Adapter->UpdateCommand->Parameters[13]->Value = System::DBNull::Value;
}
else {
this->Adapter->UpdateCommand->Parameters[12]->Value = cli::safe_cast(0);
this->Adapter->UpdateCommand->Parameters[13]->Value = (cli::safe_cast(Original_CompanyName));
}
if (Original_ContactName == nullptr) {
this->Adapter->UpdateCommand->Parameters[14]->Value = cli::safe_cast(1);
this->Adapter->UpdateCommand->Parameters[15]->Value = System::DBNull::Value;
}
else {
this->Adapter->UpdateCommand->Parameters[14]->Value = cli::safe_cast(0);
this->Adapter->UpdateCommand->Parameters[15]->Value = (cli::safe_cast(Original_ContactName));
}
if (Original_ContactTitle == nullptr) {
this->Adapter->UpdateCommand->Parameters[16]->Value = cli::safe_cast(1);
this->Adapter->UpdateCommand->Parameters[17]->Value = System::DBNull::Value;
}
else {
this->Adapter->UpdateCommand->Parameters[16]->Value = cli::safe_cast(0);
this->Adapter->UpdateCommand->Parameters[17]->Value = (cli::safe_cast(Original_ContactTitle));
}
if (Original_Address == nullptr) {
this->Adapter->UpdateCommand->Parameters[18]->Value = cli::safe_cast(1);
this->Adapter->UpdateCommand->Parameters[19]->Value = System::DBNull::Value;
}
else {
this->Adapter->UpdateCommand->Parameters[18]->Value = cli::safe_cast(0);
this->Adapter->UpdateCommand->Parameters[19]->Value = (cli::safe_cast(Original_Address));
}
if (Original_City == nullptr) {
this->Adapter->UpdateCommand->Parameters[20]->Value = cli::safe_cast(1);
this->Adapter->UpdateCommand->Parameters[21]->Value = System::DBNull::Value;
}
else {
this->Adapter->UpdateCommand->Parameters[20]->Value = cli::safe_cast(0);
this->Adapter->UpdateCommand->Parameters[21]->Value = (cli::safe_cast(Original_City));
}
if (Original_Region == nullptr) {
this->Adapter->UpdateCommand->Parameters[22]->Value = cli::safe_cast(1);
this->Adapter->UpdateCommand->Parameters[23]->Value = System::DBNull::Value;
}
else {
this->Adapter->UpdateCommand->Parameters[22]->Value = cli::safe_cast(0);
this->Adapter->UpdateCommand->Parameters[23]->Value = (cli::safe_cast(Original_Region));
}
if (Original_PostalCode == nullptr) {
this->Adapter->UpdateCommand->Parameters[24]->Value = cli::safe_cast(1);
this->Adapter->UpdateCommand->Parameters[25]->Value = System::DBNull::Value;
}
else {
this->Adapter->UpdateCommand->Parameters[24]->Value = cli::safe_cast(0);
this->Adapter->UpdateCommand->Parameters[25]->Value = (cli::safe_cast(Original_PostalCode));
}
if (Original_Country == nullptr) {
this->Adapter->UpdateCommand->Parameters[26]->Value = cli::safe_cast(1);
this->Adapter->UpdateCommand->Parameters[27]->Value = System::DBNull::Value;
}
else {
this->Adapter->UpdateCommand->Parameters[26]->Value = cli::safe_cast(0);
this->Adapter->UpdateCommand->Parameters[27]->Value = (cli::safe_cast(Original_Country));
}
if (Original_Phone == nullptr) {
this->Adapter->UpdateCommand->Parameters[28]->Value = cli::safe_cast(1);
this->Adapter->UpdateCommand->Parameters[29]->Value = System::DBNull::Value;
}
else {
this->Adapter->UpdateCommand->Parameters[28]->Value = cli::safe_cast(0);
this->Adapter->UpdateCommand->Parameters[29]->Value = (cli::safe_cast(Original_Phone));
}
if (Original_Fax == nullptr) {
this->Adapter->UpdateCommand->Parameters[30]->Value = cli::safe_cast(1);
this->Adapter->UpdateCommand->Parameters[31]->Value = System::DBNull::Value;
}
else {
this->Adapter->UpdateCommand->Parameters[30]->Value = cli::safe_cast(0);
this->Adapter->UpdateCommand->Parameters[31]->Value = (cli::safe_cast(Original_Fax));
}
System::Data::ConnectionState previousConnectionState = this->Adapter->UpdateCommand->Connection->State;
if ((this->Adapter->UpdateCommand->Connection->State & System::Data::ConnectionState::Open)
!= System::Data::ConnectionState::Open) {
this->Adapter->UpdateCommand->Connection->Open();
}
try {
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>