using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using BeWo.Report.ReportObjects;
using BeWo.Report;

namespace BeWo.Club74
{
    public partial class Stundenzettel : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<ServicesOverviewRO>
    {
        public Stundenzettel()
        {
            InitializeComponent();
        }

        public void SetReportDataSource(ServicesOverviewRO pRO)
        {
			if (pRO.Services != null)
			{
				var servicesBillable = new List<ServicesOverviewRO.ServiceDetail>();

				foreach (ServicesOverviewRO.ServiceDetail s in pRO.Services)
				{
					if (s.IsBillable)
						servicesBillable.Add(s);
				}

				pRO.Services = servicesBillable;
			}
			bindingSource1.DataSource = pRO;
        }
    }
}
