public ActionResult DeleteConfirmed(int id) { ClassesTaken classesTaken = db.ClassesTakens.Find(id); db.ClassesTakens.Remove(classesTaken); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ClassesTakenID,StudentID,CID,GPA")] ClassesTaken classesTaken) { if (ModelState.IsValid) { db.Entry(classesTaken).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CID = new SelectList(db.CurrentClassOfferings, "CurrentClassOfferingID", "timeOffered", classesTaken.CID); ViewBag.StudentID = new SelectList(db.Students, "StudentID", "firstName", classesTaken.StudentID); return(View(classesTaken)); }
// GET: ClassesTakens/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ClassesTaken classesTaken = db.ClassesTakens.Find(id); if (classesTaken == null) { return(HttpNotFound()); } return(View(classesTaken)); }
// GET: ClassesTakens/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ClassesTaken classesTaken = db.ClassesTakens.Find(id); if (classesTaken == null) { return(HttpNotFound()); } ViewBag.CID = new SelectList(db.CurrentClassOfferings, "CurrentClassOfferingID", "timeOffered", classesTaken.CID); ViewBag.StudentID = new SelectList(db.Students, "StudentID", "firstName", classesTaken.StudentID); return(View(classesTaken)); }