using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using BeWo.Report.ReportObjects;
using BeWo.Report;

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

        public void SetReportDataSource(ServicesOverviewRO pRO)
        {
			 
	        if (pRO.AllEmployees != null)
	        {
		        foreach (var employee in pRO.AllEmployees)
		        {
			        if (employee.Employee != null && employee.Employee.IsQualified.HasValue &&
			            employee.Employee.IsQualified.Value)
			        {
				        employee.EmployeeName += " FK";
			        }
			        else
			        {
				        roterPunkt.Visible = true;
			        }
		        }
	        }
            this.bindingSource1.DataSource = pRO;
        }
    }
}
