Beispiel #1
0
        public ActionResult Create()
        {
            var enumData = from CarColors c in Enum.GetValues(typeof(CarColors))
                           select new
            {
                Name = c.ToString()
            };

            ViewBag.CarColors = enumData;
            ViewBag.Category  = _categoryRep.GetAll();
            ViewBag.Gear      = _gearRep.GetAll();
            ViewBag.Fuel      = _fuelRep.GetAll();
            return(View());
        }
Beispiel #2
0
 public void PopulationDropDownList()
 {
     ViewBag.Category = _categoryRep.GetAll();
     ViewBag.Fuel     = _fuelRep.GetAll();
     ViewBag.Gear     = _gearRep.GetAll();
 }
Beispiel #3
0
 // GET: GearCRUD
 public ActionResult Index()
 {
     return(View(_gearRep.GetAll()));
 }