Esempio n. 1
0
        public List <SelectListItem> GetAirportsDropDown()
        {
            List <SelectListItem> ls = new List <SelectListItem>();
            var lm = airports.Retreive();

            foreach (var airport in lm)
            {
                ls.Add(new SelectListItem()
                {
                    Text = airport.Name, Value = airport.AirportId.ToString()
                });
            }
            return(ls);
        }
Esempio n. 2
0
        // GET: Airport
        public ActionResult Index()
        {
            var model = db.Retreive();

            return(View(model));
        }