⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 customers.h

📁 Visual C++ 2005的源代码
💻 H
📖 第 1 页 / 共 5 页
字号:
            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<Ex22_03::Customers::CustomersDataTable^  >(__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<Ex22_03::Customers::CustomersRow^  >(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<Ex22_03::Customers::CustomersRow^  >(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<Ex22_03::Customers::CustomersRow^  >(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<Ex22_03::Customers::CustomersDataTable^  >(__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<Ex22_03::Customers::CustomersRow^  >(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<Ex22_03::Customers::CustomersRow^  >(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<Ex22_03::Customers::CustomersRow^  >(e->Row)), 
                    e->Action)));
        }
    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -