//[DisplayName("مدیریت محتوا ")] //[GroupingDashboard(GroupingDashboardSSOT.Banks)] public async Task <IActionResult> Index(ContentEntitySearchViewModel search, MainPageContentTypeSSOT?MainPageContentType, ShowlocationTypeSSOT Showlocation) { var conditions = new ConditionHelper <ContentEntityDTO>(); search.MainPageContentType = MainPageContentType; search.Showlocation = Showlocation; conditions.AddCondition(p => p.Showlocation.Equals(search.Showlocation)); if (MainPageContentType != null) { conditions.AddCondition(p => p.MainPageContentType.Equals(MainPageContentType)); } if (search.Title != null) { conditions.AddCondition(p => p.Title.Contains(search.Title)); } var data = await _ContentManagementRepository.GetAll(conditions.GetConditionList()); var TotalCount = data.Count(); var model = new SearchCriteriaPageModel <List <ContentEntityDTO>, ContentEntitySearchViewModel, int>(data, search, TotalCount); return(View(model)); }
public async Task <IActionResult> Index(UserSearchViewModel vm) { //vm.ItemsPerPage = 20; //var model = await _userManager.GetPagedUsersListAsync(vm, // showAllUsers: true, // personFilter: personFilter, // genderFilter: genderFilter, // statusFilter: statusFilter, // companyFilter: companyFilter, // term); //model.CurrentPage = vm.CurrentPage; //model.ItemsPerPage = vm.ItemsPerPage; //model.ShowFirstLast = true; //if (HttpContext.Request.IsAjaxRequest()) //{ // return PartialView("_UsersList", model); //} //ViewBag.CurrentPage = vm.CurrentPage; //return View(model); var users = _userService.GetUsers(vm); var TotalCount = await _userService.TotalCount(); var model = new SearchCriteriaPageModel <IPaginated <User>, UserSearchViewModel, int>(users, vm, TotalCount); return(View(model)); }
public IActionResult Index(BankUniversityTypeSearchViewModel search) { var data = _bankUniversityTypeRepository.GetAll(search); var model = new SearchCriteriaPageModel <List <BankUniversityType>, BankUniversityTypeSearchViewModel>(data, search); return(View(model)); }
public async Task <IActionResult> Index(BankUniversityNameSearchViewModel search, int id) { var conditions = new ConditionHelper <TestSummeryDTO>(); if (search.Term != null) { conditions.AddCondition(p => p.Title.Contains(search.Term)); } var data = await _bankUniversityNameRepository.GetAll <TestSummeryDTO>(conditions.GetConditionList()); var model = new SearchCriteriaPageModel <List <TestSummeryDTO>, BankUniversityNameSearchViewModel>(data, search); ViewBag.Id = id; return(View(model)); }
public async Task <IActionResult> Index(MenuEntitySearchViewModel search) { var conditions = new ConditionHelper <MenuEntityDTO>(); conditions.AddCondition(p => p.Row == search.RowType); conditions.AddCondition(p => p.ParentId == search.ParentId); if (search.Title != null) { conditions.AddCondition(p => p.Title.Contains(search.Title)); } var data = await _MenuRepository.GetAll(conditions.GetConditionList()); var TotalCount = await _MenuRepository.TotalCount(); var model = new SearchCriteriaPageModel <List <MenuEntityDTO>, MenuEntitySearchViewModel, int>(data, search, TotalCount); return(View(model)); }