28 lines
697 B
Plaintext
28 lines
697 B
Plaintext
@page "/profiles/import/{profileId:int}/edit"
|
|
@using ECM.JobRunner.Common.JobRunnerReference;
|
|
@using ECM.JobRunner.Web.Data;
|
|
@inject NavigationManager Navigation;
|
|
@inject ImportService Profile;
|
|
|
|
<PageTitle>Job bearbeiten</PageTitle>
|
|
|
|
<h3>Job bearbeiten</h3>
|
|
|
|
<ProfileForm ProfileId="ProfileId" OnValidSubmit="OnFormSubmit" />
|
|
|
|
@code {
|
|
[Parameter]
|
|
public int ProfileId { get; set; }
|
|
|
|
private async void OnFormSubmit(EditContext ctx)
|
|
{
|
|
ImportProfile profile = (ImportProfile)ctx.Model;
|
|
bool result = await Profile.UpdateProfile(profile);
|
|
|
|
if (result == true)
|
|
{
|
|
Navigation.NavigateTo($"/profiles/import/{profile.Id}");
|
|
}
|
|
}
|
|
}
|