public void ImportNewPlotTasks() { var da = new DataAccessService(_connectionString); var query = QueryTemplates.Templates.GetTemplate("Import_PJOB_from_PLT_MNGR_PLOT_TICKET").Template; var result = da.ExecuteCommand(query); query = QueryTemplates.Templates.GetTemplate("Import_PTASK_from_PLT_MNGR_PLOT_TICKET").Template; result = da.ExecuteCommand(query); }
public void UpdateTaskStatus(int taskId, int taskStatus) { var connectionString = Configuration.Instance.GetConnectionString("WriteConnectionString"); var da = new DataAccessService(connectionString); var query = $"UPDATE PTASK SET S_PLTICKET_STATUS = {taskStatus} WHERE PTASKID = {taskId} "; var result = da.ExecuteCommand(query); }
public bool LockPlotTask(int taskId) { var da = new DataAccessService(_connectionString); var template = QueryTemplates.Templates.GetTemplate("Lock_PTASK_record").Template; var query = string.Format(template, taskId); var result = da.ExecuteCommand(query); return(result == 1); }
public bool UpdatePlotTaskStatus(int taskId, bool successful) { var da = new DataAccessService(_connectionString); var templateName = successful ? "Update_PTASK_record_to_successful_status" : "Update_PTASK_record_to_failed_status"; var template = QueryTemplates.Templates.GetTemplate(templateName).Template; var query = string.Format(template, taskId); var result = da.ExecuteCommand(query); return(result == 1); }
public void UpdatePlotJobStatusesFromPlotTaskStatuses() { var da = new DataAccessService(_connectionString); var query = QueryTemplates.Templates.GetTemplate("Update_PJOB_status_from_PTASK_statuses").Template; var result = da.ExecuteCommand(query); }