void loadngay() { this.lb_ngay.Text = DateTime.Now.ToShortDateString(); DAOCa ca = new DAOCa(); dataGridView1.DataSource = ca.getDanhSachNhanVienVaCa(); }
private void btn_check_Click_1(object sender, EventArgs e) { if (rdb_ngay.Checked == true) { DAOCa cc = new DAOCa(); DateTime a = DateTime.Parse(dt_ngay.Value.ToString()); dataGridView1.DataSource = cc.getDanhSachCaTheoNVVaTheoNgay(Globals.NV, a); } if (rdb_khoang.Checked == true) { DAOCa cc = new DAOCa(); DateTime a = DateTime.Parse(dt_dau.Value.ToString()); DateTime b = DateTime.Parse(dt_sau.Value.ToString()); dataGridView1.DataSource = cc.getDanhSachCaTheoNVVaTheoKhoang(Globals.NV, a, b); } }
private void frmchiacav2_Load(object sender, EventArgs e) { try { DAOCa ca = new DAOCa(); DataTable DanhSachCa = ca.getDanhSachCaDeChiaCa(); DanhSachCa.Columns.Add("Check", typeof(bool)); dataGridView3.DataSource = DanhSachCa; DAONhanVien nv = new DAONhanVien(); DataTable DanhSachNhanVien = nv.getNhanVienDeChiaCa(); DanhSachNhanVien.Columns.Add("Check", typeof(bool)); dataGridView1.DataSource = DanhSachNhanVien; DAOChiaca cc = new DAOChiaca(); dataGridView2.DataSource = cc.getDanhSachChiaCaFrmChiaCa(); } catch { } }
private void rdb_all_CheckedChanged(object sender, EventArgs e) { DAOCa ca = new DAOCa(); dataGridView1.DataSource = ca.getDanhSachCaTheoNV(Globals.NV); }
private void frmdscanhanvien_Load(object sender, EventArgs e) { DAOCa ca = new DAOCa(); dataGridView1.DataSource = ca.getDanhSachCaTheoNV(Globals.NV); }