예제 #1
0
        public int Add(WorkProcessType type)
        {
            var workProcess = new WorkProcess {Type = type};

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

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

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

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

            return(JsonSuccess(jobs));
        }
예제 #4
0
 // GET: Admin/WorkProcess
 public PartialViewResult Index(WorkProcessType type)
 {
     return(PartialView("_Index", type));
 }
예제 #5
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);
 }
예제 #6
0
        public JsonResult Progress(WorkProcessType type)
        {
            var jobs = workProcessService.Find(type).Where(p => p.IsRunning).ToList();

            return JsonSuccess(jobs);
        }
예제 #7
0
 // GET: Admin/WorkProcess
 public PartialViewResult Index(WorkProcessType type)
 {
     return PartialView("_Index", type);
 }
예제 #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));
        }