Exemple #1
0
        /// <summary>
        /// Sets the actual work.
        /// </summary>
        /// <param name="actualWork">The actual work.</param>
        public void SetActualWork(double actualWork)
        {
            if (actualWork == 0)
            {
                PercentComplete = 0;
                return;
            }
            //find stop date by work value
            Query <Interval> query = new Query <Interval>();
            AssignmentBaseFunctor <double> workFunctor = GetWorkFunctor();
            TrueFalsePredicate <Interval>  alwaysTrue  = new TrueFalsePredicate <Interval>(true);
            DateAtWorkFunctor dateAtWork = new DateAtWorkFunctor(workFunctor, actualWork);

            query.Select(dateAtWork).From(workFunctor.CountourGenerator).Where(alwaysTrue.Evaluate).Execute();

            this.Stop = dateAtWork.Value;
        }
Exemple #2
0
        /// <summary>
        /// Sets the actual work.
        /// </summary>
        /// <param name="actualWork">The actual work.</param>
        public void SetActualWork(double actualWork)
        {
            if (actualWork == 0)
            {
                PercentComplete = 0;
                return;
            }
            //find stop date by work value
            Query<Interval> query = new Query<Interval>();
            AssignmentBaseFunctor<double> workFunctor = GetWorkFunctor();
            TrueFalsePredicate<Interval> alwaysTrue = new TrueFalsePredicate<Interval>(true);
            DateAtWorkFunctor dateAtWork = new DateAtWorkFunctor(workFunctor, actualWork);
            query.Select(dateAtWork).From(workFunctor.CountourGenerator).Where(alwaysTrue.Evaluate).Execute();

            this.Stop = dateAtWork.Value;
        }