Beispiel #1
0
        protected void CancelJob(Guid guid)
        {
            using (var context = ContextManager.Instance.CreateContext(ConnectionMode.AutoOpen, TransactionMode.AutoCommit))
            {
                var job = new JobInstance(context);
                job.Guid = guid;
                job.Load();
                job.LoadParameters();

                job.Cancel();
            }
        }
Beispiel #2
0
        protected JobInstance LoadJob(Guid guid)
        {
            using (var context = ContextManager.Instance.CreateContext(ConnectionMode.AutoOpen, TransactionMode.DirtyRead))
            {
                var job = new JobInstance(context);
                job.Guid = guid;
                job.Load();
                job.LoadParameters();

                return job;
            }
        }