private void frmTimKiemAutocomlet_Load(object sender, EventArgs e) { radTheoMa.Checked = true; p = new clsPhongHoc(); m = new clsMayTinh(); lvwDSMay.LargeImageList = imgLon; lvwDSMay.SmallImageList = imgNho; TaoTieuDeCot(lvwDSMay); IEnumerable <tblPhonghoc> dsP = p.GetAllPhongHoc(); lstDSPhong.DisplayMember = "TenPhong"; //ten field hien ra lstDSPhong.ValueMember = "msPhong"; // ten field ma chon ten lay ma lstDSPhong.DataSource = dsP; // nguon du lieu txtDULieuTim.AutoCompleteMode = AutoCompleteMode.Suggest; txtDULieuTim.AutoCompleteSource = AutoCompleteSource.CustomSource; }
private void frmQLComputer_Load(object sender, EventArgs e) { btnLuu.Enabled = false; btnSua.Enabled = false; btnXoa.Enabled = false; lvwDSMay.LargeImageList = imgLon; lvwDSMay.SmallImageList = imgNho; TaoTieuDeCot(lvwDSMay); nGoc = new TreeNode("Danh Sach Phong"); p = new clsPhongHoc(); m = new clsMayTinh(); trePhong.ImageList = imgTree;//co 2 hinh IEnumerable <tblPhonghoc> ds = p.GetAllPhongHoc(); LoadPhongToTree(trePhong, ds); }
public frmPhongMay() { InitializeComponent(); p = new clsPhongHoc(); bsPH = new BindingSource(); }