Exemple #1
0
        public async Task <ActionResult> SysRoleList(int pageIndex = 1, int pageSize = 20)
        {
            //总页码、当前页码、可显示总页码
            var sysRoleSvc = new SysRoleService();
            //当前第n页数据
            var sysRole = await sysRoleSvc.GetAllSysRole(pageIndex, pageSize, false);

            //总个数
            var dataCount = await sysRoleSvc.GetDataCount();

            //绑定分页
            var list = new PagedList <SysRoleDto>(sysRole, pageIndex, pageSize, dataCount);

            return(View(list));
        }