Exemplo n.º 1
0
        public ActionResult listRole(int page = 1, int pageSize = 2)
        {
            int totalCount = 0;
            PagedList <AdminRole> InfoPager = adminRolebll.FindPageList(page, pageSize, out totalCount, "Id", true).AsQueryable().ToPagedList(page, pageSize);

            InfoPager.TotalItemCount   = totalCount;
            InfoPager.CurrentPageIndex = page;
            //数据组装到viewModel
            AdminRoleListViewMode index = new AdminRoleListViewMode();

            index.Infos = InfoPager;
            return(View("listRole", index));
        }