⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ownerrepairform.h

📁 小区物业管理系统
💻 H
📖 第 1 页 / 共 4 页
字号:
			// 楼栋信息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(65, 25);
			this->维修编号TextBox->Name = L"维修编号TextBox";
			this->维修编号TextBox->Size = System::Drawing::Size(121, 21);
			this->维修编号TextBox->TabIndex = 37;
			// 
			// 接待人员TextBox
			// 
			this->接待人员TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->业主维修BindingSource, L"接待人员", true)));
			this->接待人员TextBox->Location = System::Drawing::Point(447, 49);
			this->接待人员TextBox->Name = L"接待人员TextBox";
			this->接待人员TextBox->Size = System::Drawing::Size(88, 21);
			this->接待人员TextBox->TabIndex = 47;
			// 
			// 故障现象TextBox
			// 
			this->故障现象TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->业主维修BindingSource, L"故障现象", true)));
			this->故障现象TextBox->Location = System::Drawing::Point(65, 73);
			this->故障现象TextBox->Name = L"故障现象TextBox";
			this->故障现象TextBox->Size = System::Drawing::Size(470, 21);
			this->故障现象TextBox->TabIndex = 49;
			// 
			// 处理意见TextBox
			// 
			this->处理意见TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->业主维修BindingSource, L"处理意见", true)));
			this->处理意见TextBox->Location = System::Drawing::Point(65, 97);
			this->处理意见TextBox->Name = L"处理意见TextBox";
			this->处理意见TextBox->Size = System::Drawing::Size(470, 21);
			this->处理意见TextBox->TabIndex = 51;
			// 
			// 修理日期DateTimePicker
			// 
			this->修理日期DateTimePicker->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Value", this->业主维修BindingSource, L"修理日期", 
				true)));
			this->修理日期DateTimePicker->Location = System::Drawing::Point(65, 121);
			this->修理日期DateTimePicker->Name = L"修理日期DateTimePicker";
			this->修理日期DateTimePicker->Size = System::Drawing::Size(110, 21);
			this->修理日期DateTimePicker->TabIndex = 53;
			// 
			// 修理人员TextBox
			// 
			this->修理人员TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->业主维修BindingSource, L"修理人员", true)));
			this->修理人员TextBox->Location = System::Drawing::Point(243, 121);
			this->修理人员TextBox->Name = L"修理人员TextBox";
			this->修理人员TextBox->Size = System::Drawing::Size(53, 21);
			this->修理人员TextBox->TabIndex = 55;
			// 
			// 修理费用TextBox
			// 
			this->修理费用TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->业主维修BindingSource, L"修理费用", true)));
			this->修理费用TextBox->Location = System::Drawing::Point(362, 121);
			this->修理费用TextBox->Name = L"修理费用TextBox";
			this->修理费用TextBox->Size = System::Drawing::Size(56, 21);
			this->修理费用TextBox->TabIndex = 57;
			// 
			// 材料费用TextBox
			// 
			this->材料费用TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->业主维修BindingSource, L"材料费用", true)));
			this->材料费用TextBox->Location = System::Drawing::Point(484, 121);
			this->材料费用TextBox->Name = L"材料费用TextBox";
			this->材料费用TextBox->Size = System::Drawing::Size(51, 21);
			this->材料费用TextBox->TabIndex = 59;
			// 
			// 楼栋信息TableAdapter
			// 
			this->楼栋信息TableAdapter->ClearBeforeFill = true;
			// 
			// 业主信息TableAdapter
			// 
			this->业主信息TableAdapter->ClearBeforeFill = true;
			// 
			// 业主姓名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(447, 25);
			this->业主姓名ComboBox->Name = L"业主姓名ComboBox";
			this->业主姓名ComboBox->Size = System::Drawing::Size(88, 20);
			this->业主姓名ComboBox->TabIndex = 65;
			this->业主姓名ComboBox->ValueMember = L"业主编号";
			this->业主姓名ComboBox->SelectedIndexChanged += gcnew System::EventHandler(this, &OwnerRepairForm::业主姓名ComboBox_SelectedIndexChanged);
			// 
			// OwnerRepairForm
			// 
			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->业主姓名ComboBox);
			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(故障现象Label);
			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(补充说明Label);
			this->Controls->Add(this->补充说明TextBox);
			this->Controls->Add(this->修理结果TextBox);
			this->Controls->Add(this->业主编号TextBox);
			this->Controls->Add(this->报修日期DateTimePicker);
			this->Controls->Add(this->楼栋名称ComboBox);
			this->Controls->Add(this->维修编号TextBox);
			this->Controls->Add(this->接待人员TextBox);
			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->业主维修BindingNavigator);
			this->Name = L"OwnerRepairForm";
			this->ShowInTaskbar = false;
			this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
			this->Text = L"物业管理[业主维修管理]";
			this->Load += gcnew System::EventHandler(this, &OwnerRepairForm::OwnerRepairForm_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
	public: String^ MyCommunity;
	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 OwnerRepairForm_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();
      }
	}
	private: System::Void 打印ToolStripButton_Click(System::Object^  sender, System::EventArgs^  e) 
	{//打印业主维修处理单
      this->printPreviewDialog1->Document = this->printDocument1;
      this->printPreviewDialog1->ShowDialog();     
	}
	private: System::Void printDocument1_PrintPage(System::Object^  sender, System::Drawing::Printing::PrintPageEventArgs^  e) 
	{
 	  e->Graphics->DrawString(this->MyCommunity + "业主维修处理单", gcnew System::Drawing::Font("宋体", 20), Brushes::Black, 200, 90);
      e->Graphics->DrawString("维修编号:" + this->业主维修DataGridView->CurrentRow->Cells[0]->Value->ToString(), gcnew System::Drawing::Font("宋体", 10), Brushes::Black, 100, 145);
	  e->Graphics->DrawString("打印日期:" + DateTime::Now.ToLongDateString(), gcnew System::Drawing::Font("宋体", 10), Brushes::Black, 550, 145);
      e->Graphics->DrawLine(gcnew Pen(Color::Black, (float)3.00), 100, 165, 720, 165);
      e->Graphics->DrawString("楼栋名称:" + this->业主维修DataGridView->CurrentRow->Cells[1]->Value->ToString(), gcnew System::Drawing::Font("宋体", 10), Brushes::Black, 100, 175);
      e->Graphics->DrawString("业主编号:" + this->业主维修DataGridView->CurrentRow->Cells[2]->Value->ToString(), gcnew System::Drawing::Font("宋体", 10), Brushes::Black, 320, 175);
      e->Graphics->DrawString("业主姓名:" + this->业主维修DataGridView->CurrentRow->Cells[3]->Value->ToString(), gcnew System::Drawing::Font("宋体", 10), Brushes::Black, 550, 175);
      e->Graphics->DrawLine(gcnew Pen(Color::Black), 100, 195, 720, 195);
      e->Graphics->DrawString("报修日期:" + DateTime::Parse(this->业主维修DataGridView->CurrentRow->Cells[4]->Value->ToString()).ToShortDateString(), gcnew System::Drawing::Font("宋体", 10), Brushes::Black, 100, 200);
      e->Graphics->DrawString("接待人员:" + this->业主维修DataGridView->CurrentRow->Cells[5]->Value->ToString(), gcnew System::Drawing::Font("宋体", 10), Brushes::Black, 400, 200);
      e->Graphics->DrawLine(gcnew Pen(Color::Black), 100, 220, 720, 220);
      e->Graphics->DrawString("故障现象:", gcnew System::Drawing::Font("宋体", 10), Brushes::Black, 100, 225);
      e->Graphics->DrawString(this->业主维修DataGridView->CurrentRow->Cells[6]->Value->ToString(), gcnew System::Drawing::Font("宋体", 10), Brushes::Black, RectangleF(110, 245, 620, 90));
      e->Graphics->DrawLine(gcnew Pen(Color::Black), 100, 335, 720, 335);
      e->Graphics->DrawString("处理意见:", gcnew System::Drawing::Font("宋体", 10), Brushes::Black, 100, 340);
      e->Graphics->DrawString(this->业主维修DataGridView->CurrentRow->Cells[7]->Value->ToString(), gcnew System::Drawing::Font("宋体", 10), Brushes::Black, RectangleF(110, 360, 620, 90));
      e->Graphics->DrawLine(gcnew Pen(Color::Black), 100, 450, 720, 450);
      e->Graphics->DrawString("修理日期:" + DateTime::Parse(this->业主维修DataGridView->CurrentRow->Cells[8]->Value->ToString()).ToShortDateString(), gcnew System::Drawing::Font("宋体", 10), Brushes::Black, 100, 455);
      e->Graphics->DrawString("修理人员:" + this->业主维修DataGridView->CurrentRow->Cells[9]->Value->ToString(), gcnew System::Drawing::Font("宋体", 10), Brushes::Black, 250, 455);
      e->Graphics->DrawString("修理费用:" + this->业主维修DataGridView->CurrentRow->Cells[10]->Value->ToString() + "元", gcnew System::Drawing::Font("宋体", 10), Brushes::Black, 370, 455);
      e->Graphics->DrawString("材料费用:" + this->业主维修DataGridView->CurrentRow->Cells[11]->Value->ToString() + "元", gcnew System::Drawing::Font("宋体", 10), Brushes::Black, 480, 455);
      double My费用合计 = Convert::ToDouble(this->业主维修DataGridView->CurrentRow->Cells[10]->Value->ToString()) + Convert::ToDouble(this->业主维修DataGridView->CurrentRow->Cells[11]->Value->ToString());
      e->Graphics->DrawString("费用合计:" + My费用合计.ToString() + "元", gcnew System::Drawing::Font("宋体", 10), Brushes::Black, 590, 455);
      e->Graphics->DrawLine(gcnew Pen(Color::Black), 100, 475, 720, 475);
      e->Graphics->DrawString("修理结果:", gcnew System::Drawing::Font("宋体", 10), Brushes::Black, 100, 480);
      e->Graphics->DrawString(this->业主维修DataGridView->CurrentRow->Cells[12]->Value->ToString(), gcnew System::Drawing::Font("宋体", 10), Brushes::Black, RectangleF(110, 500, 620, 240));
      e->Graphics->DrawLine(gcnew Pen(Color::Black), 100, 765, 720, 765);
      e->Graphics->DrawString("补充说明:", gcnew System::Drawing::Font("宋体", 10), Brushes::Black, 100, 770);
      e->Graphics->DrawString(this->业主维修DataGridView->CurrentRow->Cells[13]->Value->ToString(), gcnew System::Drawing::Font("宋体", 10), Brushes::Black, RectangleF(110, 790, 620, 205));
      e->Graphics->DrawLine(gcnew Pen(Color::Black, (float)3.00), 100, 1000, 720, 1000);       
	}
  };
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -