public ActionResult DeleteConfirmed(int id) { SemesterTable semesterTable = db.SemesterTables.Find(id); db.SemesterTables.Remove(semesterTable); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "SemesterID,SemesterTypeID,Name,Description")] SemesterTable semesterTable) { if (ModelState.IsValid) { db.Entry(semesterTable).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.SemesterTypeID = new SelectList(db.SemesterTypeTables, "SemesterTypeID", "Name", semesterTable.SemesterTypeID); return(View(semesterTable)); }
// GET: SemesterTables/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } SemesterTable semesterTable = db.SemesterTables.Find(id); if (semesterTable == null) { return(HttpNotFound()); } return(View(semesterTable)); }
// GET: SemesterTables/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } SemesterTable semesterTable = db.SemesterTables.Find(id); if (semesterTable == null) { return(HttpNotFound()); } ViewBag.SemesterTypeID = new SelectList(db.SemesterTypeTables, "SemesterTypeID", "Name", semesterTable.SemesterTypeID); return(View(semesterTable)); }