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

namespace BeWo.BeWoSchillingReports
{
    public partial class Leistungsdokumentation : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<FLSReportRO>
    {
        public Leistungsdokumentation()
        {
            InitializeComponent();
        }

        public void SetReportDataSource(FLSReportRO pRO)
        {
			//foreach (var group in pRO.FLSReportGroups)
			//{
			//	foreach (var sr in group.ServiceRecords)
			//	{
			//		if (!sr.DistanceInMeter.HasValue && sr.ServiceRecordOid.HasValue)
			//		{
			//			var srBO = DAOFactory.GenericDAO.LoadByID<ServiceRecord>(sr.ServiceRecordOid.Value);
			//			sr.DistanceInMeter = srBO.DistanceInMeter;
			//		}
			//	}
			//}
	        lblZeitraum.Text = String.Format("Zeitraum: {0:dd.MM.yyyy} - {1:dd.MM.yyyy}", pRO.ReportStartDate, pRO.ReportEndDate);
            this.bindingSource1.DataSource = pRO;
        }

    }
}
