public string Create(int contentID, Person person, RsvpResponse response) { string json = "" + (int)response; string url = rsvpUrl + "/" + contentID.ToString(); string result; try { result = RunAs(person.id, () => PostAbsolute(url, json)); } catch (HttpException e) { switch (e.GetHttpCode()) { case 400: throw new HttpException(e.WebEventCode, "An input field is missing or malformed", e); case 403: throw new HttpException(e.WebEventCode, "You are not allowed to perform this operation", e); case 404: throw new HttpException(e.WebEventCode, "The specified parent content object (or comment) cannot be found", e); default: throw; } } return(result); }
public ActionResult RegistrationForm(RsvpResponse model) { if (ModelState.IsValid) { return(View("Thanks", model)); } return(View(model)); }
public ActionResult RegistrationForm2() { var model = new RsvpResponse(); return(View(model)); }