List<ReportDataInfo> Lrdi = new List<ReportDataInfo>(); ReportDataInfo rdi = new ReportDataInfo(); ReportDataInfo RdiMerge=new ReportDataInfo(); string[] AccountTypeCodeCustomArray = AccountCodeTypeCustom.Split(",".tochararray()); string[] SubTypeCodeCustomArray = SubAccountTypeCodeCustom.Split(",".tochararray()); string[] AccountCodeCustomArray = AccountCodeCustom.Split(",".tochararray()); for (int i = 0; i < AccountCodeTypeCustom.Length; i++) { rdi = ExportDataToCSV.GetLedgerReportData(Globals.GetInt( AccountTypeCodeCustomArray[i],0),Globals.GetInt( SubTypeCodeCustomArray[i],Globals.GetInt( AccountCodeCustomArray[i],this.CurrentSessionInfo.Company.CompanyCode,this.CurrentSessionInfo.FinancialYear.StartDate,this.CurrentSessionInfo.FinancialYear.EndDate); // Lrdi.Add(rdi); RdiMerge.Rows.Concat(rdi.Rows); //RdiMerge.Reportheading = rdi.Reportheading; //RdiMerge.Rows = rdi.Rows; } CurrentSessionInfo.ReportData = RdiMerge;
这是我以前尝试过的事情
现在我的问题是
我希望从ExportDataToCSV.GetLedgerReportData()返回合并返回的ReportDataInfo;
无论从ExportDataToCSV.GetLedgerReportData()返回什么值,我都被困在这里;
我想合并到单个ReportDataInfo然后传递给CurrentSessionInfo.ReportData = RdiMerge;
ReportDataInfolooks之类的
[Serializable] public class ReportDataInfo { public string Reportheading { get; set; } public List<ReportColumnInfo> Rows { get; set; } }