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(); }
private void btnupdatedoan_Click(object sender, EventArgs e) { try { Doanobject dv = new Doanobject(); dv.Madoan = txtmadoan1.Text; dv.Tendoan = txttendoan.Text; dv.Ghichu = txtghichu.Text; Doancontrol.updatedoan(dv); datDOAN.DataSource = Doancontrol.getdatadoan(); } catch { } }
private void btndeletedoan_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) { Doanobject dv = new Doanobject(); dv.Madoan = txtmadoan1.Text; Doancontrol.deletedoan(dv); datDOAN.DataSource = Doancontrol.getdatadoan(); } } catch { } }
private void dsdoan_Click(object sender, EventArgs e) { datDOAN.DataSource = Doancontrol.getdatadoan(); }