using System; using BeWo.Report.ReportObjects; using BeWo.Report; namespace WMB { public partial class Spitzabrechnung : DevExpress.XtraReports.UI.XtraReport, IBeWoReport { public Spitzabrechnung() { InitializeComponent(); } public void SetReportDataSource(SettlementRO pRO) { pRO.ApprovedFLSWithFactor = String.Format("{0:0.00}", pRO.RecordedFLSTotal*(double)pRO.RateFactor); if (!String.IsNullOrWhiteSpace(pRO.AmountRecordedFLSString)) pRO.AmountRecordedFLSString = pRO.AmountRecordedFLSString.Replace("€", "").Trim(); if (!String.IsNullOrWhiteSpace(pRO.AmountAdvancedPayments)) pRO.AmountAdvancedPayments = pRO.AmountAdvancedPayments.Replace("€", "").Trim(); if (!String.IsNullOrWhiteSpace(pRO.Claim)) pRO.Claim = pRO.Claim.Replace("€", "").Trim(); if (pRO.DifferentHourlyRateCount == 3) { pRO.Abrechnungstext1 = String.Format("{2:0.00} Fachleistungsstunden in der Zeit vom {0} - {1}", pRO.AccountingStartDateString, pRO.HourlyRate3EndDateString, pRO.GeleisteteFLSMitStundensatz3 * pRO.RateFactor); pRO.Abrechnungstext2 = String.Format("{2:0.00} Fachleistungsstunden in der Zeit vom {0} - {1}", pRO.HourlyRateOldStartDateString, pRO.HourlyRateOldEndDateString, pRO.GeleisteteFLSMitStundensatzAlt * pRO.RateFactor); pRO.Abrechnungstext3 = String.Format("{2:0.00} Fachleistungsstunden in der Zeit vom {0} - {1}", pRO.HourlyRateNewStartDateString, pRO.AccountingEndDateString, pRO.GeleisteteFLSMitStundensatzAktuell * pRO.RateFactor); } else if (pRO.DifferentHourlyRateCount == 2) { pRO.Abrechnungstext2 = String.Format("{2:0.00} Fachleistungsstunden in der Zeit vom {0} - {1}", pRO.AccountingStartDateString, pRO.HourlyRateOldEndDateString, pRO.GeleisteteFLSMitStundensatzAlt * pRO.RateFactor); pRO.Abrechnungstext3 = String.Format("{2:0.00} Fachleistungsstunden in der Zeit vom {0} - {1}", pRO.HourlyRateNewStartDateString, pRO.AccountingEndDateString, pRO.GeleisteteFLSMitStundensatzAktuell * pRO.RateFactor); } else { pRO.Abrechnungstext3 = String.Format("{2:0.00} Fachleistungsstunden in der Zeit vom {0} - {1}", pRO.AccountingStartDateString, pRO.AccountingEndDateString, pRO.GeleisteteFLSMitStundensatzAktuell * pRO.RateFactor); } this.bindingSource1.DataSource = pRO; } } }