public ActionResult Edit([Bind(Include = "Student_email")] Student student) { if (ModelState.IsValid) { db.Entry(student).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(student)); }
public ActionResult Edit([Bind(Include = "Course_ID,Course_name,Credits,Requisites,Requisite")] Course course) { if (ModelState.IsValid) { db.Entry(course).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(course)); }
public ActionResult Edit([Bind(Include = "Term_ID,Course_ID,Student_email,Grade1")] Grade grade) { if (ModelState.IsValid) { db.Entry(grade).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Course_ID = new SelectList(db.Courses, "Course_ID", "Course_ID", grade.Course_ID); ViewBag.Student_email = new SelectList(db.Students, "Student_email", "Student_email", grade.Student_email); ViewBag.Term_ID = new SelectList(db.Terms, "Term_ID", "Term_ID", grade.Term_ID); return(View(grade)); }