public void saveJob(string data) { JobRecord job = new JobRecord(data); job.insertOb(); //if (job.name == "") job.name = "Default"; //saveJob(job); }
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. }
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. }
public void saveJob(JobRecord job) { job.insertOb(); }