public ActionResult Index() { var lineSer = new LineService(); var lineList = lineSer.getLines(); return(View(lineList)); }
private void SetDropdownsInViewBags() { var operationalIntervalService = new OperationalIntervalService(); var stationService = new StationService(); var lineService = new LineService(); ViewBag.Stations = stationService.GetStations() .OrderBy(a => a.StationName) .ToList(); ViewBag.Ois = operationalIntervalService.GetOperationalIntervals() .OrderBy(a => a.Name) .Select(a => new SelectListItem { Text = a.Name, Value = a.Id.ToString() }) .ToList(); ViewBag.Lines = lineService.getLines() .OrderBy(a => a.LineName) .Select(a => new SelectListItem { Text = a.LineName, Value = a.Id.ToString() }) .ToList(); }