public ActionResult DeleteComment(int commentID) { var model = new ContentComment(commentID); var content = new Content(model.ContentID); var ua = new UserAccount(Convert.ToInt32(_mu.ProviderUserKey)); if (_mu == null || (model.CreatedByUserID != Convert.ToInt32(_mu.ProviderUserKey) && !ua.IsAdmin)) return new EmptyResult(); model.Delete(); return RedirectToAction("Detail", new {@key = content.ContentKey}); }
public ActionResult BlockIP(int? id) { if (id != null && id > 0) { var model = new ContentComment( Convert.ToInt32(id)); model.Delete(); var bip = new BlackIP {IpAddress = model.IpAddress}; bip.Create(); } return RedirectToAction("ArticleComments"); }
public ActionResult DeleteComment(int? id) { if (id != null && id > 0) { var model = new ContentComment( Convert.ToInt32(id)); model.Delete(); } return RedirectToAction("ArticleComments"); }