Files
BeWoPlaner/ReportImp/HPHBersenbrueck/CustomerDataReport.cs

40 lines
1.1 KiB
C#
Raw Normal View History

2016-06-27 01:45:38 +02:00
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report;
using DevExpress.XtraReports.UI;
using BeWo.Report.ReportObjects;
2018-05-21 16:39:24 +02:00
using BeWo.Service.DCEntityMapper;
using BS.Shared.DataContracts;
2016-06-27 01:45:38 +02:00
2018-05-21 16:39:24 +02:00
namespace HphBersenbrueck
2016-06-27 01:45:38 +02:00
{
2018-05-21 16:39:24 +02:00
public partial class AufnahmeUndEntlassungsbogen : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<QueryRO>
2016-06-27 01:45:38 +02:00
{
2018-05-21 16:39:24 +02:00
public AufnahmeUndEntlassungsbogen()
2016-06-27 01:45:38 +02:00
{
InitializeComponent();
}
2018-05-21 16:39:24 +02:00
public void SetReportDataSource(QueryRO pRO)
2016-06-27 01:45:38 +02:00
{
2018-05-21 16:39:24 +02:00
long oid = 0;
Int64.TryParse(pRO.Rows[0].Field1.ToString(), out oid);
if (oid > 0)
{
var c = DAOFactory.GenericDAO.LoadByID<Customer>(oid);
CustomerDC custDc = MapperFactory.CustomerDC_Customer.MapToNewDC(c);
CustomerDataRO cro = CustomerDataRO.Create(custDc);
this.bindingSource1.DataSource = cro;
}
2016-06-27 01:45:38 +02:00
}
}
}