|
|
@ -1115,8 +1115,8 @@ namespace Acme.BookStore.Blazor.Pages |
|
|
private async Task OnDataGridReadAsync(DataGridReadDataEventArgs<AuthorDto> e) |
|
|
private async Task OnDataGridReadAsync(DataGridReadDataEventArgs<AuthorDto> e) |
|
|
{ |
|
|
{ |
|
|
CurrentSorting = e.Columns |
|
|
CurrentSorting = e.Columns |
|
|
.Where(c => c.Direction != SortDirection.None) |
|
|
.Where(c => c.SortDirection != SortDirection.Default) |
|
|
.Select(c => c.Field + (c.Direction == SortDirection.Descending ? " DESC" : "")) |
|
|
.Select(c => c.Field + (c.SortDirection == SortDirection.Descending ? " DESC" : "")) |
|
|
.JoinAsString(","); |
|
|
.JoinAsString(","); |
|
|
CurrentPage = e.Page - 1; |
|
|
CurrentPage = e.Page - 1; |
|
|
|
|
|
|
|
|
@ -1166,7 +1166,7 @@ namespace Acme.BookStore.Blazor.Pages |
|
|
|
|
|
|
|
|
private async Task CreateAuthorAsync() |
|
|
private async Task CreateAuthorAsync() |
|
|
{ |
|
|
{ |
|
|
if (CreateValidationsRef.ValidateAll()) |
|
|
if (await CreateValidationsRef.ValidateAll()) |
|
|
{ |
|
|
{ |
|
|
await AuthorAppService.CreateAsync(NewAuthor); |
|
|
await AuthorAppService.CreateAsync(NewAuthor); |
|
|
await GetAuthorsAsync(); |
|
|
await GetAuthorsAsync(); |
|
|
@ -1176,7 +1176,7 @@ namespace Acme.BookStore.Blazor.Pages |
|
|
|
|
|
|
|
|
private async Task UpdateAuthorAsync() |
|
|
private async Task UpdateAuthorAsync() |
|
|
{ |
|
|
{ |
|
|
if (EditValidationsRef.ValidateAll()) |
|
|
if (await EditValidationsRef.ValidateAll()) |
|
|
{ |
|
|
{ |
|
|
await AuthorAppService.UpdateAsync(EditingAuthorId, EditingAuthor); |
|
|
await AuthorAppService.UpdateAsync(EditingAuthorId, EditingAuthor); |
|
|
await GetAuthorsAsync(); |
|
|
await GetAuthorsAsync(); |
|
|
|