Jonathan Jenne 0a25b0925c 08-12-2022
2022-12-08 16:43:22 +01:00

28 lines
616 B
Plaintext

@page "/profiles/import/new"
@using ECM.JobRunner.Common.JobRunnerReference;
@using ECM.JobRunner.Web.Data;
@inject NavigationManager Navigation;
@inject ImportService Import;
<PageTitle>Job erstellen</PageTitle>
<h3>Job erstellen</h3>
<ProfileForm JobId="JobId" OnValidSubmit="OnFormSubmit" />
@code {
public int JobId = -1;
private async void OnFormSubmit(EditContext ctx)
{
ImportProfile profile = (ImportProfile)ctx.Model;
bool result = await Import.CreateProfile(profile);
if (result == true)
{
Navigation.NavigateTo("/jobs");
}
}
}