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

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

        public void SetReportDataSource(ServicesOverviewRO pRO)
        {
            if (pRO.Services != null)
            {
                foreach (ServicesOverviewRO.ServiceDetail s in pRO.Services)
                {
	                s.ServiceCategoryAbbr = "";

	                String firstLine = "";
					if (!String.IsNullOrEmpty(s.Notice))
					{
						if (s.Notice.IndexOf(Environment.NewLine) >= 0)
							firstLine = s.Notice.Substring(0, s.Notice.IndexOf(Environment.NewLine));
						else
							firstLine = s.Notice;
					}
					s.Notice = firstLine;

				}

            }

            this.bindingSource1.DataSource = pRO;
        }
    }
}
