public JsonResult ApplyPost(PostAnswerModel model) { try { var result = CorporateBusiness.ApplyPost(model); var response = new ApiRespnoseWrapper { status = ApiRespnoseStatus.Success, results = new ArrayList() { result } }; return(new JsonResult { Data = response }); } catch (Exception ex) { return(CommonBusiness.GetErrorResponse(ex.Message)); } }
public ActionResult PostAnswer(PostAnswerModel model, string test) { TryUpdateModel(model); AnsweringService service = new AnsweringService(); var success = service.PostAnswerModel(model); var returnModel = new ThankYouModel { LawID = model.LawID, RepresentativeDisplayName = model.RepresentativeDisplayName, RepresentativeID = model.RepresentativeID, }; // Redirect to action is a hack as html input is causing issues if (success) { return(RedirectToAction("ThankYou", returnModel)); } return(RedirectToAction("AnswerRejected", returnModel)); }