コード例 #1
0
        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));
        }
コード例 #2
0
        public ActionResult Listar()
        {
            NegVehiculo obj = new NegVehiculo();

            return(View(obj.Listar()));
        }
コード例 #3
0
        private List <VehiculoBO> getVehiculo()
        {
            NegVehiculo obj = new NegVehiculo();

            return(obj.Listar());
        }