58 lines
1.8 KiB
C#
58 lines
1.8 KiB
C#
using System;
|
|
using System.Drawing;
|
|
using System.Collections;
|
|
using System.ComponentModel;
|
|
using BeWo.Report.ReportObjects;
|
|
using BeWo.Report;
|
|
using BeWo.Data.Access;
|
|
using BeWo.Data.Entities;
|
|
|
|
namespace SKFLeverkusen
|
|
{
|
|
public partial class ABWFolgeantrag : DevExpress.XtraReports.UI.XtraReport
|
|
{
|
|
public ABWFolgeantrag()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public void SetReportDataSource(CustomerDataRO customerDataRO)
|
|
{
|
|
String betreuerName = null;
|
|
String betreuerKuerzel = null;
|
|
|
|
if (customerDataRO.CostBearers != null)
|
|
{
|
|
foreach (var cb in customerDataRO.CostBearers)
|
|
{
|
|
if (cb.CostBearer.Name.Contains("LVR") || cb.CostBearer.Name.Contains("Rheinland"))
|
|
customerDataRO.Customer.ReferenceNumber = cb.ReferenceNumber;
|
|
}
|
|
}
|
|
|
|
foreach (var relatedEmployees in customerDataRO.RelatedEmployees)
|
|
{
|
|
if (relatedEmployees.RelationRole.DisplayName.ToLower().Contains("hauptbetreuung"))
|
|
{
|
|
betreuerName = relatedEmployees.Employee.FirstName + " " + relatedEmployees.Employee.LastName;
|
|
|
|
var employee = DAOFactory.GenericDAO.GetByID<Employee>(relatedEmployees.Employee.EmployeeOid);
|
|
betreuerKuerzel = employee.Person.Abbreviation;
|
|
}
|
|
}
|
|
|
|
xrLabel16.Text = xrLabel16.Text.Replace("[betreuerName]", betreuerName);
|
|
lblBetreuerKuerzel.Text = betreuerKuerzel;
|
|
|
|
xrRichText1.Rtf.Replace("[FirstName]", customerDataRO.FirstName);
|
|
xrRichText1.Rtf.Replace("[LastName]", customerDataRO.LastName);
|
|
xrRichText1.Rtf.Replace("[DateOfBirth]", customerDataRO.DateOfBirth);
|
|
xrRichText1.Rtf.Replace("[Street]", customerDataRO.Street);
|
|
xrRichText1.Rtf.Replace("[PostCode]", customerDataRO.PostCode);
|
|
xrRichText1.Rtf.Replace("[Town]", customerDataRO.Town);
|
|
|
|
this.bindingSource1.DataSource = customerDataRO;
|
|
}
|
|
}
|
|
}
|