public ActionResult DeleteConfirmed(int id) { QuestionAnswerMapper questionanswermapper = db.QuestionAnswerMappers.Find(id); db.QuestionAnswerMappers.Remove(questionanswermapper); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /QuestionAnswerMapper/Details/5 public ActionResult Details(int id = 0) { QuestionAnswerMapper questionanswermapper = db.QuestionAnswerMappers.Find(id); if (questionanswermapper == null) { return(HttpNotFound()); } return(View(questionanswermapper)); }
public ActionResult Edit(QuestionAnswerMapper questionanswermapper) { if (ModelState.IsValid) { db.Entry(questionanswermapper).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.QuestionId = new SelectList(db.Questions, "Id", "QuestionText", questionanswermapper.QuestionId); ViewBag.SupplierId = new SelectList(db.Suppliers, "Id", "Name", questionanswermapper.SupplierId); return(View(questionanswermapper)); }
// // GET: /QuestionAnswerMapper/Edit/5 public ActionResult Edit(int id = 0) { QuestionAnswerMapper questionanswermapper = db.QuestionAnswerMappers.Find(id); if (questionanswermapper == null) { return(HttpNotFound()); } ViewBag.QuestionId = new SelectList(db.Questions, "Id", "QuestionText", questionanswermapper.QuestionId); ViewBag.SupplierId = new SelectList(db.Suppliers, "Id", "Name", questionanswermapper.SupplierId); return(View(questionanswermapper)); }