public async Task <IActionResult> Edit(int id, [Bind("Id,CodProc,NomProc,PreProc,Valor")] Procedimientos procedimientos) { if (id != procedimientos.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(procedimientos); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProcedimientosExists(procedimientos.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(procedimientos)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Cantidad,Concepto,Tipo,InsumoId")] MovInsumos movInsumos) { if (id != movInsumos.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(movInsumos); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MovInsumosExists(movInsumos.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["InsumoId"] = new SelectList(_context.Insumos, "Id", "CodIns", movInsumos.InsumoId); return(View(movInsumos)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,CiuRes,DirRes,ECivil,MailEmp,FecIng,FecNac,Genero,NIdEmp,PApe,PNom,Rh,SApe,SNom,TelEmp,ArlId,CargoId,EpsId,TiposIdId,Estado")] Empleados empleados) { if (id != empleados.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(empleados); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EmpleadosExists(empleados.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["ArlId"] = new SelectList(_context.Arl, "Id", "NomArl", empleados.ArlId); ViewData["CargoId"] = new SelectList(_context.Cargos, "Id", "NomCar", empleados.CargoId); ViewData["EpsId"] = new SelectList(_context.Eps, "Id", "NomEps", empleados.EpsId); ViewData["TiposIdId"] = new SelectList(_context.Tiposid, "Id", "NomTipo", empleados.TiposIdId); return(View(empleados)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Tipo,NomTipo")] Tiposid tiposid) { if (id != tiposid.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(tiposid); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TiposidExists(tiposid.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(tiposid)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Migration,Batch")] Migrations migrations) { if (id != migrations.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(migrations); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MigrationsExists(migrations.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(migrations)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Edad,MailAcom,NIdAcom,PApe,ParPac,PNom,SApe,SNom,TelAcom,TipoIdId,PacienteId")] Acompanantes acompanantes) { if (id != acompanantes.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(acompanantes); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AcompanantesExists(acompanantes.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["PacienteId"] = new SelectList(_context.Pacientes, "Id", "CiuRes", acompanantes.PacienteId); ViewData["TipoIdId"] = new SelectList(_context.Tiposid, "Id", "NomTipo", acompanantes.TipoIdId); return(View(acompanantes)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Descripcion,Fecha,AcompananteId,EmpleadoId,PacienteId,SedeId")] Citas citas) { if (id != citas.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(citas); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CitasExists(citas.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["AcompananteId"] = new SelectList(_context.Acompanantes, "Id", "MailAcom", citas.AcompananteId); ViewData["EmpleadoId"] = new SelectList(_context.Empleados, "Id", "Id", citas.EmpleadoId); ViewData["PacienteId"] = new SelectList(_context.Pacientes, "Id", "CiuRes", citas.PacienteId); ViewData["SedeId"] = new SelectList(_context.Sedes, "Id", "DirSede", citas.SedeId); return(View(citas)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,NomCate,TipoCate")] CategoriasInsumos categoriasInsumos) { if (id != categoriasInsumos.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(categoriasInsumos); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CategoriasInsumosExists(categoriasInsumos.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(categoriasInsumos)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,CosConv,DurConv,FecAper,NomConv,ObjConv,Resolu,EpsId,Estado")] Convenios convenios) { if (id != convenios.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(convenios); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ConveniosExists(convenios.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["EpsId"] = new SelectList(_context.Eps, "Id", "NomEps", convenios.EpsId); return(View(convenios)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,DirSede,NomSede,TelSede")] Sedes sedes) { if (id != sedes.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(sedes); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SedesExists(sedes.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(sedes)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,NomArl,TelArl")] Arl arl) { if (id != arl.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(arl); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ArlExists(arl.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(arl)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,CodIns,Concen,Labora,NomIns,PrecioU,Pres,Unid,CategoriaId")] Insumos insumos) { if (id != insumos.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(insumos); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!InsumosExists(insumos.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["CategoriaId"] = new SelectList(_context.CategoriasInsumos, "Id", "NomCate", insumos.CategoriaId); return(View(insumos)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Disponi,Entradas,Salidas,InsumoId")] StockInsumos stockInsumos) { if (id != stockInsumos.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(stockInsumos); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!StockInsumosExists(stockInsumos.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["InsumoId"] = new SelectList(_context.Insumos, "Id", "CodIns", stockInsumos.InsumoId); return(View(stockInsumos)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Concepto,FecGasto,ForPago,Valor,EmpleadoId")] Gastos gastos) { if (id != gastos.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(gastos); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!GastosExists(gastos.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["EmpleadoId"] = new SelectList(_context.Empleados, "Id", "Id", gastos.EmpleadoId); return(View(gastos)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,CiuRes,DirRes,ECivil,MailPac,FecNac,Genero,NIdPac,PApe,PNom,Regimen,Rh,SApe,SNom,TelPac,EpsId,TipoIdId")] Pacientes pacientes) { if (id != pacientes.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(pacientes); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PacientesExists(pacientes.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["EpsId"] = new SelectList(_context.Eps, "Id", "NomEps", pacientes.EpsId); ViewData["TipoIdId"] = new SelectList(_context.Tiposid, "Id", "NomTipo", pacientes.TipoIdId); return(View(pacientes)); }
public async Task <IActionResult> Edit(long id, [Bind("Id,Name,Email,Password,RememberToken,RolId,EmpleadoId")] Users users) { if (id != users.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(users); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UsersExists(users.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["EmpleadoId"] = new SelectList(_context.Empleados, "Id", "Id", users.EmpleadoId); ViewData["RolId"] = new SelectList(_context.Roles, "Id", "NomRol", users.RolId); return(View(users)); }