Пример #1
0
        protected virtual async Task UpdateAuthorAsync()
        {
            await AuthorAppService.UpdateAsync(EditingAuthorId, EditingAuthor);

            await GetAuthorsAsync();

            EditAuthorModal.Hide();
        }
Пример #2
0
        private async Task UpdateAuthorAsync()
        {
            await AuthorAppService.UpdateAsync(EditingAuthorId, EditingAuthor);

            await GetAuthorsAsync();

            EditAuthorModal.Hide();
        }
Пример #3
0
        protected virtual async Task CreateEntityAsync()
        {
            await AuthorAppService.CreateAsync(NewAuthor);

            await GetAuthorsAsync();

            CreateAuthorModal.Hide();
        }
Пример #4
0
        private async Task CreateAuthorAsync()
        {
            await AuthorAppService.CreateAsync(NewAuthor);

            await GetAuthorsAsync();

            CreateAuthorModal.Hide();
        }
Пример #5
0
    private async Task UpdateAuthorAsync()
    {
        if (await EditValidationsRef.ValidateAll())
        {
            await AuthorAppService.UpdateAsync(EditingAuthorId, EditingAuthor);
            await GetAuthorsAsync();

            await EditAuthorModal.Hide();
        }
    }
Пример #6
0
    private async Task CreateAuthorAsync()
    {
        if (await CreateValidationsRef.ValidateAll())
        {
            await AuthorAppService.CreateAsync(NewAuthor);
            await GetAuthorsAsync();

            await CreateAuthorModal.Hide();
        }
    }
Пример #7
0
        private async Task DeleteAuthorAsync(AuthorDto author)
        {
            var confirmMessage = L["AuthorDeletionConfirmationMessage", author.Name];

            if (!await UiMessageService.ConfirmAsync(confirmMessage))
            {
                return;
            }

            await AuthorAppService.DeleteAsync(author.Id);

            await GetAuthorsAsync();
        }
Пример #8
0
        private async Task GetAuthorsAsync()
        {
            var result = await AuthorAppService.GetListAsync(
                new GetAuthorListDto
            {
                MaxResultCount = PageSize,
                SkipCount      = CurrentPage * PageSize,
                Sorting        = CurrentSorting
            }
                );

            AuthorList = result.Items;
            TotalCount = (int)result.TotalCount;
        }
Пример #9
0
 public ProductController(AuthorAppService authorAppService, BookAppService bookAppService)
 {
     _authorAppService = authorAppService;
     _bookAppService   = bookAppService;
 }