Ejemplo n.º 1
0
        public ActionResult Create(Library.Reply reply)
        {
            if (!ModelState.IsValid)
            {
                return(View("Create"));
            }

            ReplyWeb replyWeb = new ReplyWeb();

            replyWeb.AddReply(reply);
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        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"));
        }