Example #1
0
        public BookingReport export(ReportTypes reportType)
        {
            BookingReport report = null;

            if (reportType.Equals(ReportTypes.CSV))
            {
                report = new CSVReport();
            }
            else if (reportType.Equals(ReportTypes.XML))
            {
                report = new XMLReport();
            }
            return(report);
        }
Example #2
0
 /// <summary>
 /// start the generator methods depending of selected report type
 /// </summary>
 /// <param name="type">report type</param>
 public void GenerateNewReport(ReportTypes type)
 {
     if (type.Equals(ReportTypes.CUSTOMERREPORT))
     {
         this.GenerateCustomerReport();
     }
     else if (type.Equals(ReportTypes.ORDERREPORT))
     {
         this.GenerateOrderReport();
     }
     else
     {
         throw new InvalidOperationException("unknown reporting type");
     }
 }
Example #3
0
        public static Report Create(ReportTypes reportTypes)
        {
            Report report = null;

            if (reportTypes.Equals(ReportTypes.CSV))
            {
                report = new ReportCSV();
                return(report);
            }
            else if (reportTypes.Equals(ReportTypes.Json))
            {
                report = new ReportJSON();
                return(report);
            }
            return(report);
        }