public ActionResult Index(int startStation = 1001, int endStation = 1008)
        {
            var result = TrainService.GetTimetable(startStation, endStation);

            var stations = TrainService.GetStations();

            var stationDic = TrainService.GetStationDic();

            ViewBag.Stations = TrainService.GetStations();

            ViewBag.StartStation = startStation;

            ViewBag.EndStation = endStation;

            ViewBag.StartStationName = stationDic.GetValue(startStation);

            ViewBag.EndStationName = stationDic.GetValue(endStation);

            return(View(result));
        }
Exemplo n.º 2
0
 public IActionResult Timetable(string ss, string es)
 {
     return(View(trainService.GetTimetable(ss, es)));
 }