Esempio n. 1
0
        private Report GetReport(int reportId)
        {
            var dbReport = this.reportRepository.Get(reportId);

            ReportType type;

            if (!Enum.TryParse(dbReport.Type, out type))
            {
                type = ReportType.RPT_GENERIC;
            }

            var report = new Report {
                Title           = dbReport.Title,
                Type            = type,
                StoredProcedure = dbReport.StoredProcedure,
                Columns         = Report.ParseHeaderAndFields(dbReport.Header, dbReport.Fields),
            };

            foreach (var arg in dbReport.Arguments)
            {
                report.AddArgument(arg.ReportArgument.Name);
            }

            return(report);
        }         // GetReport