Files
BeWoPlaner/ReportImp/ProfEggersStiftung/ServicesOverviewReport.cs
Christian cf90774667 bugfixing
2017-06-11 15:50:31 +02:00

81 lines
2.1 KiB
C#

using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using BS.Shared;
using DevExpress.XtraReports.UI;
using BeWo.Report.ReportObjects;
using BeWo.Report;
namespace ProfEggersStiftung
{
public partial class Stundenzettel : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<ServicesOverviewRO>
{
public Stundenzettel()
{
InitializeComponent();
}
public void SetReportDataSource(ServicesOverviewRO pRO)
{
bool isJugendamt = true;
if (pRO.Costbearer == "LWL" || pRO.Costbearer == "LVR")
{
isJugendamt = false;
}
if (pRO.Services != null)
{
List<ServicesOverviewRO.ServiceDetail> servicesBillable = new List<ServicesOverviewRO.ServiceDetail>();
foreach (ServicesOverviewRO.ServiceDetail s in pRO.Services)
{
if (s.IsBillable)
{
if (isJugendamt)
{
s.Minutes *= 1.2;
}
servicesBillable.Add(s);
}
}
pRO.Services = servicesBillable;
}
if (isJugendamt)
{
pRO.TotalFLMBillable *= 1.2;
}
lbl1.Visible = false;
lbl2.Visible = false;
lbl3.Visible = false;
lbl4.Visible = false;
this.bindingSource1.DataSource = pRO;
}
public String GetBetreuungsart(ServicesOverviewRO pRO)
{
if (pRO.CostBearer2SupportConceptList != null && pRO.CostBearer2SupportConceptList.Count > 0)
{
var c2s = pRO.CostBearer2SupportConceptList[0];
foreach (var v2o in c2s.SupportConcept.Customer.ValueList)
{
if (v2o.Entry.Type == ValueListEntryType.CustomerCareType)
{
return v2o.Entry.Value;
}
}
}
return "";
}
}
}