public IEnumerable <DanhSachNguoiDung> DanhSachCanThem(string searchString, int page, int pagesize)
        {
            var dao = new NguoiDungDao().ListAll();
            List <DanhSachNguoiDung> DScanthem = new List <DanhSachNguoiDung>();

            for (int i = 0; i < dao.Count; i++)
            {
                bool tim = Search(dao[i].MaNguoiDung);
                if (tim == true)
                {
                    DScanthem.Add(dao[i]);
                }
            }
            return(DScanthem.OrderBy(x => x.MaNguoiDung).ToPagedList(page, pagesize));
        }
        public IEnumerable <ChiTiet_QuyenHan> LayTatCaDS(int page, int pagesize)
        {
            //lay ds nguoi dung
            List <DanhSachNguoiDung> nguoidung = new NguoiDungDao().ListAll();
            //tao ds phan quyen rong
            List <ChiTiet_QuyenHan> quyenhan = new List <ChiTiet_QuyenHan>();

            //so sanh va tao ds
            for (int i = 0; i < nguoidung.Count; i++)
            {
                var tim = Tim(nguoidung[i].MaNguoiDung);
                if (tim.Count == 1)
                {
                    //them vao ds
                    ChiTiet_QuyenHan tam = tim[0];
                    quyenhan.Add(tim[0]);
                }
            }

            var model = quyenhan;

            return(model.OrderBy(x => x.MaNguoiDung).ToPagedList(page, pagesize));
        }