Files
ECMJobRunner/ECM.JobRunner.Web/Pages/ImportProfile/NewProfile.razor
Jonathan Jenne 45f8dd2aad 16-12-2022
2022-12-16 15:59:26 +01:00

28 lines
635 B
Plaintext

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