@using ECM.JobRunner.Common.JobRunnerReference; @using ECM.JobRunner.Web.Data; @inject ImportService Import; @inject JobService Jobs; @if (step == null || profile == null) {

Form loading..

} else {
Der Windream Index, in den das Ergebnis des Schritte geschrieben wird
Basiswert, auf den die Funktion angewendet wird.
Funktion, die auf den Wert angewendet wird.
@if (arg1 != null) {
@arg1.helpText
} @if (arg2 != null) {
@arg2.helpText
} @if (arg3 != null) {
@arg3.name
@arg3.helpText
}
Back
} @code { [Parameter] public int ProfileId { get; set; } [Parameter] public int StepId { get; set; } [Parameter] public EventCallback OnValidSubmit { get; set; } private ImportProfileStep? step; private ImportProfile? profile; private StepArgument? arg1 = null; private StepArgument? arg2 = null; private StepArgument? arg3 = null; protected string GetBackUrl() { return $"/profiles/import/{ProfileId}/steps/{StepId}"; } protected override async Task OnInitializedAsync() { profile = await Import.GetProfile(ProfileId); if (profile == null) return; if (StepId == Constants.ENTITY_ID_NEW) { step = new ImportProfileStep() { Id = Constants.ENTITY_ID_NEW, ProfileId = ProfileId }; } else { step = profile.Steps.Where(s => s.Id == StepId).SingleOrDefault(); SetMethodArgs(step.Method); } StateHasChanged(); } protected void OnMethodChange(ChangeEventArgs e) { if (step == null || e.Value == null) return; step.Method = e.Value.ToString(); if (step.Method != null) { SetMethodArgs(step.Method); } } protected void SetMethodArgs(string method) { switch (method) { case "SUBSTRING": arg1 = new StepArgument() { name = "Index", helpText = "Index" }; arg2 = new StepArgument() { name = "Length", helpText = "Length" }; arg3 = null; break; case "REGEX": arg1 = new StepArgument() { name = "Regex", helpText = "Regex" }; arg2 = new StepArgument() { name = "Match Value", helpText = "Match Value" }; arg3 = new StepArgument() { name = "Not Match Value", helpText = "Not Match Value" }; break; case "VALUE": arg1 = new StepArgument() { name = "Value", helpText = "Value" }; arg2 = null; arg3 = null; break; default: arg1 = null; arg2 = null; arg3 = null; break; } } class StepArgument { public string name; public string helpText; } }