Пример #1
0
        public ActionResult Index()
        {
            var lineSer  = new LineService();
            var lineList = lineSer.getLines();

            return(View(lineList));
        }
Пример #2
0
        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();
        }