public ActionResult RegionDef(ENodebQueryViewModel viewModel, EvaluationInfrastructure infrastructure) { eNodebList = eNodebRepository.GetAllWithNames(townRepository, viewModel, viewModel.ENodebName, viewModel.Address); EvaluationViewModel model = new EvaluationViewModel { ENodebs = eNodebList.Take(PageSize).ToList(), PagingInfo = new PagingInfo { CurrentPage = 1, ItemsPerPage = PageSize, TotalItems = eNodebList.Count() }, TrafficLoad = EvaluationSettings.TrafficLoad * 100, CellCoverage = (int)EvaluationSettings.DegreeSpan.GetDistanceInMeter(), DistanceInMeter = EvaluationSettings.DistanceInMeter }; model.InitializeTownList(townRepository); ViewBag.RegionList = infrastructure.Region; return View(model); }
public ActionResult RegionDef(int page = 1) { EvaluationViewModel viewModel = new EvaluationViewModel { ENodebs = eNodebList.Skip((page - 1) * PageSize).Take(PageSize).ToList(), PagingInfo = new PagingInfo { CurrentPage = page, ItemsPerPage = PageSize, TotalItems = eNodebList.Count() }, TrafficLoad = EvaluationSettings.TrafficLoad * 100, CellCoverage = (int)EvaluationSettings.DegreeSpan.GetDistanceInMeter(), DistanceInMeter = EvaluationSettings.DistanceInMeter }; viewModel.InitializeTownList(townRepository); return View(viewModel); }