Example #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 });
        }
Example #2
0
        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);
        }
Example #3
0
        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);
            }
        }
Example #4
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");
        }
Example #5
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");
        }