public async Task <IActionResult> Edit(string id, [Bind("ModoPagoID,ModoPagoNom")] ModoPago modoPago) { if (id != modoPago.ModoPagoID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(modoPago); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ModoPagoExists(modoPago.ModoPagoID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(modoPago)); }
public async Task <IActionResult> Edit(string id, [Bind("DUI,nombre,apellido,correo,telefono,salario,modPago,Area,rol")] Empleado empleado) { if (id != empleado.DUI) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(empleado); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EmpleadoExists(empleado.DUI)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(empleado)); }
public async Task <IActionResult> Edit(int id, [Bind("AreaID,AreaNombre,Descripcion")] Area area) { if (id != area.AreaID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(area); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AreaExists(area.AreaID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(area)); }
public async Task <IActionResult> Edit(string id, [Bind("DUI,nombre,apellido,correo,telefono")] Cliente cliente) { if (id != cliente.DUI) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(cliente); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ClienteExists(cliente.DUI)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(cliente)); }
public async Task <IActionResult> Edit(string id, [Bind("placa,marca,modelo,año,Estado,Procedimiento,comentario,cliente")] Automovil automovil) { if (id != automovil.placa) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(automovil); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AutomovilExists(automovil.placa)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(automovil)); }