void display_NCC() { cbbNCC.DataSource = SQL_ThongTin.Display_NCC(); cbbNCC.DisplayMember = "TenNCC"; cbbNCC.ValueMember = "MaNCC"; ; }
private void UCSanPham_Load(object sender, EventArgs e) { BatDau(); // combobox cbbLoaiSP.DataSource = SQL_DanhMuc.Display_LoaiSanPham(); cbbLoaiSP.DisplayMember = "TenLoaiSP"; cbbLoaiSP.ValueMember = "MaLoaiSP"; cbbNCC.DataSource = SQL_ThongTin.Display_NCC(); cbbNCC.DisplayMember = "TenNCC"; cbbNCC.ValueMember = "MaNCC"; }
public bool checkma() { NhaCungCap = SQL_ThongTin.Display_NCC(); bool check = false; // không trùng for (int i = 0; i < NhaCungCap.Rows.Count; i++) { if (txtMaNCC.Text == NhaCungCap.Rows[i][0].ToString()) { check = true; // trùng mã break; } } return(check); }
void display_CBB() { cbbNhanVien.DataSource = SQL_ThongTin.Display_NhanVien(); cbbNhanVien.DisplayMember = "TenNV"; cbbNhanVien.ValueMember = "MaNV"; cbbNCC.DataSource = SQL_ThongTin.Display_NCC(); cbbNCC.DisplayMember = "TenNCC"; cbbNCC.ValueMember = "MaNCC"; DataTable temp = SQL_ThongTin.Display_SanPham_Find(cbbNCC.SelectedValue.ToString()); cbbSanPham.DataSource = temp; cbbSanPham.DisplayMember = "Tên Sản Phẩm"; cbbSanPham.ValueMember = "Mã Sản Phẩm"; }
void display() { gridControl1.DataSource = SQL_ThongTin.Display_NCC(); fixHeaderName(); }