Пример #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));
        }