private void TheoMaGV_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { check = 5; this.pnNhapTT.Enabled = true; this.txtTaiKhoan.Enabled = false; this.txtMatKhau.Enabled = false; this.cbbLoaiTK.Enabled = false; this.txtMa.Enabled = true; this.txtMa.ResetText(); this.btnThucThi.Enabled = true; this.btnHuyBo.Enabled = true; this.btnThem.Enabled = false; this.btnSua.Enabled = false; this.btnXoa.Enabled = false; this.btnTim.Enabled = false; this.txtMa.AutoCompleteMode = AutoCompleteMode.Suggest; this.txtMa.AutoCompleteSource = AutoCompleteSource.CustomSource; var lstGV = gvBUS.getMaGV(); var lstSV = svBUS.getMSSV(); AutoCompleteStringCollection AutoComp = new AutoCompleteStringCollection(); foreach (var gv in lstGV) { AutoComp.Add(gv.MaGV); } foreach (var sv in lstSV) { AutoComp.Add(sv.MaSV); } this.txtMa.AutoCompleteCustomSource = AutoComp; this.txtMa.Focus(); }