public ActionResult SubmitAnswer(Detail detail, int sort, int count) { db.Entry(detail).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); if (sort < count) { return(RedirectToAction("_Topic", new { aid = detail.AnswerID, sort = sort + 1 })); } else { return(RedirectToAction("_AllDetailStu", new { aid = detail.AnswerID })); } }
public ActionResult Edit(Student student) { db.Entry(student).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(Teacher teacher) { db.Entry(teacher).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); }