private ReportObject.Snapshot GetSnapshotData(PotentialCategoryInfo categoryInfo) { if (reportObject.SnapshotData.Data.ContainsKey(categoryInfo.SequenceNumber)) { return(reportObject.SnapshotData.Data[categoryInfo.SequenceNumber]); } return(new ReportObject.Snapshot()); }
private void PrintReportDetail(PdfPTable table, PotentialCategoryInfo categoryInfo) { ReportObject.Snapshot snapshotData = GetSnapshotData(categoryInfo); if (categoryInfo.SequenceNumber >= 8 && categoryInfo.SequenceNumber < 9 && categoryInfo.SequenceNumber != 8.7) { _TotalIncome.Amount += snapshotData.Amount; _TotalIncome.Count += snapshotData.Count; } string[] values; if (categoryInfo.SequenceNumber == 0) { values = new string[] { categoryInfo.Category, string.Empty, string.Empty }; } else if (categoryInfo.SequenceNumber == 8.7) { values = new string[] { categoryInfo.Category, (snapshotData.Amount / 100).ToString("0.00%"), string.Empty }; } else if (categoryInfo.SequenceNumber == 6.2 || categoryInfo.SequenceNumber == 6.4 || (categoryInfo.SequenceNumber >= 8 && categoryInfo.SequenceNumber <= 8.6) || (categoryInfo.SequenceNumber > 8.7 && categoryInfo.SequenceNumber < 8.8)) { values = new string[] { categoryInfo.Category, string.Empty, snapshotData.Amount.ToString("c") }; } else if (categoryInfo.SequenceNumber == 9) { values = new string[] { categoryInfo.Category, string.Empty, _TotalIncome.Amount.ToString("c") }; } else { values = new string[] { categoryInfo.Category, snapshotData.Count.ToString(), snapshotData.Amount.ToString("c") }; } if (categoryInfo.SequenceNumber == 9) { PrintReportDetailValues(table, string.Empty, string.Empty, "---------------", 0); } PrintReportDetailValues(table, values[0], values[1], values[2], categoryInfo.Tabs); }