Exemplo n.º 1
0
        // GET: VehicleController/Details/5
        //public ActionResult Details(int id)
        //{
        //    return View();
        //}
        #region get dropdown items
        private List <SelectListItem> GetVehicleBrand()
        {
            VehicleBrandFilter filter = new VehicleBrandFilter();

            filter.Name = "";
            return(VehicleBrandService.Get(filter).Select(b => new SelectListItem(b.Name, b.Id.ToString())).ToList());
        }
        private List <SelectListItem> GetVehicleBrands()
        {
            return(VehicleBrandService.Get(new VehicleBrandFilter()).Select(b => new SelectListItem(b.Name, b.Id.ToString())).ToList()); //linq

            //VehicleBrandFilter filter = new VehicleBrandFilter();
            //List<VehicleBrand> vehicleBrands = VehicleBrandService.Get(filter);
            //List<SelectListItem> vehicleBrandList = vehicleBrands.Select(b => new SelectListItem(b.Name, b.Id.ToString())).ToList(); //linq
            //ViewBag.VehicleBrands = vehicleBrandList;
        }
Exemplo n.º 3
0
 private List <SelectListItem> GetVehicleBrands()
 {
     return(VehicleBrandService.Get(new VehicleBrandFilter()).Select(b => new SelectListItem(b.Name, b.Id.ToString())).ToList());
 }