Add operation executor

This commit is contained in:
2025-10-25 20:30:49 +09:00
parent 59470b49d1
commit 891d462af1
19 changed files with 144 additions and 52 deletions

View File

@ -11,7 +11,7 @@
<AuthorizedContent Roles="@AppRole.ADMINISTRATOR_TYPE">
<Content>
<RadzenTemplateForm TItem="InputModel" Data=@Input Submit="@DoAddUser">
<RadzenTemplateForm TItem="InputModel" Data=@Input Submit="@DoAddUserAsync">
<RadzenAlert Visible="@hasError" AlertStyle="AlertStyle.Danger" Variant="Variant.Flat" Shade="Shade.Lighter" AllowClose="false">
@errorMessage
</RadzenAlert>
@ -88,7 +88,7 @@
Input.Role = roles.First();
}
async Task DoAddUser(InputModel input)
async Task DoAddUserAsync(InputModel input)
{
if (inProgress) return;
@ -97,7 +97,7 @@
try
{
var result = await UsersService.CreateUser(input.UserName, input.Role.Name, input.Password);
var result = await UsersService.CreateUserAsync(input.UserName, input.Role.Name, input.Password);
if (result.Succeeded)
{
DialogService.Close(true);

View File

@ -12,7 +12,7 @@
<AuthorizedContent Roles="@AppRole.ADMINISTRATOR_TYPE">
<Content>
<RadzenTemplateForm TItem="InputModel" Data=@Input Submit="@DoEditUser">
<RadzenTemplateForm TItem="InputModel" Data=@Input Submit="@DoEditUserAsync">
<RadzenAlert Visible="@hasError" AlertStyle="AlertStyle.Danger" Variant="Variant.Flat" Shade="Shade.Lighter" AllowClose="false">
@errorMessage
</RadzenAlert>
@ -90,7 +90,7 @@
roles = await RoleManager.Roles.OrderBy(x => x.Priority).ToListAsync();
}
async Task DoEditUser(InputModel input)
async Task DoEditUserAsync(InputModel input)
{
if (inProgress) return;
@ -99,7 +99,7 @@
try
{
await UsersService.UpdateUser(UserId, input.RoleId, input.Password);
await UsersService.UpdateUserAsync(UserId, input.RoleId, input.Password);
DialogService.Close(true);
}