示例#1
0
        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);
        }
示例#2
0
 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);
 }
示例#3
0
        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);
        }
示例#4
0
        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);
        }
示例#5
0
 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);
 }