Merge branch 'master' of ssh://float.ownsoft.de/git/beyondSoft/BeWo

This commit is contained in:
2024-12-06 14:37:14 +01:00
11 changed files with 2052 additions and 263 deletions

View File

@@ -2,7 +2,8 @@ using System;
using BeWo.Report.ReportObjects;
using BS.Shared.Core;
using System.Data;
using DevExpress.XtraReports.UI;
using System.Linq;
namespace BeWo.Report.DefaultReports
{
@@ -18,33 +19,30 @@ namespace BeWo.Report.DefaultReports
public void SetReportDataSource(BewertungsstatistikRO pRO)
{
//JahresReportRO b = new JahresReportRO();
//b.CreateReport(pRO);
//JahresReportRO b = new JahresReportRO();
//b.CreateReport(pRO);
ErstelleBewertungsstatistikTabelle(pRO);
this.bindingSource1.DataSource = pRO;
this.bindingSource1.DataSource = pRO;
}
/*private DataTable CreateChartData() {
// Create an empty table.
DataTable table = new DataTable("Table1");
public void ErstelleBewertungsstatistikTabelle(BewertungsstatistikRO pRO)
{
// Spaltenüberschriften erstellen
//foreach (var pair in pRO.RatingTypeZuAnzahl)
// tableBewertungen.Rows[0].Cells.Add(new XRTableCell() { Text = pair.Key });
// Add three columns to the table.
table.Columns.Add("Anzahl", typeof(Int32));
table.Columns.Add("Weiblich", typeof(Int32));
table.Columns.Add("Männlich", typeof(Int32));
//tableBewertungen.Rows.Add(new XRTableRow());
//foreach (var pair in pRO.RatingTypeZuAnzahl)
// tableBewertungen.Rows[1].Cells.Add(new XRTableCell() { Text = pair.Value.ToString() });
// Add data rows to the table.
table.Rows.Add(new object[] { "1", "Section1", 10 });
table.Rows.Add(new object[] { "2", "Section2", 20 });
table.Rows.Add(new object[] { "3", "Section1", 20 });
table.Rows.Add(new object[] { "4", "Section2", 30 });
table.Rows.Add(new object[] { "5", "Section1", 15 });
table.Rows.Add(new object[] { "6", "Section2", 25 });
//tableBewertungen.Rows.Add(new XRTableRow());
//var summeBewertungen = pRO.RatingTypeZuAnzahl.Sum(r2a => r2a.Value);
//foreach (var pair in pRO.RatingTypeZuAnzahl)
// tableBewertungen.Rows[2].Cells.Add(new XRTableCell() { Text = string.Format("{0:0.00} %", pair.Value / summeBewertungen * 100) });
return table;
}*/
}
}
}
}

View File

@@ -30,7 +30,10 @@ namespace BeWo.Report.DefaultReports
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
DevExpress.XtraReports.UI.XRWatermark xrWatermark1 = new DevExpress.XtraReports.UI.XRWatermark();
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel();
this.Title = new DevExpress.XtraReports.UI.XRControlStyle();
this.FieldCaption = new DevExpress.XtraReports.UI.XRControlStyle();
this.PageInfo = new DevExpress.XtraReports.UI.XRControlStyle();
@@ -46,17 +49,18 @@ namespace BeWo.Report.DefaultReports
this.Detail1 = new DevExpress.XtraReports.UI.DetailBand();
this.DetailReport1 = new DevExpress.XtraReports.UI.DetailReportBand();
this.Detail2 = new DevExpress.XtraReports.UI.DetailBand();
this.GroupHeader1 = new DevExpress.XtraReports.UI.GroupHeaderBand();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.fieldStunden = new DevExpress.XtraReports.UI.CalculatedField();
this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel();
this.tableBewertungen = new DevExpress.XtraReports.UI.XRTable();
this.xrTable1 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableRow3 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.groupBoxArray1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tableBewertungen)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// Detail
@@ -66,12 +70,40 @@ namespace BeWo.Report.DefaultReports
this.xrLabel8});
this.Detail.Font = new DevExpress.Drawing.DXFont("Verdana", 11.25F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.Detail.HeightF = 42.20826F;
this.Detail.HeightF = 63.87493F;
this.Detail.Name = "Detail";
this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
this.Detail.StylePriority.UseFont = false;
this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrLabel2
//
this.xrLabel2.Font = new DevExpress.Drawing.DXFont("Verdana", 8.25F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 22.4583F);
this.xrLabel2.Name = "xrLabel2";
this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel2.SizeF = new System.Drawing.SizeF(433.3333F, 19.74996F);
this.xrLabel2.StylePriority.UseFont = false;
this.xrLabel2.StylePriority.UseForeColor = false;
this.xrLabel2.StylePriority.UseTextAlignment = false;
this.xrLabel2.Text = "Zeitraum: [StartDay!dd.MM.yyyy] - [EndDay!dd.MM.yyyy]";
this.xrLabel2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrLabel8
//
this.xrLabel8.Font = new DevExpress.Drawing.DXFont("Verdana", 11.25F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrLabel8.Name = "xrLabel8";
this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel8.SizeF = new System.Drawing.SizeF(665.625F, 22.4583F);
this.xrLabel8.StylePriority.UseFont = false;
this.xrLabel8.StylePriority.UseForeColor = false;
this.xrLabel8.StylePriority.UseTextAlignment = false;
this.xrLabel8.Text = "Wirksamkeitskontrolle";
this.xrLabel8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
//
// Title
//
this.Title.BackColor = System.Drawing.Color.White;
@@ -164,33 +196,22 @@ namespace BeWo.Report.DefaultReports
// DetailReport1
//
this.DetailReport1.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
this.Detail2,
this.GroupHeader1});
this.DetailReport1.DataMember = "BewertungsstatistikReportTabelleList.BewertungsstatistikZielDetailList";
this.Detail2});
this.DetailReport1.DataMember = "Wirkungskontolle";
this.DetailReport1.DataSource = this.bindingSource1;
this.DetailReport1.Level = 0;
this.DetailReport1.Name = "DetailReport1";
//
// Detail2
//
this.Detail2.HeightF = 0F;
this.Detail2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTable1});
this.Detail2.HeightF = 105.0753F;
this.Detail2.MultiColumn.ColumnCount = 5;
this.Detail2.MultiColumn.Layout = DevExpress.XtraPrinting.ColumnLayout.AcrossThenDown;
this.Detail2.MultiColumn.Mode = DevExpress.XtraReports.UI.MultiColumnMode.UseColumnCount;
this.Detail2.Name = "Detail2";
//
// GroupHeader1
//
this.GroupHeader1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.tableBewertungen});
this.GroupHeader1.Font = new DevExpress.Drawing.DXFont("Verdana", 11.25F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.GroupHeader1.HeightF = 176.5417F;
this.GroupHeader1.KeepTogether = true;
this.GroupHeader1.Name = "GroupHeader1";
this.GroupHeader1.StylePriority.UseFont = false;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.BewertungsstatistikRO);
//
// fieldStunden
//
this.fieldStunden.DataMember = "BewertungsstatistikReportTabelleList";
@@ -198,56 +219,90 @@ namespace BeWo.Report.DefaultReports
this.fieldStunden.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
this.fieldStunden.Name = "fieldStunden";
//
// xrLabel2
// xrTable1
//
this.xrLabel2.Font = new DevExpress.Drawing.DXFont("Verdana", 8.25F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 22.4583F);
this.xrLabel2.Name = "xrLabel2";
this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel2.SizeF = new System.Drawing.SizeF(433.3333F, 19.74996F);
this.xrLabel2.StylePriority.UseFont = false;
this.xrLabel2.StylePriority.UseForeColor = false;
this.xrLabel2.StylePriority.UseTextAlignment = false;
this.xrLabel2.Text = "Zeitraum: [StartDay!dd.MM.yyyy] - [EndDay!dd.MM.yyyy]";
this.xrLabel2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrLabel8
//
this.xrLabel8.Font = new DevExpress.Drawing.DXFont("Verdana", 11.25F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrLabel8.Name = "xrLabel8";
this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel8.SizeF = new System.Drawing.SizeF(665.625F, 22.4583F);
this.xrLabel8.StylePriority.UseFont = false;
this.xrLabel8.StylePriority.UseForeColor = false;
this.xrLabel8.StylePriority.UseTextAlignment = false;
this.xrLabel8.Text = "Wirksamkeitskontrolle";
this.xrLabel8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
//
// tableBewertungen
//
this.tableBewertungen.LocationFloat = new DevExpress.Utils.PointFloat(0F, 10.00001F);
this.tableBewertungen.Name = "tableBewertungen";
this.tableBewertungen.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 96F);
this.tableBewertungen.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow1});
this.tableBewertungen.SizeF = new System.Drawing.SizeF(100F, 25F);
this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrTable1.Name = "xrTable1";
this.xrTable1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 96F);
this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow1,
this.xrTableRow2,
this.xrTableRow3});
this.xrTable1.SizeF = new System.Drawing.SizeF(151.8F, 98F);
//
// xrTableRow1
//
this.xrTableRow1.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell1});
this.xrTableRow1.Name = "xrTableRow1";
this.xrTableRow1.Weight = 1D;
this.xrTableRow1.Weight = 1.92D;
//
// xrTableCell1
//
this.xrTableCell1.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
| DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTableCell1.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] {
new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Benotung]")});
this.xrTableCell1.Font = new DevExpress.Drawing.DXFont("Verdana", 9F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrTableCell1.Multiline = true;
this.xrTableCell1.Name = "xrTableCell1";
this.xrTableCell1.StylePriority.UseBorders = false;
this.xrTableCell1.StylePriority.UseFont = false;
this.xrTableCell1.Weight = 1D;
//
// xrTableRow2
//
this.xrTableRow2.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell2});
this.xrTableRow2.Name = "xrTableRow2";
this.xrTableRow2.Weight = 1D;
//
// xrTableCell2
//
this.xrTableCell2.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
| DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTableCell2.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] {
new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[AnzahlVergeben]")});
this.xrTableCell2.Font = new DevExpress.Drawing.DXFont("Verdana", 9F);
this.xrTableCell2.Multiline = true;
this.xrTableCell2.Name = "xrTableCell2";
this.xrTableCell2.StylePriority.UseBorders = false;
this.xrTableCell2.StylePriority.UseFont = false;
this.xrTableCell2.StylePriority.UseTextAlignment = false;
this.xrTableCell2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell2.TextFormatString = "{0:0}";
this.xrTableCell2.Weight = 1D;
//
// xrTableRow3
//
this.xrTableRow3.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell3});
this.xrTableRow3.Name = "xrTableRow3";
this.xrTableRow3.Weight = 1D;
//
// xrTableCell3
//
this.xrTableCell3.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
| DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTableCell3.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] {
new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[AnzahlVergebenInProzent]")});
this.xrTableCell3.Font = new DevExpress.Drawing.DXFont("Verdana", 9F);
this.xrTableCell3.Multiline = true;
this.xrTableCell3.Name = "xrTableCell3";
this.xrTableCell3.StylePriority.UseBorders = false;
this.xrTableCell3.StylePriority.UseFont = false;
this.xrTableCell3.StylePriority.UseTextAlignment = false;
this.xrTableCell3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell3.TextFormatString = "{0:0.00} %";
this.xrTableCell3.Weight = 1D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.BewertungsstatistikRO);
//
// Bewertungsstatistik
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -271,9 +326,11 @@ namespace BeWo.Report.DefaultReports
this.PageInfo,
this.DataField});
this.Version = "23.2";
xrWatermark1.Id = "Watermark1";
this.Watermarks.Add(xrWatermark1);
((System.ComponentModel.ISupportInitialize)(this.groupBoxArray1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tableBewertungen)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
}
@@ -297,12 +354,15 @@ namespace BeWo.Report.DefaultReports
private DevExpress.XtraReports.UI.DetailBand Detail1;
private DevExpress.XtraReports.UI.DetailReportBand DetailReport1;
private DevExpress.XtraReports.UI.DetailBand Detail2;
private DevExpress.XtraReports.UI.GroupHeaderBand GroupHeader1;
private DevExpress.XtraReports.UI.CalculatedField fieldStunden;
private DevExpress.XtraReports.UI.XRLabel xrLabel2;
private DevExpress.XtraReports.UI.XRLabel xrLabel8;
private DevExpress.XtraReports.UI.XRTable tableBewertungen;
private DevExpress.XtraReports.UI.XRTable xrTable1;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow1;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell1;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow2;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell2;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow3;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell3;
}
}

View File

@@ -18,6 +18,8 @@ namespace BeWo.Report.ReportObjects
public class BewertungsstatistikRO : AbstractBeWoReportObject<BewertungsstatistikRO>
{
public List<BewertungsstatistikReportTabelle> BewertungsstatistikReportTabelleList { get; set; }
public List<Wirkungskontrolle> Wirkungskontolle{ get; set; }
public DateTime? StartDay { get; set; }
public DateTime? EndDay { get; set; }
@@ -38,123 +40,156 @@ namespace BeWo.Report.ReportObjects
public DateTime? Datum { get; set; }
public int Note { get; set; }
}
public class Wirkungskontrolle
{
public string Benotung { get; set; }
public int AnzahlVergeben { get; set; }
public decimal AnzahlVergebenInProzent { get; set; }
}
public static BewertungsstatistikRO Create(DateTime? start, DateTime? end, SupportConceptDC supportConcept, bool inclZeiterfassung, List<ValueListEntryDC> ausgewaehlteZiele, List<RatingDC> scZiele)
{
var result = new BewertungsstatistikRO();
result.Wirkungskontolle = new List<Wirkungskontrolle>();
result.StartDay = start;
result.EndDay = end;
if (supportConcept == null && ausgewaehlteZiele == null && scZiele == null)
{
// Hier neu
}
result.StartDay = start;
result.EndDay = end;
result.ZeiterfassungEinbinden = inclZeiterfassung;
result.SupportConceptDC = supportConcept;
result.BewertungsstatistikReportTabelleList = new List<BewertungsstatistikReportTabelle>();
List<GoalRatingDC> passendeZielBewertungen = new List<GoalRatingDC>();
foreach (var item in scZiele)
{
foreach (var item2 in item.GoalRatingList)
Dictionary<string, int> ratingTypeZuAnzahl = new Dictionary<string, int>();
// Zuerst alle GoalRating holen und in ein Dict packen, damit man schon mal nach der Bewertung sortiert hat
var allGoalRatings = MapperFactory.GoalRatingDC_GoalRating.MapToNewDCs(DAOFactory.GenericDAO.GetAllActive<GoalRating>());
foreach (var rating in allGoalRatings)
{
item2.ServiceRecord = new ServiceRecordDC
if (!ratingTypeZuAnzahl.ContainsKey(rating.RatingType.DisplayName))
ratingTypeZuAnzahl.Add(rating.RatingType.DisplayName, 0);
ratingTypeZuAnzahl[rating.RatingType.DisplayName]++;
}
int gesamt = ratingTypeZuAnzahl.Sum(r => r.Value);
foreach (var pair in ratingTypeZuAnzahl)
{
result.Wirkungskontolle.Add(new Wirkungskontrolle()
{
RoundedDuration = 0,
Start = item.StartDate
};
passendeZielBewertungen.Add(item2);
Benotung = pair.Key,
AnzahlVergeben = pair.Value,
//AnzahlVergebenInProzent = gesamt > 0 ? (pair.Value / gesamt) * 100 : 0
});
var prozenz = gesamt > 0 ? (pair.Value / gesamt) * 100 : 0;
}
}
if (inclZeiterfassung)
else
{
var osi = new OperationsServiceImp();
var serviceRecordRatings = osi.FetchServiceRecordRatings(supportConcept.SupportConceptOid, null, null, null, start, end);
foreach (var item in serviceRecordRatings)
passendeZielBewertungen.Add(item);
}
result.ZeiterfassungEinbinden = inclZeiterfassung;
result.SupportConceptDC = supportConcept;
result.BewertungsstatistikReportTabelleList = new List<BewertungsstatistikReportTabelle>();
//List<ServiceRecord> serviceRecords = DAOFactory.SearchDAO.FindServiceRecordsForSupportConcept((long)supportConcept.SupportConceptOid);
foreach (var ziel in ausgewaehlteZiele)
{
int anzahl = 0; // Zähler für Schnittberechnung und scZiele-Index
var datensatz = new BewertungsstatistikReportTabelle();
datensatz.Zielname = ziel.DisplayName;
datensatz.GesamtzeitInvestiert = 0;
datensatz.BewertungsstatistikZielDetailList = new List<BewertungsstatistikZielDetail>();
//foreach (var sr in serviceRecords)
//{
// var detail = new BewertungsstatistikZielDetail();
// foreach (var item in passendeZielBewertungen)
// {
// if (item.GoalEntry.ValueListEntryOid == ziel.ValueListEntryOid)
// {
// if (item.ServiceRecord.ServiceRecordOid == sr.Oid && item.GoalRatingOid == null && item.RatingType?.RatingId != null)
// {
// if (item.ServiceRecord.Start >= start && item.ServiceRecord.Start <= end)
// {
// detail.Note = item.RatingType.RatingId.Value;
// anzahl++; // Zähler für Schnittberechnung
// detail.MinutenInvestiert = sr.DurationMinutes;
// detail.Datum = sr.Start;
// passendeZielBewertungen.Remove(item);
// break;
// }
// }
// }
// }
// if (detail.MinutenInvestiert != 0)
// {
// datensatz.GesamtzeitInvestiert += detail.MinutenInvestiert;
// datensatz.Durchschnitt += detail.Note;
// }
// if (detail.Datum != null)
// datensatz.BewertungsstatistikZielDetailList.Add(detail);
//}
foreach (var item in passendeZielBewertungen)
List<GoalRatingDC> passendeZielBewertungen = new List<GoalRatingDC>();
foreach (var item in scZiele)
{
//if (item.ServiceRecord.Start.Value.Day >= start.Value.Day && item.ServiceRecord.Start <= end)
//{
if (item.GoalEntry != null && item.GoalEntry.Equals(ziel))
foreach (var item2 in item.GoalRatingList)
{
var detail = new BewertungsstatistikZielDetail();
if (item.RatingType != null)
item2.ServiceRecord = new ServiceRecordDC
{
detail.Note = item.RatingType.RatingId.Value;
}
detail.Datum = item.ServiceRecord.Start;
detail.MinutenInvestiert = (double)item.ServiceRecord.RoundedDuration;
datensatz.GesamtzeitInvestiert += detail.MinutenInvestiert;
anzahl++;
datensatz.Durchschnitt += detail.Note;
datensatz.BewertungsstatistikZielDetailList.Add(detail);
RoundedDuration = 0,
Start = item.StartDate
};
passendeZielBewertungen.Add(item2);
}
//}
}
if (inclZeiterfassung)
{
var osi = new OperationsServiceImp();
var serviceRecordRatings = osi.FetchServiceRecordRatings(supportConcept.SupportConceptOid, null, null, null, start, end);
foreach (var item in serviceRecordRatings)
passendeZielBewertungen.Add(item);
}
datensatz.Durchschnitt /= anzahl;
datensatz.Durchschnitt = Math.Round(datensatz.Durchschnitt, 2);
datensatz.BewertungsstatistikZielDetailList = datensatz.BewertungsstatistikZielDetailList.OrderBy(a => a.Datum).ToList<BewertungsstatistikZielDetail>();
//if(datensatz.GesamtzeitInvestiert != 0) //Falls Ziele ohne Zeitaufwand nicht dargestellt werden sollen
result.BewertungsstatistikReportTabelleList.Add(datensatz);
//List<ServiceRecord> serviceRecords = DAOFactory.SearchDAO.FindServiceRecordsForSupportConcept((long)supportConcept.SupportConceptOid);
foreach (var ziel in ausgewaehlteZiele)
{
int anzahl = 0; // Zähler für Schnittberechnung und scZiele-Index
var datensatz = new BewertungsstatistikReportTabelle();
datensatz.Zielname = ziel.DisplayName;
datensatz.GesamtzeitInvestiert = 0;
datensatz.BewertungsstatistikZielDetailList = new List<BewertungsstatistikZielDetail>();
//foreach (var sr in serviceRecords)
//{
// var detail = new BewertungsstatistikZielDetail();
// foreach (var item in passendeZielBewertungen)
// {
// if (item.GoalEntry.ValueListEntryOid == ziel.ValueListEntryOid)
// {
// if (item.ServiceRecord.ServiceRecordOid == sr.Oid && item.GoalRatingOid == null && item.RatingType?.RatingId != null)
// {
// if (item.ServiceRecord.Start >= start && item.ServiceRecord.Start <= end)
// {
// detail.Note = item.RatingType.RatingId.Value;
// anzahl++; // Zähler für Schnittberechnung
// detail.MinutenInvestiert = sr.DurationMinutes;
// detail.Datum = sr.Start;
// passendeZielBewertungen.Remove(item);
// break;
// }
// }
// }
// }
// if (detail.MinutenInvestiert != 0)
// {
// datensatz.GesamtzeitInvestiert += detail.MinutenInvestiert;
// datensatz.Durchschnitt += detail.Note;
// }
// if (detail.Datum != null)
// datensatz.BewertungsstatistikZielDetailList.Add(detail);
//}
foreach (var item in passendeZielBewertungen)
{
//if (item.ServiceRecord.Start.Value.Day >= start.Value.Day && item.ServiceRecord.Start <= end)
//{
if (item.GoalEntry != null && item.GoalEntry.Equals(ziel))
{
var detail = new BewertungsstatistikZielDetail();
if (item.RatingType != null)
{
detail.Note = item.RatingType.RatingId.Value;
}
detail.Datum = item.ServiceRecord.Start;
detail.MinutenInvestiert = (double)item.ServiceRecord.RoundedDuration;
datensatz.GesamtzeitInvestiert += detail.MinutenInvestiert;
anzahl++;
datensatz.Durchschnitt += detail.Note;
datensatz.BewertungsstatistikZielDetailList.Add(detail);
}
//}
}
datensatz.Durchschnitt /= anzahl;
datensatz.Durchschnitt = Math.Round(datensatz.Durchschnitt, 2);
datensatz.BewertungsstatistikZielDetailList = datensatz.BewertungsstatistikZielDetailList.OrderBy(a => a.Datum).ToList<BewertungsstatistikZielDetail>();
//if(datensatz.GesamtzeitInvestiert != 0) //Falls Ziele ohne Zeitaufwand nicht dargestellt werden sollen
result.BewertungsstatistikReportTabelleList.Add(datensatz);
}
result.BewertungsstatistikReportTabelleList = result.BewertungsstatistikReportTabelleList.OrderBy(b => b.Zielname).ToList();
}
result.BewertungsstatistikReportTabelleList = result.BewertungsstatistikReportTabelleList.OrderBy(b => b.Zielname).ToList();
return result;
}

View File

@@ -92,12 +92,19 @@
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Quittierungsbeleg.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Quittierungsbeleg.Designer.cs">
<DependentUpon>Quittierungsbeleg.cs</DependentUpon>
</Compile>
<Compile Include="ServiceInvoiceReport.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="ServiceInvoiceReport.Designer.cs">
<DependentUpon>ServiceInvoiceReport.cs</DependentUpon>
</Compile>
<Compile Include="Service\CustomVacationService.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Data\Data.csproj">
@@ -137,6 +144,10 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Quittierungsbeleg.resx">
<DependentUpon>Quittierungsbeleg.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="ServiceInvoiceReport.resx">
<DependentUpon>ServiceInvoiceReport.cs</DependentUpon>
<SubType>Designer</SubType>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,158 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Text.RegularExpressions;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using BS.Shared.Core;
using DevExpress.XtraReports.UI;
namespace CaritasverbandDuerenJuelichEV
{
public partial class Quittierungsbeleg : XtraReport, IBeWoReport<ServicesOverviewRO>
{
public Quittierungsbeleg()
{
InitializeComponent();
}
public void SetReportDataSource(ServicesOverviewRO pRO)
{
// Get calling method name
//StackTrace stackTrace = new StackTrace();
//Debug.WriteLine(stackTrace.GetFrame(1).GetMethod().Name);
bool hatGruppen = false;
//if (pRO == null)
// return;
if (pRO.Services != null)
{
List<ServicesOverviewRO.ServiceDetail> servicesBillable = new List<ServicesOverviewRO.ServiceDetail>();
double fls = 0;
double fehlkontakte= 0;
foreach (var sd in pRO.Services)
{
if (sd.IsBillable || sd.ServiceDescription.ToLower().Contains("fehlkontakt") || sd.ServiceCategory.ToLower().Contains("fehlkontakt"))
{
sd.Notice = "";
sd.Notice = string.Format("{0:00}:{1:00} h", Convert.ToInt16(sd.Minutes / 60), sd.Minutes % 60);
ServicesOverviewRO.CreateSignatureString(sd);
sd.Notice5 = "E";
if (sd.IsGroup)
{
//sd.Notice5 = String.Format("{0} Teilnehmer", sd.CustomerCount);
sd.Notice5 = "GR";
hatGruppen = true;
}
if (sd.ServiceDescription.ToLower().Contains("fehlkontakt") || sd.ServiceCategory.ToLower().Contains("fehlkontakt") || (sd.ProzentAbrechenbar < 100))
{
fehlkontakte += sd.Minutes;
sd.Notice5 = "F";
}
else
fls += sd.Minutes;
servicesBillable.Add(sd);
}
}
lblFLSFehlkontakte.Text = string.Format("{0:00}:{1:00} h", Convert.ToInt16(fehlkontakte / 60), fehlkontakte % 60);
lblFLSoFehlkontakte.Text = string.Format("{0:00}:{1:00} h", Convert.ToInt16(fls / 60), fls % 60);
pRO.Services = servicesBillable;
}
if (String.IsNullOrWhiteSpace(pRO.AbsenceTimes))
{
lblHatAbwesenheiten.Text = "X";
}
if (!hatGruppen)
{
lblHatGruppen.Text = "X";
}
ErstelleAbwesenheitenTabelle(pRO);
bindingSource1.DataSource = pRO;
}
private void ErstelleAbwesenheitenTabelle(ServicesOverviewRO pRo)
{
if (pRo.Abwesenheiten != null)
{
int newRows = 0;
int index = 1;
foreach (var at in pRo.Abwesenheiten)
{
DevExpress.XtraReports.UI.XRTableRow row = null;
if (index < xrTableAbwesenheiten.Rows.Count)
{
row = xrTableAbwesenheiten.Rows[index];
}
else
{
row = xrTableAbwesenheiten.InsertRowBelow(xrTableAbwesenheiten.Rows[xrTableAbwesenheiten.Rows.Count - 1]);
newRows++;
}
row.Cells[0].Text = String.Format("{0:dd.MM.yyyy}", at.Start);
int? days = null;
if (at.End.HasValue)
{
row.Cells[1].Text = String.Format("{0:dd.MM.yyyy}", at.End);
days = (int)at.End.Value.Subtract(at.Start.Value).TotalDays + 1;
}
else
{
row.Cells[1].Text = "unbekannt";
}
row.Cells[2].Text = String.Format("{0:0}", days);
index++;
}
if (newRows > 0)
{
lblUnterschriftKlient.Top += newRows * 20;
lblUnterschriftMitarbeiter.Top += newRows * 20;
}
}
}
private void picSignature_BeforePrint(object sender, System.ComponentModel.CancelEventArgs e)
{
XRPictureBox xrBox = sender as XRPictureBox;
//var test = this.GetCurrent
string base64String = xrBox.Tag as string;
if (!String.IsNullOrWhiteSpace(base64String))
{
var base64Data = Regex.Match(base64String, @"data:image/(?<type>.+?),(?<data>.+)").Groups["data"].Value;
var binData = Convert.FromBase64String(base64Data);
Image img = ByteArrayToImage(binData);
xrBox.Image = Utils.CropImage(img);
}
else
{
xrBox.Image = null;
}
}
public Image ByteArrayToImage(byte[] byteArrayIn)
{
using(var memoryStream = new MemoryStream(byteArrayIn))
{
return Image.FromStream(memoryStream);
}
}
}
}

View File

@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="xrRichText2.SerializableRtfString" xml:space="preserve">
<value>ewBcAHIAdABmADEAXABkAGUAZgBmADAAewBcAGYAbwBuAHQAdABiAGwAewBcAGYAMAAgAEMAYQBsAGkAYgByAGkAOwB9AHsAXABmADEAIABUAGkAbQBlAHMAIABOAGUAdwAgAFIAbwBtAGEAbgA7AH0AewBcAGYAMgAgAEEAcgBpAGEAbAA7AH0AfQB7AFwAYwBvAGwAbwByAHQAYgBsACAAOwBcAHIAZQBkADAAXABnAHIAZQBlAG4AMABcAGIAbAB1AGUAMAAgADsAXAByAGUAZAAwAFwAZwByAGUAZQBuADAAXABiAGwAdQBlADIANQA1ACAAOwB9AHsAXAAqAFwAZABlAGYAYwBoAHAAIABcAGYAMQBcAGYAcwAyADQAfQB7AFwAcwB0AHkAbABlAHMAaABlAGUAdAAgAHsAXABxAGwAXABmADEAXABmAHMAMgA0ACAATgBvAHIAbQBhAGwAOwB9AHsAXAAqAFwAYwBzADEAXABmADEAXABmAHMAMgA0AFwAYwBmADEAIABEAGUAZgBhAHUAbAB0ACAAUABhAHIAYQBnAHIAYQBwAGgAIABGAG8AbgB0ADsAfQB7AFwAKgBcAGMAcwAyAFwAcwBiAGEAcwBlAGQAbwBuADEAXABmADEAXABmAHMAMgA0AFwAYwBmADEAIABMAGkAbgBlACAATgB1AG0AYgBlAHIAOwB9AHsAXAAqAFwAYwBzADMAXAB1AGwAXABmADEAXABmAHMAMgA0AFwAYwBmADIAIABIAHkAcABlAHIAbABpAG4AawA7AH0AewBcACoAXAB0AHMANABcAHQAcwByAG8AdwBkAFwAZgAxAFwAZgBzADIANABcAHEAbABcAHQAcwBjAGUAbABsAHAAYQBkAGQAZgBsADMAXAB0AHMAYwBlAGwAbABwAGEAZABk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RtfString" xml:space="preserve">
<value>ewBcAHIAdABmADEAXABkAGUAZgBmADAAewBcAGYAbwBuAHQAdABiAGwAewBcAGYAMAAgAEMAYQBsAGkAYgByAGkAOwB9AHsAXABmADEAIABUAGkAbQBlAHMAIABOAGUAdwAgAFIAbwBtAGEAbgA7AH0AewBcAGYAMgAgAEEAcgBpAGEAbAA7AH0AfQB7AFwAYwBvAGwAbwByAHQAYgBsACAAOwBcAHIAZQBkADAAXABnAHIAZQBlAG4AMABcAGIAbAB1AGUAMAAgADsAXAByAGUAZAAwAFwAZwByAGUAZQBuADAAXABiAGwAdQBlADIANQA1ACAAOwB9AHsAXAAqAFwAZABlAGYAYwBoAHAAIABcAGYAMQBcAGYAcwAyADQAfQB7AFwAcwB0AHkAbABlAHMAaABlAGUAdAAgAHsAXABxAGwAXABmADEAXABmAHMAMgA0ACAATgBvAHIAbQBhAGwAOwB9AHsAXAAqAFwAYwBzADEAXABmADEAXABmAHMAMgA0AFwAYwBmADEAIABEAGUAZgBhAHUAbAB0ACAAUABhAHIAYQBnAHIAYQBwAGgAIABGAG8AbgB0ADsAfQB7AFwAKgBcAGMAcwAyAFwAcwBiAGEAcwBlAGQAbwBuADEAXABmADEAXABmAHMAMgA0AFwAYwBmADEAIABMAGkAbgBlACAATgB1AG0AYgBlAHIAOwB9AHsAXAAqAFwAYwBzADMAXAB1AGwAXABmADEAXABmAHMAMgA0AFwAYwBmADIAIABIAHkAcABlAHIAbABpAG4AawA7AH0AewBcACoAXAB0AHMANABcAHQAcwByAG8AdwBkAFwAZgAxAFwAZgBzADIANABcAHEAbABcAHQAcwBjAGUAbABsAHAAYQBkAGQAZgBsADMAXAB0AHMAYwBlAGwAbABwAGEAZABkAGwAMQAwADgAXAB0AHMAYwBlAGwAbABwAGEAZABkAGYAYgAzAFwAdABzAGMAZQBsAGwAcABhAGQAZABmAHIAMwBcAHQAcwBjAGUAbABsAHAAYQBkAGQAcgAxADAAOABcAHQAcwBjAGUAbABsAHAAYQBkAGQAZ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GcAZQBiAG8AdABlAH0AewBcAGYAMgBcAGYAcwAyADAAXABjAGYAMQAgACAAaQBtACAAQQBiAHIAZQBjAGgAbgB1AG4AZwBzAHoAZQBpAHQAcgBhAHUAbQB9AFwAZgAxAFwAZgBzADIANABcAGMAZgAxAFwAcABhAHIAfQA=</value>
</data>
</root>

View File

@@ -0,0 +1,22 @@
using BeWo.Service.Plugins;
using BS.Shared.DataContracts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KundeXyz.Service
{
public class CustomVacationService : VacationService
{
public override List<FeiertagDC> GetFeiertage(int year, string bundesland)
{
var list = base.GetFeiertage(year, bundesland);
list.Add(new FeiertagDC() { Datum = new DateTime(year, 12, 31), Name = "Silvester" });
return list;
}
}
}

View File

@@ -699,8 +699,6 @@ namespace CaritasverbandDuerenJuelichEV
this.lblBewFLS.BorderColor = System.Drawing.Color.Black;
this.lblBewFLS.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.lblBewFLS.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.SupportConceptApprovalPeriod.ApprovedBEPerInterval")});
this.lblBewFLS.Dpi = 254F;
this.lblBewFLS.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
@@ -713,7 +711,6 @@ namespace CaritasverbandDuerenJuelichEV
this.lblBewFLS.StylePriority.UseFont = false;
this.lblBewFLS.StylePriority.UsePadding = false;
this.lblBewFLS.StylePriority.UseTextAlignment = false;
this.lblBewFLS.Text = "lblBewFLS";
this.lblBewFLS.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
this.lblBewFLS.TextFormatString = "{0:0.##}";
this.lblBewFLS.Weight = 1.861798487530498D;

View File

@@ -25,11 +25,19 @@ namespace CaritasverbandDuerenJuelichEV
lblBewZeitraum.Text = String.Format("{0:dd.MM.yyyy} bis {1:dd.MM.yyyy}", pRO.InvoiceBase.SupportConceptCostBearerRelDc.StartDate, pRO.InvoiceBase.SupportConceptCostBearerRelDc.EndDate);
SetBetreuung(pRO);
var bewStundenProWoche = 0.00m;
var bewStundenGesamt = 0.00m;
if (pRO.ServiceInvoicePeriods != null && pRO.ServiceInvoicePeriods.Count > 0)
{
decimal rateFactor = 1;
foreach (var sip in pRO.ServiceInvoicePeriods)
{
if (sip.SupportConceptApprovalPeriod.ApprovedBETotal.HasValue)
bewStundenGesamt += sip.SupportConceptApprovalPeriod.ApprovedBETotal.Value;
else if (sip.SupportConceptApprovalPeriod.ApprovedBEInterval.Value == SupportConceptApprovalInterval.Weekly)
bewStundenProWoche += sip.SupportConceptApprovalPeriod.ApprovedBEPerInterval.Value;
foreach (var ii in sip.ServiceInvoiceItems)
{
if (!String.IsNullOrEmpty(ii.RateFactor))
@@ -49,6 +57,11 @@ namespace CaritasverbandDuerenJuelichEV
}
}
if (bewStundenGesamt != 0)
lblBewFLS.Text = string.Format("{0:0.00}", bewStundenGesamt);
else if (bewStundenProWoche != 0)
lblBewFLS.Text = string.Format("{0:0.00}", bewStundenProWoche);
this.bindingSource1.DataSource = pRO;
}
@@ -73,23 +86,6 @@ namespace CaritasverbandDuerenJuelichEV
}
}
//var hauptbetreuer = c.Employee2CustomerList.FirstOrDefault(
// e2c => e2c.ValueList.Any(ve => ve.Entry.SystemEntryID.HasValue
// && ve.Entry.SystemEntryID.Value == SystemEntryID.EmployeeRoleMainAttendant));
//var vertretung = c.Employee2CustomerList.FirstOrDefault(
// e2c => e2c.ValueList.Any(ve => ve.Entry.Type == ValueListEntryType.StaffRoleType
// && ve.Entry.Value != null && ve.Entry.Value == "Ergänzende Betreuung"));
//if (hauptbetreuer != null && hauptbetreuer.Employee.Person != null)
//{
// lblBetreuungskraft.Text = hauptbetreuer.Employee.Person.FirstNameLastName;
//}
//if (vertretung != null && vertretung.Employee.Person != null)
//{
// lblBetreuungskraft.Text += " / " + vertretung.Employee.Person.FirstNameLastName;
//}
var betreuungsarten = c.ValueList.Where(v2o => v2o.Entry.Type == ValueListEntryType.CustomerCareType).ToList();
if (betreuungsarten != null && betreuungsarten.Count > 0)
{
@@ -100,34 +96,7 @@ namespace CaritasverbandDuerenJuelichEV
}
}
//if (pRO.ServiceInvoicePeriods[0].SupportConceptApprovalPeriod != null &&
// pRO.ServiceInvoicePeriods[0].SupportConceptApprovalPeriod.ServiceCategory != null)
//{
// var name = pRO.ServiceInvoicePeriods[0].SupportConceptApprovalPeriod.ServiceCategory.Name;
// name = name.Replace("Fachleistungsstunde", "").Trim();
// name = name.Replace("(", "");
// name = name.Replace(")", "");
// lblBetreuungsart.Text = name;
//}
}
//if (pRO.CustomerOid.HasValue)
//{
// var c = DAOFactory.GenericDAO.LoadByID<Customer>(pRO.CustomerOid.Value);
// var hauptbetreuer = c.Employee2CustomerList.FirstOrDefault(
// e2c => e2c.ValueList.Any(ve => ve.Entry.SystemEntryID.HasValue
// && ve.Entry.SystemEntryID.Value == SystemEntryID.EmployeeRoleMainAttendant));
// if (hauptbetreuer != null && hauptbetreuer.Employee.Person != null)
// {
// lblBetreuungskraft.Text = hauptbetreuer.Employee.Person.FirstNameLastName;
// }
// var betreuungsart = c.ValueList.FirstOrDefault(v2o => v2o.Entry.Type == ValueListEntryType.CustomerCareType);
// if (betreuungsart != null)
// {
// lblBetreuungsart.Text = betreuungsart.Entry.Value;
// }
//}
}
}
}

View File

@@ -1,39 +1,56 @@
using System.Collections.Generic;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using System;
using System.Collections.Generic;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using BS.Shared.Extensions;
using DevExpress.XtraReports.UI;
namespace Mittelpunkt
using DevExpress.XtraReports.UI;
namespace Mittelpunkt
{
public class CustomReportCreator : DefaultReportCreator
{
public override XtraReport CreateServiceOverviewAllCustomersReport(int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay)
{
List<ServicesOverviewRO> lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay, serviceCategoryOid, false);
if (lROs.Count > 0)
{
public class CustomReportCreator : DefaultReportCreator
{
public override XtraReport CreateQueryReport(long queryOid, string queryReportId)
{
if (queryOid == 11)
{
var ro = base.CreateQueryRO(queryOid, queryReportId);
if (DateTime.TryParse(ro.Rows[0].Field1.ToString(), out var datum))
{
return CreateBewertungsstatistikReport(datum, new DateTime(datum.Year, 12, 31), null, false, null, null);
}
}
return base.CreateQueryReport(queryOid, queryReportId);
}
public override XtraReport CreateServiceOverviewAllCustomersReport(int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay)
{
List<ServicesOverviewRO> lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay, serviceCategoryOid, false);
if (lROs.Count > 0)
{
var rootReport = CreateServicesOverviewReportForRo(lROs[0], serviceCategoryOid);
if (rootReport.Pages.Count == 0)
{
rootReport.CreateDocument();
}
for (int i = 1; i < lROs.Count; i++)
{
for (int i = 1; i < lROs.Count; i++)
{
var lNext = CreateServicesOverviewReportForRo(lROs[i], serviceCategoryOid);
if (lNext.Pages.Count == 0)
{
lNext.CreateDocument();
}
rootReport.Pages.AddRange(lNext.Pages);
}
return rootReport;
}
return new XtraReport();
rootReport.Pages.AddRange(lNext.Pages);
}
return rootReport;
}
return new XtraReport();
}
public override XtraReport CreateServiceOverviewReportForCustomers(IList<long> customerOids, int month, int year, long? orgaOid, long? empOid, long? serviceCategoryOid, int startDay, int endDay, bool nurFehlende)
@@ -65,18 +82,18 @@ namespace Mittelpunkt
return new XtraReport();
}
public override XtraReport CreateServiceOverviewSingleCustomerReport(long customerOid, int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay)
{
var ro = ServicesOverviewRO.Create(customerOid, month, year, false, orgaOid, empOid, startDay, endDay, serviceCategoryOid);
public override XtraReport CreateServiceOverviewSingleCustomerReport(long customerOid, int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay)
{
var ro = ServicesOverviewRO.Create(customerOid, month, year, false, orgaOid, empOid, startDay, endDay, serviceCategoryOid);
return CreateServicesOverviewReportForRo(ro, serviceCategoryOid);
}
private XtraReport CreateServicesOverviewReportForRo(ServicesOverviewRO ro, long? serviceCategoryOid)
{
private XtraReport CreateServicesOverviewReportForRo(ServicesOverviewRO ro, long? serviceCategoryOid)
{
ServicesOverviewRO flsRo = ServicesOverviewRO.CopyFromRO(ro);
ServicesOverviewRO assiRo = ServicesOverviewRO.CopyFromRO(ro);
@@ -106,8 +123,8 @@ namespace Mittelpunkt
if (report == null)
report = new XtraReport();
return report;
return report;
}
public override XtraReport CreateReportForServicesOverviewRo(ServicesOverviewRO ro, string reportId)
@@ -139,7 +156,7 @@ namespace Mittelpunkt
}
}
return report;
}
}
}
}
}
}