public List <SinhVien> GetAll()
        {
            List <SinhVien> lstSV = new List <SinhVien>();

            try
            {
                lstSV = context.GetAll();
                return(lstSV);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                return(null);
            }
        }
Example #2
0
        public void LoadDanhSachSV()
        {
            gcDanhSach.DataSource = null;
            gcDanhSach.Controls.Clear();
            var dao = new SinhVienDAO();
            var lst = new List <SinhVien>();
            var ids = string.Join(",", cbbDanhSachLop.Properties.Items.GetCheckedValues());
            var ser = txtSearch.Text;

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

            gcDanhSach.DataSource = lst;
        }
Example #3
0
        private void LoadData()
        {
            SinhVienDAO dao = new SinhVienDAO();

            dgvSinhVien.DataSource = dao.GetAll();
        }
Example #4
0
 public DataTable DanhSach()
 {
     return(sinhVienDAO.GetAll());
 }