100 lines
3.1 KiB
C#
100 lines
3.1 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.ComponentModel;
|
|
using BeWo.Service.ServiceImplementations;
|
|
using BS.Shared.Core;
|
|
using DevExpress.XtraReports.UI;
|
|
using BeWo.Report.ReportObjects;
|
|
using BeWo.Report;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using BeWo.Data.Access;
|
|
using BeWo.Data.Entities;
|
|
|
|
namespace LandshuterNetzwerk
|
|
{
|
|
public partial class Quittierungsbeleg : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<ServicesOverviewRO>
|
|
{
|
|
public Quittierungsbeleg()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public void SetReportDataSource(ServicesOverviewRO pRO)
|
|
{
|
|
pRO.ApprovedFLSPerWeekTotal = 0;
|
|
|
|
if (pRO.Mandator != null && !String.IsNullOrEmpty(pRO.Mandator.Name))
|
|
{
|
|
lblAnbieter.Text = pRO.Mandator.Name;
|
|
}
|
|
//var geleistetGesamt = GetGeleisteteMinuten(pRO);
|
|
//pRO.FreeMinutesThisMonth = geleistetGesamt;
|
|
|
|
if (pRO.Services != null)
|
|
{
|
|
List<ServicesOverviewRO.ServiceDetail> servicesBillable = new List<ServicesOverviewRO.ServiceDetail>();
|
|
|
|
foreach (ServicesOverviewRO.ServiceDetail s in pRO.Services)
|
|
{
|
|
|
|
if (s.IsBillable)
|
|
{
|
|
s.Notice = "";
|
|
s.Notice2 = "";
|
|
s.Notice3 = "";
|
|
s.Notice4 = "";
|
|
|
|
if (s.IsGroup)
|
|
{
|
|
s.Notice3 = String.Format("{0:0.00} {1}", s.Minutes / 60, s.EmployeeAbbr);
|
|
}
|
|
else
|
|
{
|
|
s.Notice = String.Format("{0:0.00} {1}", s.Minutes / 60, s.EmployeeAbbr);
|
|
}
|
|
|
|
//ServicesOverviewRO.CreateSignatureString(s);
|
|
//ServicesOverviewRO.CreateGoalList(s);
|
|
|
|
servicesBillable.Add(s);
|
|
//if (!String.IsNullOrWhiteSpace(s.GoalList))
|
|
//{
|
|
// if (!String.IsNullOrWhiteSpace(s.Notice))
|
|
// {
|
|
// s.Notice += "\n" + s.GoalList;
|
|
// }
|
|
// else
|
|
// {
|
|
// s.Notice = s.GoalList;
|
|
// }
|
|
|
|
//}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
pRO.Services = servicesBillable;
|
|
}
|
|
|
|
|
|
this.bindingSource1.DataSource = pRO;
|
|
}
|
|
|
|
//private decimal GetGeleisteteMinuten(ServicesOverviewRO pRO)
|
|
//{
|
|
// if (pRO.CostBearer2SupportConceptList != null && pRO.CostBearer2SupportConceptList.Count > 0)
|
|
// {
|
|
// var service = new OperationsServiceImp();
|
|
// var stats = service.CreateSupportConceptStatistics(pRO.CostBearer2SupportConceptList[0].Oid.Value, pRO.EndDate);
|
|
// if (stats != null)
|
|
// {
|
|
// return stats.MinutesProvidedTotalRounded;
|
|
// }
|
|
// }
|
|
// return 0;
|
|
//}
|
|
}
|
|
}
|