private async Task LoadTableDataAsync() { var currentTotalRows = TotalRecords; TotalRecords = await SoftwareVaultService.GetInvitationsCountAsync(SearchText, Filter); if (currentTotalRows != TotalRecords) { CurrentPage = 1; } SoftwareVaultInvitations = await SoftwareVaultService.GetSoftwareVaultInvitationsAsync((CurrentPage - 1) *DisplayRows, DisplayRows, SortedColumn, SortDirection, SearchText, Filter); SelectedInvitation = null; StateHasChanged(); }
private async Task SendAsync() { try { await SoftwareVaultService.CreateAndSendInvitationAsync(Employee, ServerSettings, ValidTo); await ToastService.ShowToastAsync("Invitation sent.", ToastType.Success); //await HubContext.Clients.AllExcept(ConnectionId).SendAsync(RefreshPage.EmployeesDetails, Employee.Id); //await ModalDialogService.CloseAsync(); } catch (Exception ex) { Logger.LogError(ex.Message); await ToastService.ShowToastAsync(ex.Message, ToastType.Error); //await ModalDialogService.CloseAsync(); } }
public async Task SendAsync() { try { await SoftwareVaultService.ResendInvitationAsync(SoftwareVaultInvitation.Employee, ServerSettings, SoftwareVaultInvitation.Id); await Refresh.InvokeAsync(this); await ToastService.ShowToastAsync("Invitation sent.", ToastType.Success); } catch (Exception ex) { Logger.LogError(ex.Message); await ToastService.ShowToastAsync(ex.Message, ToastType.Error); } finally { await ModalDialogService.CloseAsync(); } }
public async Task DeleteAsync() { try { await SoftwareVaultService.DeleteInvitationAsync(SoftwareVaultInvitation.Id); await Refresh.InvokeAsync(this); await ToastService.ShowToastAsync("Invitation deleted.", ToastType.Success); } catch (Exception ex) { Logger.LogError(ex.Message); await ToastService.ShowToastAsync(ex.Message, ToastType.Error); } finally { await ModalDialogService.CloseAsync(); } }
public void Dispose() { SoftwareVaultService.Dispose(); }