public async Task <IActionResult> Edit(int id, [Bind("Id,FechaIngresoVehiculo,FechaEntregaVehiculo,DescripcionServicio")] ServicioMecanico servicioMecanico) { if (id != servicioMecanico.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(servicioMecanico); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ServicioMecanicoExists(servicioMecanico.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(servicioMecanico)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,NumeroPlaca,Descripcion,NumeroMotor,NumeroChasis")] Vehiculo vehiculo) { if (id != vehiculo.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(vehiculo); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!VehiculoExists(vehiculo.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(vehiculo)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Nombre")] TipoServicio tipoServicio) { if (id != tipoServicio.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(tipoServicio); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TipoServicioExists(tipoServicio.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(tipoServicio)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Nombres,Apellidos,Direccion,NIT,Email")] Clientes clientes) { if (id != clientes.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(clientes); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ClientesExists(clientes.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(clientes)); }