public static void UpdateJobName(int autoID, string name) { JobLM job = JobStorage.Get(autoID); job.Name = name; job.DeleteFlag = 0; JobStorage.Save(job); }
public static void UpdateJobDecimalCount(int jobAutoID, int decimalCount) { JobLM job = JobStorage.Get(jobAutoID); if (job != null) { job.DecimalCount = decimalCount; JobStorage.Save(job); } }
public static void DeleteJob(int autoID) { JobLM job = JobStorage.Get(autoID); JobStorage.Delete(autoID); if (job != null && job.PlanAutoID > 0) { PlanLM plan = PlanStorage.Get(job.PlanAutoID); plan.ReferenceCount--; PlanStorage.Save(plan); } }
public static void UpdateJob(int jobAutoID, EvaluationContext context) { Dictionary <string, string> variables = new Dictionary <string, string>(); foreach (KeyValuePair <string, object> variable in context.SourceVariables) { if (variable.Value != null) { variables.Add(variable.Key, variable.Value.ToString()); } } JobLM job = JobStorage.Get(jobAutoID); job.IsComplete = context.Steps.All(i => i.State != StepState.Unready); job.Variables = new JsonSerializer().SerializeToString(variables); job.UpdateTime = DateTime.Now; JobStorage.Save(job); }
public static JobLM GetJob(int autoID) { return(JobStorage.Get(autoID)); }