private void btnShowNCC_Click(object sender, EventArgs e) { try { info.dataGridView.ClearSelection(); info.dataGridView.DataSource = _pnService.DanhSachNhaCungCap(); info.setMaXacDinh("NHACUNGCAP"); info.ShowDialog(); } catch { } }
private void btnRefesh_Click(object sender, EventArgs e) { if (xacDinh.Equals("KHACHHANG")) { dataGridView.ClearSelection(); dataGridView.DataSource = _hdService.DanhSachKhachHang(); } else if (xacDinh.Equals("SANPHAM")) { dataGridView.ClearSelection(); dataGridView.DataSource = _hdService.DanhSachSanPham(); } else if (xacDinh.Equals("NHACUNGCAP")) { dataGridView.ClearSelection(); dataGridView.DataSource = _pnService.DanhSachNhaCungCap(); } else if (xacDinh.Equals("SANPHAM_")) { dataGridView.ClearSelection(); dataGridView.DataSource = _pnService.DanhSachSanPham(); } }