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(); } }
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(); } }