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();
        }
Esempio n. 2
0
        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();
            }
        }
Esempio n. 3
0
        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();
            }
        }
Esempio n. 4
0
        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();
            }
        }
Esempio n. 5
0
 public void Dispose()
 {
     SoftwareVaultService.Dispose();
 }