public ActionResult DeleteConfirmed(int id) { CurrentClassOffering currentClassOffering = db.CurrentClassOfferings.Find(id); db.CurrentClassOfferings.Remove(currentClassOffering); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "CurrentClassOfferingID,CID,Quarter,Year,timeOffered")] CurrentClassOffering currentClassOffering) { if (ModelState.IsValid) { db.Entry(currentClassOffering).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CID = new SelectList(db.ClassOfferings, "ClassOfferingID", "CourseCode", currentClassOffering.CID); return(View(currentClassOffering)); }
// GET: CurrentClassOfferings/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CurrentClassOffering currentClassOffering = db.CurrentClassOfferings.Find(id); if (currentClassOffering == null) { return(HttpNotFound()); } return(View(currentClassOffering)); }
// GET: CurrentClassOfferings/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CurrentClassOffering currentClassOffering = db.CurrentClassOfferings.Find(id); if (currentClassOffering == null) { return(HttpNotFound()); } ViewBag.CID = new SelectList(db.ClassOfferings, "ClassOfferingID", "CourseCode", currentClassOffering.CID); return(View(currentClassOffering)); }