Beispiel #1
0
        private ActionResult ChartMenuHelper(int index)
        {
            var numOfCharts = Enum.GetNames(typeof(ChartsMenuModel.ChartType)).Length;

            if (index == 0)
            {
                index = numOfCharts;
            }
            if (index == numOfCharts + 1)
            {
                index = 1;
            }

            return(index switch
            {
                1 => View("ChartsProgression", new ChartsProgressionModel(ActivityCache.Get(_dbcontext))),
                2 => View("ChartsMetrics", new ChartsMetricsModel(ActivityCache.Get(_dbcontext))),
                3 => View("ChartsWorkload", new ChartsWorkloadModel(ActivityCache.Get(_dbcontext))),
                4 => View("ChartsVolume", new ChartsVolumeModel(ActivityCache.Get(_dbcontext))),
                5 => View("ChartsComparison", new ChartsComparisonModel(ActivityCache.Get(_dbcontext))),
                6 => View("ChartsEddington", new ChartsEddingtonModel(ActivityCache.Get(_dbcontext))),
                _ => View("ChartsProgression", new ChartsProgressionModel(ActivityCache.Get(_dbcontext)))
            });
Beispiel #2
0
 public IActionResult EditDescription(long id)
 {
     return(View("EditRun", ActivityCache.Get(_dbcontext).Single(a => a.Id == id)));
 }
Beispiel #3
0
 public IActionResult Map()
 {
     return(View("Map", new MapModel(ActivityCache.Get(_dbcontext))));
 }
Beispiel #4
0
 public IActionResult Races()
 {
     return(View("Races", new RacesModel(ActivityCache.Get(_dbcontext).Where(a => a.IsRace).ToList())));
 }
Beispiel #5
0
 public IActionResult Stats()
 {
     return(View("Stats", new StatsModel(ActivityCache.Get(_dbcontext))));
 }
Beispiel #6
0
 public IActionResult Charts()
 {
     return(View("ChartsProgression", new ChartsProgressionModel(ActivityCache.Get(_dbcontext))));
 }
Beispiel #7
0
 public IActionResult Index()
 {
     return(View("Index", new IndexModel(ActivityCache.Get(_dbcontext))));
 }