63 lines
2.4 KiB
C#
63 lines
2.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using BeWo.Data.Access;
|
|
using BeWo.Data.Entities;
|
|
using BeWo.Report.ReportObjects;
|
|
using BeWo.Report;
|
|
using BS.Shared.DataContracts;
|
|
using DevExpress.XtraReports.UI;
|
|
|
|
namespace HausTheresia
|
|
{
|
|
public partial class Budgetnachweis : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<SettlementRO>
|
|
{
|
|
public Budgetnachweis()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public void SetReportDataSource(SettlementRO pRO)
|
|
{
|
|
if (!String.IsNullOrEmpty(pRO.SenderContactPersonPhone))
|
|
{
|
|
pRO.SenderContactPersonPhone = pRO.SenderContactPersonPhone.Replace("Tel.:", "").Trim();
|
|
}
|
|
if (!String.IsNullOrEmpty(pRO.SenderContactPersonFax))
|
|
{
|
|
pRO.SenderContactPersonFax = pRO.SenderContactPersonFax.Replace("Fax:", "").Trim();
|
|
}
|
|
if (!String.IsNullOrEmpty(pRO.SenderContactPersonMail))
|
|
{
|
|
pRO.SenderContactPersonMail = pRO.SenderContactPersonMail.Replace("E-Mail:", "").Trim();
|
|
}
|
|
|
|
xrCheckBox2.Checked = true;
|
|
|
|
if (pRO.CostBearer2SupportConceptOid > 0)
|
|
{
|
|
var c2s = DAOFactory.GenericDAO.LoadByID<CostBearer2SupportConcept>(pRO.CostBearer2SupportConceptOid);
|
|
if (c2s.SupportConcept.Customer.TerminationDate.HasValue)
|
|
{
|
|
xrCheckBox1.Text = String.Format(" Die Betreuung wurde beendet am {0:dd.MM.yyyy}",
|
|
c2s.SupportConcept.Customer.TerminationDate);
|
|
xrCheckBox2.Checked = false;
|
|
xrCheckBox1.Checked = true;
|
|
}
|
|
lblDate.Text = String.Format("Hattingen, {0}", pRO.InvoiceDate);
|
|
// AB, 20.03.2026: ursprünglich nur Ennepetal, Team Bochum ist neu
|
|
var c = c2s.SupportConcept.Customer;
|
|
var team = c.Team2CustomerList.Select(x => x.Team.Name).FirstOrDefault();
|
|
if (team != null && team.Contains("Bochum"))
|
|
{
|
|
lblZAD.Text = "ZAD - Nr.LWL: 9029857";
|
|
lblDate.Text = String.Format("Bochum, {0}", pRO.InvoiceDate);
|
|
lblAbsender.Text = "Theresia Albers gGmbH \nCramerstr.10, 44793 Bochum";
|
|
}
|
|
}
|
|
bindingSource1.DataSource = pRO;
|
|
}
|
|
}
|
|
}
|