Example #1
0
        public void LoadDanhSachGV()
        {
            var dao = new GiangVienDAO();
            var lst = dao.GetAll();

            cbbGVCN.Properties.DataSource    = lst;
            cbbGVCN.Properties.ValueMember   = "MaGV";
            cbbGVCN.Properties.DisplayMember = "TenGV";
        }
Example #2
0
        public List <GiangVien> GetAll()
        {
            GiangVienDAO context = new GiangVienDAO();

            try
            {
                List <GiangVien> lstLop = contextGV.GetAll();
                return(lstLop);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                return(null);
            }
        }
Example #3
0
        public void LoadDanhSachGiangVien()
        {
            gcDanhSach.DataSource = null;
            gcDanhSach.Controls.Clear();
            var dao = new GiangVienDAO();
            var lst = new List <GiangVien>();
            var ids = string.Join(",", cbbDanhSachKhoa.Properties.Items.GetCheckedValues());
            var ser = txtSearch.Text;

            if (string.IsNullOrEmpty(ids))
            {
                lst = dao.GetAll(ser);
            }
            else
            {
                lst = dao.GetAllByMaKhoa(ids, ser);
            }

            gcDanhSach.DataSource = lst;
        }
Example #4
0
        // Hàm load danh sách Giảng Viên
        private void LoadData()
        {
            GiangVienDAO dao = new GiangVienDAO();

            dgvGiangVien.DataSource = dao.GetAll();
        }