📄 dataset1.h
字号:
throw (gcnew System::Data::StrongTypingException(L"The value for column \'Quantity\' in table \'Order Details\' is DBNull.",
e));
}
}
inline System::Void DataSet1::Order_DetailsRow::Quantity::set(System::Int16 value) {
this[this->tableOrder_Details->QuantityColumn] = value;
}
inline System::Single DataSet1::Order_DetailsRow::Discount::get() {
try {
return (*cli::safe_cast<System::Single^>(this[this->tableOrder_Details->DiscountColumn]));
}
catch (System::InvalidCastException^ e) {
throw (gcnew System::Data::StrongTypingException(L"The value for column \'Discount\' in table \'Order Details\' is DBNull.",
e));
}
}
inline System::Void DataSet1::Order_DetailsRow::Discount::set(System::Single value) {
this[this->tableOrder_Details->DiscountColumn] = value;
}
inline System::Boolean DataSet1::Order_DetailsRow::IsUnitPriceNull() {
return this->IsNull(this->tableOrder_Details->UnitPriceColumn);
}
inline System::Void DataSet1::Order_DetailsRow::SetUnitPriceNull() {
this[this->tableOrder_Details->UnitPriceColumn] = System::Convert::DBNull;
}
inline System::Boolean DataSet1::Order_DetailsRow::IsQuantityNull() {
return this->IsNull(this->tableOrder_Details->QuantityColumn);
}
inline System::Void DataSet1::Order_DetailsRow::SetQuantityNull() {
this[this->tableOrder_Details->QuantityColumn] = System::Convert::DBNull;
}
inline System::Boolean DataSet1::Order_DetailsRow::IsDiscountNull() {
return this->IsNull(this->tableOrder_Details->DiscountColumn);
}
inline System::Void DataSet1::Order_DetailsRow::SetDiscountNull() {
this[this->tableOrder_Details->DiscountColumn] = System::Convert::DBNull;
}
inline DataSet1::Order_DetailsRowChangeEvent::Order_DetailsRowChangeEvent(Ex22_04::DataSet1::Order_DetailsRow^ row,
System::Data::DataRowAction action) {
this->eventRow = row;
this->eventAction = action;
}
inline Ex22_04::DataSet1::Order_DetailsRow^ DataSet1::Order_DetailsRowChangeEvent::Row::get() {
return this->eventRow;
}
inline System::Data::DataRowAction DataSet1::Order_DetailsRowChangeEvent::Action::get() {
return this->eventAction;
}
}
namespace Ex22_04 {
namespace DataSet1TableAdapters {
using namespace System;
ref class Order_DetailsTableAdapter;
[System::CodeDom::Compiler::GeneratedCodeAttribute(L"System.Data.Design.TypedDataSetGenerator", L"2.0.0.0"),
System::ComponentModel::DesignerCategoryAttribute(L"code"),
System::ComponentModel::ToolboxItem(true),
System::ComponentModel::DataObjectAttribute(true),
System::ComponentModel::DesignerAttribute(L"Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"
L", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"),
System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
public ref class Order_DetailsTableAdapter : public System::ComponentModel::Component {
private: System::Data::Odbc::OdbcDataAdapter^ _adapter;
private: System::Data::Odbc::OdbcConnection^ _connection;
private: cli::array< System::Data::Odbc::OdbcCommand^ >^ _commandCollection;
private: System::Boolean _clearBeforeFill;
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
Order_DetailsTableAdapter();
private: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::Data::Odbc::OdbcDataAdapter^ Adapter {
System::Data::Odbc::OdbcDataAdapter^ get();
}
internal: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::Data::Odbc::OdbcConnection^ Connection {
System::Data::Odbc::OdbcConnection^ get();
System::Void set(System::Data::Odbc::OdbcConnection^ value);
}
protected: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property cli::array< System::Data::Odbc::OdbcCommand^ >^ CommandCollection {
cli::array< System::Data::Odbc::OdbcCommand^ >^ get();
}
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
property System::Boolean ClearBeforeFill {
System::Boolean get();
System::Void set(System::Boolean value);
}
private: [System::Diagnostics::DebuggerNonUserCodeAttribute]
System::Void InitAdapter();
private: [System::Diagnostics::DebuggerNonUserCodeAttribute]
System::Void InitConnection();
private: [System::Diagnostics::DebuggerNonUserCodeAttribute]
System::Void InitCommandCollection();
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
[System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Fill, true)]
virtual System::Int32 Fill(Ex22_04::DataSet1::Order_DetailsDataTable^ dataTable);
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
[System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Select, true)]
virtual Ex22_04::DataSet1::Order_DetailsDataTable^ GetData();
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
virtual System::Int32 Update(Ex22_04::DataSet1::Order_DetailsDataTable^ dataTable);
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
virtual System::Int32 Update(Ex22_04::DataSet1^ dataSet);
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
virtual System::Int32 Update(System::Data::DataRow^ dataRow);
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
virtual System::Int32 Update(cli::array< System::Data::DataRow^ >^ dataRows);
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
[System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Delete, true)]
virtual System::Int32 Delete(System::Nullable<System::Int32 > Original_OrderID, System::Nullable<System::Int32 > Original_ProductID,
System::Nullable<System::Decimal > Original_UnitPrice, System::Nullable<System::Int16 > Original_Quantity, System::Nullable<System::Single > Original_Discount);
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
[System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Insert, true)]
virtual System::Int32 Insert(System::Nullable<System::Int32 > OrderID, System::Nullable<System::Int32 > ProductID,
System::Nullable<System::Decimal > UnitPrice, System::Nullable<System::Int16 > Quantity, System::Nullable<System::Single > Discount);
public: [System::Diagnostics::DebuggerNonUserCodeAttribute]
[System::ComponentModel::Design::HelpKeywordAttribute(L"vs.data.TableAdapter")]
[System::ComponentModel::DataObjectMethodAttribute(System::ComponentModel::DataObjectMethodType::Update, true)]
virtual System::Int32 Update(
System::Nullable<System::Int32 > OrderID,
System::Nullable<System::Int32 > ProductID,
System::Nullable<System::Decimal > UnitPrice,
System::Nullable<System::Int16 > Quantity,
System::Nullable<System::Single > Discount,
System::Nullable<System::Int32 > Original_OrderID,
System::Nullable<System::Int32 > Original_ProductID,
System::Nullable<System::Decimal > Original_UnitPrice,
System::Nullable<System::Int16 > Original_Quantity,
System::Nullable<System::Single > Original_Discount);
};
}
}
namespace Ex22_04 {
namespace DataSet1TableAdapters {
inline Order_DetailsTableAdapter::Order_DetailsTableAdapter() {
this->ClearBeforeFill = true;
}
inline System::Data::Odbc::OdbcDataAdapter^ Order_DetailsTableAdapter::Adapter::get() {
if (this->_adapter == nullptr) {
this->InitAdapter();
}
return this->_adapter;
}
inline System::Data::Odbc::OdbcConnection^ Order_DetailsTableAdapter::Connection::get() {
if (this->_connection == nullptr) {
this->InitConnection();
}
return this->_connection;
}
inline System::Void Order_DetailsTableAdapter::Connection::set(System::Data::Odbc::OdbcConnection^ value) {
this->_connection = __identifier(value);
if (this->Adapter->InsertCommand != nullptr) {
this->Adapter->InsertCommand->Connection = __identifier(value);
}
if (this->Adapter->DeleteCommand != nullptr) {
this->Adapter->DeleteCommand->Connection = __identifier(value);
}
if (this->Adapter->UpdateCommand != nullptr) {
this->Adapter->UpdateCommand->Connection = __identifier(value);
}
for ( System::Int32 i = 0; (i < this->CommandCollection->Length); i = (i + 1)) {
if (this->CommandCollection[i] != nullptr) {
(cli::safe_cast<System::Data::Odbc::OdbcCommand^ >(this->CommandCollection[i]))->Connection = __identifier(value);
}
}
}
inline cli::array< System::Data::Odbc::OdbcCommand^ >^ Order_DetailsTableAdapter::CommandCollection::get() {
if (this->_commandCollection == nullptr) {
this->InitCommandCollection();
}
return this->_commandCollection;
}
inline System::Boolean Order_DetailsTableAdapter::ClearBeforeFill::get() {
return this->_clearBeforeFill;
}
inline System::Void Order_DetailsTableAdapter::ClearBeforeFill::set(System::Boolean value) {
this->_clearBeforeFill = __identifier(value);
}
inline System::Void Order_DetailsTableAdapter::InitAdapter() {
this->_adapter = (gcnew System::Data::Odbc::OdbcDataAdapter());
System::Data::Common::DataTableMapping^ tableMapping = (gcnew System::Data::Common::DataTableMapping());
tableMapping->SourceTable = L"Table";
tableMapping->DataSetTable = L"Order Details";
tableMapping->ColumnMappings->Add(L"OrderID", L"OrderID");
tableMapping->ColumnMappings->Add(L"ProductID", L"ProductID");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -