📄 departmentform.h
字号:
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"删除";
//
// 公司部门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, &DepartmentForm::公司部门BindingNavigatorSaveItem_Click);
//
// dataGridViewTextBoxColumn3
//
this->dataGridViewTextBoxColumn3->DataPropertyName = L"人事文员";
this->dataGridViewTextBoxColumn3->HeaderText = L"人事文员";
this->dataGridViewTextBoxColumn3->Name = L"dataGridViewTextBoxColumn3";
this->dataGridViewTextBoxColumn3->ReadOnly = true;
//
// dataGridViewTextBoxColumn2
//
this->dataGridViewTextBoxColumn2->DataPropertyName = L"部门负责人";
this->dataGridViewTextBoxColumn2->HeaderText = L"部门负责人";
this->dataGridViewTextBoxColumn2->Name = L"dataGridViewTextBoxColumn2";
this->dataGridViewTextBoxColumn2->ReadOnly = true;
//
// dataGridViewTextBoxColumn1
//
this->dataGridViewTextBoxColumn1->DataPropertyName = L"部门名称";
this->dataGridViewTextBoxColumn1->HeaderText = L"部门名称";
this->dataGridViewTextBoxColumn1->Name = L"dataGridViewTextBoxColumn1";
this->dataGridViewTextBoxColumn1->ReadOnly = true;
//
// dataGridViewTextBoxColumn6
//
this->dataGridViewTextBoxColumn6->DataPropertyName = L"说明";
this->dataGridViewTextBoxColumn6->HeaderText = L"说明";
this->dataGridViewTextBoxColumn6->Name = L"dataGridViewTextBoxColumn6";
this->dataGridViewTextBoxColumn6->ReadOnly = true;
//
// dataGridViewTextBoxColumn5
//
this->dataGridViewTextBoxColumn5->DataPropertyName = L"额定人数";
this->dataGridViewTextBoxColumn5->HeaderText = L"额定人数";
this->dataGridViewTextBoxColumn5->Name = L"dataGridViewTextBoxColumn5";
this->dataGridViewTextBoxColumn5->ReadOnly = true;
//
// dataGridViewTextBoxColumn4
//
this->dataGridViewTextBoxColumn4->DataPropertyName = L"联系电话";
this->dataGridViewTextBoxColumn4->HeaderText = L"联系电话";
this->dataGridViewTextBoxColumn4->Name = L"dataGridViewTextBoxColumn4";
this->dataGridViewTextBoxColumn4->ReadOnly = true;
//
// 部门名称Label
//
部门名称Label->AutoSize = true;
部门名称Label->Location = System::Drawing::Point(5, 32);
部门名称Label->Name = L"部门名称Label";
部门名称Label->Size = System::Drawing::Size(59, 12);
部门名称Label->TabIndex = 15;
部门名称Label->Text = L"部门名称:";
//
// 部门名称TextBox
//
this->部门名称TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->公司部门BindingSource, L"部门名称", true)));
this->部门名称TextBox->Location = System::Drawing::Point(82, 29);
this->部门名称TextBox->Name = L"部门名称TextBox";
this->部门名称TextBox->Size = System::Drawing::Size(180, 21);
this->部门名称TextBox->TabIndex = 16;
//
// 部门负责人Label
//
部门负责人Label->AutoSize = true;
部门负责人Label->Location = System::Drawing::Point(5, 59);
部门负责人Label->Name = L"部门负责人Label";
部门负责人Label->Size = System::Drawing::Size(71, 12);
部门负责人Label->TabIndex = 17;
部门负责人Label->Text = L"部门负责人:";
//
// 部门负责人TextBox
//
this->部门负责人TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->公司部门BindingSource, L"部门负责人", true)));
this->部门负责人TextBox->Location = System::Drawing::Point(82, 56);
this->部门负责人TextBox->Name = L"部门负责人TextBox";
this->部门负责人TextBox->Size = System::Drawing::Size(180, 21);
this->部门负责人TextBox->TabIndex = 18;
//
// 人事文员Label
//
人事文员Label->AutoSize = true;
人事文员Label->Location = System::Drawing::Point(5, 86);
人事文员Label->Name = L"人事文员Label";
人事文员Label->Size = System::Drawing::Size(59, 12);
人事文员Label->TabIndex = 19;
人事文员Label->Text = L"人事文员:";
//
// 人事文员TextBox
//
this->人事文员TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->公司部门BindingSource, L"人事文员", true)));
this->人事文员TextBox->Location = System::Drawing::Point(82, 83);
this->人事文员TextBox->Name = L"人事文员TextBox";
this->人事文员TextBox->Size = System::Drawing::Size(180, 21);
this->人事文员TextBox->TabIndex = 20;
//
// 联系电话Label
//
联系电话Label->AutoSize = true;
联系电话Label->Location = System::Drawing::Point(271, 32);
联系电话Label->Name = L"联系电话Label";
联系电话Label->Size = System::Drawing::Size(59, 12);
联系电话Label->TabIndex = 21;
联系电话Label->Text = L"联系电话:";
//
// 联系电话TextBox
//
this->联系电话TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->公司部门BindingSource, L"联系电话", true)));
this->联系电话TextBox->Location = System::Drawing::Point(348, 29);
this->联系电话TextBox->Name = L"联系电话TextBox";
this->联系电话TextBox->Size = System::Drawing::Size(189, 21);
this->联系电话TextBox->TabIndex = 22;
//
// 额定人数Label
//
额定人数Label->AutoSize = true;
额定人数Label->Location = System::Drawing::Point(271, 59);
额定人数Label->Name = L"额定人数Label";
额定人数Label->Size = System::Drawing::Size(59, 12);
额定人数Label->TabIndex = 23;
额定人数Label->Text = L"额定人数:";
//
// 额定人数TextBox
//
this->额定人数TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->公司部门BindingSource, L"额定人数", true)));
this->额定人数TextBox->Location = System::Drawing::Point(348, 56);
this->额定人数TextBox->Name = L"额定人数TextBox";
this->额定人数TextBox->Size = System::Drawing::Size(189, 21);
this->额定人数TextBox->TabIndex = 24;
//
// 说明Label
//
说明Label->AutoSize = true;
说明Label->Location = System::Drawing::Point(271, 86);
说明Label->Name = L"说明Label";
说明Label->Size = System::Drawing::Size(35, 12);
说明Label->TabIndex = 25;
说明Label->Text = L"说明:";
//
// 说明TextBox
//
this->说明TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->公司部门BindingSource, L"说明", true)));
this->说明TextBox->Location = System::Drawing::Point(348, 83);
this->说明TextBox->Name = L"说明TextBox";
this->说明TextBox->Size = System::Drawing::Size(189, 21);
this->说明TextBox->TabIndex = 26;
//
// 公司部门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->BackgroundColor = System::Drawing::SystemColors::ActiveCaption;
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;
dataGridViewCellStyle1->Alignment = System::Windows::Forms::DataGridViewContentAlignment::MiddleLeft;
dataGridViewCellStyle1->BackColor = System::Drawing::Color::Green;
dataGridViewCellStyle1->Font = (gcnew System::Drawing::Font(L"宋体", 9, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(134)));
dataGridViewCellStyle1->ForeColor = System::Drawing::Color::Yellow;
dataGridViewCellStyle1->SelectionBackColor = System::Drawing::SystemColors::Highlight;
dataGridViewCellStyle1->SelectionForeColor = System::Drawing::SystemColors::HighlightText;
dataGridViewCellStyle1->WrapMode = System::Windows::Forms::DataGridViewTriState::False;
this->公司部门DataGridView->DefaultCellStyle = dataGridViewCellStyle1;
this->公司部门DataGridView->Location = System::Drawing::Point(4, 109);
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, 303);
this->公司部门DataGridView->TabIndex = 14;
//
// DepartmentForm
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 12);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(0)), static_cast<System::Int32>(static_cast<System::Byte>(192)),
static_cast<System::Int32>(static_cast<System::Byte>(192)));
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->人事文员TextBox);
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->说明TextBox);
this->Controls->Add(this->公司部门DataGridView);
this->Controls->Add(this->公司部门BindingNavigator);
this->Name = L"DepartmentForm";
this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
this->Text = L"登记公司部门信息";
this->Load += gcnew System::EventHandler(this, &DepartmentForm::DepartmentForm_Load);
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->MyPersonnelDataSet))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->公司部门BindingSource))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->公司部门BindingNavigator))->EndInit();
this->公司部门BindingNavigator->ResumeLayout(false);
this->公司部门BindingNavigator->PerformLayout();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->公司部门DataGridView))->EndInit();
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->MyPersonnelDataSet->公司部门);
}
private: System::Void DepartmentForm_Load(System::Object^ sender, System::EventArgs^ e) {
// TODO: 这行代码将数据加载到表“MyPersonnelDataSet.公司部门”中。您可以根据需要移动或移除它。
this->公司部门TableAdapter->Fill(this->MyPersonnelDataSet->公司部门);
}
};
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -