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 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"); }