public ActionResult Render() { var ms = Services.MemberService; var mem = ms.GetById(Members.GetCurrentMemberId()); var m = new ProfileNotificationModel(); m.DontBug = mem.GetValue<bool>("bugMeNot"); return PartialView("~/Views/Partials/Members/ProfileNotification.cshtml", m); }
public ActionResult HandleSubmit(ProfileNotificationModel model) { if (!ModelState.IsValid) return CurrentUmbracoPage(); var ms = Services.MemberService; var mem = ms.GetById(Members.GetCurrentMemberId()); mem.SetValue("bugMeNot", model.DontBug); ms.Save(mem); TempData["success"] = true; return RedirectToCurrentUmbracoPage(); }