private void GetCityResponse(CityResponseModel response) { if (response != null) { var profile = SL.Profile; if (profile == null) { return; } ProfileUpdateModel profileUpdateModel = new ProfileUpdateModel(); profileUpdateModel.AppVersion = profile.AppVersion; profileUpdateModel.City = response.result; profileUpdateModel.EmailAddress = profile.EmailAddress; profileUpdateModel.isGeoEnabled = true; profileUpdateModel.isNotificationEnabled = profile.isNotificationEnabled; profileUpdateModel.isPhoneBookEnabled = false; profileUpdateModel.LocationLat = Platform.Lat; profileUpdateModel.LocationLon = Platform.Lon; profileUpdateModel.UserName = profile.UserName; SL.Manager.UpdateProfileAsync(profileUpdateModel, null); //var profile = SL.Profile; //profile.City = response.result; //SL.Manager.SaveProfileAsync(profile); } }
void SaveProfile() { SL.Profile.UserName = SocialLadder.iOS.Helpers.StringWithEmojiConverter.ConvertEmojiToServer(DisplayNameText.Text); SL.Profile.City = CityText.Text; SL.Profile.EmailAddress = EmailText.Text; SL.Profile.isNotificationEnabled = swNotifications.On; var newProfile = new ProfileUpdateModel() { UserName = StringWithEmojiConverter.ConvertEmojiToServer(DisplayNameText.Text), EmailAddress = EmailText.Text, isNotificationEnabled = swNotifications.On, isPhoneBookEnabled = false, isGeoEnabled = SL.Profile.isGeoEnabled, LocationLat = SL.Profile.LocationLat, LocationLon = SL.Profile.LocationLon, City = CityText.Text, AppVersion = SL.Profile.AppVersion }; SL.Manager.UpdateProfileAsync(newProfile); }
private async Task SaveProfile(bool isNotificationEnabled) { var profile = SL.Profile; var newProfile = new ProfileUpdateModel() { UserName = profile.UserName, EmailAddress = profile.EmailAddress, isNotificationEnabled = isNotificationEnabled, isPhoneBookEnabled = false, isGeoEnabled = profile.isGeoEnabled, LocationLat = profile.LocationLat, LocationLon = profile.LocationLon, City = profile.City, AppVersion = profile.AppVersion }; var result = await SL.Manager.UpdateProfileAsync(newProfile); if (result.ResponseCode > 0) { profile.isNotificationEnabled = isNotificationEnabled; SL.Profile = profile; } }
public async Task OnGetAsync() { Input = await GetUserInfo(); }
/// <summary> /// Updates an NetworkExperimentProfiles by NetworkExperimentProfile name /// </summary> /// <remarks> /// Updates an NetworkExperimentProfiles /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the Resource group within the Azure subscription. /// </param> /// <param name='profileName'> /// The Profile identifier associated with the Tenant and Partner /// </param> /// <param name='parameters'> /// The Profile Update Model /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Profile> BeginUpdateAsync(this INetworkExperimentProfilesOperations operations, string resourceGroupName, string profileName, ProfileUpdateModel parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, profileName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Updates an NetworkExperimentProfiles by NetworkExperimentProfile name /// </summary> /// <remarks> /// Updates an NetworkExperimentProfiles /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the Resource group within the Azure subscription. /// </param> /// <param name='profileName'> /// The Profile identifier associated with the Tenant and Partner /// </param> /// <param name='parameters'> /// The Profile Update Model /// </param> public static Profile BeginUpdate(this INetworkExperimentProfilesOperations operations, string resourceGroupName, string profileName, ProfileUpdateModel parameters) { return(operations.BeginUpdateAsync(resourceGroupName, profileName, parameters).GetAwaiter().GetResult()); }
public Task <ProfileResponseModel> UpdateProfileAsync(ProfileUpdateModel profile, Action <ProfileResponseModel> callback = null) { return(restService.UpdateProfile(profile, callback)); }