コード例 #1
0
        public ActionResult Index(RoleIndexViewModel vm, int?PageIndex)
        {
            var Result = new BasicFramework.Biz.RoleService().GetRolesByCondition(new RoleRequestAndResponse()
            {
                Role = vm.Role, PageSize = UtilConstants.PAGESIZE, PageIndex = PageIndex ?? 0
            }).Result;

            vm.RoleCollection = Result.RoleCollection;
            vm.PageIndex      = Result.PageIndex;
            vm.PageSize       = Result.PageSize;
            vm.TotalCount     = Result.TotalCount;
            vm.PageCount      = Result.PageCount;
            return(View(vm));
        }
コード例 #2
0
        public ActionResult Index()
        {
            RoleIndexViewModel vm = new RoleIndexViewModel();

            vm.Role = new Role()
            {
                Name = string.Empty, Description = string.Empty, State = true
            };
            var Result = new BasicFramework.Biz.RoleService().GetRolesByCondition(new RoleRequestAndResponse()
            {
                Role = vm.Role, PageSize = UtilConstants.PAGESIZE, PageIndex = 0
            }).Result;

            vm.RoleCollection = Result.RoleCollection;
            vm.PageIndex      = Result.PageIndex;
            vm.PageSize       = Result.PageSize;
            vm.TotalCount     = Result.TotalCount;
            vm.PageCount      = Result.PageCount;
            return(View(vm));
        }