public ActionResult DeleteConfirmed(int id) { CARRERA_RAMO cARRERA_RAMO = db.CARRERA_RAMO.Find(id); db.CARRERA_RAMO.Remove(cARRERA_RAMO); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID_RAMO,ID_CARRERA,ID_CARRERA_RAMO")] CARRERA_RAMO cARRERA_RAMO) { if (ModelState.IsValid) { db.Entry(cARRERA_RAMO).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ID_CARRERA = new SelectList(db.CARRERA, "ID_CARRERA", "NOMBRE_CARRERA", cARRERA_RAMO.ID_CARRERA); ViewBag.ID_RAMO = new SelectList(db.RAMO, "ID_RAMO", "NOMBRE_RAMO", cARRERA_RAMO.ID_RAMO); return(View(cARRERA_RAMO)); }
// GET: CARRERA_RAMO/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CARRERA_RAMO cARRERA_RAMO = db.CARRERA_RAMO.Find(id); if (cARRERA_RAMO == null) { return(HttpNotFound()); } return(View(cARRERA_RAMO)); }
// GET: CARRERA_RAMO/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CARRERA_RAMO cARRERA_RAMO = db.CARRERA_RAMO.Find(id); if (cARRERA_RAMO == null) { return(HttpNotFound()); } ViewBag.ID_CARRERA = new SelectList(db.CARRERA, "ID_CARRERA", "NOMBRE_CARRERA", cARRERA_RAMO.ID_CARRERA); ViewBag.ID_RAMO = new SelectList(db.RAMO, "ID_RAMO", "NOMBRE_RAMO", cARRERA_RAMO.ID_RAMO); return(View(cARRERA_RAMO)); }