using System;
using BeWo.Report.ReportObjects;

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

        public void SetReportDataSource(ServicesOverviewRO pRO)
        {
	        if (pRO.Services != null)
	        {
		        foreach (var s in pRO.Services)
		        {
			        if (s.IsGroup)
			        {
				        s.Notice = String.Format("{0} Teilnehmer", s.CustomerCount);

			        }
			        else
			        {
				        s.Notice = null;
			        }
		        }
	        }
            bindingSource1.DataSource = pRO;
        }
    }
}
