Ejemplo n.º 1
0
        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 });
        }
Ejemplo n.º 2
0
        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");
        }
Ejemplo n.º 3
0
        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");
        }