示例#1
0
        protected override ProgressStatusEnum GetPlanProgressStatus()
        {
            ProgressStatusEnum     progressStatus = ProgressStatusEnum.NotStarted;
            ScheduleItemCollection items          = _items as ScheduleItemCollection;

            if (EndDate <= StartDate)
            {
                progressStatus = ProgressStatusEnum.NotStarted;
            }
            else if (DateTime.Now.Date > EndDate)
            {
                progressStatus = ProgressStatusEnum.Uncompleted;
            }
            else
            {
                ScheduleItem item = items.LastDailyItem as ScheduleItem;

                if (item != null)
                {
                    if (item.CurrentIndex >= EndIndex)
                    {
                        progressStatus = ProgressStatusEnum.Completed;
                    }
                    else
                    {
                        progressStatus = ProgressStatusEnum.InProgress;
                    }
                }
            }

            return(progressStatus);
        }
示例#2
0
 public SchedulePlan(DateTime startDate) : base(startDate)
 {
     _items = new ScheduleItemCollection();
 }