// // GET: /Forum/Delete/5 public ActionResult Delete(int id) { IForumRepository tmpRep = new SQLForumRepository(); var result = tmpRep.GetForumByID(id); return View(result); }
public ActionResult Details(int id) { IForumRepository tmpRep = new SQLForumRepository(); var result = tmpRep.GetForumByID(id); ViewBag.Message = "Forum detail"; return View(result); }
public ActionResult Create(Forum forum) { try { // TODO: Add insert logic here IForumRepository tmpRep = new SQLForumRepository(); tmpRep.AddForum(forum); return RedirectToAction("Index"); } catch { return View(); } }
public ActionResult Delete(int id, FormCollection collection) { try { // TODO: Add delete logic here IForumRepository tmpRep = new SQLForumRepository(); var forum = tmpRep.GetForumByID(id); tmpRep.DeleteForum(forum); return RedirectToAction("Index"); } catch { return View(); } }
// // GET: /Forum/ public ActionResult Index() { IForumRepository tmpRep = new SQLForumRepository(); var result = tmpRep.GetAllForums(); ViewBag.Message = "QA Forums list"; return View(result); }
public ActionResult Edit(int id, Forum forum) { try { // TODO: Add update logic here IForumRepository tmpRep = new SQLForumRepository(); tmpRep.UpdateForum(forum); return RedirectToAction("Index"); } catch { return View(); } }
// // GET: /Thread/Edit/5 public ActionResult Edit(int id) { IForumRepository tmpRep = new SQLForumRepository(); var result = tmpRep.GetThreadByID(id); return View(result); }