Exemple #1
0
 private async Task SyncAsync()
 {
     try
     {
         await LdapService.SyncUsersAsync(LdapSettings);
         await LdapService.ChangePasswordWhenExpiredAsync(LdapSettings);
         await ToastService.ShowToastAsync("Users synced.", ToastType.Success);
         await ModalDialogClose();
     }
     catch (Exception ex)
     {
         Logger.LogError(ex.Message);
         await ToastService.ShowToastAsync(ex.Message, ToastType.Error);
         await ModalDialogCancel();
     }
 }
Exemple #2
0
        private async Task SyncAsync()
        {
            try
            {
                await LdapService.SyncUsersAsync(LdapSettings);

                await LdapService.ChangePasswordWhenExpiredAsync(LdapSettings);

                await SynchronizationService.UpdateEmployees(ExceptPageId);

                await ToastService.ShowToastAsync("Users synced.", ToastType.Success);

                await ModalDialogService.CloseAsync();
            }
            catch (Exception ex)
            {
                Logger.LogError(ex.Message);
                await ToastService.ShowToastAsync(ex.Message, ToastType.Error);

                await ModalDialogService.CancelAsync();
            }
        }