From cec2499264d3b628534bc3248d7adfb6f23d8af0 Mon Sep 17 00:00:00 2001 From: Aditya Bist Date: Tue, 17 Apr 2018 17:02:22 -0700 Subject: [PATCH] added step status (#604) --- .../Agent/Contracts/AgentJobHistoryInfo.cs | 1 + src/Microsoft.SqlTools.ServiceLayer/Agent/JobUtilities.cs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/Microsoft.SqlTools.ServiceLayer/Agent/Contracts/AgentJobHistoryInfo.cs b/src/Microsoft.SqlTools.ServiceLayer/Agent/Contracts/AgentJobHistoryInfo.cs index cc4e7b6c..03934fad 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Agent/Contracts/AgentJobHistoryInfo.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/Agent/Contracts/AgentJobHistoryInfo.cs @@ -42,6 +42,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent.Contracts public string StepName { get; set; } public string Message { get; set; } public DateTime RunDate { get; set; } + public int RunStatus { get; set; } } diff --git a/src/Microsoft.SqlTools.ServiceLayer/Agent/JobUtilities.cs b/src/Microsoft.SqlTools.ServiceLayer/Agent/JobUtilities.cs index ebab1728..c91b79b7 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Agent/JobUtilities.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/Agent/JobUtilities.cs @@ -114,11 +114,13 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent string stepName = Convert.ToString(jobRow[UrnStepName], System.Globalization.CultureInfo.InvariantCulture); string message = Convert.ToString(jobRow[UrnMessage], System.Globalization.CultureInfo.InvariantCulture); DateTime runDate = Convert.ToDateTime(jobRow[UrnRunDate], System.Globalization.CultureInfo.InvariantCulture); + int runStatus = Convert.ToInt32(jobRow[UrnRunStatus], System.Globalization.CultureInfo.InvariantCulture); AgentJobStep step = new AgentJobStep(); step.StepId = stepId; step.StepName = stepName; step.Message = message; step.RunDate = runDate; + step.RunStatus = runStatus; return step; } }