Exemple #1
0
        public long DurationInSeconds()
        {
            long seconds  = TimeEntries.Sum(timeEntry => timeEntry.DurationInSeconds());
            long duration = seconds + TimeDifference;

            if (duration > 0)
            {
                return(duration);
            }
            return(0);
        }
Exemple #2
0
        public TimeSpan CalculateSpan()
        {
            var seconds = TimeEntries.Sum(t => t.TimeElapsed.TotalSeconds);

            return(TimeSpan.FromSeconds(seconds));
        }
Exemple #3
0
 public void RefreshHours()
 {
     TotalHours   = TimeEntries.Sum(t => t.TimeEntryInfo.Hours);
     UnsavedHours =
         TimeEntries.Where(t => t.Origin != TimeEntryOrigin.RedmineService).Sum(t => t.TimeEntryInfo.Hours);
 }