示例#1
0
        public IActionResult List(PagedListResultViewModel <MatterViewModel> parameters, string search)
        {
            Services.Matters.DTOs.MatterFilter filter = null;
            if (!string.IsNullOrWhiteSpace(search))
            {
                filter = Newtonsoft.Json.JsonConvert.DeserializeObject <Services.Matters.DTOs.MatterFilter>(search);
            }

            var pagination = new PaginationOptions();

            if (parameters.Page > 0)
            {
                pagination.Page     = parameters.Page;
                pagination.PageSize = 10;
            }
            else
            {
                pagination.Page     = 1;
                pagination.PageSize = 10;
            }

            var resultList = _matterService.GetPagedList(pagination.Page, pagination.PageSize, null, filter).ToViewModel();
            var list       = new SelectList(resultList.Entities, "Id", "Name");

            return(Json(list));
        }
示例#2
0
        public IActionResult List(PagedListResultViewModel <CourseListViewModel> parameters, string search)
        {
            Services.Courses.DTOs.CourseFilter filter = null;
            if (!string.IsNullOrWhiteSpace(search))
            {
                filter = Newtonsoft.Json.JsonConvert.DeserializeObject <Services.Courses.DTOs.CourseFilter>(search);
            }
            var resultList = _courseService.GetListDTOPaged(1, 50, null, filter);
            var list       = new SelectList(resultList.Entities, "Id", "CommissionNumber");

            return(Json(list));
        }
示例#3
0
        public IActionResult Index(PagedListResultViewModel <CareerViewModel> parameters)
        {
            var pagination = new PaginationOptions();

            if (parameters.Page > 0)
            {
                pagination.Page     = parameters.Page;
                pagination.PageSize = 10;
            }
            else
            {
                pagination.Page     = 1;
                pagination.PageSize = 10;
            }

            var resultList = _careerService.GetPagedList(pagination.Page, pagination.PageSize, null).ToViewModel();

            return(View(resultList));
        }
示例#4
0
        public IActionResult Index(PagedListResultViewModel <UserListViewModel> parameters, string search)
        {
            Services.Users.DTOs.UserFilter filter = null;
            if (!string.IsNullOrWhiteSpace(search))
            {
                filter = Newtonsoft.Json.JsonConvert.DeserializeObject <Services.Users.DTOs.UserFilter>(search);
            }
            var pagination = new PaginationOptions();

            if (parameters.Page > 0)
            {
                pagination.Page     = parameters.Page;
                pagination.PageSize = 10;
            }
            else
            {
                pagination.Page     = 1;
                pagination.PageSize = 10;
            }

            var result = _userService.GetListDTOPaged(pagination.Page, pagination.PageSize, null, filter).ToViewModel();

            return(View(result));
        }