Esempio n. 1
0
        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"]);
        }
Esempio n. 2
0
 Task OnInfoTestClicked()
 {
     return(UiMessageService.InfoAsync("This is the Info message", "Info", options =>
     {
         options.OkButtonIcon = IconName.InfoCircle;
         options.OkButtonText = "Hello info";
     }));
 }
Esempio n. 3
0
        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]);
     }
 }
Esempio n. 5
0
 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");
     }
 }
Esempio n. 6
0
        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();
        }
Esempio n. 7
0
        protected async Task UpdatePersonalInfoAsync()
        {
            if (!await UiMessageService.ConfirmAsync(UiLocalizer["AreYouSure"]))
            {
                return;
            }

            await ProfileAppService.UpdateAsync(
                ObjectMapper.Map <PersonalInfoModel, UpdateProfileDto>(PersonalInfoModel)
                );

            await UiMessageService.SuccessAsync(L["PersonalSettingsSaved"]);
        }
Esempio n. 8
0
 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);
        }
    }
Esempio n. 10
0
 Task OnErrorTestClicked()
 {
     return(UiMessageService.ErrorAsync("This is the Error message", "Error"));
 }
Esempio n. 11
0
 Task OnWarningTestClicked()
 {
     return(UiMessageService.WarnAsync("This is the Warning message", "Warning"));
 }
Esempio n. 12
0
 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"]);
        }