Пример #1
0
        private void DisplayResultMessage(FeedbackItem feedbackItem)
        {
            RemoveCommentControls();
            Message = new Label();

            if (feedbackItem.Approved)
            {
                Message.Text     = Resources.PostComment_ThanksForComment;
                Message.CssClass = "success";
                Controls.Add(Message); //This needs to be here for ajax calls.
                Cacher.ClearCommentCache(feedbackItem.EntryId, SubtextContext);
                OnCommentApproved(feedbackItem);
                return;
            }
            if (feedbackItem.NeedsModeratorApproval)
            {
                Message.Text     = Resources.PostComment_ThanksForComment + " It will be displayed soon.";
                Message.CssClass = "error moderation";
            }
            else
            {
                Message.Text     = "Sorry, but your comment was flagged as spam and will be moderated.";
                Message.CssClass = "error";
            }
            Controls.Add(Message);
        }