public IActionResult OnGet(int Id)
        {
            Vehiculo = service.GetVehiculosPorId(Id);

            if (Vehiculo == null)
            {
                return(RedirectToPage("VehiculoNoEncontrado"));
            }
            else
            {
                return(Page());
            }
        }
예제 #2
0
        public void OnGet(int?Id)
        {
            Marcas          = helper.GetEnumSelectList <Marca>();
            LugarFab        = helper.GetEnumSelectList <LugarFab>();
            TipoTransmision = helper.GetEnumSelectList <TipoTransmision>();
            Color           = helper.GetEnumSelectList <Color>();

            if (Id.HasValue)
            {
                Vehiculo = service.GetVehiculosPorId(Id.Value);
            }
            else
            {
                Vehiculo = new Vehiculo();
            }
        }
예제 #3
0
 public void OnGet(int Id)
 {
     this.Vehiculo = service.GetVehiculosPorId(Id);
 }