Ejemplo n.º 1
0
        public ActionResult CommentParty(CommentPartyInfo commentInfo)
        {
            string json;

            if (ModelState.IsValid)
            {
                try
                {
                    PartyService.AddPartyComment(commentInfo);

                    return(RedirectToAction("ViewParty", new { partyId = commentInfo.PartyId, isCreate = true }));
                }
                catch (BasicSystemException ex)
                {
                    json = JsonHelper.GetJsonForFail(ex.ToLocalize());
                }
            }
            else
            {
                json = JsonHelper.GetJsonForFail(ModelValidationHelper.GetServSideValidErrorMsg(ModelState));
            }

            return(Content(json));
        }