private void txtMaLop_TextChanged(object sender, EventArgs e) { foreach (Lop l in bulLop.layTatLop()) { if (l.MaLop == txtMaLop.Text) { txtTenLop.Text = l.TenLop; txtNienKhoa.Text = l.NienKhoa; txtSiSo.Text = l.SiSo + ""; cbGiaoVien.SelectedValue = l.MaCBGV; break; } else { txtTenLop.Text = ""; txtNienKhoa.Text = ""; txtSiSo.Text = ""; } } }
void hienCBLop() { cbLop.DataSource = lopBUL.layTatLop(); cbLop.DisplayMember = "tenLop"; cbLop.ValueMember = "maLop"; }
void loadCBLop() { cbLop.DataSource = bulLop.layTatLop(); cbLop.DisplayMember = "tenLop"; cbLop.ValueMember = "maLop"; }