public async Task <IActionResult> Edit(int id, [Bind("idcarrera,Carrera,reticula,nivel_escolar,clave_oficial,nombre_carrera,nombre_reducido,carga_maxima,creditos_totales,nivel,modalidad")] Carrera carrera) { if (id != carrera.idcarrera) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(carrera); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!carreraExists(carrera.idcarrera)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(carrera)); }
public async Task <IActionResult> Edit(int id, [Bind("idorganigrama,area,descripcion,area_depende,nivel,tipo_area,titular")] Organigrama organigrama) { if (id != organigrama.idorganigrama) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(organigrama); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!OrganigramaExists(organigrama.idorganigrama)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(organigrama)); }