public int Add(WorkProcessType type) { var workProcess = new WorkProcess {Type = type}; db.WorkProcesses.Add(workProcess); db.SaveChanges(); return workProcess.Id; }
public int Add(WorkProcessType type) { var workProcess = new WorkProcess { Type = type }; db.WorkProcesses.Add(workProcess); db.SaveChanges(); return(workProcess.Id); }
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)); }
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); }
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)); }