📄 dataset1.h
字号:
this->BeginInit();
this->InitClass();
this->EndInit();
}
inline DataSet1::Order_DetailsDataTable::Order_DetailsDataTable(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 DataSet1::Order_DetailsDataTable::Order_DetailsDataTable(System::Runtime::Serialization::SerializationInfo^ info,
System::Runtime::Serialization::StreamingContext context) :
System::Data::DataTable(info, context) {
this->InitVars();
}
inline System::Data::DataColumn^ DataSet1::Order_DetailsDataTable::OrderIDColumn::get() {
return this->columnOrderID;
}
inline System::Data::DataColumn^ DataSet1::Order_DetailsDataTable::ProductIDColumn::get() {
return this->columnProductID;
}
inline System::Data::DataColumn^ DataSet1::Order_DetailsDataTable::UnitPriceColumn::get() {
return this->columnUnitPrice;
}
inline System::Data::DataColumn^ DataSet1::Order_DetailsDataTable::QuantityColumn::get() {
return this->columnQuantity;
}
inline System::Data::DataColumn^ DataSet1::Order_DetailsDataTable::DiscountColumn::get() {
return this->columnDiscount;
}
inline System::Int32 DataSet1::Order_DetailsDataTable::Count::get() {
return this->Rows->Count;
}
inline Ex22_04::DataSet1::Order_DetailsRow^ DataSet1::Order_DetailsDataTable::default::get(System::Int32 index) {
return (cli::safe_cast<Ex22_04::DataSet1::Order_DetailsRow^ >(this->Rows[index]));
}
inline System::Void DataSet1::Order_DetailsDataTable::AddOrder_DetailsRow(Ex22_04::DataSet1::Order_DetailsRow^ row) {
this->Rows->Add(row);
}
inline Ex22_04::DataSet1::Order_DetailsRow^ DataSet1::Order_DetailsDataTable::AddOrder_DetailsRow(System::Int32 OrderID,
System::Int32 ProductID, System::Decimal UnitPrice, System::Int16 Quantity, System::Single Discount) {
Ex22_04::DataSet1::Order_DetailsRow^ rowOrder_DetailsRow = (cli::safe_cast<Ex22_04::DataSet1::Order_DetailsRow^ >(this->NewRow()));
rowOrder_DetailsRow->ItemArray = gcnew cli::array< System::Object^ >(5) {OrderID, ProductID, UnitPrice, Quantity, Discount};
this->Rows->Add(rowOrder_DetailsRow);
return rowOrder_DetailsRow;
}
inline Ex22_04::DataSet1::Order_DetailsRow^ DataSet1::Order_DetailsDataTable::FindByOrderIDProductID(System::Int32 OrderID,
System::Int32 ProductID) {
return (cli::safe_cast<Ex22_04::DataSet1::Order_DetailsRow^ >(this->Rows->Find(gcnew cli::array< System::Object^ >(2) {OrderID,
ProductID})));
}
inline System::Collections::IEnumerator^ DataSet1::Order_DetailsDataTable::GetEnumerator() {
return this->Rows->GetEnumerator();
}
inline System::Data::DataTable^ DataSet1::Order_DetailsDataTable::Clone() {
Ex22_04::DataSet1::Order_DetailsDataTable^ cln = (cli::safe_cast<Ex22_04::DataSet1::Order_DetailsDataTable^ >(__super::Clone()));
cln->InitVars();
return cln;
}
inline System::Data::DataTable^ DataSet1::Order_DetailsDataTable::CreateInstance() {
return (gcnew Ex22_04::DataSet1::Order_DetailsDataTable());
}
inline System::Void DataSet1::Order_DetailsDataTable::InitVars() {
this->columnOrderID = __super::Columns[L"OrderID"];
this->columnProductID = __super::Columns[L"ProductID"];
this->columnUnitPrice = __super::Columns[L"UnitPrice"];
this->columnQuantity = __super::Columns[L"Quantity"];
this->columnDiscount = __super::Columns[L"Discount"];
}
inline System::Void DataSet1::Order_DetailsDataTable::InitClass() {
this->columnOrderID = (gcnew System::Data::DataColumn(L"OrderID", System::Int32::typeid, nullptr, System::Data::MappingType::Element));
__super::Columns->Add(this->columnOrderID);
this->columnProductID = (gcnew System::Data::DataColumn(L"ProductID", System::Int32::typeid, nullptr, System::Data::MappingType::Element));
__super::Columns->Add(this->columnProductID);
this->columnUnitPrice = (gcnew System::Data::DataColumn(L"UnitPrice", System::Decimal::typeid, nullptr, System::Data::MappingType::Element));
__super::Columns->Add(this->columnUnitPrice);
this->columnQuantity = (gcnew System::Data::DataColumn(L"Quantity", System::Int16::typeid, nullptr, System::Data::MappingType::Element));
__super::Columns->Add(this->columnQuantity);
this->columnDiscount = (gcnew System::Data::DataColumn(L"Discount", System::Single::typeid, nullptr, System::Data::MappingType::Element));
__super::Columns->Add(this->columnDiscount);
this->Constraints->Add((gcnew System::Data::UniqueConstraint(L"Constraint1", gcnew cli::array< System::Data::DataColumn^ >(2) {this->columnOrderID,
this->columnProductID}, true)));
this->columnOrderID->AllowDBNull = false;
this->columnProductID->AllowDBNull = false;
this->ExtendedProperties->Add(L"Generator_RowClassName", L"Order_DetailsRow");
this->ExtendedProperties->Add(L"Generator_RowEvArgName", L"Order_DetailsRowChangeEvent");
this->ExtendedProperties->Add(L"Generator_RowEvHandlerName", L"Order_DetailsRowChangeEventHandler");
this->ExtendedProperties->Add(L"Generator_TableClassName", L"Order_DetailsDataTable");
this->ExtendedProperties->Add(L"Generator_TablePropName", L"Order_Details");
this->ExtendedProperties->Add(L"Generator_TableVarName", L"tableOrder_Details");
this->ExtendedProperties->Add(L"Generator_UserTableName", L"Order Details");
}
inline Ex22_04::DataSet1::Order_DetailsRow^ DataSet1::Order_DetailsDataTable::NewOrder_DetailsRow() {
return (cli::safe_cast<Ex22_04::DataSet1::Order_DetailsRow^ >(this->NewRow()));
}
inline System::Data::DataRow^ DataSet1::Order_DetailsDataTable::NewRowFromBuilder(System::Data::DataRowBuilder^ builder) {
return (gcnew Ex22_04::DataSet1::Order_DetailsRow(builder));
}
inline System::Type^ DataSet1::Order_DetailsDataTable::GetRowType() {
return Ex22_04::DataSet1::Order_DetailsRow::typeid;
}
inline System::Void DataSet1::Order_DetailsDataTable::OnRowChanged(System::Data::DataRowChangeEventArgs^ e) {
__super::OnRowChanged(e);
{
this->Order_DetailsRowChanged(this, (gcnew Ex22_04::DataSet1::Order_DetailsRowChangeEvent((cli::safe_cast<Ex22_04::DataSet1::Order_DetailsRow^ >(e->Row)),
e->Action)));
}
}
inline System::Void DataSet1::Order_DetailsDataTable::OnRowChanging(System::Data::DataRowChangeEventArgs^ e) {
__super::OnRowChanging(e);
{
this->Order_DetailsRowChanging(this, (gcnew Ex22_04::DataSet1::Order_DetailsRowChangeEvent((cli::safe_cast<Ex22_04::DataSet1::Order_DetailsRow^ >(e->Row)),
e->Action)));
}
}
inline System::Void DataSet1::Order_DetailsDataTable::OnRowDeleted(System::Data::DataRowChangeEventArgs^ e) {
__super::OnRowDeleted(e);
{
this->Order_DetailsRowDeleted(this, (gcnew Ex22_04::DataSet1::Order_DetailsRowChangeEvent((cli::safe_cast<Ex22_04::DataSet1::Order_DetailsRow^ >(e->Row)),
e->Action)));
}
}
inline System::Void DataSet1::Order_DetailsDataTable::OnRowDeleting(System::Data::DataRowChangeEventArgs^ e) {
__super::OnRowDeleting(e);
{
this->Order_DetailsRowDeleting(this, (gcnew Ex22_04::DataSet1::Order_DetailsRowChangeEvent((cli::safe_cast<Ex22_04::DataSet1::Order_DetailsRow^ >(e->Row)),
e->Action)));
}
}
inline System::Void DataSet1::Order_DetailsDataTable::RemoveOrder_DetailsRow(Ex22_04::DataSet1::Order_DetailsRow^ row) {
this->Rows->Remove(row);
}
inline System::Xml::Schema::XmlSchemaComplexType^ DataSet1::Order_DetailsDataTable::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_04::DataSet1^ ds = (gcnew Ex22_04::DataSet1());
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"Order_DetailsDataTable";
type->Attributes->Add(attribute2);
type->Particle = sequence;
return type;
}
inline DataSet1::Order_DetailsRow::Order_DetailsRow(System::Data::DataRowBuilder^ rb) :
System::Data::DataRow(rb) {
this->tableOrder_Details = (cli::safe_cast<Ex22_04::DataSet1::Order_DetailsDataTable^ >(this->Table));
}
inline System::Int32 DataSet1::Order_DetailsRow::OrderID::get() {
return (*cli::safe_cast<System::Int32^>(this[this->tableOrder_Details->OrderIDColumn]));
}
inline System::Void DataSet1::Order_DetailsRow::OrderID::set(System::Int32 value) {
this[this->tableOrder_Details->OrderIDColumn] = value;
}
inline System::Int32 DataSet1::Order_DetailsRow::ProductID::get() {
return (*cli::safe_cast<System::Int32^>(this[this->tableOrder_Details->ProductIDColumn]));
}
inline System::Void DataSet1::Order_DetailsRow::ProductID::set(System::Int32 value) {
this[this->tableOrder_Details->ProductIDColumn] = value;
}
inline System::Decimal DataSet1::Order_DetailsRow::UnitPrice::get() {
try {
return (*cli::safe_cast<System::Decimal^>(this[this->tableOrder_Details->UnitPriceColumn]));
}
catch (System::InvalidCastException^ e) {
throw (gcnew System::Data::StrongTypingException(L"The value for column \'UnitPrice\' in table \'Order Details\' is DBNull.",
e));
}
}
inline System::Void DataSet1::Order_DetailsRow::UnitPrice::set(System::Decimal value) {
this[this->tableOrder_Details->UnitPriceColumn] = value;
}
inline System::Int16 DataSet1::Order_DetailsRow::Quantity::get() {
try {
return (*cli::safe_cast<System::Int16^>(this[this->tableOrder_Details->QuantityColumn]));
}
catch (System::InvalidCastException^ e) {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -