public long DurationInSeconds() { long seconds = TimeEntries.Sum(timeEntry => timeEntry.DurationInSeconds()); long duration = seconds + TimeDifference; if (duration > 0) { return(duration); } return(0); }
public TimeSpan CalculateSpan() { var seconds = TimeEntries.Sum(t => t.TimeElapsed.TotalSeconds); return(TimeSpan.FromSeconds(seconds)); }
public void RefreshHours() { TotalHours = TimeEntries.Sum(t => t.TimeEntryInfo.Hours); UnsavedHours = TimeEntries.Where(t => t.Origin != TimeEntryOrigin.RedmineService).Sum(t => t.TimeEntryInfo.Hours); }