51 lines
1.2 KiB
C#
51 lines
1.2 KiB
C#
using System;
|
|
using BeWo.Report.ReportObjects;
|
|
using BeWo.Report;
|
|
using DevExpress.XtraReports.UI;
|
|
using System.Data;
|
|
|
|
namespace SkmRheydt
|
|
{
|
|
public partial class Zahlungsavise : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<QueryRO>
|
|
{
|
|
public Zahlungsavise()
|
|
{
|
|
InitializeComponent();
|
|
|
|
}
|
|
|
|
public void SetReportDataSource(QueryRO pRO)
|
|
{
|
|
InitTable(pRO);
|
|
this.bindingSource1.DataSource = pRO;
|
|
}
|
|
|
|
private void InitTable(QueryRO ro)
|
|
{
|
|
decimal gesamt = 0;
|
|
|
|
DateTime monat = DateTime.MinValue;
|
|
|
|
int index = 1;
|
|
|
|
foreach (BeWo.Report.ReportObjects.QueryRO.Row row in ro.Rows)
|
|
{
|
|
if (monat == DateTime.MinValue)
|
|
{
|
|
monat = DateTime.Parse(row.Field8.ToString());
|
|
|
|
}
|
|
if (row.Field1 != null)
|
|
row.Field1 = String.Format("{0:dd.MM.yyyy}", DateTime.Parse(row.Field1.ToString()));
|
|
|
|
|
|
row.Field7 = String.Format("{0}", index++);
|
|
}
|
|
|
|
lblHeader.Text = String.Format("Liste der Zahlungsavise {0:MMMM yyyy}", monat);
|
|
|
|
}
|
|
|
|
}
|
|
}
|