Esempio n. 1
0
 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 });
 }
Esempio n. 2
0
        public virtual void Exec()
        {
            if (jobstr != null)
            {
                job = JsonConvert.DeserializeObject<BatchJob>(jobstr);

                FunctionLogic();
            }
        }
Esempio n. 3
0
        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();
        }