public ActionResult PublishParty(PublishPartyInfo partyInfo) { string json; if (ModelState.IsValid) { try { var partyId = PartyService.AddParty(partyInfo); return(RedirectToAction("ViewParty", new { partyId = partyId, isCreate = true })); } catch (BasicSystemException ex) { json = JsonHelper.GetJsonForFail(ex.ToLocalize()); } } else { json = JsonHelper.GetJsonForFail(ModelValidationHelper.GetServSideValidErrorMsg(ModelState)); } return(Content(json)); }
public IActionResult AddParty(Party party) { PartyService.AddParty(party); return(Ok()); }