public ActionResult DeleteConfirmed(int id) { ForumCommentCategory forumCommentCategory = db.ForumCommentCategories.Find(id); db.ForumCommentCategories.Remove(forumCommentCategory); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "CategoryId,CategoryName,CountryId")] ForumCommentCategory forumCommentCategory) { if (ModelState.IsValid) { db.Entry(forumCommentCategory).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CountryId = new SelectList(db.Countries, "CountryId", "CountryName", forumCommentCategory.CountryId); return(View(forumCommentCategory)); }
// GET: Panel/ForumCommentCategories/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ForumCommentCategory forumCommentCategory = db.ForumCommentCategories.Find(id); if (forumCommentCategory == null) { return(HttpNotFound()); } return(View(forumCommentCategory)); }
// GET: Panel/ForumCommentCategories/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ForumCommentCategory forumCommentCategory = db.ForumCommentCategories.Find(id); if (forumCommentCategory == null) { return(HttpNotFound()); } ViewBag.CountryId = new SelectList(db.Countries, "CountryId", "CountryName", forumCommentCategory.CountryId); return(View(forumCommentCategory)); }