protected async Task ChangePasswordAsync() { if (string.IsNullOrWhiteSpace(ChangePasswordModel.CurrentPassword)) { return; } if (ChangePasswordModel.NewPassword != ChangePasswordModel.NewPasswordConfirm) { await UiMessageService.WarnAsync(L["NewPasswordConfirmFailed"]); return; } if (!await UiMessageService.ConfirmAsync(UiLocalizer["AreYouSure"])) { return; } await ProfileAppService.ChangePasswordAsync(new ChangePasswordInput { CurrentPassword = ChangePasswordModel.CurrentPassword, NewPassword = ChangePasswordModel.NewPassword }); await UiMessageService.SuccessAsync(L["PasswordChanged"]); }
protected async Task UpdatePersonalInfoAsync() { await ProfileAppService.UpdateAsync( ObjectMapper.Map <PersonalInfoModel, UpdateProfileDto>(PersonalInfoModel) ); await UiMessageService.SuccessAsync(L["PersonalSettingsSaved"]); }
protected async Task UpdatePersonalInfoAsync() { if (!await UiMessageService.ConfirmAsync(UiLocalizer["AreYouSure"])) { return; } await ProfileAppService.UpdateAsync( ObjectMapper.Map <PersonalInfoModel, UpdateProfileDto>(PersonalInfoModel) ); await UiMessageService.SuccessAsync(L["PersonalSettingsSaved"]); }
Task OnSuccessTestClicked() { return(UiMessageService.SuccessAsync("This is the Success message", "Success")); }