private void LoadDVT() { //DataTable dt = BDonViTinh.GetAll(); cbbDVT.DataSource = BDonViTinh.GetAll(); cbbDVT.DisplayMember = "DonViTinh"; cbbDVT.ValueMember = "MaDVT"; cbbDonViTinh1.DataSource = BDonViTinh.GetAll(); cbbDonViTinh1.DisplayMember = "DonViTinh"; cbbDonViTinh1.ValueMember = "MaDVT"; cbbDonViTinh2.DataSource = BDonViTinh.GetAll(); cbbDonViTinh2.DisplayMember = "DonViTinh"; cbbDonViTinh2.ValueMember = "MaDVT"; }
private void LoadData() { try { dtgvDonViTinh.AutoGenerateColumns = false; dtDataActived = BDonViTinh.GetAll(); dtgvDonViTinh.DataSource = dtDataActived; } catch (Exception ex) { MessageBox.Show("Lỗi:" + ex); } }