public ActionResult DeleteComment(int commentID) { MembershipUser mu = Membership.GetUser(); var model = new BootBaronLib.AppSpec.DasKlub.BOL.UserContent.ContentComment(commentID); Content content = new BootBaronLib.AppSpec.DasKlub.BOL.UserContent.Content(model.ContentID); if (mu == null || model.CreatedByUserID != Convert.ToInt32(mu.ProviderUserKey)) return new EmptyResult(); model.Delete(); return RedirectToAction("Detail", new { @key = content.ContentKey }); }
public ActionResult EditArticleComment(int? id) { var model = new BootBaronLib.AppSpec.DasKlub.BOL.UserContent.ContentComment(); if (id != null && id > 0) { model = new BootBaronLib.AppSpec.DasKlub.BOL.UserContent.ContentComment( Convert.ToInt32(id)); } return View(model); }
public ActionResult EditArticleComment( FormCollection fc, int? contentCommentID) { var model = new BootBaronLib.AppSpec.DasKlub.BOL.UserContent.ContentComment(); if (contentCommentID != null && contentCommentID > 0) { model = new BootBaronLib.AppSpec.DasKlub.BOL.UserContent.ContentComment( Convert.ToInt32(contentCommentID)); } TryUpdateModel(model); if (ModelState.IsValid) { model.Update(); return RedirectToAction("ArticleComments"); } else { return View(model); } }
public ActionResult DeleteComment(int? id) { var model = new BootBaronLib.AppSpec.DasKlub.BOL.UserContent.ContentComment(); if (id != null && id > 0) { model = new BootBaronLib.AppSpec.DasKlub.BOL.UserContent.ContentComment( Convert.ToInt32(id)); model.Delete(); } return RedirectToAction("ArticleComments"); }
public ActionResult BlockIP(int? id) { var model = new BootBaronLib.AppSpec.DasKlub.BOL.UserContent.ContentComment(); if (id != null && id > 0) { model = new BootBaronLib.AppSpec.DasKlub.BOL.UserContent.ContentComment( Convert.ToInt32(id)); model.Delete(); BlackIP bip = new BlackIP(); bip.IpAddress = model.IpAddress; bip.Create(); } return RedirectToAction("ArticleComments"); }