61 lines
2.3 KiB
C#
61 lines
2.3 KiB
C#
|
|
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;
|
|||
|
|
using BeWo.Data.Access;
|
|||
|
|
using BeWo.Data.Entities;
|
|||
|
|
using BeWo.Service.DCEntityMapper;
|
|||
|
|
|
|||
|
|
namespace PsychosozialeProjekteSaarpfalz
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
public partial class LeistungsnachweisSoziotherapie : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<ServicesOverviewRO>
|
|||
|
|
{
|
|||
|
|
public LeistungsnachweisSoziotherapie()
|
|||
|
|
{
|
|||
|
|
InitializeComponent();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public void SetReportDataSource(ServicesOverviewRO pRO)
|
|||
|
|
{
|
|||
|
|
if (pRO.Services != null)
|
|||
|
|
{
|
|||
|
|
foreach (ServicesOverviewRO.ServiceDetail s in pRO.Services)
|
|||
|
|
{
|
|||
|
|
var serviceRecord = DAOFactory.GenericDAO.LoadByID<ServiceRecord>(s.ServiceRecordOid);
|
|||
|
|
var srDc = MapperFactory.ServiceRecordDC_ServiceRecord.MapToNewDC(serviceRecord);
|
|||
|
|
|
|||
|
|
s.GoalList = String.Empty;
|
|||
|
|
s.ServiceCategoryAbbr = String.Empty;
|
|||
|
|
|
|||
|
|
if (srDc.Goals != null && srDc.Goals.Count > 0)
|
|||
|
|
{
|
|||
|
|
foreach (var goal in srDc.Goals)
|
|||
|
|
{
|
|||
|
|
// Ziele und Ma<4D>nahmen in zwei Spalten trennen
|
|||
|
|
if (goal.Type == BS.Shared.ValueListEntryType.SupportConceptGoalCategoryType || goal.Type == BS.Shared.ValueListEntryType.SupportConceptIndividualGoalCategoryType)
|
|||
|
|
{
|
|||
|
|
if (s.GoalList.Length > 0)
|
|||
|
|
s.GoalList += ", ";
|
|||
|
|
s.GoalList += goal.TypeDescription;
|
|||
|
|
}
|
|||
|
|
else if (goal.Type == BS.Shared.ValueListEntryType.SupportConceptGoalType || goal.Type == BS.Shared.ValueListEntryType.SupportConceptIndividualGoalType)
|
|||
|
|
{
|
|||
|
|
if (s.ServiceCategoryAbbr.Length > 0)
|
|||
|
|
s.ServiceCategoryAbbr += ", ";
|
|||
|
|
s.ServiceCategoryAbbr += goal.TypeDescription;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
this.bindingSource1.DataSource = pRO;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|