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"]); }
Task OnInfoTestClicked() { return(UiMessageService.InfoAsync("This is the Info message", "Info", options => { options.OkButtonIcon = IconName.InfoCircle; options.OkButtonText = "Hello info"; })); }
protected async Task UpdatePersonalInfoAsync() { await ProfileAppService.UpdateAsync( ObjectMapper.Map <PersonalInfoModel, UpdateProfileDto>(PersonalInfoModel) ); await UiMessageService.SuccessAsync(L["PersonalSettingsSaved"]); }
protected virtual async Task OnFeatureValueChangedAsync(string value, FeatureDto feature) { if (feature?.ValueType?.Validator.IsValid(value) == true) { feature.Value = value; } else { await UiMessageService.Warn(L["Volo.Abp.FeatureManagement:InvalidFeatureValue", feature.DisplayName]); } }
async Task OnConfirmTestClicked() { if (await UiMessageService.ConfirmAsync("Are you sure you want to delete the item?", "Confirm", options => { options.CancelButtonText = "Do not delete it"; options.ConfirmButtonText = "Yes I'm sure"; })) { Console.WriteLine("Confirmed"); } }
private async Task DeleteAuthorAsync(AuthorDto author) { var confirmMessage = L["AuthorDeletionConfirmationMessage", author.Name]; if (!await UiMessageService.ConfirmAsync(confirmMessage)) { return; } await AuthorAppService.DeleteAsync(author.Id); await GetAuthorsAsync(); }
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 OnConfirmTestClicked() { return(UiMessageService.ConfirmAsync("Are you sure you want to delete the item?", "Confirm", options => { options.CancelButtonText = "Do not delete it"; options.ConfirmButtonText = "Yes I'm sure"; }) .ContinueWith(result => { if (result.Result) { Console.WriteLine("Confirmed"); } else { Console.WriteLine("Cancelled"); } })); }
protected virtual async Task UpdateSettingsAsync() { try { if (!await EmailSettingValidation.ValidateAll()) { return; } await EmailSettingsAppService.UpdateAsync(ObjectMapper.Map <UpdateEmailSettingsViewModel, UpdateEmailSettingsDto>(EmailSettings)); await CurrentApplicationConfigurationCacheResetService.ResetAsync(); await UiMessageService.Success(L["SuccessfullySaved"]); } catch (Exception ex) { await HandleErrorAsync(ex); } }
Task OnErrorTestClicked() { return(UiMessageService.ErrorAsync("This is the Error message", "Error")); }
Task OnWarningTestClicked() { return(UiMessageService.WarnAsync("This is the Warning message", "Warning")); }
Task OnSuccessTestClicked() { return(UiMessageService.SuccessAsync("This is the Success message", "Success")); }
protected virtual async Task UpdateSettingsAsync() { await EmailSettingsAppService.UpdateAsync(ObjectMapper.Map <EmailSettingsDto, UpdateEmailSettingsDto>(EmailSettings)); await UiMessageService.Success(L["SavedSuccessfully"]); }