using System.Linq;

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

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

        public void SetReportDataSource(ServicesOverviewRO pRO)
        {
            if (pRO.Services != null)
            {
                var servicesBillable = pRO.Services.Where(s => s.IsBillable).ToList();

                pRO.Services = servicesBillable;
            }

            bindingSource1.DataSource = pRO;
        }
    }
}
