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