Ejemplo n.º 1
0
        protected override ProgressStatusEnum GetPlanProgressStatus()
        {
            DateTime currentDate = DateTime.Now.Date;

            if (_items == null || currentDate < _startDate || _startDate >= _endDate)
            {
                return(ProgressStatusEnum.NotStarted);
            }

            CommonEbbCollection items = _items as CommonEbbCollection;

            int inprogressCount, completedCount, notStartedCount, uncompletedCount;

            items.TryGetProcessStatus(out inprogressCount, out completedCount, out notStartedCount, out uncompletedCount);
            items.AdjustDate();
            if (uncompletedCount > 0 && currentDate > _endDate)
            {
                return(ProgressStatusEnum.Uncompleted);
            }
            if (completedCount == _items.Count && currentDate >= items.LastReviewDate)
            {
                return(ProgressStatusEnum.Completed);
            }
            return(ProgressStatusEnum.InProgress);
        }
Ejemplo n.º 2
0
        public float GetCompletedPercent(out int inprogressCount, out int completedCount, out int notStartedCount, out int uncompletedCount)
        {
            CommonEbbCollection items = _items as CommonEbbCollection;

            items.TryGetProcessStatus(out inprogressCount, out completedCount, out notStartedCount, out uncompletedCount);
            var percent = (float)completedCount / (float)_items.Count;

            return(percent);
        }