mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-24 17:24:14 -05:00
added ability to start at step (#758)
This commit is contained in:
committed by
Karl Burtram
parent
e4808c12aa
commit
046563318a
@@ -53,7 +53,14 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent
|
||||
CategoryType = job.CategoryType,
|
||||
LastRun = job.LastRun != null ? job.LastRun.ToString() : string.Empty,
|
||||
NextRun = job.NextRun != null ? job.NextRun.ToString() : string.Empty,
|
||||
JobId = job.JobID != null ? job.JobID.ToString() : null
|
||||
JobId = job.JobID != null ? job.JobID.ToString() : null,
|
||||
OperatorToEmail = job.OperatorToEmail,
|
||||
OperatorToPage = job.OperatorToPage,
|
||||
StartStepId = job.StartStepID,
|
||||
EmailLevel = job.EmailLevel,
|
||||
PageLevel = job.PageLevel,
|
||||
EventLogLevel = job.EventLogLevel,
|
||||
DeleteLevel = job.DeleteLevel
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent.Contracts
|
||||
public string JobId { get; set; }
|
||||
public string OperatorToEmail { get; set; }
|
||||
public string OperatorToPage { get; set; }
|
||||
public int StartStepID { get; set; }
|
||||
public int StartStepId { get; set; }
|
||||
public JobCompletionActionCondition EmailLevel { get; set; }
|
||||
public JobCompletionActionCondition PageLevel { get; set; }
|
||||
public JobCompletionActionCondition EventLogLevel { get; set; }
|
||||
|
||||
@@ -166,6 +166,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent
|
||||
// other information
|
||||
private string script = null;
|
||||
private string scriptName = null;
|
||||
private int startStepID = -1;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -661,6 +662,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent
|
||||
this.owner = jobInfo.Owner;
|
||||
this.description = jobInfo.Description;
|
||||
this.enabled = jobInfo.Enabled;
|
||||
this.startStepID = jobInfo.StartStepId;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -1184,6 +1186,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent
|
||||
}
|
||||
else
|
||||
{
|
||||
job.StartStepID = this.startStepID != -1 ? this.startStepID : job.StartStepID;
|
||||
job.Alter();
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Globalization;
|
||||
using Microsoft.SqlTools.ServiceLayer.Agent.Contracts;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.Agent
|
||||
{
|
||||
@@ -182,5 +183,40 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent
|
||||
return this.description;
|
||||
}
|
||||
}
|
||||
|
||||
public int StartStepID
|
||||
{
|
||||
get { return this.startStepID; }
|
||||
}
|
||||
|
||||
public string OperatorToEmail
|
||||
{
|
||||
get { return this.operatorToEmail; }
|
||||
}
|
||||
|
||||
public string OperatorToPage
|
||||
{
|
||||
get { return this.operatorToPage; }
|
||||
}
|
||||
|
||||
public JobCompletionActionCondition EmailLevel
|
||||
{
|
||||
get { return (JobCompletionActionCondition)this.emailLevel; }
|
||||
}
|
||||
|
||||
public JobCompletionActionCondition PageLevel
|
||||
{
|
||||
get { return (JobCompletionActionCondition)this.pageLevel; }
|
||||
}
|
||||
|
||||
public JobCompletionActionCondition EventLogLevel
|
||||
{
|
||||
get { return (JobCompletionActionCondition)this.eventLogLevel; }
|
||||
}
|
||||
|
||||
public JobCompletionActionCondition DeleteLevel
|
||||
{
|
||||
get { return (JobCompletionActionCondition)this.eventLogLevel; }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user