Files
BeWoPlaner/ReportImp/AssistenzaReports/ServicesOverviewReport.cs
2020-04-15 18:20:43 +02:00

52 lines
1.7 KiB
C#

using System;
using System.Collections;
using System.ComponentModel;
using BeWo.Data;
using DevExpress.XtraReports.UI;
using BeWo.Report.ReportObjects;
using BeWo.Report;
namespace BeWo.AssistenzaReports
{
public partial class Stundenzettel : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<ServicesOverviewRO>
{
public Stundenzettel()
{
InitializeComponent();
}
public void SetReportDataSource(ServicesOverviewRO pRO)
{
if (pRO.StartDate.Day > 1 || pRO.EndDate.Day < DateTime.DaysInMonth(pRO.EndDate.Year, pRO.EndDate.Month))
{
lblMonat.Text = String.Format("{0}. bis {1}.{2:MM}.{3}", pRO.StartDate.Day, pRO.EndDate.Day, pRO.StartDate, pRO.Year);
//lblMonat.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
}
else
{
lblMonat.Text = String.Format("{0} {1}", pRO.Month, pRO.Year);
}
//[Month] [Year]
//BeWo.Data.Entities.ApplicationUser user = null;
//if (LoggedInUserOperationContextExt.Current != null && LoggedInUserOperationContextExt.Current.User != null)
//{
// user = LoggedInUserOperationContextExt.Current.User;
//}
//else
//{
// user = SessionFacade.LoggedInUser;
//}
//if (user != null)
//{
// pRO.MainAttendant = user.Employee.Person.FirstNameLastName;
//}
this.bindingSource1.DataSource = pRO;
}
}
}