📄 certificateform.h
字号:
this->选择文件Button->Size = System::Drawing::Size(82, 23);
this->选择文件Button->TabIndex = 62;
this->选择文件Button->Text = L"选择文件";
this->选择文件Button->TextImageRelation = System::Windows::Forms::TextImageRelation::ImageBeforeText;
this->选择文件Button->UseVisualStyleBackColor = true;
this->选择文件Button->Click += gcnew System::EventHandler(this, &CertificateForm::选择文件Button_Click);
//
// dataGridViewTextBoxColumn1
//
this->dataGridViewTextBoxColumn1->DataPropertyName = L"证件编号";
this->dataGridViewTextBoxColumn1->HeaderText = L"证件编号";
this->dataGridViewTextBoxColumn1->Name = L"dataGridViewTextBoxColumn1";
this->dataGridViewTextBoxColumn1->ReadOnly = true;
//
// dataGridViewTextBoxColumn2
//
this->dataGridViewTextBoxColumn2->DataPropertyName = L"证件名称";
this->dataGridViewTextBoxColumn2->HeaderText = L"证件名称";
this->dataGridViewTextBoxColumn2->Name = L"dataGridViewTextBoxColumn2";
this->dataGridViewTextBoxColumn2->ReadOnly = true;
//
// 证件编号TextBox
//
this->证件编号TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->公司证件管理BindingSource, L"证件编号", true)));
this->证件编号TextBox->Location = System::Drawing::Point(67, 26);
this->证件编号TextBox->Name = L"证件编号TextBox";
this->证件编号TextBox->Size = System::Drawing::Size(200, 21);
this->证件编号TextBox->TabIndex = 51;
//
// 证件名称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(338, 27);
this->证件名称TextBox->Name = L"证件名称TextBox";
this->证件名称TextBox->Size = System::Drawing::Size(214, 21);
this->证件名称TextBox->TabIndex = 53;
//
// 日期DateTimePicker
//
this->日期DateTimePicker->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Value", this->公司证件管理BindingSource, L"日期",
true)));
this->日期DateTimePicker->Location = System::Drawing::Point(67, 53);
this->日期DateTimePicker->Name = L"日期DateTimePicker";
this->日期DateTimePicker->Size = System::Drawing::Size(200, 21);
this->日期DateTimePicker->TabIndex = 55;
//
// 签发单位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(338, 54);
this->签发单位TextBox->Name = L"签发单位TextBox";
this->签发单位TextBox->Size = System::Drawing::Size(214, 21);
this->签发单位TextBox->TabIndex = 57;
//
// 存放路径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(67, 80);
this->存放路径TextBox->Name = L"存放路径TextBox";
this->存放路径TextBox->ReadOnly = true;
this->存放路径TextBox->Size = System::Drawing::Size(299, 21);
this->存放路径TextBox->TabIndex = 59;
//
// 说明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(67, 107);
this->说明TextBox->Name = L"说明TextBox";
this->说明TextBox->Size = System::Drawing::Size(485, 21);
this->说明TextBox->TabIndex = 61;
//
// 公司证件管理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^ >(6) {this->dataGridViewTextBoxColumn1,
this->dataGridViewTextBoxColumn2, this->dataGridViewTextBoxColumn3, this->dataGridViewTextBoxColumn4, this->dataGridViewTextBoxColumn5,
this->dataGridViewTextBoxColumn6});
this->公司证件管理DataGridView->DataSource = this->公司证件管理BindingSource;
this->公司证件管理DataGridView->Location = System::Drawing::Point(4, 134);
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(548, 292);
this->公司证件管理DataGridView->TabIndex = 49;
//
// 公司证件管理BindingNavigatorSaveItem
//
this->公司证件管理BindingNavigatorSaveItem->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"公司证件管理BindingNavigatorSaveItem.Image")));
this->公司证件管理BindingNavigatorSaveItem->Name = L"公司证件管理BindingNavigatorSaveItem";
this->公司证件管理BindingNavigatorSaveItem->Size = System::Drawing::Size(49, 22);
this->公司证件管理BindingNavigatorSaveItem->Text = L"保存";
this->公司证件管理BindingNavigatorSaveItem->Click += gcnew System::EventHandler(this, &CertificateForm::公司证件管理BindingNavigatorSaveItem_Click);
//
// 公司证件管理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(557, 25);
this->公司证件管理BindingNavigator->TabIndex = 48;
this->公司证件管理BindingNavigator->Text = L"bindingNavigator1";
//
// 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"新增";
//
// 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"删除";
//
// toolStripLabel1
//
this->toolStripLabel1->Name = L"toolStripLabel1";
this->toolStripLabel1->Size = System::Drawing::Size(59, 22);
this->toolStripLabel1->Text = L"开始日期:";
//
// 开始日期ToolStripTextBox
//
this->开始日期ToolStripTextBox->Name = L"开始日期ToolStripTextBox";
this->开始日期ToolStripTextBox->Size = System::Drawing::Size(100, 25);
this->开始日期ToolStripTextBox->Text = L"2001-1-1";
//
// toolStripLabel2
//
this->toolStripLabel2->Name = L"toolStripLabel2";
this->toolStripLabel2->Size = System::Drawing::Size(59, 22);
this->toolStripLabel2->Text = L"结束日期:";
//
// 结束日期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, &CertificateForm::查询ToolStripButton_Click);
//
// bindingNavigatorSeparator2
//
this->bindingNavigatorSeparator2->Name = L"bindingNavigatorSeparator2";
this->bindingNavigatorSeparator2->Size = System::Drawing::Size(6, 25);
//
// CertificateForm
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 12);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(557, 431);
this->Controls->Add(this->显示文件Button);
this->Controls->Add(this->选择文件Button);
this->Controls->Add(this->证件编号TextBox);
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->公司证件管理DataGridView);
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->公司证件管理BindingNavigator);
this->Name = L"CertificateForm";
this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
this->Text = L"公司证件管理";
this->Load += gcnew System::EventHandler(this, &CertificateForm::CertificateForm_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 CertificateForm_Load(System::Object^ sender, System::EventArgs^ e) {
// TODO: 这行代码将数据加载到表“MyOfficeDataSet.公司证件管理”中。您可以根据需要移动或移除它。
this->公司证件管理TableAdapter->Fill(this->MyOfficeDataSet->公司证件管理);
}
private: System::Void 选择文件Button_Click(System::Object^ sender, System::EventArgs^ e) {
OpenFileDialog^ MyDlg = gcnew OpenFileDialog();
if (MyDlg->ShowDialog() == System::Windows::Forms::DialogResult::OK)
{
this->存放路径TextBox->Text = MyDlg->FileName;
}
}
private: System::Void 显示文件Button_Click(System::Object^ sender, System::EventArgs^ e) {
System::Diagnostics::Process::Start(this->存放路径TextBox->Text);
}
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 + -