using BeWo.Report;
using BeWo.Report.ReportObjects;

namespace SPZRatingen
{
    public partial class InvoiceCustomerReport : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<InvoiceCustomerRO>
    {
        public InvoiceCustomerReport()
        {
            InitializeComponent();
        }

        public void SetReportDataSource(InvoiceCustomerRO pRO)
        {
	        decimal hours = 0;
	        if (pRO.InvoiceItems != null)
	        {
		        foreach (var ii in pRO.InvoiceItems)
		        {
			        hours += ii.UnitCount;
		        }
	        }
	        lblSum.Text = string.Format("{0:0.00}", hours);
            this.bindingSource1.DataSource = pRO;
        }
    }
}
