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

📄 dataset1.h

📁 Visual C++ 2005的源代码
💻 H
📖 第 1 页 / 共 5 页
字号:
                System::Int32 get();
                System::Void set(System::Int32 value);
            }
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
             property System::Int32 ProductID {
                System::Int32 get();
                System::Void set(System::Int32 value);
            }
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
             property System::Decimal UnitPrice {
                System::Decimal get();
                System::Void set(System::Decimal value);
            }
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
             property System::Int16 Quantity {
                System::Int16 get();
                System::Void set(System::Int16 value);
            }
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
             property System::Single Discount {
                System::Single get();
                System::Void set(System::Single value);
            }
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            System::Boolean IsUnitPriceNull();
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            System::Void SetUnitPriceNull();
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            System::Boolean IsQuantityNull();
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            System::Void SetQuantityNull();
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            System::Boolean IsDiscountNull();
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            System::Void SetDiscountNull();
        };
        
        public : [System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0")]
        ref class Order_DetailsRowChangeEvent : public System::EventArgs {
            
            private: Ex22_04::DataSet1::Order_DetailsRow^  eventRow;
            
            private: System::Data::DataRowAction eventAction;
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
            Order_DetailsRowChangeEvent(Ex22_04::DataSet1::Order_DetailsRow^  row, System::Data::DataRowAction action);
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
             property Ex22_04::DataSet1::Order_DetailsRow^  Row {
                Ex22_04::DataSet1::Order_DetailsRow^  get();
            }
            
            public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
             property System::Data::DataRowAction Action {
                System::Data::DataRowAction get();
            }
        };
    };
}
namespace Ex22_04 {
    
    
    inline DataSet1::DataSet1() {
        this->BeginInit();
        this->InitClass();
        System::ComponentModel::CollectionChangeEventHandler^  schemaChangedHandler = gcnew System::ComponentModel::CollectionChangeEventHandler(this, &Ex22_04::DataSet1::SchemaChanged);
        __super::Tables->CollectionChanged += schemaChangedHandler;
        __super::Relations->CollectionChanged += schemaChangedHandler;
        this->EndInit();
    }
    
    inline DataSet1::DataSet1(System::Runtime::Serialization::SerializationInfo^  info, System::Runtime::Serialization::StreamingContext context) : 
            System::Data::DataSet(info, context, false) {
        if (this->IsBinarySerialized(info, context) == true) {
            this->InitVars(false);
            System::ComponentModel::CollectionChangeEventHandler^  schemaChangedHandler1 = gcnew System::ComponentModel::CollectionChangeEventHandler(this, &Ex22_04::DataSet1::SchemaChanged);
            this->Tables->CollectionChanged += schemaChangedHandler1;
            this->Relations->CollectionChanged += schemaChangedHandler1;
            return;
        }
        System::String^  strSchema = (cli::safe_cast<System::String^  >(info->GetValue(L"XmlSchema", System::String::typeid)));
        if (this->DetermineSchemaSerializationMode(info, context) == System::Data::SchemaSerializationMode::IncludeSchema) {
            System::Data::DataSet^  ds = (gcnew System::Data::DataSet());
            ds->ReadXmlSchema((gcnew System::Xml::XmlTextReader((gcnew System::IO::StringReader(strSchema)))));
            if (ds->Tables[L"Order Details"] != nullptr) {
                __super::Tables->Add((gcnew Ex22_04::DataSet1::Order_DetailsDataTable(ds->Tables[L"Order Details"])));
            }
            this->DataSetName = ds->DataSetName;
            this->Prefix = ds->Prefix;
            this->Namespace = ds->Namespace;
            this->Locale = ds->Locale;
            this->CaseSensitive = ds->CaseSensitive;
            this->EnforceConstraints = ds->EnforceConstraints;
            this->Merge(ds, false, System::Data::MissingSchemaAction::Add);
            this->InitVars();
        }
        else {
            this->ReadXmlSchema((gcnew System::Xml::XmlTextReader((gcnew System::IO::StringReader(strSchema)))));
        }
        this->GetSerializationData(info, context);
        System::ComponentModel::CollectionChangeEventHandler^  schemaChangedHandler = gcnew System::ComponentModel::CollectionChangeEventHandler(this, &Ex22_04::DataSet1::SchemaChanged);
        __super::Tables->CollectionChanged += schemaChangedHandler;
        this->Relations->CollectionChanged += schemaChangedHandler;
    }
    
    inline Ex22_04::DataSet1::Order_DetailsDataTable^  DataSet1::Order_Details::get() {
        return this->tableOrder_Details;
    }
    
    inline System::Data::SchemaSerializationMode DataSet1::SchemaSerializationMode::get() {
        return this->_schemaSerializationMode;
    }
    inline System::Void DataSet1::SchemaSerializationMode::set(System::Data::SchemaSerializationMode value) {
        this->_schemaSerializationMode = __identifier(value);
    }
    
    inline System::Data::DataTableCollection^  DataSet1::Tables::get() {
        return __super::Tables;
    }
    
    inline System::Data::DataRelationCollection^  DataSet1::Relations::get() {
        return __super::Relations;
    }
    
    inline System::Void DataSet1::InitializeDerivedDataSet() {
        this->BeginInit();
        this->InitClass();
        this->EndInit();
    }
    
    inline System::Data::DataSet^  DataSet1::Clone() {
        Ex22_04::DataSet1^  cln = (cli::safe_cast<Ex22_04::DataSet1^  >(__super::Clone()));
        cln->InitVars();
        cln->SchemaSerializationMode = this->SchemaSerializationMode;
        return cln;
    }
    
    inline System::Boolean DataSet1::ShouldSerializeTables() {
        return false;
    }
    
    inline System::Boolean DataSet1::ShouldSerializeRelations() {
        return false;
    }
    
    inline System::Void DataSet1::ReadXmlSerializable(System::Xml::XmlReader^  reader) {
        if (this->DetermineSchemaSerializationMode(reader) == System::Data::SchemaSerializationMode::IncludeSchema) {
            this->Reset();
            System::Data::DataSet^  ds = (gcnew System::Data::DataSet());
            ds->ReadXml(reader);
            if (ds->Tables[L"Order Details"] != nullptr) {
                __super::Tables->Add((gcnew Ex22_04::DataSet1::Order_DetailsDataTable(ds->Tables[L"Order Details"])));
            }
            this->DataSetName = ds->DataSetName;
            this->Prefix = ds->Prefix;
            this->Namespace = ds->Namespace;
            this->Locale = ds->Locale;
            this->CaseSensitive = ds->CaseSensitive;
            this->EnforceConstraints = ds->EnforceConstraints;
            this->Merge(ds, false, System::Data::MissingSchemaAction::Add);
            this->InitVars();
        }
        else {
            this->ReadXml(reader);
            this->InitVars();
        }
    }
    
    inline System::Xml::Schema::XmlSchema^  DataSet1::GetSchemaSerializable() {
        System::IO::MemoryStream^  stream = (gcnew System::IO::MemoryStream());
        this->WriteXmlSchema((gcnew System::Xml::XmlTextWriter(stream, nullptr)));
        stream->Position = 0;
        return System::Xml::Schema::XmlSchema::Read((gcnew System::Xml::XmlTextReader(stream)), nullptr);
    }
    
    inline System::Void DataSet1::InitVars() {
        this->InitVars(true);
    }
    
    inline System::Void DataSet1::InitVars(System::Boolean initTable) {
        this->tableOrder_Details = (cli::safe_cast<Ex22_04::DataSet1::Order_DetailsDataTable^  >(__super::Tables[L"Order Details"]));
        if (initTable == true) {
            if (this->tableOrder_Details != nullptr) {
                this->tableOrder_Details->InitVars();
            }
        }
    }
    
    inline System::Void DataSet1::InitClass() {
        this->DataSetName = L"DataSet1";
        this->Prefix = L"";
        this->Namespace = L"http://tempuri.org/DataSet1.xsd";
        this->EnforceConstraints = true;
        this->SchemaSerializationMode = System::Data::SchemaSerializationMode::IncludeSchema;
        this->tableOrder_Details = (gcnew Ex22_04::DataSet1::Order_DetailsDataTable());
        __super::Tables->Add(this->tableOrder_Details);
    }
    
    inline System::Boolean DataSet1::ShouldSerializeOrder_Details() {
        return false;
    }
    
    inline System::Void DataSet1::SchemaChanged(System::Object^  sender, System::ComponentModel::CollectionChangeEventArgs^  e) {
        if (e->Action == System::ComponentModel::CollectionChangeAction::Remove) {
            this->InitVars();
        }
    }
    
    inline System::Xml::Schema::XmlSchemaComplexType^  DataSet1::GetTypedDataSetSchema(System::Xml::Schema::XmlSchemaSet^  xs) {
        Ex22_04::DataSet1^  ds = (gcnew Ex22_04::DataSet1());
        System::Xml::Schema::XmlSchemaComplexType^  type = (gcnew System::Xml::Schema::XmlSchemaComplexType());
        System::Xml::Schema::XmlSchemaSequence^  sequence = (gcnew System::Xml::Schema::XmlSchemaSequence());
        xs->Add(ds->GetSchemaSerializable());
        System::Xml::Schema::XmlSchemaAny^  any = (gcnew System::Xml::Schema::XmlSchemaAny());
        any->Namespace = ds->Namespace;
        sequence->Items->Add(any);
        type->Particle = sequence;
        return type;
    }
    
    
    inline DataSet1::Order_DetailsDataTable::Order_DetailsDataTable() {
        this->TableName = L"Order Details";

⌨️ 快捷键说明

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