예제 #1
0
        private Job GetExistingGlobalJob()
        {
            var viewModel = new GlobalJobViewModel();

            var jobId = Database.Instance.GetGlobalJobId();
            if (!string.IsNullOrEmpty(jobId))
            {
                return JobManager.Instance.GetJob(jobId);
            }
            else
            {
                return null;
            }
        }
예제 #2
0
        public ActionResult GlobalJob()
        {
            var viewModel = new GlobalJobViewModel();

            var globalJob = GetExistingGlobalJob();
            if (globalJob != null && globalJob.IsComplete)
            {
                Database.Instance.StoreGlobalJobId("");
            }
            else
            {
                viewModel.Job = globalJob;
            }

            return View(viewModel);
        }