Пример #1
0
        internal void Update(ref double hours, ref DateTime start, ref DateTime end, ref bool allInactive)
        {
            if (this.Task2RequirementsTitle == null)
            {
                throw new ArgumentNullException("Task2RequirementsTitle", this.Title);
            }
            if (this.Task2MilestoneResolvedInTitle == null || this.Task2MilestoneResolvedInTitle != this.Task2RequirementsTitle.Requirements2MilestoneTitle)
            {
                throw new ArgumentOutOfRangeException("Task2MilestoneResolvedInTitle", this.Task2RequirementsTitle.Title);
            }
            if (this.Task2ProjectTitle == null || this.Task2ProjectTitle != this.Task2RequirementsTitle.Requirements2ProjectsTitle)
            {
                throw new ArgumentOutOfRangeException("Task2ProjectTitle", this.Title);
            }
            AdjustActive(ref allInactive);
            double   _hours = 0;
            DateTime _start = DateTime.MaxValue;
            DateTime _end   = DateTime.MinValue;

            foreach (Workload _wx in Workload)
            {
                _wx.Update(ref _hours, ref _start, ref _end);
            }
            if (_start != DateTime.MaxValue)
            {
                this.TaskStart = _start;
            }
            if (_end != DateTime.MinValue)
            {
                this.TaskEnd = _end;
            }
            DataModelExtensions.UpdateWorkload(ref hours, ref start, ref end, _hours, _start, _end);
        }
        internal void Update(ref double hours, ref DateTime start, ref DateTime end, ref bool allInactive)
        {
            double   _hours = 0;
            DateTime _start = DateTime.MaxValue;
            DateTime _end   = DateTime.MinValue;

            foreach (Tasks _tx in this.Tasks)
            {
                _tx.Update(ref _hours, ref _start, ref _end, ref allInactive);
            }
            DataModelExtensions.UpdateWorkload(ref hours, ref start, ref end, _hours, _start, _end);
            this.Hours = _hours;
        }
Пример #3
0
 public void Update(ref double hours, ref DateTime start, ref DateTime end)
 {
     MakeConsistent();
     DataModelExtensions.UpdateWorkload(ref hours, ref start, ref end, MyHours, MyDate, MyDate);
 }