108 lines
4.9 KiB
C#
108 lines
4.9 KiB
C#
using System;
|
|
using BeWo.Data.Entities;
|
|
using BeWo.Data.Access;
|
|
using DomizielAnsbach.Service;
|
|
|
|
namespace DomizielAnsbach
|
|
{
|
|
public partial class Selbsteinschaetzung : DevExpress.XtraReports.UI.XtraReport//, IBeWoReport<CustomerDataRO>
|
|
{
|
|
public Selbsteinschaetzung()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public void SetReportDataSource(KlientenStammdatenRO newRO)
|
|
{
|
|
DateTime start = new DateTime(newRO.Datum.Year, 1, 1);
|
|
DateTime end = newRO.Datum;
|
|
|
|
var pRO = newRO.CustomerDataRO;
|
|
|
|
long cbOid = 0;
|
|
var c = DAOFactory.GenericDAO.LoadByID<Customer>(pRO.CustomerOid);
|
|
|
|
if (pRO.EnvironmentPersons.Count > 0)
|
|
{
|
|
foreach (var p2p in pRO.EnvironmentPersons)
|
|
{
|
|
if (p2p.RelationRole.ToString().Contains("Anleiter"))
|
|
{
|
|
lblAnleiter.Text = p2p.Person.FullName;
|
|
lblAnleiter2.Text = p2p.Person.FullName;
|
|
}
|
|
}
|
|
}
|
|
if (pRO.EnvironmentOrganisations.Count > 0)
|
|
{
|
|
foreach (var o2p in pRO.EnvironmentOrganisations)
|
|
{
|
|
if (o2p.RelationRole.DisplayName.Contains("Zuverdienst"))
|
|
{
|
|
cbOid = o2p.Organisation.CostBearerOid ?? 0;
|
|
pRO.Occupation = o2p.Organisation.Name;
|
|
if (o2p.Person != null)
|
|
{
|
|
var anleiterin = DAOFactory.GenericDAO.LoadByID<Person>(o2p.Person.PersonOid);
|
|
if (lblAnleiter.Text == "")
|
|
{
|
|
lblAnleiter.Text = anleiterin.LastNameFirstName;
|
|
lblAnleiter2.Text = anleiterin.LastNameFirstName;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
int quarter = (int)Math.Ceiling(end.Month / (double)3);
|
|
var tage = ZuverdienstHelper.SetArbeitszeiten(pRO, cbOid, c, end);
|
|
lblQ1Soll.Text = tage.wochenAZeitSollQ1;
|
|
lblSollQ1.Text = tage.wochenAZeitSollQ1;
|
|
lblQ1Ist.Text = String.Format("{0}", tage.wochenAZeitIstQ1);
|
|
lblIstQ1.Text = String.Format("{0}", tage.wochenAZeitIstQ1);
|
|
if (quarter >= 2)
|
|
{
|
|
lblQ2Soll.Text = tage.wochenAZeitSollQ2;
|
|
lblSollQ2.Text = tage.wochenAZeitSollQ2;
|
|
lblQ2Ist.Text = String.Format("{0}", tage.wochenAZeitIstQ2);
|
|
lblIstQ2.Text = String.Format("{0}", tage.wochenAZeitIstQ2);
|
|
if (quarter >= 3)
|
|
{
|
|
lblQ3Soll.Text = tage.wochenAZeitSollQ3;
|
|
lblSollQ3.Text = tage.wochenAZeitSollQ3;
|
|
lblQ3Ist.Text = String.Format("{0}", tage.wochenAZeitIstQ3);
|
|
lblIstQ3.Text = String.Format("{0}", tage.wochenAZeitIstQ3);
|
|
if (quarter >= 4)
|
|
{
|
|
lblQ4Soll.Text = tage.wochenAZeitSollQ4;
|
|
lblSollQ4.Text = tage.wochenAZeitSollQ4;
|
|
lblQ4Ist.Text = String.Format("{0}", tage.wochenAZeitIstQ4);
|
|
lblIstQ4.Text = String.Format("{0}", tage.wochenAZeitIstQ4);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
if (pRO.Sex.Equals("männlich"))
|
|
{
|
|
xrTableCell304.Text = xrTableCell304.Text.Replace("Sie ", "Er ");
|
|
xrTableCell321.Text = xrTableCell321.Text.Replace("Sie ", "Er ");
|
|
xrTableCell338.Text = xrTableCell338.Text.Replace("Sie ", "Er ");
|
|
xrTableCell355.Text = xrTableCell355.Text.Replace("Sie ", "Er ");
|
|
xrTableCell372.Text = xrTableCell372.Text.Replace("Sie ", "Er ");
|
|
xrTableCell389.Text = xrTableCell389.Text.Replace("Sie ", "Er ");
|
|
xrTableCell406.Text = xrTableCell406.Text.Replace("Sie ", "Er ");
|
|
xrTableCell415.Text = "Er nutzt die ihm gewährten Entscheidungs-/Handlungsspielräume.";
|
|
xrTableCell432.Text = xrTableCell432.Text.Replace("Sie ", "Er ");
|
|
xrTableCell449.Text = "Er achtet gut auf sich. Er achtet auf seine Belastungsgrenzen.";
|
|
xrTableCell458.Text = xrTableCell458.Text.Replace("Sie ", "Er ");
|
|
xrTableCell475.Text = "Er holt sich bei Bedarf aktiv und frühzeitig Hilfe bei seinem Anleiter.";
|
|
xrTableCell492.Text = "Er gestaltet den Zuverdienstplatz in Absprache mit seinem Anleiter: ";
|
|
xrTableCell501.Text = "Arbeitsinhalt, -menge, -zeit orientieren sich an seinen Bedürfnissen.";
|
|
lblUnterschrift.Text = "Unterschrift ZV-Teilnehmer";
|
|
}
|
|
this.bindingSource1.DataSource = pRO;
|
|
}
|
|
}
|
|
}
|