📄 vehicleform.h
字号:
// 结束日期ToolStripTextBox
//
this->结束日期ToolStripTextBox->Name = L"结束日期ToolStripTextBox";
this->结束日期ToolStripTextBox->Size = System::Drawing::Size(100, 25);
this->结束日期ToolStripTextBox->Text = L"2099-12-31";
//
// 查询ToolStripButton
//
this->查询ToolStripButton->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"查询ToolStripButton.Image")));
this->查询ToolStripButton->Name = L"查询ToolStripButton";
this->查询ToolStripButton->Size = System::Drawing::Size(49, 22);
this->查询ToolStripButton->Text = L"查询";
this->查询ToolStripButton->Click += gcnew System::EventHandler(this, &VehicleForm::查询ToolStripButton_Click);
//
// dataGridViewTextBoxColumn7
//
this->dataGridViewTextBoxColumn7->DataPropertyName = L"引擎号码";
this->dataGridViewTextBoxColumn7->HeaderText = L"引擎号码";
this->dataGridViewTextBoxColumn7->Name = L"dataGridViewTextBoxColumn7";
this->dataGridViewTextBoxColumn7->ReadOnly = true;
//
// dataGridViewTextBoxColumn8
//
this->dataGridViewTextBoxColumn8->DataPropertyName = L"使用部门";
this->dataGridViewTextBoxColumn8->HeaderText = L"使用部门";
this->dataGridViewTextBoxColumn8->Name = L"dataGridViewTextBoxColumn8";
this->dataGridViewTextBoxColumn8->ReadOnly = true;
//
// dataGridViewTextBoxColumn9
//
this->dataGridViewTextBoxColumn9->DataPropertyName = L"说明";
this->dataGridViewTextBoxColumn9->HeaderText = L"说明";
this->dataGridViewTextBoxColumn9->Name = L"dataGridViewTextBoxColumn9";
this->dataGridViewTextBoxColumn9->ReadOnly = true;
//
// dataGridViewTextBoxColumn6
//
this->dataGridViewTextBoxColumn6->DataPropertyName = L"购买价格";
this->dataGridViewTextBoxColumn6->HeaderText = L"购买价格";
this->dataGridViewTextBoxColumn6->Name = L"dataGridViewTextBoxColumn6";
this->dataGridViewTextBoxColumn6->ReadOnly = true;
//
// dataGridViewTextBoxColumn3
//
this->dataGridViewTextBoxColumn3->DataPropertyName = L"车辆类别";
this->dataGridViewTextBoxColumn3->HeaderText = L"车辆类别";
this->dataGridViewTextBoxColumn3->Name = L"dataGridViewTextBoxColumn3";
this->dataGridViewTextBoxColumn3->ReadOnly = true;
//
// dataGridViewTextBoxColumn4
//
this->dataGridViewTextBoxColumn4->DataPropertyName = L"驾驶员";
this->dataGridViewTextBoxColumn4->HeaderText = L"驾驶员";
this->dataGridViewTextBoxColumn4->Name = L"dataGridViewTextBoxColumn4";
this->dataGridViewTextBoxColumn4->ReadOnly = true;
//
// dataGridViewTextBoxColumn5
//
this->dataGridViewTextBoxColumn5->DataPropertyName = L"购置日期";
this->dataGridViewTextBoxColumn5->HeaderText = L"购置日期";
this->dataGridViewTextBoxColumn5->Name = L"dataGridViewTextBoxColumn5";
this->dataGridViewTextBoxColumn5->ReadOnly = true;
//
// 车牌号TextBox
//
this->车牌号TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->车辆登记管理BindingSource, L"车牌号", true)));
this->车牌号TextBox->Location = System::Drawing::Point(55, 27);
this->车牌号TextBox->Name = L"车牌号TextBox";
this->车牌号TextBox->Size = System::Drawing::Size(103, 21);
this->车牌号TextBox->TabIndex = 23;
//
// 自编号TextBox
//
this->自编号TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->车辆登记管理BindingSource, L"自编号", true)));
this->自编号TextBox->Location = System::Drawing::Point(215, 27);
this->自编号TextBox->Name = L"自编号TextBox";
this->自编号TextBox->Size = System::Drawing::Size(38, 21);
this->自编号TextBox->TabIndex = 25;
//
// 车辆类别ComboBox
//
this->车辆类别ComboBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->车辆登记管理BindingSource, L"车辆类别", true)));
this->车辆类别ComboBox->FormattingEnabled = true;
this->车辆类别ComboBox->Items->AddRange(gcnew cli::array< System::Object^ >(3) {L"长安小货车", L"东风雪铁龙", L"天津夏利"});
this->车辆类别ComboBox->Location = System::Drawing::Point(323, 28);
this->车辆类别ComboBox->Name = L"车辆类别ComboBox";
this->车辆类别ComboBox->Size = System::Drawing::Size(74, 20);
this->车辆类别ComboBox->TabIndex = 27;
//
// 驾驶员TextBox
//
this->驾驶员TextBox->Anchor = static_cast<System::Windows::Forms::AnchorStyles>(((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Left)
| System::Windows::Forms::AnchorStyles::Right));
this->驾驶员TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->车辆登记管理BindingSource, L"驾驶员", true)));
this->驾驶员TextBox->Location = System::Drawing::Point(456, 27);
this->驾驶员TextBox->Name = L"驾驶员TextBox";
this->驾驶员TextBox->Size = System::Drawing::Size(81, 21);
this->驾驶员TextBox->TabIndex = 29;
//
// 购置日期DateTimePicker
//
this->购置日期DateTimePicker->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Value", this->车辆登记管理BindingSource, L"购置日期",
true)));
this->购置日期DateTimePicker->Location = System::Drawing::Point(67, 52);
this->购置日期DateTimePicker->Name = L"购置日期DateTimePicker";
this->购置日期DateTimePicker->Size = System::Drawing::Size(142, 21);
this->购置日期DateTimePicker->TabIndex = 31;
//
// 购买价格TextBox
//
this->购买价格TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->车辆登记管理BindingSource, L"购买价格", true)));
this->购买价格TextBox->Location = System::Drawing::Point(279, 53);
this->购买价格TextBox->Name = L"购买价格TextBox";
this->购买价格TextBox->Size = System::Drawing::Size(70, 21);
this->购买价格TextBox->TabIndex = 33;
//
// 引擎号码TextBox
//
this->引擎号码TextBox->Anchor = static_cast<System::Windows::Forms::AnchorStyles>(((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Left)
| System::Windows::Forms::AnchorStyles::Right));
this->引擎号码TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->车辆登记管理BindingSource, L"引擎号码", true)));
this->引擎号码TextBox->Location = System::Drawing::Point(420, 52);
this->引擎号码TextBox->Name = L"引擎号码TextBox";
this->引擎号码TextBox->Size = System::Drawing::Size(117, 21);
this->引擎号码TextBox->TabIndex = 35;
//
// 使用部门TextBox
//
this->使用部门TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->车辆登记管理BindingSource, L"使用部门", true)));
this->使用部门TextBox->Location = System::Drawing::Point(67, 79);
this->使用部门TextBox->Name = L"使用部门TextBox";
this->使用部门TextBox->Size = System::Drawing::Size(91, 21);
this->使用部门TextBox->TabIndex = 37;
//
// 说明TextBox
//
this->说明TextBox->Anchor = static_cast<System::Windows::Forms::AnchorStyles>(((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Left)
| System::Windows::Forms::AnchorStyles::Right));
this->说明TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->车辆登记管理BindingSource, L"说明", true)));
this->说明TextBox->Location = System::Drawing::Point(204, 80);
this->说明TextBox->Name = L"说明TextBox";
this->说明TextBox->Size = System::Drawing::Size(333, 21);
this->说明TextBox->TabIndex = 39;
//
// bindingNavigatorDeleteItem
//
this->bindingNavigatorDeleteItem->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"bindingNavigatorDeleteItem.Image")));
this->bindingNavigatorDeleteItem->Name = L"bindingNavigatorDeleteItem";
this->bindingNavigatorDeleteItem->RightToLeftAutoMirrorImage = true;
this->bindingNavigatorDeleteItem->Size = System::Drawing::Size(49, 22);
this->bindingNavigatorDeleteItem->Text = L"删除";
//
// bindingNavigatorAddNewItem
//
this->bindingNavigatorAddNewItem->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"bindingNavigatorAddNewItem.Image")));
this->bindingNavigatorAddNewItem->Name = L"bindingNavigatorAddNewItem";
this->bindingNavigatorAddNewItem->RightToLeftAutoMirrorImage = true;
this->bindingNavigatorAddNewItem->Size = System::Drawing::Size(49, 22);
this->bindingNavigatorAddNewItem->Text = L"新增";
//
// 开始日期ToolStripTextBox
//
this->开始日期ToolStripTextBox->Name = L"开始日期ToolStripTextBox";
this->开始日期ToolStripTextBox->Size = System::Drawing::Size(100, 25);
this->开始日期ToolStripTextBox->Text = L"2000-1-1";
//
// toolStripLabel1
//
this->toolStripLabel1->Name = L"toolStripLabel1";
this->toolStripLabel1->Size = System::Drawing::Size(59, 22);
this->toolStripLabel1->Text = L"开始日期:";
//
// 车辆登记管理DataGridView
//
this->车辆登记管理DataGridView->AllowUserToAddRows = false;
this->车辆登记管理DataGridView->AllowUserToDeleteRows = false;
this->车辆登记管理DataGridView->AllowUserToResizeRows = false;
this->车辆登记管理DataGridView->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Bottom)
| System::Windows::Forms::AnchorStyles::Left)
| System::Windows::Forms::AnchorStyles::Right));
this->车辆登记管理DataGridView->AutoGenerateColumns = false;
this->车辆登记管理DataGridView->Columns->AddRange(gcnew cli::array< System::Windows::Forms::DataGridViewColumn^ >(9) {this->dataGridViewTextBoxColumn1,
this->dataGridViewTextBoxColumn2, this->dataGridViewTextBoxColumn3, this->dataGridViewTextBoxColumn4, this->dataGridViewTextBoxColumn5,
this->dataGridViewTextBoxColumn6, this->dataGridViewTextBoxColumn7, this->dataGridViewTextBoxColumn8, this->dataGridViewTextBoxColumn9});
this->车辆登记管理DataGridView->DataSource = this->车辆登记管理BindingSource;
this->车辆登记管理DataGridView->Location = System::Drawing::Point(4, 106);
this->车辆登记管理DataGridView->MultiSelect = false;
this->车辆登记管理DataGridView->Name = L"车辆登记管理DataGridView";
this->车辆登记管理DataGridView->ReadOnly = true;
this->车辆登记管理DataGridView->RowHeadersVisible = false;
this->车辆登记管理DataGridView->RowTemplate->Height = 23;
this->车辆登记管理DataGridView->SelectionMode = System::Windows::Forms::DataGridViewSelectionMode::FullRowSelect;
this->车辆登记管理DataGridView->Size = System::Drawing::Size(533, 305);
this->车辆登记管理DataGridView->TabIndex = 21;
//
// 车辆登记管理BindingNavigator
//
this->车辆登记管理BindingNavigator->AddNewItem = this->bindingNavigatorAddNewItem;
this->车辆登记管理BindingNavigator->BindingSource = this->车辆登记管理BindingSource;
this->车辆登记管理BindingNavigator->CountItem = nullptr;
this->车辆登记管理BindingNavigator->DeleteItem = this->bindingNavigatorDeleteItem;
this->车辆登记管理BindingNavigator->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(9) {this->toolStripLabel1,
this->开始日期ToolStripTextBox, this->toolStripLabel2, this->结束日期ToolStripTextBox, this->查询ToolStripButton, this->bindingNavigatorSeparator2,
this->bindingNavigatorAddNewItem, this->bindingNavigatorDeleteItem, this->车辆登记管理BindingNavigatorSaveItem});
this->车辆登记管理BindingNavigator->Location = System::Drawing::Point(0, 0);
this->车辆登记管理BindingNavigator->MoveFirstItem = nullptr;
this->车辆登记管理BindingNavigator->MoveLastItem = nullptr;
this->车辆登记管理BindingNavigator->MoveNextItem = nullptr;
this->车辆登记管理BindingNavigator->MovePreviousItem = nullptr;
this->车辆登记管理BindingNavigator->Name = L"车辆登记管理BindingNavigator";
this->车辆登记管理BindingNavigator->PositionItem = nullptr;
this->车辆登记管理BindingNavigator->Size = System::Drawing::Size(542, 25);
this->车辆登记管理BindingNavigator->TabIndex = 20;
this->车辆登记管理BindingNavigator->Text = L"bindingNavigator1";
//
// VehicleForm
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 12);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(542, 416);
this->Controls->Add(车牌号Label);
this->Controls->Add(this->车牌号TextBox);
this->Controls->Add(自编号Label);
this->Controls->Add(this->自编号TextBox);
this->Controls->Add(车辆类别Label);
this->Controls->Add(this->车辆类别ComboBox);
this->Controls->Add(this->驾驶员TextBox);
this->Controls->Add(this->购置日期DateTimePicker);
this->Controls->Add(this->购买价格TextBox);
this->Controls->Add(this->引擎号码TextBox);
this->Controls->Add(this->使用部门TextBox);
this->Controls->Add(this->说明TextBox);
this->Controls->Add(驾驶员Label);
this->Controls->Add(购置日期Label);
this->Controls->Add(购买价格Label);
this->Controls->Add(引擎号码Label);
this->Controls->Add(使用部门Label);
this->Controls->Add(说明Label);
this->Controls->Add(this->车辆登记管理DataGridView);
this->Controls->Add(this->车辆登记管理BindingNavigator);
this->Name = L"VehicleForm";
this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
this->Text = L"车辆登记管理";
this->Load += gcnew System::EventHandler(this, &VehicleForm::VehicleForm_Load);
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->MyOfficeDataSet))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->车辆登记管理BindingSource))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->车辆登记管理DataGridView))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->车辆登记管理BindingNavigator))->EndInit();
this->车辆登记管理BindingNavigator->ResumeLayout(false);
this->车辆登记管理BindingNavigator->PerformLayout();
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
private: System::Void 车辆登记管理BindingNavigatorSaveItem_Click(System::Object^ sender, System::EventArgs^ e) {
this->Validate();
this->车辆登记管理BindingSource->EndEdit();
this->车辆登记管理TableAdapter->Update(this->MyOfficeDataSet->车辆登记管理);
}
private: System::Void VehicleForm_Load(System::Object^ sender, System::EventArgs^ e) {
// TODO: 这行代码将数据加载到表“MyOfficeDataSet.车辆登记管理”中。您可以根据需要移动或移除它。
this->车辆登记管理TableAdapter->Fill(this->MyOfficeDataSet->车辆登记管理);
}
private: System::Void 查询ToolStripButton_Click(System::Object^ sender, System::EventArgs^ e) {
try
{
this->车辆登记管理TableAdapter->FillBy(this->MyOfficeDataSet->车辆登记管理, System::Nullable<System::DateTime >((*cli::safe_cast<System::DateTime^>(System::Convert::ChangeType(开始日期ToolStripTextBox->Text,
System::DateTime::typeid)))), System::Nullable<System::DateTime >((*cli::safe_cast<System::DateTime^>(System::Convert::ChangeType(结束日期ToolStripTextBox->Text, System::DateTime::typeid)))));
}
catch (System::Exception^ ex)
{
System::Windows::Forms::MessageBox::Show(ex->Message);
}
}
};
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -