public IActionResult MainListPartial() { AdminMenuFilterInput filterInput = GetFilterInSession <AdminMenuFilterInput>(ConstantConfig.SessionName.AdminMenuSession); PagingResultDto <AdminMenuDto> pagingResult = adminMenuAdminService.GetAllByPaging(filterInput); ViewBag.AdminMenuCombobox = adminMenuAdminService.GetAdminMenusCombobox(); return(PartialView(pagingResult)); }
public PagingResultDto <AdminMenuDto> GetAllByPaging(AdminMenuFilterInput adminMenuFilterInput) { // neu khong truyen page size thi lay pagesize mac dinh trong bang appparameter SetDefaultPageSize(adminMenuFilterInput); IQueryable <AdminMenuDto> query = adminMenuRepository.GetAll() .Filter(adminMenuFilterInput) .OrderBy(x => x.OrderNo) .ProjectTo <AdminMenuDto>(mapper.ConfigurationProvider); return(query.PagedQuery(adminMenuFilterInput)); }
public IActionResult Index(int page = 0) { AdminMenuViewModel viewModel = new AdminMenuViewModel(); AdminMenuFilterInput filterInput = GetFilterInSession <AdminMenuFilterInput>(ConstantConfig.SessionName.AdminMenuSession); if (filterInput == null) { filterInput = new AdminMenuFilterInput { RecordStatus = ConstantConfig.RecordStatusConfig.Active }; } filterInput.PageNumber = page; viewModel.PagingResult = adminMenuAdminService.GetAllByPaging(filterInput); viewModel.AdminMenuFilterInput = filterInput; ViewBag.AdminMenuCombobox = adminMenuAdminService.GetAdminMenusCombobox(); InitAdminBaseViewModel(viewModel); return(View(viewModel)); }
public IActionResult FilterPartial(AdminMenuFilterInput filterInput) { SetFilterToSession(ConstantConfig.SessionName.AdminMenuSession, filterInput); return(RedirectToAction("Index", new { page = 1 })); }