34 lines
869 B
C#
34 lines
869 B
C#
using System;
|
|
using BeWo.Report.ReportObjects;
|
|
using BeWo.Report;
|
|
|
|
namespace BeWoNordeifel
|
|
{
|
|
public partial class Leistungsdokumentation : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<FLSReportRO>
|
|
{
|
|
public Leistungsdokumentation()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public void SetReportDataSource(FLSReportRO pRO)
|
|
{
|
|
int kmSumme = 0;
|
|
foreach (var group in pRO.FLSReportGroups)
|
|
{
|
|
foreach (var sr in group.ServiceRecords)
|
|
{
|
|
if (sr.DistanceInMeter.HasValue)
|
|
{
|
|
kmSumme += sr.DistanceInMeter.Value;
|
|
}
|
|
}
|
|
}
|
|
|
|
lblKm.Text = String.Format("{0:0.##}", kmSumme);
|
|
this.bindingSource1.DataSource = pRO;
|
|
}
|
|
|
|
}
|
|
}
|