コード例 #1
0
        public ActionResult UpdateApplicants()
        {
            BackgroundJobsManager.RefreshAssignedApplicantsState();

            var message = new MessageViewModel()
            {
                Type    = MessageType.Success,
                Title   = "Success",
                Content = string.Format("All assigned applicants have beed updated at {0}", DateTime.Now),
            };

            TempData["Message"] = message;


            return(RedirectToAction("Index"));
        }
コード例 #2
0
        public ActionResult Index(AppConfigurationsViewModel vm)
        {
            if (ModelState.IsValid)
            {
                vm.SaveChanges();
                BackgroundJobsManager.Initialize();
                //TO DO: update background jobs here
                TempData["Message"] = new MessageViewModel()
                {
                    Type    = MessageType.Success,
                    Title   = "Success",
                    Content = string.Format("Your configuration has been updated at {0} UTC ... New changes will take effect in 1 min", DateTime.UtcNow),
                };

                return(RedirectToAction("Index"));
            }
            return(View(vm));
        }
コード例 #3
0
 public void InitBackgroundJobs()
 {
     BackgroundJobsManager.Initialize();
 }