private void txttimctthue_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { datachitietp_thue.DataSource = Chitietp_Thuecontrol.timctp_thue(txttimctthue.Text); } }
private void datap_thue_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) { if (MaKH != "") { datachitietp_thue.DataSource = Chitietp_Thuecontrol.getdateloadbymakh(MaKH); } }
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 datengay_KeyDown(object sender, KeyEventArgs e) { //if (e.KeyCode == Keys.Enter) // datachitietp_thue.DataSource = Chitietp_Thuecontrol.timctp_thuengay(DateTime.Parse(datengay.Text.Trim())); if (e.KeyCode == Keys.Enter) { if (radngaythue.Checked == true) { datachitietp_thue.DataSource = Chitietp_Thuecontrol.timctp_thuebyngaythue(DateTime.Parse(datengay.Text.Trim())); } if (radngaytradk.Checked == true) { datachitietp_thue.DataSource = Chitietp_Thuecontrol.timctp_thuebyngaytradk(DateTime.Parse(datengay.Text.Trim())); } } }
private void btnsauctthue_Click(object sender, EventArgs e) { try { Chitietp_Thueobject ct = new Chitietp_Thueobject(); ct.Maphieu = textBox14.Text; ct.Map = textBox15.Text; ct.Ngaythue = DateTime.Parse(dateTimePicker2.Text); ct.Ngaytradk = DateTime.Parse(dateTimePicker3.Text); ct.Ghichu = textBox16.Text; Chitietp_Thuecontrol.updatectp_thue(ct); datachitietp_thue.DataSource = Chitietp_Thuecontrol.getdateloadbymakh(MaKH); //datachitietp_thue.DataSource = Chitietp_Thuecontrol.getdatactThue(); } catch { } }
private void btnxoactthue_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) { Chitietp_Thueobject ct = new Chitietp_Thueobject(); ct.Maphieu = textBox14.Text; //ct.Map = textBox15.Text; ct.Ngaythue = DateTime.Now; ct.Ngaytradk = DateTime.Now; Chitietp_Thuecontrol.deletectp_thue(ct); datachitietp_thue.DataSource = Chitietp_Thuecontrol.getdateloadbymakh(MaKH); //datachitietp_thue.DataSource = Chitietp_Thuecontrol.getdatactThue(); } } catch { } }
private void btndsctthue_Click(object sender, EventArgs e) { datachitietp_thue.DataSource = Chitietp_Thuecontrol.getdatactThue(); }