コード例 #1
0
        private void SetupForEditMessage()
        {
            string msg = String.Empty;

            //fetch original message from db
            switch (_type)
            {
            case "reply":
                ReplyInfo reply = Replies.GetReply(_recId);
                SubjectDiv.Visible = false;
                ForumDiv.Visible   = false;
                msg = HttpUtility.HtmlDecode(reply.Message);
                break;

            case "topics":
                ForumDiv.Visible = (IsAdministrator || (_inModeratedList && !Config.RestrictModeratorMove));

                ForumDropDown.SelectedValue = _thisTopic.ForumId.ToString();
                SubjectDiv.Visible          = true;
                tbxSubject.Text             = HttpUtility.HtmlDecode(_thisTopic.Subject);
                string poll = "";
                if (_thisTopic.PollId != null)
                {
                    poll = Polls.GetTopicPollString(_thisTopic.PollId);
                }
                msg = poll + HttpUtility.HtmlDecode(_thisTopic.Message);
                break;
            }

            Message.Text = msg;
        }