public LogbookPrintedPageSubtotalsCollection(LogbookEntryDisplay.LogbookRowType groupType, string title, IEnumerable <LogbookEntryDisplay> lst) { GroupType = groupType; GroupTitle = title; m_list = new List <LogbookEntryDisplay>(lst); m_list.Sort((le1, le2) => { return(le1.EffectiveCatClass.CompareTo(le2.EffectiveCatClass)); }); }
private static void ConsolidateTotals(IDictionary <string, LogbookEntryDisplay> d, LogbookEntryDisplay.LogbookRowType rowType, OptionalColumn[] optionalColumns) { if (d == null || d.Count <= 1) { return; } LogbookEntryDisplay ledAll = new LogbookEntryDisplay() { RowType = rowType, OptionalColumns = optionalColumns }; foreach (LogbookEntryDisplay led in d.Values) { ledAll.AddFrom(led); } ledAll.CatClassDisplay = Resources.LogbookEntry.PrintTotalsAllCatClass; d[Resources.LogbookEntry.PrintTotalsAllCatClass] = ledAll; }