Ejemplo n.º 1
0
 public ActionResult Index(KpiListViewModel postedModel)
 {
     IEnumerable<CdmaRegionStat> stats
         = cdmaStatRepository.GetAllList().GetLastDateStats(
         regionRepository.GetAllList(), postedModel.StatDate);
     DateTime endDate = (stats.Any()) ?
         stats.First().StatDate : DateTime.Today.AddDays(-1);
     KpiListViewModel viewModel = new KpiListViewModel
     {
         CdmaStats = stats,
         EndDate = endDate,
         StatDate = endDate,
         StartDate = endDate.AddDays(-7),
         Cities = regionNamesService.Query().ToList()
     };
     return View(viewModel);
 }
Ejemplo n.º 2
0
 public ActionResult Precise4G(KpiListViewModel postedModel)
 {
     IEnumerable<TownPrecise4GView> stats
         = townPrecise4GRepository.GetAll().GetLastDateStats(
         townRepository.GetAllList(), postedModel.StatDate);
     DateTime endDate = (stats.Any()) ?
         stats.First().StatDate : DateTime.Today.AddDays(-1);
     Precise4GViewModel viewModel = new Precise4GViewModel
     {
         StatDate = endDate,
         PreciseStats = stats,
         Districts = districtNamesService.Query()
     };
     return View(viewModel);
 }