예제 #1
0
파일: BatchJob.cs 프로젝트: meraruda/Job
 public static void SetJob(BatchJob job)
 {
     ado.NonQueryExcute(@"update SCM.B2B_BATCHJOB set
                             NAME = :NAME,
                             SERVER = :SERVER,
                             PATH = :PATH,
                             PROGRAMFILE = :PROGRAMFILE,
                             PARMS = :PARMS,
                             INTERVAL = :INTERVAL,
                             MAXINTERVAL = :MAXINTERVAL,
                             LOGPATH = :LOGPATH
                          where ID = :ID", new List<dynamic>() { job });
 }
예제 #2
0
        public virtual void Exec()
        {
            if (jobstr != null)
            {
                job = JsonConvert.DeserializeObject<BatchJob>(jobstr);

                FunctionLogic();
            }
        }
예제 #3
0
파일: BatchJob.cs 프로젝트: meraruda/Job
        public static string NewJob(BatchJob job)
        {
            ado.NonQueryExcute(@"insert into SCM.B2B_BATCHJOB
                                    (ID, NAME, SERVER, PATH, PROGRAMFILE, PARMS, INTERVAL, MAXINTERVAL, LOGPATH)
                                values
                                    ((select MAX(TO_NUMBER(ID)) + 1 from SCM.B2B_BATCHJOB),
                                    :NAME, : SERVER, :PATH, :PROGRAMFILE, :PARMS, :INTERVAL, :MAXINTERVAL, :LOGPATH)",
            new List<dynamic>() {
                    new {
                        NAME = job.NAME,
                        SERVER = job.SERVER,
                        PATH = job.PATH,
                        PROGRAMFILE = job.PROGRAMFILE,
                        PARMS = job.PARMS,
                        INTERVAL = job.INTERVAL,
                        MAXINTERVAL = job.MAXINTERVAL,
                        LOGPATH = job.LOGPATH

                    }
                });

            return ado.Query<string>("select MAX(TO_NUMBER(ID)) from SCM.B2B_BATCHJOB").First();
        }