private void dgvDanhSach_CellClick(object sender, DataGridViewCellEventArgs e) { tsbtnXoa.Enabled = true; dgvChiTiet.DataSource = PhieuNhapBUS.DanhSachCTPN(dgvDanhSach.CurrentRow.Cells[0].Value.ToString()); Custom2(); dgvChiTiet.ClearSelection(); }
void LoadData() { dgvDanhSach.DataSource = PhieuNhapBUS.DanhSachPN(); Custom1(); dgvDanhSach.ClearSelection(); if (dgvDanhSach.Rows.Count > 0) { dgvChiTiet.DataSource = PhieuNhapBUS.DanhSachCTPN(dgvDanhSach.CurrentRow.Cells[0].Value.ToString()); Custom2(); dgvChiTiet.ClearSelection(); } }