public async Task <ActionResult> DeleteConfirmed(string id) { tbPlanEstudio tbPlanEstudio = await db.tbPlanEstudio.FindAsync(id); db.tbPlanEstudio.Remove(tbPlanEstudio); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "sigla,nombre")] tbPlanEstudio tbPlanEstudio) { if (ModelState.IsValid) { db.Entry(tbPlanEstudio).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.sigla = new SelectList(db.tbCarrera, "sigla", "carrera", tbPlanEstudio.sigla); return(View(tbPlanEstudio)); }
// GET: tbPlanEstudios/Details/5 public async Task <ActionResult> Details(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tbPlanEstudio tbPlanEstudio = await db.tbPlanEstudio.FindAsync(id); if (tbPlanEstudio == null) { return(HttpNotFound()); } return(View(tbPlanEstudio)); }
// GET: tbPlanEstudios/Edit/5 public async Task <ActionResult> Edit(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tbPlanEstudio tbPlanEstudio = await db.tbPlanEstudio.FindAsync(id); if (tbPlanEstudio == null) { return(HttpNotFound()); } ViewBag.sigla = new SelectList(db.tbCarrera, "sigla", "carrera", tbPlanEstudio.sigla); return(View(tbPlanEstudio)); }