Ejemplo n.º 1
0
        private void UpdateNewDueTime(DateTime requiredTime)
        {
            int taskCategory = Convert.ToInt32(_task.TaskType);
            var tp           = new TaskPropertyResponseLeadtime(taskCategory);
            int leadTime     = tp.Leadtime;

            _task.Rush = false;
            int hours = MyDateTime.GetDiffHoursOfWeekday(Convert.ToDateTime(_task.SubmitTime), requiredTime);

            if (hours < leadTime)
            {
                _task.Rush = true;
            }

            _task.RequiredTime   = requiredTime;
            _task.LastUpdateTime = DateTime.Now;

            _db.Entry(_task).State = EntityState.Modified;
            _db.SaveChanges();
        }
Ejemplo n.º 2
0
        private int GetLeadtime()
        {
            var tp = new TaskPropertyResponseLeadtime(_taskCategory);

            return(tp.Leadtime);
        }