Ejemplo n.º 1
0
        public static void Main()
        {
            Database.SetInitializer(new MigrateDatabaseToLatestVersion <ConfluxDbContext, Configuration>());

            var db = new ConfluxDbContext();

            JSON.SaveFile(db);

            var carPrices = db.Cars
                            .Select(c => new { c.Model, c.Make, c.Price })
                            .ToList();

            PDFReporter.CreateReport(carPrices, "../../PDF-Reports/car-price.pdf", "Car prices report");
            Console.WriteLine("Car prices report created.");

            var carPricesInRange = db.Cars
                                   .Where(c => c.Price > 15000 && c.Price < 25000)
                                   .ToList();

            PDFReporter.CreateReport(carPricesInRange, "../../PDF-Reports/car-price-between-15000-and-25000.pdf", "Car prices between 15000 and 25000");
            Console.WriteLine("Car prices between 15000 and 25000 report created.");

            XmlReport xlmReport = new XmlReport();
            bool      success   = xlmReport.GenerateXmlReport("../../xmlReport.xml");

            Console.WriteLine("XML Report created at: '../ConfluxApplication/xmlReport.xml'");

            db.Dispose();
        }
Ejemplo n.º 2
0
        private void button3_Click(object sender, EventArgs e)
        {
            string format = "Name Category Count";

            PDFReporter.CreatePDFReport(PDFReporter.Alignment.Horizontal, format, list, @"D:\report.pdf");
        }
Ejemplo n.º 3
0
 public byte[] GetPDFReportDocument()
 {
      return PDFReporter.GenerateDocumentFromXML( this.ConvertSalesToXML() );
 }