public ActionResult DeleteConfirmed(int id) { ExamScheduleQuestion examScheduleQuestion = db.ExamScheduleQuestions.Find(id); db.ExamScheduleQuestions.Remove(examScheduleQuestion); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ExamScheduleQuestionsId,QuestionId,ExamScheduleId")] ExamScheduleQuestion examScheduleQuestion) { if (ModelState.IsValid) { db.Entry(examScheduleQuestion).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ExamScheduleId = new SelectList(db.ExamSchedules, "ExamScheduleId", "LastModifiedBy", examScheduleQuestion.ExamScheduleId); ViewBag.QuestionId = new SelectList(db.Questions, "QuestionId", "Question1", examScheduleQuestion.QuestionId); return(View(examScheduleQuestion)); }
// GET: ExamScheduleQuestions/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ExamScheduleQuestion examScheduleQuestion = db.ExamScheduleQuestions.Find(id); if (examScheduleQuestion == null) { return(HttpNotFound()); } return(View(examScheduleQuestion)); }
// GET: ExamScheduleQuestions/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ExamScheduleQuestion examScheduleQuestion = db.ExamScheduleQuestions.Find(id); if (examScheduleQuestion == null) { return(HttpNotFound()); } ViewBag.ExamScheduleId = new SelectList(db.ExamSchedules, "ExamScheduleId", "LastModifiedBy", examScheduleQuestion.ExamScheduleId); ViewBag.QuestionId = new SelectList(db.Questions, "QuestionId", "Question1", examScheduleQuestion.QuestionId); return(View(examScheduleQuestion)); }