using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using BS.Shared.Extensions;
using BeWo.Report.ReportObjects;
using BeWo.Report;

namespace BeWo.SozialeDiensteNiederrhein
{
    public partial class Hilfeplanuebersicht : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<SupportConceptListRO>
    {
        public Hilfeplanuebersicht()
        {
            InitializeComponent();
        }

        public void SetReportDataSource(SupportConceptListRO pRO)
        {
	        foreach (var d in pRO.SupportConceptDetailList)
	        {
		        if (d.MainEmployee != null)
		        {
			        d.MainAttendant = String.Format("{0}, {1}", d.MainEmployee.Person.LastName, d.MainEmployee.Person.FirstName);
		        }
	        }
            this.bindingSource1.DataSource = pRO;
        }
    }
}
