Пример #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"]);
        }
Пример #2
0
        protected async Task UpdatePersonalInfoAsync()
        {
            await ProfileAppService.UpdateAsync(
                ObjectMapper.Map <PersonalInfoModel, UpdateProfileDto>(PersonalInfoModel)
                );

            await UiMessageService.SuccessAsync(L["PersonalSettingsSaved"]);
        }
Пример #3
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"]);
        }
Пример #4
0
 Task OnSuccessTestClicked()
 {
     return(UiMessageService.SuccessAsync("This is the Success message", "Success"));
 }