Files
BeWoPlaner/ReportImp/SKFAlsdorf/ServicesOverviewReportJA3.cs
2016-06-27 01:45:38 +02:00

55 lines
1.4 KiB
C#

using System;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using BeWo.Report.ReportObjects;
using BeWo.Report;
namespace BeWo.SKFAlsdorf
{
public partial class StundenzettelJugenamt : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<ServicesOverviewRO>
{
public StundenzettelJugenamt()
{
InitializeComponent();
}
public void SetReportDataSource(ServicesOverviewRO pRO)
{
if (pRO.CostBearer2SupportConceptList.Count > 0)
{
var c2s = pRO.CostBearer2SupportConceptList[0];
lblApprovalDate.Text = String.Format("{0:dd.MM.yyyy}",
c2s.SupportConcept.ApprovalDate);
if (String.IsNullOrEmpty(pRO.ApprovedStartDate))
{
pRO.ApprovedStartDate = pRO.RequestedStartDate;
}
if (String.IsNullOrEmpty(pRO.ApprovedEndDate))
{
pRO.ApprovedEndDate = pRO.RequestedEndDate;
}
}
if (pRO.Services != null)
{
foreach (var s in pRO.Services)
{
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;
}
}
}