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

📄 myxml.h

📁 Visual_C++.NET实用编程百例
💻 H
📖 第 1 页 / 共 3 页
字号:
    inline myXML::studentRow::studentRow(System::Data::DataRowBuilder *  rb) : 
            DataRow(rb) {
        this->tablestudent = (__try_cast<CreatXML::myXML::studentDataTable *  >(this->Table));
    }
    
    inline System::String *  myXML::studentRow::get_studentName() {
        return (__try_cast<System::String *  >(this->Item[this->tablestudent->studentNameColumn]));
    }
    inline void myXML::studentRow::set_studentName(System::String *  value) {
        this->Item[this->tablestudent->studentNameColumn] = value;
    }
    
    inline CreatXML::myXML::studentInfoRow *  myXML::studentRow::GetstudentInfoRows()[] {
        return (__try_cast<CreatXML::myXML::studentInfoRow * [] >(this->GetChildRows(this->Table->ChildRelations->Item[S"student_studentInfo"])));
    };
    
    
    
    
    inline myXML::studentRowChangeEvent::studentRowChangeEvent(CreatXML::myXML::studentRow *  row, System::Data::DataRowAction action) {
        this->eventRow = row;
        this->eventAction = action;
    }
    
    inline CreatXML::myXML::studentRow *  myXML::studentRowChangeEvent::get_Row() {
        return this->eventRow;
    }
    
    inline System::Data::DataRowAction myXML::studentRowChangeEvent::get_Action() {
        return this->eventAction;
    }
    
    
    
    
    
    
    inline myXML::studentInfoDataTable::studentInfoDataTable() : 
            DataTable(S"studentInfo") {
        this->InitClass();
    }
    
    inline myXML::studentInfoDataTable::studentInfoDataTable(System::Data::DataTable *  table) : 
            DataTable(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;
        this->DisplayExpression = table->DisplayExpression;
    }
    
    inline System::Int32 myXML::studentInfoDataTable::get_Count() {
        return this->Rows->Count;
    }
    
    inline System::Data::DataColumn *  myXML::studentInfoDataTable::get_nameColumn() {
        return this->columnname;
    }
    
    inline System::Data::DataColumn *  myXML::studentInfoDataTable::get_addressColumn() {
        return this->columnaddress;
    }
    
    inline System::Data::DataColumn *  myXML::studentInfoDataTable::get_telphoneColumn() {
        return this->columntelphone;
    }
    
    inline System::Data::DataColumn *  myXML::studentInfoDataTable::get_student_IdColumn() {
        return this->columnstudent_Id;
    }
    
    inline CreatXML::myXML::studentInfoRow *  myXML::studentInfoDataTable::get_Item(System::Int32 index) {
        return (__try_cast<CreatXML::myXML::studentInfoRow *  >(this->Rows->Item[index]));
    }
    
    
    
    
    
    inline System::Void myXML::studentInfoDataTable::AddstudentInfoRow(CreatXML::myXML::studentInfoRow *  row) {
        this->Rows->Add(row);
    };
    
    inline CreatXML::myXML::studentInfoRow *  myXML::studentInfoDataTable::AddstudentInfoRow(System::String *  name, System::String *  address, System::String *  telphone, CreatXML::myXML::studentRow *  parentstudentRowBystudent_studentInfo) {
        CreatXML::myXML::studentInfoRow *  rowstudentInfoRow = (__try_cast<CreatXML::myXML::studentInfoRow *  >(this->NewRow()));
        System::Object* __mcTemp__1[] = new System::Object*[4];
                __mcTemp__1[0] = name;
                __mcTemp__1[1] = address;
                __mcTemp__1[2] = telphone;
                __mcTemp__1[3] = parentstudentRowBystudent_studentInfo->Item[1];
        rowstudentInfoRow->ItemArray = __mcTemp__1;
        this->Rows->Add(rowstudentInfoRow);
        return rowstudentInfoRow;
    };
    
    inline System::Collections::IEnumerator *  myXML::studentInfoDataTable::GetEnumerator() {
        return this->Rows->GetEnumerator();
    };
    
    inline System::Data::DataTable *  myXML::studentInfoDataTable::Clone() {
        CreatXML::myXML::studentInfoDataTable *  cln = (__try_cast<CreatXML::myXML::studentInfoDataTable *  >(__super::Clone()));
        cln->InitVars();
        return cln;
    };
    
    inline System::Data::DataTable *  myXML::studentInfoDataTable::CreateInstance() {
        return new CreatXML::myXML::studentInfoDataTable();
    };
    
    inline System::Void myXML::studentInfoDataTable::InitVars() {
        this->columnname = this->Columns->Item[S"name"];
        this->columnaddress = this->Columns->Item[S"address"];
        this->columntelphone = this->Columns->Item[S"telphone"];
        this->columnstudent_Id = this->Columns->Item[S"student_Id"];
    };
    
    inline System::Void myXML::studentInfoDataTable::InitClass() {
        this->columnname = new System::Data::DataColumn(S"name", __typeof(System::String), 0, System::Data::MappingType::Attribute);
        this->Columns->Add(this->columnname);
        this->columnaddress = new System::Data::DataColumn(S"address", __typeof(System::String), 0, System::Data::MappingType::Attribute);
        this->Columns->Add(this->columnaddress);
        this->columntelphone = new System::Data::DataColumn(S"telphone", __typeof(System::String), 0, System::Data::MappingType::Attribute);
        this->Columns->Add(this->columntelphone);
        this->columnstudent_Id = new System::Data::DataColumn(S"student_Id", __typeof(System::Int32), 0, System::Data::MappingType::Hidden);
        this->Columns->Add(this->columnstudent_Id);
        this->columnname->Namespace = S"http://tempuri.org/myXML.xsd";
        this->columnaddress->Namespace = S"http://tempuri.org/myXML.xsd";
        this->columntelphone->Namespace = S"http://tempuri.org/myXML.xsd";
    };
    
    inline CreatXML::myXML::studentInfoRow *  myXML::studentInfoDataTable::NewstudentInfoRow() {
        return (__try_cast<CreatXML::myXML::studentInfoRow *  >(this->NewRow()));
    };
    
    inline System::Data::DataRow *  myXML::studentInfoDataTable::NewRowFromBuilder(System::Data::DataRowBuilder *  builder) {
        return new CreatXML::myXML::studentInfoRow(builder);
    };
    
    inline System::Type *  myXML::studentInfoDataTable::GetRowType() {
        return __typeof(CreatXML::myXML::studentInfoRow);
    };
    
    inline System::Void myXML::studentInfoDataTable::OnRowChanged(System::Data::DataRowChangeEventArgs *  e) {
        __super::OnRowChanged(e);
        if ((this->studentInfoRowChanged != 0)) {
            this->studentInfoRowChanged(this, new CreatXML::myXML::studentInfoRowChangeEvent((__try_cast<CreatXML::myXML::studentInfoRow *  >(e->Row)), e->Action));
        }
    };
    
    inline System::Void myXML::studentInfoDataTable::OnRowChanging(System::Data::DataRowChangeEventArgs *  e) {
        __super::OnRowChanging(e);
        if ((this->studentInfoRowChanging != 0)) {
            this->studentInfoRowChanging(this, new CreatXML::myXML::studentInfoRowChangeEvent((__try_cast<CreatXML::myXML::studentInfoRow *  >(e->Row)), e->Action));
        }
    };
    
    inline System::Void myXML::studentInfoDataTable::OnRowDeleted(System::Data::DataRowChangeEventArgs *  e) {
        __super::OnRowDeleted(e);
        if ((this->studentInfoRowDeleted != 0)) {
            this->studentInfoRowDeleted(this, new CreatXML::myXML::studentInfoRowChangeEvent((__try_cast<CreatXML::myXML::studentInfoRow *  >(e->Row)), e->Action));
        }
    };
    
    inline System::Void myXML::studentInfoDataTable::OnRowDeleting(System::Data::DataRowChangeEventArgs *  e) {
        __super::OnRowDeleting(e);
        if ((this->studentInfoRowDeleting != 0)) {
            this->studentInfoRowDeleting(this, new CreatXML::myXML::studentInfoRowChangeEvent((__try_cast<CreatXML::myXML::studentInfoRow *  >(e->Row)), e->Action));
        }
    };
    
    inline System::Void myXML::studentInfoDataTable::RemovestudentInfoRow(CreatXML::myXML::studentInfoRow *  row) {
        this->Rows->Remove(row);
    };
    
    
    
    inline myXML::studentInfoRow::studentInfoRow(System::Data::DataRowBuilder *  rb) : 
            DataRow(rb) {
        this->tablestudentInfo = (__try_cast<CreatXML::myXML::studentInfoDataTable *  >(this->Table));
    }
    
    inline System::String *  myXML::studentInfoRow::get_name() {
        try {
            return (__try_cast<System::String *  >(this->Item[this->tablestudentInfo->nameColumn]));
        }
        catch (System::InvalidCastException * e) {
            throw new System::Data::StrongTypingException(S"无法获取值,因为它是 DBNull。", e);
        }
    }
    inline void myXML::studentInfoRow::set_name(System::String *  value) {
        this->Item[this->tablestudentInfo->nameColumn] = value;
    }
    
    inline System::String *  myXML::studentInfoRow::get_address() {
        try {
            return (__try_cast<System::String *  >(this->Item[this->tablestudentInfo->addressColumn]));
        }
        catch (System::InvalidCastException * e) {
            throw new System::Data::StrongTypingException(S"无法获取值,因为它是 DBNull。", e);
        }
    }
    inline void myXML::studentInfoRow::set_address(System::String *  value) {
        this->Item[this->tablestudentInfo->addressColumn] = value;
    }
    
    inline System::String *  myXML::studentInfoRow::get_telphone() {
        try {
            return (__try_cast<System::String *  >(this->Item[this->tablestudentInfo->telphoneColumn]));
        }
        catch (System::InvalidCastException * e) {
            throw new System::Data::StrongTypingException(S"无法获取值,因为它是 DBNull。", e);
        }
    }
    inline void myXML::studentInfoRow::set_telphone(System::String *  value) {
        this->Item[this->tablestudentInfo->telphoneColumn] = value;
    }
    
    inline CreatXML::myXML::studentRow *  myXML::studentInfoRow::get_studentRow() {
        return (__try_cast<CreatXML::myXML::studentRow *  >(this->GetParentRow(this->Table->ParentRelations->Item[S"student_studentInfo"])));
    }
    inline void myXML::studentInfoRow::set_studentRow(CreatXML::myXML::studentRow *  value) {
        this->SetParentRow(value, this->Table->ParentRelations->Item[S"student_studentInfo"]);
    }
    
    inline System::Boolean myXML::studentInfoRow::IsnameNull() {
        return this->IsNull(this->tablestudentInfo->nameColumn);
    };
    
    inline System::Void myXML::studentInfoRow::SetnameNull() {
        this->Item[this->tablestudentInfo->nameColumn] = System::Convert::DBNull;
    };
    
    inline System::Boolean myXML::studentInfoRow::IsaddressNull() {
        return this->IsNull(this->tablestudentInfo->addressColumn);
    };
    
    inline System::Void myXML::studentInfoRow::SetaddressNull() {
        this->Item[this->tablestudentInfo->addressColumn] = System::Convert::DBNull;
    };
    
    inline System::Boolean myXML::studentInfoRow::IstelphoneNull() {
        return this->IsNull(this->tablestudentInfo->telphoneColumn);
    };
    
    inline System::Void myXML::studentInfoRow::SettelphoneNull() {
        this->Item[this->tablestudentInfo->telphoneColumn] = System::Convert::DBNull;
    };
    
    
    
    
    inline myXML::studentInfoRowChangeEvent::studentInfoRowChangeEvent(CreatXML::myXML::studentInfoRow *  row, System::Data::DataRowAction action) {
        this->eventRow = row;
        this->eventAction = action;
    }
    
    inline CreatXML::myXML::studentInfoRow *  myXML::studentInfoRowChangeEvent::get_Row() {
        return this->eventRow;
    }
    
    inline System::Data::DataRowAction myXML::studentInfoRowChangeEvent::get_Action() {
        return this->eventAction;
    }
}

⌨️ 快捷键说明

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