public ActionResult Update(string Placa) { List <SelectListItem> lst = new List <SelectListItem>(); lst.Add(new SelectListItem() { Text = "Automóvil", Value = "Automóvil" }); lst.Add(new SelectListItem() { Text = "Camioneta", Value = "Camioneta" }); lst.Add(new SelectListItem() { Text = "Van", Value = "Van" }); lst.Add(new SelectListItem() { Text = "Cuatrimoto", Value = "Cuatrimoto" }); lst.Add(new SelectListItem() { Text = "Moto", Value = "Moto" }); ViewBag.Opciones = lst; NegVehiculo obj = new NegVehiculo(); VehiculoBO dto = obj.Listar().FirstOrDefault(a => a.PLACA == Placa); return(View("update", dto)); }
public ActionResult Listar() { NegVehiculo obj = new NegVehiculo(); return(View(obj.Listar())); }
private List <VehiculoBO> getVehiculo() { NegVehiculo obj = new NegVehiculo(); return(obj.Listar()); }