Skip to content

Commit

Permalink
1.1.9.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Jurioli committed Sep 7, 2021
1 parent 2ec8cfb commit e75f966
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 2 deletions.
Binary file removed Blazor.WebForm.Components.1.1.9.7.nupkg
Binary file not shown.
Binary file added Blazor.WebForm.Components.1.1.9.8.nupkg
Binary file not shown.
4 changes: 2 additions & 2 deletions Blazor.WebForm.Components/Blazor.WebForm.Components.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net5.0</TargetFramework>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Blazor.WebForm.Components.pfx</AssemblyOriginatorKeyFile>
<Version>1.1.9.7</Version>
<Version>1.1.9.8</Version>
<RootNamespace>asp</RootNamespace>
<Copyright>Jurio li</Copyright>
<AssemblyName>Blazor.WebForm.Components</AssemblyName>
Expand All @@ -17,7 +17,7 @@

<ItemGroup>
<PackageReference Include="Applied" Version="1.2.1.6" />
<PackageReference Include="Blazor.WebForm.UI" Version="1.1.9.7" />
<PackageReference Include="Blazor.WebForm.UI" Version="1.1.9.8" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.9" />
</ItemGroup>

Expand Down
81 changes: 81 additions & 0 deletions Blazor.WebForm.Components/FreeDataSource.razor
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
@code {
private OnExecuteSorted _executeSorted;
private OnExecuteUpdated _executeUpdated;
private OnExecuteUpdatedAsync _executeUpdatedAsync;
private OnExecuteSelected _executeSelected;
private OnExecuteDeleted _executeDeleted;
private OnExecuteDeletedAsync _executeDeletedAsync;
private OnExecuteInserted _executeInserted;
private OnExecuteInsertedAsync _executeInsertedAsync;

[Parameter]
public bool AutoSort
Expand Down Expand Up @@ -93,6 +96,27 @@
}
}

[Parameter]
public OnExecuteUpdatedAsync OnExecuteUpdatedAsync
{
get
{
return _executeUpdatedAsync;
}
set
{
if (value != null)
{
this.Control.ExecuteUpdatedAsync += InvokeExecuteUpdatedAsync;
}
else
{
this.Control.ExecuteUpdatedAsync -= InvokeExecuteUpdatedAsync;
}
_executeUpdatedAsync = value;
}
}

[Parameter]
public EventHandler OnDataSourceChanged
{
Expand Down Expand Up @@ -148,6 +172,27 @@
}
}

[Parameter]
public OnExecuteInsertedAsync OnExecuteInsertedAsync
{
get
{
return _executeInsertedAsync;
}
set
{
if (value != null)
{
this.Control.ExecuteInsertedAsync += InvokeExecuteInsertedAsync;
}
else
{
this.Control.ExecuteInsertedAsync -= InvokeExecuteInsertedAsync;
}
_executeInsertedAsync = value;
}
}

[Parameter]
public OnExecuteDeleted OnExecuteDeleted
{
Expand All @@ -169,6 +214,27 @@
}
}

[Parameter]
public OnExecuteDeletedAsync OnExecuteDeletedAsync
{
get
{
return _executeDeletedAsync;
}
set
{
if (value != null)
{
this.Control.ExecuteDeletedAsync += InvokeExecuteDeletedAsync;
}
else
{
this.Control.ExecuteDeletedAsync -= InvokeExecuteDeletedAsync;
}
_executeDeletedAsync = value;
}
}

private void InvokeExecuteSorted(object sender, ref IEnumerable enumerable, DataSourceSelectArguments arguments)
{
_executeSorted.Invoke(sender, ref enumerable, arguments);
Expand All @@ -179,6 +245,11 @@
_executeUpdated.Invoke(sender, keys, values, oldValues);
}

private Task InvokeExecuteUpdatedAsync(object sender, IDictionary keys, IDictionary values, IDictionary oldValues)
{
return _executeUpdatedAsync.Invoke(sender, keys, values, oldValues);
}

private IEnumerable InvokeExecuteSelected(object sender)
{
return _executeSelected.Invoke(sender);
Expand All @@ -189,8 +260,18 @@
_executeDeleted.Invoke(sender, keys, oldValues);
}

private Task InvokeExecuteDeletedAsync(object sender, IDictionary keys, IDictionary oldValues)
{
return _executeDeletedAsync.Invoke(sender, keys, oldValues);
}

private void InvokeExecuteInserted(object sender, IDictionary values)
{
_executeInserted.Invoke(sender, values);
}

private Task InvokeExecuteInsertedAsync(object sender, IDictionary values)
{
return _executeInsertedAsync.Invoke(sender, values);
}
}

0 comments on commit e75f966

Please sign in to comment.