Пример #1
0
        public static byte[] ViewPrintedReports(int managementCompanyId, int year, string reportLetterTypeName)
        {
            DataSet dsPrintedReports = GetPrintedReportsDataSet(managementCompanyId, year, reportLetterTypeName);

            ReportExecutionWrapper wrapper = new ReportExecutionWrapper();
            wrapper.SetReportName(getReportTemplateName(managementCompanyId, ReportReturnClass.ResultOfPrintedReport.ToString()));
            wrapper.AddParameters(new string[] { "SelectedReportYear" });

            return wrapper.GetReportContent(dsPrintedReports, new string[] { year.ToString() });
        }
Пример #2
0
        private static ReportExecutionWrapper getReportWrapper(DateTime beginDate, DateTime endDate, int managementCompanyId,
                                                               ReportLetterTypes reportLetterType)
        {
            string reportTemplateName;
            string[] parameterNames;
            if (reportLetterType == ReportLetterTypes.EOY)
            {
                reportTemplateName = ReportReturnClass.FiscalYearReport.ToString();
                parameterNames = new string[] { "BeginDate", "EndDate", "FiscalYearDividend", "Betreft", "Omschrijving", "SelectedFiscalYear",
                                                "accountHasDividend", "ShowLogo" };
            }
            else
            {
                reportTemplateName = ReportReturnClass.QuarterReport.ToString();
                parameterNames = new string[] { "BeginDate", "EndDate", "PortfolioDevelopment", "PortfolioOverview", "PortfolioSummary",
                                                "TransactionOverview", "MoneyMutations", "Chartcover", "Betreft", "Omschrijving", "ShowLogo" };
            }

            IDalSession session = NHSessionFactory.CreateSession();
            try
            {
                IManagementCompany managementCompany = ManagementCompanyMapper.GetManagementCompany(session, managementCompanyId);
                IReportTemplate reportTemplate = ReportTemplateMapper.GetReportTemplate(session, managementCompany, reportTemplateName, true);

                ReportExecutionWrapper wrapper = new ReportExecutionWrapper();
                wrapper.SetReportName(reportTemplate.ReportTemplateName);
                wrapper.AddParameters(parameterNames);
                return wrapper;
            }
            finally
            {
                session.Close();
            }
        }