Skip to content

Commit

Permalink
Update package version 3.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavnavar committed Mar 12, 2022
1 parent 5a2928c commit 6ff10ca
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 19 deletions.
2 changes: 1 addition & 1 deletion GridBlazor/GridBlazor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<LangVersion>8.0</LangVersion>
<GenerateEmbeddedFilesManifest>True</GenerateEmbeddedFilesManifest>
<EnableDefaultEmbeddedResourceItems>False</EnableDefaultEmbeddedResourceItems>
<Version>3.2.0</Version>
<Version>3.2.1</Version>
<Title>GridBlazor</Title>
<Description>Grid components for Blazor</Description>
<Summary>Grid components for Blazor</Summary>
Expand Down
13 changes: 8 additions & 5 deletions GridBlazor/Pages/GridComponent.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,7 @@ protected virtual async Task OnAfterBack()
}
}

public async Task CreateItem(GridCreateComponent<T> component)
public async Task<bool> CreateItem(GridCreateComponent<T> component)
{
try
{
Expand Down Expand Up @@ -1347,7 +1347,8 @@ public async Task CreateItem(GridCreateComponent<T> component)
_shouldRender = true;
StateHasChanged();
}
}
}
return isValid;
}
catch (Exception e)
{
Expand All @@ -1374,7 +1375,7 @@ protected virtual async Task OnAfterInsert(GridCreateComponent<T> component)
}
}

public async Task UpdateItem(GridUpdateComponent<T> component)
public async Task<bool> UpdateItem(GridUpdateComponent<T> component)
{
try
{
Expand All @@ -1383,7 +1384,7 @@ public async Task UpdateItem(GridUpdateComponent<T> component)
{
await ShowSpinner();
if (((CGrid<T>)Grid).CrudFileService != null)
Item = await((CGrid<T>)Grid).CrudFileService.UpdateFiles(Item, component.Files);
Item = await ((CGrid<T>)Grid).CrudFileService.UpdateFiles(Item, component.Files);
await ((CGrid<T>)Grid).CrudDataService.Update(Item);
await HideSpinner();
((CGrid<T>)Grid).Mode = GridMode.Grid;
Expand All @@ -1395,6 +1396,7 @@ public async Task UpdateItem(GridUpdateComponent<T> component)
_shouldRender = true;
StateHasChanged();
}
return isValid;
}
catch (Exception e)
{
Expand All @@ -1421,7 +1423,7 @@ protected virtual async Task OnAfterUpdate(GridUpdateComponent<T> component)
}
}

public async Task DeleteItem(GridDeleteComponent<T> component)
public async Task<bool> DeleteItem(GridDeleteComponent<T> component)
{
try
{
Expand All @@ -1443,6 +1445,7 @@ public async Task DeleteItem(GridDeleteComponent<T> component)
_shouldRender = true;
StateHasChanged();
}
return isValid;
}
catch (Exception e)
{
Expand Down
11 changes: 7 additions & 4 deletions GridBlazor/Pages/GridCreateComponent.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,13 @@ protected async Task CreateItem()

try
{
Error = "";
ColumnErrors = new QueryDictionary<string>();
_tabGroups = null;
await GridComponent.CreateItem(this);
bool isValid = await GridComponent.CreateItem(this);
if (isValid)
{
Error = "";
ColumnErrors = new QueryDictionary<string>();
_tabGroups = null;
}
}
catch (GridException e)
{
Expand Down
5 changes: 3 additions & 2 deletions GridBlazor/Pages/GridDeleteComponent.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ public async Task DeleteItem()

try
{
_tabGroups = null;
await GridComponent.DeleteItem(this);
bool isValid = await GridComponent.DeleteItem(this);
if(isValid)
_tabGroups = null;
}
catch (GridException e)
{
Expand Down
11 changes: 7 additions & 4 deletions GridBlazor/Pages/GridUpdateComponent.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,13 @@ protected async Task UpdateItem()

try
{
Error = "";
ColumnErrors = new QueryDictionary<string>();
_tabGroups = null;
await GridComponent.UpdateItem(this);
bool isValid = await GridComponent.UpdateItem(this);
if (isValid)
{
Error = "";
ColumnErrors = new QueryDictionary<string>();
_tabGroups = null;
}
}
catch (GridException e)
{
Expand Down
2 changes: 1 addition & 1 deletion GridCore/GridCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<EnableDefaultEmbeddedResourceItems>False</EnableDefaultEmbeddedResourceItems>
<Product>GridCore</Product>
<PackageId>GridCore</PackageId>
<Version>5.2.0</Version>
<Version>5.2.1</Version>
<Title>GridCore</Title>
<Description>Grid core component</Description>
<Summary>Grid core component</Summary>
Expand Down
2 changes: 1 addition & 1 deletion GridMvc/GridMvc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<EnableDefaultEmbeddedResourceItems>False</EnableDefaultEmbeddedResourceItems>
<Product>GridMvc</Product>
<PackageId>GridMvcCore</PackageId>
<Version>5.2.0</Version>
<Version>5.2.1</Version>
<Title>GridMvc</Title>
<Description>ASP.NET MVC Grid component</Description>
<Summary>ASP.NET MVC Grid component</Summary>
Expand Down
2 changes: 1 addition & 1 deletion GridShared/GridShared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.1;net5.0;net6.0</TargetFrameworks>
<LangVersion>8.0</LangVersion>
<Version>5.2.0</Version>
<Version>5.2.1</Version>
<Title>GridShared</Title>
<Description>Support library for GridBlazor and GridMvcCore component libraries</Description>
<Summary>Support library for GridBlazor and GridMvcCore component libraries</Summary>
Expand Down

0 comments on commit 6ff10ca

Please sign in to comment.