📄 moveform.h
字号:
this->迁出信息DataGridView->ReadOnly = true;
dataGridViewCellStyle2->Alignment = System::Windows::Forms::DataGridViewContentAlignment::TopCenter;
dataGridViewCellStyle2->BackColor = System::Drawing::SystemColors::Control;
dataGridViewCellStyle2->Font = (gcnew System::Drawing::Font(L"宋体", 9, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(134)));
dataGridViewCellStyle2->ForeColor = System::Drawing::SystemColors::WindowText;
dataGridViewCellStyle2->SelectionBackColor = System::Drawing::SystemColors::Highlight;
dataGridViewCellStyle2->SelectionForeColor = System::Drawing::SystemColors::HighlightText;
dataGridViewCellStyle2->WrapMode = System::Windows::Forms::DataGridViewTriState::True;
this->迁出信息DataGridView->RowHeadersDefaultCellStyle = dataGridViewCellStyle2;
this->迁出信息DataGridView->RowHeadersVisible = false;
dataGridViewCellStyle3->SelectionBackColor = System::Drawing::Color::Green;
this->迁出信息DataGridView->RowsDefaultCellStyle = dataGridViewCellStyle3;
this->迁出信息DataGridView->RowTemplate->Height = 23;
this->迁出信息DataGridView->SelectionMode = System::Windows::Forms::DataGridViewSelectionMode::FullRowSelect;
this->迁出信息DataGridView->Size = System::Drawing::Size(528, 303);
this->迁出信息DataGridView->TabIndex = 46;
//
// 业主编号DataGridViewTextBoxColumn
//
this->业主编号DataGridViewTextBoxColumn->DataPropertyName = L"业主编号";
this->业主编号DataGridViewTextBoxColumn->HeaderText = L"业主编号";
this->业主编号DataGridViewTextBoxColumn->Name = L"业主编号DataGridViewTextBoxColumn";
this->业主编号DataGridViewTextBoxColumn->ReadOnly = true;
//
// 业主姓名DataGridViewTextBoxColumn
//
this->业主姓名DataGridViewTextBoxColumn->DataPropertyName = L"业主姓名";
this->业主姓名DataGridViewTextBoxColumn->HeaderText = L"业主姓名";
this->业主姓名DataGridViewTextBoxColumn->Name = L"业主姓名DataGridViewTextBoxColumn";
this->业主姓名DataGridViewTextBoxColumn->ReadOnly = true;
//
// 楼栋名称ComboBox
//
this->楼栋名称ComboBox->DataSource = this->楼栋信息BindingSource;
this->楼栋名称ComboBox->DisplayMember = L"楼栋名称";
this->楼栋名称ComboBox->FormattingEnabled = true;
this->楼栋名称ComboBox->Location = System::Drawing::Point(71, 26);
this->楼栋名称ComboBox->Name = L"楼栋名称ComboBox";
this->楼栋名称ComboBox->Size = System::Drawing::Size(87, 20);
this->楼栋名称ComboBox->TabIndex = 45;
this->楼栋名称ComboBox->ValueMember = L"楼栋名称";
this->楼栋名称ComboBox->SelectedIndexChanged += gcnew System::EventHandler(this, &MoveForm::楼栋名称ComboBox_SelectedIndexChanged);
//
// 楼栋信息BindingSource
//
this->楼栋信息BindingSource->DataMember = L"楼栋信息";
this->楼栋信息BindingSource->DataSource = this->DBCommunityDataSet;
//
// 补充说明TextBox
//
this->补充说明TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->迁出信息BindingSource, L"补充说明", true)));
this->补充说明TextBox->Location = System::Drawing::Point(71, 77);
this->补充说明TextBox->Name = L"补充说明TextBox";
this->补充说明TextBox->Size = System::Drawing::Size(461, 21);
this->补充说明TextBox->TabIndex = 43;
this->补充说明TextBox->Text = L"暂无";
//
// 迁出原因TextBox
//
this->迁出原因TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->迁出信息BindingSource, L"迁出原因", true)));
this->迁出原因TextBox->Location = System::Drawing::Point(259, 51);
this->迁出原因TextBox->Name = L"迁出原因TextBox";
this->迁出原因TextBox->Size = System::Drawing::Size(273, 21);
this->迁出原因TextBox->TabIndex = 41;
this->迁出原因TextBox->Text = L"售房";
//
// 业主编号TextBox
//
this->业主编号TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->迁出信息BindingSource, L"业主编号", true)));
this->业主编号TextBox->Location = System::Drawing::Point(372, 25);
this->业主编号TextBox->Name = L"业主编号TextBox";
this->业主编号TextBox->ReadOnly = true;
this->业主编号TextBox->Size = System::Drawing::Size(160, 21);
this->业主编号TextBox->TabIndex = 35;
//
// 业主姓名ComboBox
//
this->业主姓名ComboBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->迁出信息BindingSource, L"业主姓名", true)));
this->业主姓名ComboBox->DataSource = this->业主信息BindingSource;
this->业主姓名ComboBox->DisplayMember = L"业主姓名";
this->业主姓名ComboBox->FormattingEnabled = true;
this->业主姓名ComboBox->Location = System::Drawing::Point(229, 26);
this->业主姓名ComboBox->Name = L"业主姓名ComboBox";
this->业主姓名ComboBox->Size = System::Drawing::Size(74, 20);
this->业主姓名ComboBox->TabIndex = 37;
this->业主姓名ComboBox->ValueMember = L"业主编号";
this->业主姓名ComboBox->SelectedIndexChanged += gcnew System::EventHandler(this, &MoveForm::业主姓名ComboBox_SelectedIndexChanged);
//
// 迁出日期DateTimePicker
//
this->迁出日期DateTimePicker->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Value", this->迁出信息BindingSource, L"迁出日期",
true)));
this->迁出日期DateTimePicker->Location = System::Drawing::Point(71, 51);
this->迁出日期DateTimePicker->Name = L"迁出日期DateTimePicker";
this->迁出日期DateTimePicker->Size = System::Drawing::Size(117, 21);
this->迁出日期DateTimePicker->TabIndex = 39;
//
// 楼栋信息TableAdapter
//
this->楼栋信息TableAdapter->ClearBeforeFill = true;
//
// 业主信息BindingSource
//
this->业主信息BindingSource->DataMember = L"业主信息";
this->业主信息BindingSource->DataSource = this->DBCommunityDataSet;
//
// 业主信息TableAdapter
//
this->业主信息TableAdapter->ClearBeforeFill = true;
//
// MoveForm
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 12);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(542, 416);
this->Controls->Add(this->楼栋名称Label);
this->Controls->Add(this->迁出信息DataGridView);
this->Controls->Add(this->楼栋名称ComboBox);
this->Controls->Add(业主编号Label);
this->Controls->Add(业主姓名Label);
this->Controls->Add(迁出日期Label);
this->Controls->Add(迁出原因Label);
this->Controls->Add(this->补充说明TextBox);
this->Controls->Add(补充说明Label);
this->Controls->Add(this->迁出原因TextBox);
this->Controls->Add(this->业主编号TextBox);
this->Controls->Add(this->业主姓名ComboBox);
this->Controls->Add(this->迁出日期DateTimePicker);
this->Controls->Add(this->迁出信息BindingNavigator);
this->Name = L"MoveForm";
this->ShowInTaskbar = false;
this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
this->Text = L"基本管理[业主迁出管理]";
this->Load += gcnew System::EventHandler(this, &MoveForm::MoveForm_Load);
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->DBCommunityDataSet))->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();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->楼栋信息BindingSource))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->业主信息BindingSource))->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->DBCommunityDataSet->迁出信息);
}
private: System::Void 查询ToolStripButton_Click(System::Object^ sender, System::EventArgs^ e)
{
try
{
this->迁出信息TableAdapter->Fill(this->DBCommunityDataSet->迁出信息, 业主编号ToolStripTextBox->Text);
}
catch (System::Exception^ ex)
{
System::Windows::Forms::MessageBox::Show(ex->Message);
}
}
private: System::Void MoveForm_Load(System::Object^ sender, System::EventArgs^ e)
{// TODO: 这行代码将数据加载到表“DBCommunityDataSet.楼栋信息”中
this->楼栋信息TableAdapter->Fill(this->DBCommunityDataSet->楼栋信息);
try
{
this->迁出信息TableAdapter->Fill(this->DBCommunityDataSet->迁出信息, 业主编号ToolStripTextBox->Text);
}
catch (System::Exception^ ex)
{
System::Windows::Forms::MessageBox::Show(ex->Message);
}
}
private: System::Void 楼栋名称ComboBox_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e)
{//获取指定楼栋的业主信息
this->业主信息TableAdapter->FillLiveBy(this->DBCommunityDataSet->业主信息,楼栋名称ComboBox->Text);
}
private: System::Void 业主姓名ComboBox_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e)
{
if (this->业主姓名ComboBox->SelectedValue->ToString() != "System.Data.DataRowView")
{
this->业主编号TextBox->Text = this->业主姓名ComboBox->SelectedValue->ToString();
}
}
};
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -