Skip to content

Commit

Permalink
Fix Nested CRUD Update and Delete actions
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavnavar committed May 23, 2020
1 parent d8549d7 commit 3c71f09
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions GridBlazor/Pages/GridDeleteComponent.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,19 @@ protected async Task DeleteItem()
{
try
{
_tabGroups = null;
await GridComponent.DeleteItem(this);
}
catch (GridException e)
{
await OnParametersSetAsync();
_shouldRender = true;
Error = string.IsNullOrWhiteSpace(e.Code) ? e.Message : e.Code + " - " + e.Message;
}
catch (Exception e)
{
Console.WriteLine(e.Message);
await OnParametersSetAsync();
_shouldRender = true;
Error = Strings.DeleteError;
}
Expand Down
3 changes: 3 additions & 0 deletions GridBlazor/Pages/GridUpdateComponent.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,19 @@ protected async Task UpdateItem()
{
try
{
_tabGroups = null;
await GridComponent.UpdateItem(this);
}
catch (GridException e)
{
await OnParametersSetAsync();
_shouldRender = true;
Error = string.IsNullOrWhiteSpace(e.Code) ? e.Message : e.Code + " - " + e.Message;
}
catch (Exception e)
{
Console.WriteLine(e.Message);
await OnParametersSetAsync();
_shouldRender = true;
Error = Strings.UpdateError;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BlazorStrap" Version="1.3.2" />
<PackageReference Include="BlazorStrap" Version="1.3.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="3.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Build" Version="3.2.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="3.2.0" PrivateAssets="all" />
Expand Down
2 changes: 1 addition & 1 deletion GridBlazorOData.Client/GridBlazorOData.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BlazorStrap" Version="1.3.2" />
<PackageReference Include="BlazorStrap" Version="1.3.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="3.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Build" Version="3.2.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="3.2.0" PrivateAssets="all" />
Expand Down
2 changes: 1 addition & 1 deletion GridBlazorServerSide/GridBlazorServerSide.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BlazorStrap" Version="1.3.2" />
<PackageReference Include="BlazorStrap" Version="1.3.1" />
<PackageReference Include="FluentValidation" Version="8.6.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.4" />
Expand Down

0 comments on commit 3c71f09

Please sign in to comment.