private static string CreateSummary(EffortSheet sheet) { string result = $"Der noch abzurechnende stündliche Aufwand beträgt: **{sheet.SumHourlyEffort()}h**"; result += Environment.NewLine; result += $"Die noch abzurechnende Anzahl an Iterationen beträgt: **{sheet.SumIterations()} Iterationen**"; return(result); }
private static string CreateHourlyEffortTable(EffortSheet sheet) { string result = Environment.NewLine; result += Environment.NewLine; result += "| Aktivität | Projekt | Von | Bis | Aufwand | " + Environment.NewLine; result += "| --- | --- | --- | --- | ---: |"; IReadOnlyList <HourlyEffortGroup> effortGroups = sheet.GetAllEffortGroups(); IEnumerable <HourlyEffortGroup> orderedEffortGroups = effortGroups .OrderBy(x => x.RepositoryName) .ThenBy(x => x.FirstDate) .ToList(); foreach (var group in orderedEffortGroups) { result += Environment.NewLine; result += $"| [{group.Name}]({group.LinkToDetailedDescription.AbsolutePath}) "; result += $"| {group.RepositoryName} "; result += $"| {group.FirstDate.ToShortDateString()} "; result += $"| {group.LastDate.ToShortDateString()} "; result += $"| {group.EffortInHours}h |"; } result += Environment.NewLine; result += $"| Summe | |"; result += $" {sheet.From.ToShortDateString()} | {sheet.To.ToShortDateString()} | {sheet.SumHourlyEffort()}h |"; return(result); }