Beispiel #1
0
        public RivalListReportPrinter(RivalListReport report, string path)
        {
            _report = report;
            _path   = path;

            //CompanyCount = report.Companies.Count < MaxCompanyCount ? report.Companies.Count : MaxCompanyCount;
        }
Beispiel #2
0
        private string GetRowsLayout(RivalListReport report, int firstIndex, int lastIndex)
        {
            var sb        = new StringBuilder();
            var groups    = new Queue <string>();
            var rowNumber = 0;

            foreach (var reportRow in report.Rows)
            {
                if (reportRow.QueryGroup.Count != 0)
                {
                    reportRow.QueryGroup.ForEach(g => groups.Enqueue(g));
                    sb.AppendLine(GetGroupRow(groups, firstIndex, lastIndex));
                }
                sb.AppendLine(GetRow(reportRow, groups, firstIndex, lastIndex, rowNumber++));
            }

            return(sb.ToString());
        }