public async Task SaveProfileSettings(ProfileSettingsDTO settings) { var settingsEntity = Mapper.Map <ProfileSetting>(settings); this.profRepo.AddOrUpdate(settingsEntity); await unitOfWork.CommitAsync(); }
public async Task <JsonResult> SaveProfileSettings(ProfileSettingsDTO settings) { settings.Id = this.User.Identity.GetUserId(); settings.Country = settings.Country ?? "USA"; await this.profileService.SaveProfileSettings(settings); return(new JsonResult() { Data = new { success = true } }); }
void fillNotifications(ProfileSettingsDTO settings) { chkNotifyFriendChangedCalendarMessage.IsChecked = ((settings.NotificationFriendChangedCalendar & ProfileNotification.Message) == ProfileNotification.Message); chkNotifyFriendChangedCalendarEMail.IsChecked = ((settings.NotificationFriendChangedCalendar & ProfileNotification.Email) == ProfileNotification.Email); chkNotifyFollowerChangedCalendarMessage.IsChecked = ((settings.NotificationFollowersChangedCalendar & ProfileNotification.Message) == ProfileNotification.Message); chkNotifyFollowerChangedCalendarEMail.IsChecked = ((settings.NotificationFollowersChangedCalendar & ProfileNotification.Email) == ProfileNotification.Email); chkNotifyPlanVotedMessage.IsChecked = ((settings.NotificationVoted & ProfileNotification.Message) == ProfileNotification.Message); chkNotifyPlanVotedEMail.IsChecked = ((settings.NotificationVoted & ProfileNotification.Email) == ProfileNotification.Email); chkNotifyTrainingDayCommentMessage.IsChecked = ((settings.NotificationBlogCommentAdded & ProfileNotification.Message) == ProfileNotification.Message); chkNotifyTrainingDayCommentEMail.IsChecked = ((settings.NotificationBlogCommentAdded & ProfileNotification.Email) == ProfileNotification.Email); chkNotifyPlanSocialMessage.IsChecked = ((settings.NotificationSocial & ProfileNotification.Message) == ProfileNotification.Message); chkNotifyPlanSocialEMail.IsChecked = ((settings.NotificationSocial & ProfileNotification.Email) == ProfileNotification.Email); }