public int Add(WorkProcessType type)
        {
            var workProcess = new WorkProcess {Type = type};

            db.WorkProcesses.Add(workProcess);
            db.SaveChanges();

            return workProcess.Id;
        }
Example #2
0
        public int Add(WorkProcessType type)
        {
            var workProcess = new WorkProcess {
                Type = type
            };

            db.WorkProcesses.Add(workProcess);
            db.SaveChanges();

            return(workProcess.Id);
        }
Example #3
0
        public JsonResult Progress(WorkProcessType type)
        {
            var jobs = workProcessService.Find(type).Where(p => p.IsRunning).ToList();

            return(JsonSuccess(jobs));
        }
Example #4
0
 // GET: Admin/WorkProcess
 public PartialViewResult Index(WorkProcessType type)
 {
     return(PartialView("_Index", type));
 }
 public IQueryable<WorkProcess> Find(WorkProcessType type)
 {
     var cutoffTime = DateTime.Now.Subtract(TimeSpan.FromHours(6));
     return db.WorkProcesses.Where(p => p.Type == type && p.DateCreated >= cutoffTime);
 }
        public JsonResult Progress(WorkProcessType type)
        {
            var jobs = workProcessService.Find(type).Where(p => p.IsRunning).ToList();

            return JsonSuccess(jobs);
        }
 // GET: Admin/WorkProcess
 public PartialViewResult Index(WorkProcessType type)
 {
     return PartialView("_Index", type);
 }
Example #8
0
        public IQueryable <WorkProcess> Find(WorkProcessType type)
        {
            var cutoffTime = DateTime.Now.Subtract(TimeSpan.FromHours(6));

            return(db.WorkProcesses.Where(p => p.Type == type && p.DateCreated >= cutoffTime));
        }