Пример #1
0
 public XtraReport PrintInvoice(uint invoiceID)
 {
     using (var db = DB.GetContext())
     {
         DataSet data = InvoiceRepository.PrintInvoice(db, invoiceID);
         //data.WriteXmlSchema("D:\\schema.xml");
         return(ReportBinder.BindReport(12, data));
     }
 }
        public XtraReport RenderInvoice(uint invoiceID)
        {
            using (var db = DB.GetContext())
            {
                DataSet data = InvoiceRepository.PrintInvoice(db, invoiceID);
                //data.WriteXmlSchema("D:\\schema.xml");
                var report = ReportBinder.BindReport(12, data);
                report.Tag = data.Tables[0].Rows[0]["InvoiceNumber"].ToString();

                return(report);
            }
        }
        public XtraReport RenderConfirmation(uint invoiceID)
        {
            using (var db = DB.GetContext())
            {
                var invoice = InvoiceRepository.GetInvoice(db, invoiceID);

                uint[] companies = new uint[1] {
                    invoice.CompanyID
                };
                uint[] locations = new uint[1] {
                    invoice.LocationID
                };
                var report = ReportRepository.GenerateReport(db, 3, companies, locations, fromDate: invoice.InvoicePeriodFrom, toDate: invoice.InvoicePeriodTo);
                var rep    = ReportBinder.BindReport(report);
                rep.Tag = invoice.InvoiceNumber;
                return(rep);
            }
        }