Пример #1
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;
        }