public List <SinhVien> GetAll() { List <SinhVien> lstSV = new List <SinhVien>(); try { lstSV = context.GetAll(); return(lstSV); } catch (Exception ex) { Console.WriteLine(ex); return(null); } }
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; }
private void LoadData() { SinhVienDAO dao = new SinhVienDAO(); dgvSinhVien.DataSource = dao.GetAll(); }
public DataTable DanhSach() { return(sinhVienDAO.GetAll()); }