private ActionResult SearchState(int? key, SearchStateCriteriaModel model) { var data = Mapper.Map<SearchStateCriteria>(model); var pageIndex = (key ?? 1); var searchResult = _searchService.SearchStates(data, pageIndex, PageSize); if (searchResult.Total > -1) { var profiles = searchResult.Profiles; var profilesModel = Mapper.Map<IList<ProfileModel>>(profiles); var profilesAsIPagedList = new StaticPagedList<ProfileModel>(profilesModel, pageIndex, PageSize, searchResult.Total); var searchResultModel = new SearchStateResultModel { FacetValues = searchResult.FacetValues, SearchCriteria = Mapper.Map<SearchStateCriteriaModel>(searchResult.SearchCriteria), Total = searchResult.Total, Profiles = profilesAsIPagedList }; ViewBag.KatushaSearchResult = searchResultModel; return View("Search", searchResultModel); } return View("Search", new SearchStateResultModel { SearchCriteria = model }); }
private ActionResult SearchState(int?key, SearchStateCriteriaModel model) { var data = Mapper.Map <SearchStateCriteria>(model); var pageIndex = (key ?? 1); var searchResult = _searchService.SearchStates(data, pageIndex, PageSize); if (searchResult.Total > -1) { var profiles = searchResult.Profiles; var profilesModel = Mapper.Map <IList <ProfileModel> >(profiles); var profilesAsIPagedList = new StaticPagedList <ProfileModel>(profilesModel, pageIndex, PageSize, searchResult.Total); var searchResultModel = new SearchStateResultModel { FacetValues = searchResult.FacetValues, SearchCriteria = Mapper.Map <SearchStateCriteriaModel>(searchResult.SearchCriteria), Total = searchResult.Total, Profiles = profilesAsIPagedList }; ViewBag.KatushaSearchResult = searchResultModel; return(View("Search", searchResultModel)); } return(View("Search", new SearchStateResultModel { SearchCriteria = model })); }
public ActionResult GirlsOnline(int?key, SearchStateCriteriaModel model) { model.Gender = Sex.Female; return(SearchState(key, model)); }
public ActionResult GirlsOnline(int? key, SearchStateCriteriaModel model) { model.Gender = Sex.Female; return SearchState(key, model); }