Example #1
0
        public List <SelectListItem> GetAirlinesDropDown()
        {
            List <SelectListItem> ls = new List <SelectListItem>();
            var lm = airlines.Retreive();

            foreach (var airline in lm)
            {
                ls.Add(new SelectListItem()
                {
                    Text = airline.Name, Value = airline.AirlineId.ToString()
                });
            }
            return(ls);
        }
Example #2
0
        // GET: Airline
        public ActionResult Index()
        {
            var model = db.Retreive();

            return(View(model));
        }