예제 #1
0
        public void saveJob(string data)
        {
            JobRecord job = new JobRecord(data);

            job.insertOb();
            //if (job.name == "") job.name = "Default";
            //saveJob(job);
        }
예제 #2
0
        public static string publishJob1(string userID, string jobName, string data)
        {
            JobRecord job = new JobRecord(data);


            job.active = true;
            job.type   = "ImageRegion";
            JobRecord oldjob = (JobRecord)job.selectOb("WHERE name='" + jobName + "'");

            if (oldjob != null)
            {
                return("Error: Job name, " + jobName + " already in use.");
            }
            else
            {
                job.insertOb();
            }
            return(job.serialize()); /// should include ID field.
        }
예제 #3
0
        public static string publishJob2(string userID, string jobName, string data)
        {
            JobRecord job = new JobRecord(data);


            job.active = true;
            job.type   = "ImageRegion";
            JobRecord oldjob = (JobRecord)job.selectOb("WHERE name='" + jobName + "'");

            if (oldjob != null)
            {
                job.ID = oldjob.ID;
                job.updateOb();
            }
            else
            {
                job.insertOb();
            }
            createTaskRecords(userID, job.ID);
            return(job.serialize()); /// should include ID field.
        }
예제 #4
0
 public void saveJob(JobRecord job)
 {
     job.insertOb();
 }