public ActionResult RenderProfileTShirtSizeForm() { ProfileTShirtSizeForm profileTShirtSizeForm = new ProfileTShirtSizeForm(); RegisterHost registerHost = (RegisterHost)this.Umbraco.TypedContentSingleAtXPath("//" + RegisterHost.Alias); this.ViewBag.TShirtSizes = registerHost.TShirtSizes; PartyHost partyHost = (PartyHost)this.Members.GetCurrentPartier(); profileTShirtSizeForm.TShirtSize = partyHost.TShirtSize; return(this.PartialView("Profile/Forms/ProfileTShirtSizeForm", profileTShirtSizeForm)); }
public ActionResult HandleProfileTShirtSizeForm(ProfileTShirtSizeForm profileTShirtSizeForm) { FormResponse formResponse = new FormResponse(); if (this.ModelState.IsValid) { PartyHost partyHost = (PartyHost)this.Members.GetCurrentPartier(); partyHost.TShirtSize = profileTShirtSizeForm.TShirtSize; formResponse.Success = true; } else { formResponse.Errors = this.ModelState.GetErrors(); } return(Json(formResponse, "text/plain")); }