コード例 #1
0
        public ActionResult Edit(Int16?group, Int64?forum, Int32?discussion, Int32?message, string returnUrl)
        {
            // UNDONE: SECURITY CONSIDERATIONS
            ViewModels.DiscussionInfo di = new ViewModels.DiscussionInfo(
                ViewModels.DiscussionInfo.EditorTypes.Reply);

            di.MessageToEdit =
                di.CreateMessage(group, forum, discussion.Value, message.Value, false);

            di.MessageToReply =
                di.CreateMessage(group, forum, 0, 0, false);

            DomainModel.Repository.Sql.Discussions.LoadMessageAndParent(
                di.MessageToEdit, di.MessageToReply);

            if (di.MessageToEdit.Body != null)
            {
                di.MessageToEdit.Body = di.MessageToEdit.Body.Replace("<br />", "\r\n");
            }

            if (di.MessageToReply.Body != null)
            {
                di.MessageToReply.Body = di.MessageToReply.Body.Replace("<br />", "\r\n");
            }

            di.ReturnUrl = returnUrl;

            return(View("Edit", di));
        }
コード例 #2
0
        public ActionResult Report(Int16?group, Int64?forum, Int32?discussion, Int32?message, string returnUrl)
        {
            // UNDONE: SECURITY CONSIDERATIONS
            ViewModels.DiscussionInfo di = new ViewModels.DiscussionInfo(
                ViewModels.DiscussionInfo.EditorTypes.Report);

            di.MessageToReport = message.Value;
            di.ReturnUrl       = returnUrl;

            return(View("Confirm", di));
        }
コード例 #3
0
        public ActionResult Create(Int16?group, Int64?forum, string returnUrl)
        {
            // UNDONE: SECURITY CONSIDERATIONS
            ViewModels.DiscussionInfo di = new ViewModels.DiscussionInfo(
                ViewModels.DiscussionInfo.EditorTypes.Insert);

            di.ReturnUrl = returnUrl;

            di.MessageToEdit =
                di.CreateMessage(group, forum, 0, 0, false);

            return(View("Edit", di));
        }
コード例 #4
0
        public ActionResult Reply(Int16?group, Int64?forum, Int32?discussion, Int32?message, string returnUrl)
        {
            // UNDONE: SECURITY CONSIDERATIONS
            ViewModels.DiscussionInfo di = new ViewModels.DiscussionInfo(
                ViewModels.DiscussionInfo.EditorTypes.Reply);

            di.MessageToReply =
                di.CreateMessage(group, forum, discussion.Value, message.Value, false);

            DomainModel.Repository.Sql.Discussions.LoadMessageById(di.MessageToReply);

            di.MessageToEdit =
                di.CreateMessage(group, forum, discussion.Value, 0, false);

            di.ReturnUrl = returnUrl;

            return(View("Edit", di));
        }