コード例 #1
0
ファイル: ReplyController.cs プロジェクト: f85084/web_1
        public ActionResult Create(Library.Reply reply)
        {
            if (!ModelState.IsValid)
            {
                return(View("Create"));
            }

            ReplyWeb replyWeb = new ReplyWeb();

            replyWeb.AddReply(reply);
            return(RedirectToAction("Index"));
        }
コード例 #2
0
ファイル: ReplyController.cs プロジェクト: f85084/Web
        public ActionResult Create(Library.Reply reply, int?messageId)
        {
            if (!ModelState.IsValid)
            {
                return(View("Create"));
            }

            if (messageId == 0)
            {
                return(View("Index", "Message"));
            }

            ReplyWeb replyWeb = new ReplyWeb();

            replyWeb.AddReply(reply);
            //return RedirectToAction("Index", "Message");
            return(RedirectToAction("Index", "Message"));
        }