Пример #1
0
 private void Form1_Load(object sender, EventArgs e)
 {
     dataGridPHONG.DataSource     = Phongcontrol.getdatap();
     dataGridView2.DataSource     = Khachhangcontrol.getdataK();
     dataGridView3.DataSource     = Dichvucontrol.getdatadv();
     datDOAN.DataSource           = Doancontrol.getdatadoan();
     dataNCP.DataSource           = NgCPcontrol.getdataNCP();
     dataNV.DataSource            = Nhanviencontrol.getdatanv();
     datap_thue.DataSource        = P_Thuecontrol.getdatap_thue();
     datachitietp_thue.DataSource = Chitietp_Thuecontrol.getdatactThue();
     dathoadon.DataSource         = Hoadoncontrol.getdatahd();
 }
Пример #2
0
 private void btnsuap_thue_Click(object sender, EventArgs e)
 {
     try
     {
         P_Thueobject ph = new P_Thueobject();
         ph.Maphieu = textBox9.Text;
         ph.Makh    = textBox11.Text;
         ph.Ngaylap = DateTime.Parse(dateTimePicker1.Text); DateTime.Parse(dateTimePicker1.Text);
         ph.Datcoc  = Int32.Parse(textBox12.Text);
         //ph.Thanhtien = Int32.Parse(textBox13.Text);
         P_Thuecontrol.updatep_thue(ph);
         datap_thue.DataSource = P_Thuecontrol.getdatap_thue();
     }
     catch { }
 }
Пример #3
0
 private void btnxoap_thue_Click(object sender, EventArgs e)
 {
     try
     {
         DialogResult dg = new DialogResult();
         dg = MessageBox.Show("Bạn có muốn xóa không", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (dg == DialogResult.Yes)
         {
             P_Thueobject ph = new P_Thueobject();
             ph.Maphieu = textBox9.Text;
             ph.Ngaylap = DateTime.Now;
             P_Thuecontrol.deletep_thue(ph);
             datap_thue.DataSource = P_Thuecontrol.getdatap_thue();
         }
     }
     catch { }
 }
Пример #4
0
 private void btndsp_thue_Click(object sender, EventArgs e)
 {
     datap_thue.DataSource = P_Thuecontrol.getdatap_thue();
 }