public ActionResult UserSettings() { pageResourceManager.InsertTitlePart("用户设置"); UserSettings userSettings = userSettingsManager.Get(); UserProfileSettings userProfileSettings = userProfileSettingsManager.Get(); InviteFriendSettings inviteFriendSettings = inviteFriendSettingsManager.Get(); UserSettingsEditModel userSettingsEditModel = new UserSettingsEditModel(userProfileSettings, userSettings, inviteFriendSettings); return View(userSettingsEditModel); }
/// <summary> /// 保存用户设置 /// </summary> /// <param name="userSettingsEditModel">用户设置EditModel</param> /// <returns></returns> public JsonResult SaveUserSettings(UserSettingsEditModel userSettingsEditModel) { UserSettings userSettings = userSettingsEditModel.AsUserSettings(); UserProfileSettings userProfileSettings = userSettingsEditModel.AsUserProfileSettings(); InviteFriendSettings inviteFriendSettings = userSettingsEditModel.AsInviteFriendSettings(); userSettingsManager.Save(userSettings); userProfileSettingsManager.Save(userProfileSettings); inviteFriendSettingsManager.Save(inviteFriendSettings); return Json(new StatusMessageData(StatusMessageType.Success, "设置成功!")); }