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); }
public SchedulePlan(DateTime startDate) : base(startDate) { _items = new ScheduleItemCollection(); }