public ActionResult Index(IndexViewModel indexViewModel) { var pageIndex = indexViewModel.Page.HasValue ? (int)indexViewModel.Page : FirstPage; //missing filtering var results = _districtsManagement.GetDistricts(); indexViewModel.PagedItems = results.ToPagedList(pageIndex, PageSize); return(View(indexViewModel)); }
public ActionResult Create() { var editViewModel = GenerateBasicEditViewModel(); editViewModel.UsersToShowList = GenerateUsersToShowList(GetAvailableUsersList()); ViewBag.ProvincesList = _provincesManagement.GetProvinces(); ViewBag.CantonsList = _cantonsManagement.GetCantons((int)Constants.DefaultProvince); ViewBag.DistrictsList = _districtsManagement.GetDistricts((int)Constants.DefaultCanton); return(View("Edit", editViewModel)); }