예제 #1
0
 private TimeEntry CreateTimeEntry(DateTime fromDate, DateTime throughDate, TimeFrequency frequency, WorkEffort workEffort) =>
 new TimeEntryBuilder(this.Session)
 .WithRateType(new RateTypes(this.Session).StandardRate)
 .WithFromDate(fromDate)
 .WithThroughDate(throughDate)
 .WithTimeFrequency(frequency)
 .WithWorkEffort(workEffort)
 .Build();
예제 #2
0
        public decimal?ConvertToFrequency(decimal value, TimeFrequency timeFrequency)
        {
            var conversion = this.GetConvertToFactor(timeFrequency);

            if (conversion != null)
            {
                return(value * (decimal)conversion);
            }

            return(null);
        }
예제 #3
0
 private UnitOfMeasureConversion NewFrequencyConversion(TimeFrequency toFrequency, decimal conversionFactor)
 => new UnitOfMeasureConversionBuilder(this.Session)
 .WithToUnitOfMeasure(toFrequency)
 .WithConversionFactor(conversionFactor)
 .Build();
예제 #4
0
 public decimal?GetConvertToFactor(TimeFrequency timeFrquency)
 => this.UnitOfMeasureConversions?.FirstOrDefault(c => c.ToUnitOfMeasure.Equals(timeFrquency)).ConversionFactor;