Files
BeWoPlaner/ReportImp/BeWoNeuss/CustomReportCreator.cs

33 lines
921 B
C#
Raw Permalink Normal View History

2023-09-11 14:17:15 +02:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BeWo.BeWoHeinsberg;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using BeWo.Service.DCEntityMapper;
using BS.Shared;
using BS.Shared.DataContracts;
using DevExpress.XtraReports.UI;
namespace BeWoNeuss
{
public class CustomReportCreator : DefaultReportCreator
{
public override XtraReport CreateCustomerInvoiceReport(long invoiceOid)
{
var ib = DAOFactory.GenericDAO.LoadByID<InvoiceBase>(invoiceOid);
if (ib.Type == InvoiceType.General)
{
var report = new MahnungReport();
report.SetReportDataSource(InvoiceCustomerRO.Create(MapperFactory.InvoiceBaseDC_InvoiceBase.MapToNewDC(ib)));
return report;
}
return base.CreateCustomerInvoiceReport(invoiceOid);
}
}
}