diff --git a/ECM.JobRunner.Common/Connected Services/JobRunnerReference/DigitalData.Services.EDMIService.wsdl b/ECM.JobRunner.Common/Connected Services/JobRunnerReference/DigitalData.Services.EDMIService.wsdl index 0ec7fa1..7a7241d 100644 --- a/ECM.JobRunner.Common/Connected Services/JobRunnerReference/DigitalData.Services.EDMIService.wsdl +++ b/ECM.JobRunner.Common/Connected Services/JobRunnerReference/DigitalData.Services.EDMIService.wsdl @@ -5,6 +5,7 @@ + diff --git a/ECM.JobRunner.Common/Connected Services/JobRunnerReference/ECM.JobRunner.Common.xsd b/ECM.JobRunner.Common/Connected Services/JobRunnerReference/ECM.JobRunner.Common.xsd new file mode 100644 index 0000000..126923d --- /dev/null +++ b/ECM.JobRunner.Common/Connected Services/JobRunnerReference/ECM.JobRunner.Common.xsd @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ECM.JobRunner.Common/Connected Services/JobRunnerReference/ECM.JobRunner.Windows.xsd b/ECM.JobRunner.Common/Connected Services/JobRunnerReference/ECM.JobRunner.Windows.xsd index 4fcf647..05dbf53 100644 --- a/ECM.JobRunner.Common/Connected Services/JobRunnerReference/ECM.JobRunner.Windows.xsd +++ b/ECM.JobRunner.Common/Connected Services/JobRunnerReference/ECM.JobRunner.Windows.xsd @@ -1,13 +1,12 @@  - - - + + - - + + @@ -21,65 +20,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -97,7 +37,7 @@ - + @@ -109,25 +49,6 @@ - - - - - - - - - - - - - - - - - - - @@ -139,7 +60,7 @@ - + @@ -151,52 +72,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -209,43 +84,19 @@ - - + + - + - - - - - - - - - - - - - + - - - - - - - - - - - - \ No newline at end of file diff --git a/ECM.JobRunner.Common/Connected Services/JobRunnerReference/Reference.svcmap b/ECM.JobRunner.Common/Connected Services/JobRunnerReference/Reference.svcmap index f9a0519..6321524 100644 --- a/ECM.JobRunner.Common/Connected Services/JobRunnerReference/Reference.svcmap +++ b/ECM.JobRunner.Common/Connected Services/JobRunnerReference/Reference.svcmap @@ -27,6 +27,7 @@ + diff --git a/ECM.JobRunner.Common/Connected Services/JobRunnerReference/Reference.vb b/ECM.JobRunner.Common/Connected Services/JobRunnerReference/Reference.vb index d33d843..6103a8d 100644 --- a/ECM.JobRunner.Common/Connected Services/JobRunnerReference/Reference.vb +++ b/ECM.JobRunner.Common/Connected Services/JobRunnerReference/Reference.vb @@ -284,7 +284,7 @@ Namespace JobRunnerReference _ Partial Public Class HistoryItem Inherits Object @@ -410,7 +410,7 @@ Namespace JobRunnerReference _ Partial Public Class HistoryStep Inherits Object @@ -487,7 +487,7 @@ Namespace JobRunnerReference End Class _ + System.Runtime.Serialization.DataContractAttribute(Name:="HistoryItem.StepLevel", [Namespace]:="http://schemas.datacontract.org/2004/07/ECM.JobRunner.Common")> _ Public Enum StepLevel As Integer _ @@ -506,7 +506,7 @@ Namespace JobRunnerReference _ Partial Public Class StatusItem Inherits Object @@ -665,7 +665,7 @@ Namespace JobRunnerReference _ Partial Public Class JobDefinition Inherits Object @@ -792,7 +792,7 @@ Namespace JobRunnerReference _ Partial Public Class JobType Inherits Object @@ -871,7 +871,7 @@ Namespace JobRunnerReference _ Partial Public Class ObjectType Inherits Object @@ -934,7 +934,7 @@ Namespace JobRunnerReference _ Partial Public Class ImportProfile Inherits Object @@ -1189,7 +1189,7 @@ Namespace JobRunnerReference _ Partial Public Class ImportProfileStep Inherits Object diff --git a/ECM.JobRunner.Common/ECM.JobRunner.Common.vbproj b/ECM.JobRunner.Common/ECM.JobRunner.Common.vbproj index 5b7e1f0..207b48c 100644 --- a/ECM.JobRunner.Common/ECM.JobRunner.Common.vbproj +++ b/ECM.JobRunner.Common/ECM.JobRunner.Common.vbproj @@ -45,6 +45,7 @@ + @@ -72,6 +73,14 @@ Reference.svcmap + + + + + + + + True @@ -120,6 +129,9 @@ Reference.svcmap + + Designer + Designer diff --git a/ECM.JobRunner.Windows/Models/Jobs/HistoryItem.vb b/ECM.JobRunner.Common/Models/Jobs/HistoryItem.vb similarity index 100% rename from ECM.JobRunner.Windows/Models/Jobs/HistoryItem.vb rename to ECM.JobRunner.Common/Models/Jobs/HistoryItem.vb diff --git a/ECM.JobRunner.Windows/Models/Jobs/JobDefinition.vb b/ECM.JobRunner.Common/Models/Jobs/JobDefinition.vb similarity index 100% rename from ECM.JobRunner.Windows/Models/Jobs/JobDefinition.vb rename to ECM.JobRunner.Common/Models/Jobs/JobDefinition.vb diff --git a/ECM.JobRunner.Windows/Models/Jobs/JobType.vb b/ECM.JobRunner.Common/Models/Jobs/JobType.vb similarity index 100% rename from ECM.JobRunner.Windows/Models/Jobs/JobType.vb rename to ECM.JobRunner.Common/Models/Jobs/JobType.vb diff --git a/ECM.JobRunner.Windows/Models/Jobs/StatusItem.vb b/ECM.JobRunner.Common/Models/Jobs/StatusItem.vb similarity index 100% rename from ECM.JobRunner.Windows/Models/Jobs/StatusItem.vb rename to ECM.JobRunner.Common/Models/Jobs/StatusItem.vb diff --git a/ECM.JobRunner.Windows/Models/Profiles/ImportFile.vb b/ECM.JobRunner.Common/Models/Profiles/ImportFile.vb similarity index 100% rename from ECM.JobRunner.Windows/Models/Profiles/ImportFile.vb rename to ECM.JobRunner.Common/Models/Profiles/ImportFile.vb diff --git a/ECM.JobRunner.Windows/Models/Profiles/ImportProfile.vb b/ECM.JobRunner.Common/Models/Profiles/ImportProfile.vb similarity index 100% rename from ECM.JobRunner.Windows/Models/Profiles/ImportProfile.vb rename to ECM.JobRunner.Common/Models/Profiles/ImportProfile.vb diff --git a/ECM.JobRunner.Windows/Models/Profiles/ImportProfileStep.vb b/ECM.JobRunner.Common/Models/Profiles/ImportProfileStep.vb similarity index 83% rename from ECM.JobRunner.Windows/Models/Profiles/ImportProfileStep.vb rename to ECM.JobRunner.Common/Models/Profiles/ImportProfileStep.vb index af35c7e..249c48b 100644 --- a/ECM.JobRunner.Windows/Models/Profiles/ImportProfileStep.vb +++ b/ECM.JobRunner.Common/Models/Profiles/ImportProfileStep.vb @@ -1,6 +1,4 @@ -Imports System.Runtime.Serialization - -Public Class ImportProfileStep +Public Class ImportProfileStep Public Property Active As Boolean Public Property Id As Integer Public Property ProfileId As Integer diff --git a/ECM.JobRunner.Windows/Models/Windream/ObjectType.vb b/ECM.JobRunner.Common/Models/Windream/ObjectType.vb similarity index 100% rename from ECM.JobRunner.Windows/Models/Windream/ObjectType.vb rename to ECM.JobRunner.Common/Models/Windream/ObjectType.vb diff --git a/ECM.JobRunner.Web/Components/NewButton.razor b/ECM.JobRunner.Web/Components/NewButton.razor new file mode 100644 index 0000000..973e827 --- /dev/null +++ b/ECM.JobRunner.Web/Components/NewButton.razor @@ -0,0 +1,11 @@ + + + + + New + + +@code { + [Parameter] + public string? linkUrl { get; set; } +} diff --git a/ECM.JobRunner.Web/ECM.JobRunner.Web.csproj b/ECM.JobRunner.Web/ECM.JobRunner.Web.csproj index 846afe9..700a527 100644 --- a/ECM.JobRunner.Web/ECM.JobRunner.Web.csproj +++ b/ECM.JobRunner.Web/ECM.JobRunner.Web.csproj @@ -7,6 +7,7 @@ + diff --git a/ECM.JobRunner.Web/Pages/ImportProfile/ProfileIndex.razor b/ECM.JobRunner.Web/Pages/ImportProfile/ProfileIndex.razor index 799c916..40c5046 100644 --- a/ECM.JobRunner.Web/Pages/ImportProfile/ProfileIndex.razor +++ b/ECM.JobRunner.Web/Pages/ImportProfile/ProfileIndex.razor @@ -71,7 +71,7 @@ else
- + diff --git a/ECM.JobRunner.Web/Pages/ImportProfile/ShowProfile.razor b/ECM.JobRunner.Web/Pages/ImportProfile/ShowProfile.razor index deb50c5..3e079a0 100644 --- a/ECM.JobRunner.Web/Pages/ImportProfile/ShowProfile.razor +++ b/ECM.JobRunner.Web/Pages/ImportProfile/ShowProfile.razor @@ -72,10 +72,6 @@ else -

Profilschritte

- - -
} @@ -127,10 +123,10 @@ else bool confirmed = await JsRuntime.InvokeAsync("confirm", "Are you sure?"); if (confirmed) { - //if (await Jobs.DeleteJob(profile) == true) - //{ - // Navigation.NavigateTo($"/jobs"); - //}; + if (await Import.DeleteProfile(profile) == true) + { + Navigation.NavigateTo($"/jobs"); + }; } } } diff --git a/ECM.JobRunner.Web/Pages/ImportStep/EditStep.razor b/ECM.JobRunner.Web/Pages/ImportStep/EditStep.razor index d15ecb8..a41faad 100644 --- a/ECM.JobRunner.Web/Pages/ImportStep/EditStep.razor +++ b/ECM.JobRunner.Web/Pages/ImportStep/EditStep.razor @@ -32,7 +32,7 @@ if (result == true) { - Navigation.NavigateTo($"/profiles/import/{profile.Id}"); + Navigation.NavigateTo($"/profiles/import/{profile.Id}/steps"); } } } diff --git a/ECM.JobRunner.Web/Pages/ImportStep/ListSteps.razor b/ECM.JobRunner.Web/Pages/ImportStep/ListSteps.razor index d864c1d..8c3d824 100644 --- a/ECM.JobRunner.Web/Pages/ImportStep/ListSteps.razor +++ b/ECM.JobRunner.Web/Pages/ImportStep/ListSteps.razor @@ -1,7 +1,5 @@ @using ECM.JobRunner.Common.JobRunnerReference; @using ECM.JobRunner.Web.Data; -@inject JobService Jobs -@inject ImportService Import; @if (Profile == null) { @@ -45,7 +43,7 @@ else @step.IndexName
- @step.Method + Process @step.Scope with Method @step.Method } diff --git a/ECM.JobRunner.Web/Pages/ImportStep/NewStep.razor b/ECM.JobRunner.Web/Pages/ImportStep/NewStep.razor new file mode 100644 index 0000000..95be4a5 --- /dev/null +++ b/ECM.JobRunner.Web/Pages/ImportStep/NewStep.razor @@ -0,0 +1,40 @@ +@page "/profiles/import/{profileId:int}/steps/new" +@using ECM.JobRunner.Common.JobRunnerReference; +@using ECM.JobRunner.Web.Data; +@inject NavigationManager Navigation; +@inject ImportService Profile; + +Schritt bearbeiten + +

Schritt bearbeiten

+ + + +@code { + [Parameter] + public int ProfileId { get; set; } + + [Parameter] + public int StepId { get; set; } + + public ImportProfile? profile; + + private async void OnFormSubmit(EditContext ctx) + { + ImportProfile profile = await Profile.GetProfile(ProfileId); + ImportProfileStep step = (ImportProfileStep)ctx.Model; + + // TODO: This is ugly and manual and needs to be abstracted. + var steps = profile.Steps.ToList(); + steps.Add(step); + + profile.Steps = steps.ToArray(); + + bool result = await Profile.UpdateProfile(profile); + + if (result == true) + { + Navigation.NavigateTo($"/profiles/import/{profile.Id}"); + } + } +} \ No newline at end of file diff --git a/ECM.JobRunner.Web/Pages/ImportStep/ShowStep.razor b/ECM.JobRunner.Web/Pages/ImportStep/ShowStep.razor index 068565c..c2bdcb0 100644 --- a/ECM.JobRunner.Web/Pages/ImportStep/ShowStep.razor +++ b/ECM.JobRunner.Web/Pages/ImportStep/ShowStep.razor @@ -114,7 +114,7 @@ else
- + Back @@ -125,7 +125,7 @@ else Edit - + Delete @@ -156,19 +156,22 @@ else } } - protected async void DeleteJob() + protected async void DeleteStep() { if (profile != null) { bool confirmed = await JsRuntime.InvokeAsync("confirm", "Are you sure?"); if (confirmed) { - var steps = profile.Steps.Where(s => s.Id != StepId).ToArray(); + var steps = profile.Steps. + ToList(). + Where(s => s.Id != StepId). + ToArray(); profile.Steps = steps; if (await Import.UpdateProfile(profile) == true) { - Navigation.NavigateTo($"/profiles/import/{ProfileId}"); + Navigation.NavigateTo($"/profiles/import/{ProfileId}/steps"); }; } } diff --git a/ECM.JobRunner.Web/Pages/ImportStep/StepForm.razor b/ECM.JobRunner.Web/Pages/ImportStep/StepForm.razor index a03df84..7d07850 100644 --- a/ECM.JobRunner.Web/Pages/ImportStep/StepForm.razor +++ b/ECM.JobRunner.Web/Pages/ImportStep/StepForm.razor @@ -161,7 +161,7 @@ else if (StepId == Constants.ENTITY_ID_NEW) { - step = new ImportProfileStep() { Id = Constants.ENTITY_ID_NEW }; + step = new ImportProfileStep() { Id = Constants.ENTITY_ID_NEW, ProfileId = ProfileId }; } else { diff --git a/ECM.JobRunner.Web/Pages/ImportStep/StepIndex.razor b/ECM.JobRunner.Web/Pages/ImportStep/StepIndex.razor new file mode 100644 index 0000000..0cefe35 --- /dev/null +++ b/ECM.JobRunner.Web/Pages/ImportStep/StepIndex.razor @@ -0,0 +1,51 @@ +@page "/profiles/import/{profileId:int}/steps" + +@using ECM.JobRunner.Common.JobRunnerReference +@using ECM.JobRunner.Web.Data +@using ECM.JobRunner.Web.Pages.ImportStep + +@inject ImportService Import + +

Profilschritte

+ +@if (profile == null) +{ +
    +
  • Loading Steps..
  • +
+} +else +{ + + +
+} + + +@code { + [Parameter] + public int ProfileId { get; set; } + + private ImportProfile? profile; + + protected async override void OnInitialized() + { + profile = await Import.GetProfile(ProfileId); + + StateHasChanged(); + } +} diff --git a/ECM.JobRunner.Windows/ECM.JobRunner.Windows.vbproj b/ECM.JobRunner.Windows/ECM.JobRunner.Windows.vbproj index 809b67b..2a3896e 100644 --- a/ECM.JobRunner.Windows/ECM.JobRunner.Windows.vbproj +++ b/ECM.JobRunner.Windows/ECM.JobRunner.Windows.vbproj @@ -122,14 +122,6 @@ - - - - - - - - True Application.myapp diff --git a/ECM.JobRunner.Windows/Scheduler/JobListener.vb b/ECM.JobRunner.Windows/Scheduler/JobListener.vb index f1c1488..155669f 100644 --- a/ECM.JobRunner.Windows/Scheduler/JobListener.vb +++ b/ECM.JobRunner.Windows/Scheduler/JobListener.vb @@ -2,6 +2,7 @@ Imports DigitalData.Modules.Logging Imports Quartz Imports Quartz.Listener +Imports ECM.JobRunner.Common Namespace Scheduler Public Class JobListener diff --git a/ECM.JobRunner.Windows/Scheduler/JobResult.vb b/ECM.JobRunner.Windows/Scheduler/JobResult.vb index 725528b..26b876d 100644 --- a/ECM.JobRunner.Windows/Scheduler/JobResult.vb +++ b/ECM.JobRunner.Windows/Scheduler/JobResult.vb @@ -1,4 +1,6 @@ -Public Class JobResult +Imports ECM.JobRunner.Common + +Public Class JobResult Public Property Successful As Boolean Public Property Description As String Public Property Steps As List(Of HistoryItem.HistoryStep) diff --git a/ECM.JobRunner.Windows/Scheduler/Jobs/FileImportJob.vb b/ECM.JobRunner.Windows/Scheduler/Jobs/FileImportJob.vb index ac63662..3ab85a9 100644 --- a/ECM.JobRunner.Windows/Scheduler/Jobs/FileImportJob.vb +++ b/ECM.JobRunner.Windows/Scheduler/Jobs/FileImportJob.vb @@ -2,6 +2,7 @@ Imports Quartz Imports System.Text.RegularExpressions Imports DigitalData.Modules.Filesystem +Imports ECM.JobRunner.Common Namespace Scheduler.Jobs diff --git a/ECM.JobRunner.Windows/State.vb b/ECM.JobRunner.Windows/State.vb index 1be8dc9..dd85b76 100644 --- a/ECM.JobRunner.Windows/State.vb +++ b/ECM.JobRunner.Windows/State.vb @@ -4,6 +4,7 @@ Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Language Imports ECM.JobRunner.Windows.Scheduler Imports DigitalData.Modules.Windream +Imports ECM.JobRunner.Common Public Class State Inherits BaseClass diff --git a/ECM.JobRunner.Windows/WCF/Methods/UpdateProfile.vb b/ECM.JobRunner.Windows/WCF/Methods/UpdateProfile.vb index 020b169..c6519b7 100644 --- a/ECM.JobRunner.Windows/WCF/Methods/UpdateProfile.vb +++ b/ECM.JobRunner.Windows/WCF/Methods/UpdateProfile.vb @@ -1,5 +1,6 @@ Imports DigitalData.Modules.Database Imports DigitalData.Modules.Logging +Imports DigitalData.Modules.Language Imports ECM.JobRunner.Common Imports ECM.JobRunner.Windows.Scheduler @@ -121,9 +122,9 @@ Public Class UpdateProfile oCommand.Parameters.Add("WM_OBJECTTYPE", SqlDbType.NVarChar, 100).Value = oProfile.ObjectTypeName oCommand.Parameters.Add("SOURCE_FOLDER", SqlDbType.NVarChar, 500).Value = oProfile.SourceFolder oCommand.Parameters.Add("TARGET_FOLDER", SqlDbType.NVarChar, 500).Value = oProfile.TargetFolder - oCommand.Parameters.Add("BACKUP_FOLDER", SqlDbType.NVarChar, 500).Value = oProfile.BackupFolder - oCommand.Parameters.Add("EXCLUDE_REGEX", SqlDbType.NVarChar, 5000).Value = oProfile.FileExcludeRegex - oCommand.Parameters.Add("SF_DATE_FORMAT", SqlDbType.NVarChar, 50).Value = oProfile.SubfolderDateFormat + oCommand.Parameters.Add("BACKUP_FOLDER", SqlDbType.NVarChar, 500).Value = Utils.NotNull(oProfile.BackupFolder, String.Empty) + oCommand.Parameters.Add("EXCLUDE_REGEX", SqlDbType.NVarChar, 5000).Value = Utils.NotNull(oProfile.FileExcludeRegex, String.Empty) + oCommand.Parameters.Add("SF_DATE_FORMAT", SqlDbType.NVarChar, 50).Value = Utils.NotNull(oProfile.SubfolderDateFormat, String.Empty) oCommand.Parameters.Add("DEL_FILE_SUCCESS", SqlDbType.Bit).Value = oProfile.DeleteFiles oCommand.Parameters.Add("INCL_SUBFOLDER", SqlDbType.Bit).Value = oProfile.IncludeSubfolders oCommand.Parameters.Add("ACTIVE", SqlDbType.Bit).Value = oProfile.Active @@ -213,9 +214,9 @@ Public Class UpdateProfile oCommand.Parameters.Add("IDX_NAME", SqlDbType.NVarChar, 100).Value = oStep.IndexName oCommand.Parameters.Add("METHOD", SqlDbType.NVarChar, 100).Value = oStep.Method - oCommand.Parameters.Add("ARGUMENT1", SqlDbType.NVarChar, 500).Value = oStep.Argument1 - oCommand.Parameters.Add("ARGUMENT2", SqlDbType.NVarChar, 500).Value = oStep.Argument2 - oCommand.Parameters.Add("ARGUMENT3", SqlDbType.NVarChar, 500).Value = oStep.Argument3 + oCommand.Parameters.Add("ARGUMENT1", SqlDbType.NVarChar, 500).Value = Utils.NotNull(oStep.Argument1, String.Empty) + oCommand.Parameters.Add("ARGUMENT2", SqlDbType.NVarChar, 500).Value = Utils.NotNull(oStep.Argument2, String.Empty) + oCommand.Parameters.Add("ARGUMENT3", SqlDbType.NVarChar, 500).Value = Utils.NotNull(oStep.Argument3, String.Empty) oCommand.Parameters.Add("SCOPE", SqlDbType.NVarChar, 50).Value = oStep.Scope oCommand.Parameters.Add("ACTIVE", SqlDbType.Bit).Value = oStep.Active oCommand.Parameters.Add("GUID", SqlDbType.Int).Value = oStep.Id @@ -232,9 +233,11 @@ Public Class UpdateProfile Private Function DoCreateImportProfileSteps(pData As UpdateProfileRequest, pIdList As List(Of Integer)) As Boolean Dim oProfile = pData.ImportProfile - Dim oSQL As String = "INSERT INTO TBECM_JR_FIW_STEP - (PROFILE_ID, IDX_NAME, METHOD, ARGUMENT1, ARGUMENT2, ARGUMENT3, SCOPE, ACTIVE) VALUES - (@PROFILE_ID, @IDX_NAME, @METHOD, @ARGUMENT1, @ARGUMENT2, @ARGUMENT3, @SCOPE, @ACTIVE)" + Dim oSQL As String = "INSERT INTO TBECM_JR_FIW_STEP ( + PROFILE_ID, IDX_NAME, METHOD, ARGUMENT1, ARGUMENT2, ARGUMENT3, SCOPE, ACTIVE + ) VALUES ( + @PROFILE_ID, @IDX_NAME, @METHOD, @ARGUMENT1, @ARGUMENT2, @ARGUMENT3, @SCOPE, @ACTIVE + )" Dim oResults As New List(Of Boolean) @@ -246,9 +249,9 @@ Public Class UpdateProfile oCommand.Parameters.Add("PROFILE_ID", SqlDbType.Int).Value = oStep.ProfileId oCommand.Parameters.Add("IDX_NAME", SqlDbType.NVarChar, 100).Value = oStep.IndexName oCommand.Parameters.Add("METHOD", SqlDbType.NVarChar, 100).Value = oStep.Method - oCommand.Parameters.Add("ARGUMENT1", SqlDbType.NVarChar, 500).Value = oStep.Argument1 - oCommand.Parameters.Add("ARGUMENT2", SqlDbType.NVarChar, 500).Value = oStep.Argument2 - oCommand.Parameters.Add("ARGUMENT3", SqlDbType.NVarChar, 500).Value = oStep.Argument3 + oCommand.Parameters.Add("ARGUMENT1", SqlDbType.NVarChar, 500).Value = Utils.NotNull(oStep.Argument1, String.Empty) + oCommand.Parameters.Add("ARGUMENT2", SqlDbType.NVarChar, 500).Value = Utils.NotNull(oStep.Argument2, String.Empty) + oCommand.Parameters.Add("ARGUMENT3", SqlDbType.NVarChar, 500).Value = Utils.NotNull(oStep.Argument3, String.Empty) oCommand.Parameters.Add("SCOPE", SqlDbType.NVarChar, 50).Value = oStep.Scope oCommand.Parameters.Add("ACTIVE", SqlDbType.Bit).Value = oStep.Active @@ -270,11 +273,12 @@ Public Class UpdateProfile For Each oId In pIdList Try - Dim oStep = pData.ImportProfile.Steps.Where(Function(s) s.Id = oId).SingleOrDefault() + Logger.Debug("Preparing to delete Step [{0}]", oId) Dim oCommand As New SqlClient.SqlCommand(oSQL) - oCommand.Parameters.Add("GUID", SqlDbType.Int).Value = oStep.Id + oCommand.Parameters.Add("GUID", SqlDbType.Int).Value = oId + Logger.Debug("Deleting Step [{0}]..", oId) oResults.Add(Database.ExecuteNonQuery(oCommand)) Catch ex As Exception oResults.Add(False)