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

📄 dataset6.h

📁 Visual C++.net数据库开发经典案例
💻 H
📖 第 1 页 / 共 2 页
字号:
#pragma once 
#using <System.dll>
#using <System.Data.dll>
#using <System.Xml.dll>
#using <mscorlib.dll>

// 
// 此源代码由 xsd, Version=1.1.4322.2032 自动生成。
// 
namespace My {
    using namespace System;
    using namespace System::Data;
    using namespace System::Xml;
    using namespace System::Runtime::Serialization;
    
    using namespace System;
    public __gc class DataSet6;
    
    
    [Serializable, 
    System::ComponentModel::DesignerCategoryAttribute(S"code"), 
    System::Diagnostics::DebuggerStepThrough, 
    System::ComponentModel::ToolboxItem(true)]
    public __gc class DataSet6 : public System::Data::DataSet {
        public : __gc class UsersDataTable;
        public : __gc class UsersRow;
        public : __gc class UsersRowChangeEvent;
        
        private: My::DataSet6::UsersDataTable *  tableUsers;
        
        public: DataSet6();
        protected: DataSet6(System::Runtime::Serialization::SerializationInfo *  info, System::Runtime::Serialization::StreamingContext context);
        public: [property: System::ComponentModel::Browsable(false), 
        property: System::ComponentModel::DesignerSerializationVisibilityAttribute(System::ComponentModel::DesignerSerializationVisibility::Content)]
         __property My::DataSet6::UsersDataTable *  get_Users();
        
        public: virtual System::Data::DataSet *  Clone();
        
        protected: virtual System::Boolean ShouldSerializeTables();
        
        protected: virtual System::Boolean ShouldSerializeRelations();
        
        protected: virtual System::Void ReadXmlSerializable(System::Xml::XmlReader *  reader);
        
        protected: virtual System::Xml::Schema::XmlSchema *  GetSchemaSerializable();
        
        public private: System::Void InitVars();
        
        private: System::Void InitClass();
        
        private: System::Boolean ShouldSerializeUsers();
        
        private: System::Void SchemaChanged(System::Object *  sender, System::ComponentModel::CollectionChangeEventArgs *  e);
        
        public: __delegate System::Void UsersRowChangeEventHandler(System::Object *  sender, My::DataSet6::UsersRowChangeEvent *  e);
        
        public : [System::Diagnostics::DebuggerStepThrough]
        __gc class UsersDataTable : public System::Data::DataTable, public System::Collections::IEnumerable {
            
            private: System::Data::DataColumn *  columnUserID;
            
            private: System::Data::DataColumn *  columnDepartment;
            
            private: System::Data::DataColumn *  columnName;
            
            private: System::Data::DataColumn *  columnSex;
            
            private: System::Data::DataColumn *  columnPassword;
            
            public private: UsersDataTable();
            public private: UsersDataTable(System::Data::DataTable *  table);
            public: [property: System::ComponentModel::Browsable(false)]
             __property System::Int32 get_Count();
            
            public private:  __property System::Data::DataColumn *  get_UserIDColumn();
            
            public private:  __property System::Data::DataColumn *  get_DepartmentColumn();
            
            public private:  __property System::Data::DataColumn *  get_NameColumn();
            
            public private:  __property System::Data::DataColumn *  get_SexColumn();
            
            public private:  __property System::Data::DataColumn *  get_PasswordColumn();
            
            public:  __property My::DataSet6::UsersRow *  get_Item(System::Int32 index);
            
            public: __event My::DataSet6::UsersRowChangeEventHandler *  UsersRowChanged;
            
            public: __event My::DataSet6::UsersRowChangeEventHandler *  UsersRowChanging;
            
            public: __event My::DataSet6::UsersRowChangeEventHandler *  UsersRowDeleted;
            
            public: __event My::DataSet6::UsersRowChangeEventHandler *  UsersRowDeleting;
            
            public: System::Void AddUsersRow(My::DataSet6::UsersRow *  row);
            
            public: My::DataSet6::UsersRow *  AddUsersRow(System::String *  UserID, System::String *  Department, System::String *  Name, System::String *  Sex, System::String *  Password);
            
            public: My::DataSet6::UsersRow *  FindByUserID(System::String *  UserID);
            
            public: System::Collections::IEnumerator *  GetEnumerator();
            
            public: virtual System::Data::DataTable *  Clone();
            
            protected: virtual System::Data::DataTable *  CreateInstance();
            
            public private: System::Void InitVars();
            
            private: System::Void InitClass();
            
            public: My::DataSet6::UsersRow *  NewUsersRow();
            
            protected: virtual System::Data::DataRow *  NewRowFromBuilder(System::Data::DataRowBuilder *  builder);
            
            protected: virtual System::Type *  GetRowType();
            
            protected: virtual System::Void OnRowChanged(System::Data::DataRowChangeEventArgs *  e);
            
            protected: virtual System::Void OnRowChanging(System::Data::DataRowChangeEventArgs *  e);
            
            protected: virtual System::Void OnRowDeleted(System::Data::DataRowChangeEventArgs *  e);
            
            protected: virtual System::Void OnRowDeleting(System::Data::DataRowChangeEventArgs *  e);
            
            public: System::Void RemoveUsersRow(My::DataSet6::UsersRow *  row);
        };
        
        public : [System::Diagnostics::DebuggerStepThrough]
        __gc class UsersRow : public System::Data::DataRow {
            
            private: My::DataSet6::UsersDataTable *  tableUsers;
            
            public private: UsersRow(System::Data::DataRowBuilder *  rb);
            public:  __property System::String *  get_UserID();
            public:  __property  void set_UserID(System::String *  value);
            
            public:  __property System::String *  get_Department();
            public:  __property  void set_Department(System::String *  value);
            
            public:  __property System::String *  get_Name();
            public:  __property  void set_Name(System::String *  value);
            
            public:  __property System::String *  get_Sex();
            public:  __property  void set_Sex(System::String *  value);
            
            public:  __property System::String *  get_Password();
            public:  __property  void set_Password(System::String *  value);
            
            public: System::Boolean IsPasswordNull();
            
            public: System::Void SetPasswordNull();
        };
        
        public : [System::Diagnostics::DebuggerStepThrough]
        __gc class UsersRowChangeEvent : public System::EventArgs {
            
            private: My::DataSet6::UsersRow *  eventRow;
            
            private: System::Data::DataRowAction eventAction;
            
            public: UsersRowChangeEvent(My::DataSet6::UsersRow *  row, System::Data::DataRowAction action);
            public:  __property My::DataSet6::UsersRow *  get_Row();
            
            public:  __property System::Data::DataRowAction get_Action();
        };
        };
    
    
    
    inline DataSet6::DataSet6() {
        this->InitClass();
        System::ComponentModel::CollectionChangeEventHandler *  schemaChangedHandler = new System::ComponentModel::CollectionChangeEventHandler(this, SchemaChanged);
        this->Tables->CollectionChanged += schemaChangedHandler;
        this->Relations->CollectionChanged += schemaChangedHandler;
    }
    
    inline DataSet6::DataSet6(System::Runtime::Serialization::SerializationInfo *  info, System::Runtime::Serialization::StreamingContext context) {
        System::String *  strSchema = (__try_cast<System::String *  >(info->GetValue(S"XmlSchema", __typeof(System::String))));
        if ((strSchema != 0)) {
            System::Data::DataSet *  ds = new System::Data::DataSet();
            ds->ReadXmlSchema(new System::Xml::XmlTextReader(new System::IO::StringReader(strSchema)));
            if ((ds->Tables->Item[S"Users"] != 0)) {
                this->Tables->Add(new My::DataSet6::UsersDataTable(ds->Tables->Item[S"Users"]));
            }
            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->InitClass();
        }
        this->GetSerializationData(info, context);
        System::ComponentModel::CollectionChangeEventHandler *  schemaChangedHandler = new System::ComponentModel::CollectionChangeEventHandler(this, SchemaChanged);
        this->Tables->CollectionChanged += schemaChangedHandler;
        this->Relations->CollectionChanged += schemaChangedHandler;
    }
    
    inline My::DataSet6::UsersDataTable *  DataSet6::get_Users() {
        return this->tableUsers;
    }
    
    inline System::Data::DataSet *  DataSet6::Clone() {
        My::DataSet6 *  cln = (__try_cast<My::DataSet6 *  >(__super::Clone()));
        cln->InitVars();
        return cln;
    };
    
    inline System::Boolean DataSet6::ShouldSerializeTables() {
        return false;
    };
    
    inline System::Boolean DataSet6::ShouldSerializeRelations() {
        return false;
    };
    
    inline System::Void DataSet6::ReadXmlSerializable(System::Xml::XmlReader *  reader) {
        this->Reset();
        System::Data::DataSet *  ds = new System::Data::DataSet();
        ds->ReadXml(reader);
        if ((ds->Tables->Item[S"Users"] != 0)) {
            this->Tables->Add(new My::DataSet6::UsersDataTable(ds->Tables->Item[S"Users"]));
        }
        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();
    };
    
    inline System::Xml::Schema::XmlSchema *  DataSet6::GetSchemaSerializable() {
        System::IO::MemoryStream *  stream = new System::IO::MemoryStream();
        this->WriteXmlSchema(new System::Xml::XmlTextWriter(stream, 0));
        stream->Position = 0;
        return System::Xml::Schema::XmlSchema::Read(new System::Xml::XmlTextReader(stream), 0);
    };
    
    inline System::Void DataSet6::InitVars() {
        this->tableUsers = (__try_cast<My::DataSet6::UsersDataTable *  >(this->Tables->Item[S"Users"]));
        if ((this->tableUsers != 0)) {
            this->tableUsers->InitVars();
        }
    };
    
    inline System::Void DataSet6::InitClass() {
        this->DataSetName = S"DataSet6";
        this->Prefix = S"";
        this->Namespace = S"http://www.tempuri.org/DataSet6.xsd";
        this->Locale = new System::Globalization::CultureInfo(S"zh-CN");
        this->CaseSensitive = false;

⌨️ 快捷键说明

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