Exemple #1
0
 public ActionResult Import(int page = 1)
 {
     MrInterferenceViewModel model = new MrInterferenceViewModel
     {
         StartDate = DateTime.Today.AddDays(-7),
         EndDate = DateTime.Today,
         MinMrs = 0
     };
     model.Initialize(_townRepository);
     model.UpdateStats(RutraceStatContainer.MrsStats, PageSize, page);
     return View(model);
 }
Exemple #2
0
 public ActionResult ImportResult(MrInterferenceViewModel model)
 {
     IEnumerable<ENodeb> eNodebs = _eNodebRepository.GetAllWithNames(_townRepository,
         model.CityName, model.DistrictName, model.TownName, model.ENodebName, model.Address);
     IEnumerable<ENodebBase> eNodebBases = eNodebs.ToList().Select(x =>
         new ENodebBase
         {
             ENodebId = x.ENodebId,
             Name = x.Name
         });
     if (eNodebs.Any())
     {
         MrsCellDate[] stats
             = _mrsRepository.QueryItems(eNodebs, model.StartDate, model.EndDate, model.MinMrs).ToArray();
         Array.Sort(stats, new MrsCellDateComparer());
         if (stats.Any())
         {
             RutraceStatContainer.MrsStats = stats.Select(x =>
             {
                 MrsCellDateView view = new MrsCellDateView();
                 x.CloneProperties(view);
                 ENodebBase eNodeb = eNodebBases.FirstOrDefault(e => e.ENodebId == x.CellId);
                 view.CellName = eNodeb == null ? "Unknown" : eNodeb.Name + "-" + x.SectorId;
                 return view;
             }).ToList();
             outdoorCellList = RutraceStatContainer.QueryOutdoorCellsFromMrs(
                 _eNodebRepository, _cellRepository);
         }
     }
     model.Initialize(_townRepository);
     model.UpdateStats(RutraceStatContainer.MrsStats, PageSize);
     return View("Import", model);
 }
 public ActionResult Import(int page = 1)
 {
     IEnumerable<ENodebBase> eNodebBases = _eNodebRepository.GetAllList().Select(x =>
         new ENodebBase
         {
             ENodebId = x.ENodebId,
             Name = x.Name
         });
     MrInterferenceViewModel model = new MrInterferenceViewModel
     {
         StartDate = DateTime.Today.AddDays(-7),
         EndDate = DateTime.Today
     };
     model.InitializeTownList(_townRepository, model);
     model.UpdateStats(RutraceStatContainer.MrsStats, eNodebBases, PageSize, page);
     return View(model);
 }