Mittelpunkt: Berichte ArbeitstageMehrAls8h für Mitarbeiter oder Team

This commit is contained in:
2025-07-25 20:41:04 +02:00
parent 3a5df6c574
commit 372995bfbe
5 changed files with 814 additions and 4 deletions

View File

@@ -0,0 +1,30 @@
using BeWo.Report;
using BeWo.Report.ReportObjects;
namespace Mittelpunkt
{
public partial class ArbeitstageMehrAls8h : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<MitarbeiterstundenkontoMonateRO>
{
public ArbeitstageMehrAls8h()
{
InitializeComponent();
}
public void SetReportDataSource(MitarbeiterstundenkontoMonateRO pRO)
{
var employeeDetail = pRO.EmployeeInfoList[0].EmployeeDetails[0].EmployeeDetail;
if (employeeDetail != null && employeeDetail.Employee.Person.Address != null)
{
var adresse = employeeDetail.Employee.Person.Address;
lblAdresse.Text = adresse.Street + "\n"
+ adresse.PostalCode + " " + adresse.Town;
lblAnzahl.Text = lblAnzahl.Text + employeeDetail.Days.Count.ToString();
}
this.bindingSource1.DataSource = pRO;
}
}
}

View File

@@ -0,0 +1,525 @@
using BeWo.Report.ReportObjects;
namespace Mittelpunkt
{
partial class ArbeitstageMehrAls8h
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ArbeitstageMehrAls8h));
DevExpress.XtraReports.UI.XRWatermark xrWatermark1 = new DevExpress.XtraReports.UI.XRWatermark();
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
this.xrTableDetail = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRowDetail = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell19 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell20 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableHeader = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRowHeader = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel1 = 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();
this.DataField = new DevExpress.XtraReports.UI.XRControlStyle();
this.fieldFLS = new DevExpress.XtraReports.UI.CalculatedField();
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
this.DetailReport1 = new DevExpress.XtraReports.UI.DetailReportBand();
this.Detail2 = new DevExpress.XtraReports.UI.DetailBand();
this.DetailReport2 = new DevExpress.XtraReports.UI.DetailReportBand();
this.Detail3 = new DevExpress.XtraReports.UI.DetailBand();
this.GroupHeader2 = new DevExpress.XtraReports.UI.GroupHeaderBand();
this.GroupHeader3 = new DevExpress.XtraReports.UI.GroupHeaderBand();
this.GroupFooter2 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.lblAnzahl = new DevExpress.XtraReports.UI.XRLabel();
this.fieldRelationGesamt = new DevExpress.XtraReports.UI.CalculatedField();
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
this.lblAdresse = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel();
this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox();
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
this.GroupHeader1 = new DevExpress.XtraReports.UI.GroupHeaderBand();
this.xrPageInfo3 = new DevExpress.XtraReports.UI.XRPageInfo();
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableHeader)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// Detail
//
this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel4});
this.Detail.HeightF = 58.3332F;
this.Detail.Name = "Detail";
this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrLabel4
//
this.xrLabel4.Font = new DevExpress.Drawing.DXFont("Times New Roman", 11F);
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 9.999974F);
this.xrLabel4.Multiline = true;
this.xrLabel4.Name = "xrLabel4";
this.xrLabel4.SizeF = new System.Drawing.SizeF(675.9999F, 48.33319F);
this.xrLabel4.StyleName = "Title";
this.xrLabel4.StylePriority.UseFont = false;
this.xrLabel4.Text = resources.GetString("xrLabel4.Text");
//
// xrTableDetail
//
this.xrTableDetail.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTableDetail.Font = new DevExpress.Drawing.DXFont("Arial", 8F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrTableDetail.LocationFloat = new DevExpress.Utils.PointFloat(100F, 0F);
this.xrTableDetail.Name = "xrTableDetail";
this.xrTableDetail.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableDetail.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRowDetail});
this.xrTableDetail.SizeF = new System.Drawing.SizeF(461.2497F, 20F);
this.xrTableDetail.StylePriority.UseBorders = false;
this.xrTableDetail.StylePriority.UseFont = false;
this.xrTableDetail.StylePriority.UsePadding = false;
this.xrTableDetail.StylePriority.UseTextAlignment = false;
this.xrTableDetail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
//
// xrTableRowDetail
//
this.xrTableRowDetail.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell3,
this.xrTableCell19,
this.xrTableCell20});
this.xrTableRowDetail.Name = "xrTableRowDetail";
this.xrTableRowDetail.Weight = 0.8D;
//
// xrTableCell3
//
this.xrTableCell3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeInfoList.EmployeeDetails.EmployeeDetail.Days.Date")});
this.xrTableCell3.Name = "xrTableCell3";
this.xrTableCell3.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F);
this.xrTableCell3.StylePriority.UseFont = false;
this.xrTableCell3.StylePriority.UsePadding = false;
this.xrTableCell3.StylePriority.UseTextAlignment = false;
this.xrTableCell3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell3.TextFormatString = "{0:dd.MM.yyyy}";
this.xrTableCell3.Weight = 0.091855175448948279D;
//
// xrTableCell19
//
this.xrTableCell19.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeInfoList.EmployeeDetails.EmployeeDetail.Days.MinutesTotal")});
this.xrTableCell19.Name = "xrTableCell19";
this.xrTableCell19.Text = "xrTableCell19";
this.xrTableCell19.TextFormatString = "{0:#,#}";
this.xrTableCell19.Weight = 0.16929384152071325D;
//
// xrTableCell20
//
this.xrTableCell20.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeInfoList.EmployeeDetails.EmployeeDetail.Days.TimeTotal")});
this.xrTableCell20.Name = "xrTableCell20";
this.xrTableCell20.Text = "xrTableCell20";
this.xrTableCell20.TextFormatString = "{0:#.00}";
this.xrTableCell20.Weight = 0.17762289222770636D;
//
// xrTableHeader
//
this.xrTableHeader.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
| DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTableHeader.Font = new DevExpress.Drawing.DXFont("Arial", 8F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrTableHeader.LocationFloat = new DevExpress.Utils.PointFloat(100F, 0F);
this.xrTableHeader.Name = "xrTableHeader";
this.xrTableHeader.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableHeader.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRowHeader});
this.xrTableHeader.SizeF = new System.Drawing.SizeF(461.2497F, 24F);
this.xrTableHeader.StylePriority.UseBorders = false;
this.xrTableHeader.StylePriority.UseFont = false;
this.xrTableHeader.StylePriority.UsePadding = false;
this.xrTableHeader.StylePriority.UseTextAlignment = false;
this.xrTableHeader.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
//
// xrTableRowHeader
//
this.xrTableRowHeader.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell5,
this.xrTableCell4,
this.xrTableCell2});
this.xrTableRowHeader.Name = "xrTableRowHeader";
this.xrTableRowHeader.Weight = 0.96000012925102918D;
//
// xrTableCell5
//
this.xrTableCell5.Name = "xrTableCell5";
this.xrTableCell5.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F);
this.xrTableCell5.StylePriority.UsePadding = false;
this.xrTableCell5.StylePriority.UseTextAlignment = false;
this.xrTableCell5.Text = "Tag";
this.xrTableCell5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell5.Weight = 0.091855172169328772D;
//
// xrTableCell4
//
this.xrTableCell4.Name = "xrTableCell4";
this.xrTableCell4.Text = "Gesamtarbeitszeit in Minuten";
this.xrTableCell4.Weight = 0.16929395454012958D;
//
// xrTableCell2
//
this.xrTableCell2.Name = "xrTableCell2";
this.xrTableCell2.Text = "Gesamtarbeitszeit in Stunden";
this.xrTableCell2.Weight = 0.17762278293689804D;
//
// xrLabel8
//
this.xrLabel8.Font = new DevExpress.Drawing.DXFont("Times New Roman", 8F);
this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(0F, 88.93325F);
this.xrLabel8.Multiline = true;
this.xrLabel8.Name = "xrLabel8";
this.xrLabel8.SizeF = new System.Drawing.SizeF(254.9996F, 23.00005F);
this.xrLabel8.StyleName = "Title";
this.xrLabel8.StylePriority.UseFont = false;
this.xrLabel8.Text = "(Mittelpunkt Verwaltung)";
//
// xrLabel1
//
this.xrLabel1.Font = new DevExpress.Drawing.DXFont("Times New Roman", 11F);
this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 37.18235F);
this.xrLabel1.Multiline = true;
this.xrLabel1.Name = "xrLabel1";
this.xrLabel1.SizeF = new System.Drawing.SizeF(254.9996F, 23.00005F);
this.xrLabel1.StyleName = "Title";
this.xrLabel1.StylePriority.UseFont = false;
this.xrLabel1.Text = "Mit freundlichen Grüßen";
//
// Title
//
this.Title.BackColor = System.Drawing.Color.White;
this.Title.BorderColor = System.Drawing.SystemColors.ControlText;
this.Title.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.Title.BorderWidth = 1F;
this.Title.Font = new DevExpress.Drawing.DXFont("Times New Roman", 24F);
this.Title.ForeColor = System.Drawing.Color.Black;
this.Title.Name = "Title";
//
// FieldCaption
//
this.FieldCaption.BackColor = System.Drawing.Color.White;
this.FieldCaption.BorderColor = System.Drawing.SystemColors.ControlText;
this.FieldCaption.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.FieldCaption.BorderWidth = 1F;
this.FieldCaption.Font = new DevExpress.Drawing.DXFont("Times New Roman", 10F, DevExpress.Drawing.DXFontStyle.Bold);
this.FieldCaption.ForeColor = System.Drawing.Color.Black;
this.FieldCaption.Name = "FieldCaption";
//
// PageInfo
//
this.PageInfo.BackColor = System.Drawing.Color.White;
this.PageInfo.BorderColor = System.Drawing.SystemColors.ControlText;
this.PageInfo.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.PageInfo.BorderWidth = 1F;
this.PageInfo.Font = new DevExpress.Drawing.DXFont("Times New Roman", 8F);
this.PageInfo.ForeColor = System.Drawing.Color.Black;
this.PageInfo.Name = "PageInfo";
//
// DataField
//
this.DataField.BackColor = System.Drawing.Color.White;
this.DataField.BorderColor = System.Drawing.SystemColors.ControlText;
this.DataField.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.DataField.BorderWidth = 1F;
this.DataField.Font = new DevExpress.Drawing.DXFont("Times New Roman", 8F);
this.DataField.ForeColor = System.Drawing.SystemColors.ControlText;
this.DataField.Name = "DataField";
//
// fieldFLS
//
this.fieldFLS.DataMember = "FLSReportGroups";
this.fieldFLS.Expression = "[TotalFLM] / 60";
this.fieldFLS.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
this.fieldFLS.Name = "fieldFLS";
//
// topMarginBand1
//
this.topMarginBand1.HeightF = 45.8333F;
this.topMarginBand1.Name = "topMarginBand1";
//
// bottomMarginBand1
//
this.bottomMarginBand1.HeightF = 30F;
this.bottomMarginBand1.Name = "bottomMarginBand1";
//
// DetailReport1
//
this.DetailReport1.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
this.Detail2,
this.DetailReport2});
this.DetailReport1.DataMember = "EmployeeInfoList";
this.DetailReport1.DataSource = this.bindingSource1;
this.DetailReport1.Level = 0;
this.DetailReport1.Name = "DetailReport1";
//
// Detail2
//
this.Detail2.HeightF = 0F;
this.Detail2.Name = "Detail2";
this.Detail2.PageBreak = DevExpress.XtraReports.UI.PageBreak.BeforeBandExceptFirstEntry;
//
// DetailReport2
//
this.DetailReport2.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
this.Detail3,
this.GroupHeader2,
this.GroupHeader3,
this.GroupFooter2});
this.DetailReport2.DataMember = "EmployeeInfoList.EmployeeDetails.EmployeeDetail.Days";
this.DetailReport2.DataSource = this.bindingSource1;
this.DetailReport2.Level = 0;
this.DetailReport2.Name = "DetailReport2";
//
// Detail3
//
this.Detail3.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTableDetail});
this.Detail3.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F);
this.Detail3.HeightF = 20F;
this.Detail3.Name = "Detail3";
this.Detail3.StylePriority.UseFont = false;
//
// GroupHeader2
//
this.GroupHeader2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTableHeader});
this.GroupHeader2.HeightF = 24F;
this.GroupHeader2.Name = "GroupHeader2";
//
// GroupHeader3
//
this.GroupHeader3.HeightF = 0F;
this.GroupHeader3.Level = 1;
this.GroupHeader3.Name = "GroupHeader3";
//
// GroupFooter2
//
this.GroupFooter2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel8,
this.xrLabel1,
this.lblAnzahl});
this.GroupFooter2.HeightF = 111.9333F;
this.GroupFooter2.Name = "GroupFooter2";
//
// lblAnzahl
//
this.lblAnzahl.Font = new DevExpress.Drawing.DXFont("Times New Roman", 11F);
this.lblAnzahl.ForeColor = System.Drawing.Color.DarkBlue;
this.lblAnzahl.LocationFloat = new DevExpress.Utils.PointFloat(0F, 6.999918F);
this.lblAnzahl.Multiline = true;
this.lblAnzahl.Name = "lblAnzahl";
this.lblAnzahl.SizeF = new System.Drawing.SizeF(675.9999F, 22.15545F);
this.lblAnzahl.StyleName = "Title";
this.lblAnzahl.StylePriority.UseFont = false;
this.lblAnzahl.StylePriority.UseForeColor = false;
this.lblAnzahl.Text = "Anzahl Arbeitstagtage [ReportStartDate!yyyy] mit mehr als 8 Stunden für [Employee" +
"InfoList.FirstName] [EmployeeInfoList.LastName]: ";
//
// fieldRelationGesamt
//
this.fieldRelationGesamt.DataMember = "EmployeeInfoList.EmployeeDetails";
this.fieldRelationGesamt.Expression = "(Sum([EmployeeDetail.FlsIst]) / Sum([EmployeeDetail.StundenGesamtIst])) * 100";
this.fieldRelationGesamt.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
this.fieldRelationGesamt.Name = "fieldRelationGesamt";
//
// ReportHeader
//
this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel6,
this.xrPictureBox1,
this.xrLabel3});
this.ReportHeader.HeightF = 145.1042F;
this.ReportHeader.Name = "ReportHeader";
//
// lblAdresse
//
this.lblAdresse.Font = new DevExpress.Drawing.DXFont("Times New Roman", 11F);
this.lblAdresse.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.lblAdresse.Multiline = true;
this.lblAdresse.Name = "lblAdresse";
this.lblAdresse.SizeF = new System.Drawing.SizeF(394.3745F, 55.20831F);
this.lblAdresse.StyleName = "Title";
this.lblAdresse.StylePriority.UseFont = false;
//
// xrLabel6
//
this.xrLabel6.Font = new DevExpress.Drawing.DXFont("Times New Roman", 11F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrLabel6.LocationFloat = new DevExpress.Utils.PointFloat(0F, 127.3115F);
this.xrLabel6.Multiline = true;
this.xrLabel6.Name = "xrLabel6";
this.xrLabel6.SizeF = new System.Drawing.SizeF(394.3745F, 17.79271F);
this.xrLabel6.StyleName = "Title";
this.xrLabel6.StylePriority.UseFont = false;
this.xrLabel6.Text = "[EmployeeInfoList.FirstName] [EmployeeInfoList.LastName]";
//
// xrPictureBox1
//
this.xrPictureBox1.ImageSource = new DevExpress.XtraPrinting.Drawing.ImageSource("img", resources.GetString("xrPictureBox1.ImageSource"));
this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(498.9028F, 0F);
this.xrPictureBox1.Name = "xrPictureBox1";
this.xrPictureBox1.SizeF = new System.Drawing.SizeF(126.4304F, 145.1041F);
this.xrPictureBox1.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
//
// xrLabel3
//
this.xrLabel3.Font = new DevExpress.Drawing.DXFont("Times New Roman", 14F);
this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrLabel3.Multiline = true;
this.xrLabel3.Name = "xrLabel3";
this.xrLabel3.SizeF = new System.Drawing.SizeF(461.2498F, 24.99999F);
this.xrLabel3.StyleName = "Title";
this.xrLabel3.StylePriority.UseFont = false;
this.xrLabel3.Text = "Bescheinigung für das Finanzamt";
//
// GroupHeader1
//
this.GroupHeader1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.lblAdresse,
this.xrPageInfo3,
this.xrLabel5});
this.GroupHeader1.HeightF = 97.41638F;
this.GroupHeader1.Name = "GroupHeader1";
//
// xrPageInfo3
//
this.xrPageInfo3.Font = new DevExpress.Drawing.DXFont("Times New Roman", 11F);
this.xrPageInfo3.LocationFloat = new DevExpress.Utils.PointFloat(507.9028F, 74.41639F);
this.xrPageInfo3.Name = "xrPageInfo3";
this.xrPageInfo3.PageInfo = DevExpress.XtraPrinting.PageInfo.DateTime;
this.xrPageInfo3.SizeF = new System.Drawing.SizeF(168.0968F, 22.99999F);
this.xrPageInfo3.StyleName = "PageInfo";
this.xrPageInfo3.StylePriority.UseFont = false;
this.xrPageInfo3.TextFormatString = "{0:dd.MM.yyyy}";
//
// xrLabel5
//
this.xrLabel5.Font = new DevExpress.Drawing.DXFont("Times New Roman", 11F);
this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(507.9028F, 7F);
this.xrLabel5.Multiline = true;
this.xrLabel5.Name = "xrLabel5";
this.xrLabel5.SizeF = new System.Drawing.SizeF(168.0969F, 65.62487F);
this.xrLabel5.StyleName = "Title";
this.xrLabel5.StylePriority.UseFont = false;
this.xrLabel5.Text = "Girbelsrather Str. 231\r\n52351 Düren\r\n02421-224252";
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.MitarbeiterstundenkontoMonateRO);
//
// ArbeitstageMehrAls8h
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
this.Detail,
this.topMarginBand1,
this.bottomMarginBand1,
this.DetailReport1,
this.ReportHeader,
this.GroupHeader1});
this.CalculatedFields.AddRange(new DevExpress.XtraReports.UI.CalculatedField[] {
this.fieldFLS,
this.fieldRelationGesamt});
this.DataSource = this.bindingSource1;
this.DisplayName = "Arbeitstage mit mehr als acht Stunden";
this.DrawGrid = false;
this.Margins = new DevExpress.Drawing.DXMargins(75F, 75F, 45.8333F, 30F);
this.PageHeight = 1169;
this.PageWidth = 827;
this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4;
this.StyleSheet.AddRange(new DevExpress.XtraReports.UI.XRControlStyle[] {
this.Title,
this.FieldCaption,
this.PageInfo,
this.DataField});
this.Version = "23.2";
xrWatermark1.Id = "Watermark1";
this.Watermarks.Add(xrWatermark1);
((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableHeader)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
}
#endregion
private DevExpress.XtraReports.UI.DetailBand Detail;
private System.Windows.Forms.BindingSource bindingSource1;
private DevExpress.XtraReports.UI.XRControlStyle Title;
private DevExpress.XtraReports.UI.XRControlStyle FieldCaption;
private DevExpress.XtraReports.UI.XRControlStyle PageInfo;
private DevExpress.XtraReports.UI.XRControlStyle DataField;
private DevExpress.XtraReports.UI.XRTable xrTableHeader;
private DevExpress.XtraReports.UI.XRTableRow xrTableRowHeader;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell5;
private DevExpress.XtraReports.UI.XRTable xrTableDetail;
private DevExpress.XtraReports.UI.XRTableRow xrTableRowDetail;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell3;
private DevExpress.XtraReports.UI.CalculatedField fieldFLS;
private DevExpress.XtraReports.UI.TopMarginBand topMarginBand1;
private DevExpress.XtraReports.UI.BottomMarginBand bottomMarginBand1;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell4;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell2;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell19;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell20;
private DevExpress.XtraReports.UI.DetailReportBand DetailReport1;
private DevExpress.XtraReports.UI.DetailBand Detail2;
private DevExpress.XtraReports.UI.DetailReportBand DetailReport2;
private DevExpress.XtraReports.UI.DetailBand Detail3;
private DevExpress.XtraReports.UI.GroupHeaderBand GroupHeader2;
private DevExpress.XtraReports.UI.GroupHeaderBand GroupHeader3;
private DevExpress.XtraReports.UI.GroupFooterBand GroupFooter2;
private DevExpress.XtraReports.UI.CalculatedField fieldRelationGesamt;
private DevExpress.XtraReports.UI.ReportHeaderBand ReportHeader;
private DevExpress.XtraReports.UI.XRLabel xrLabel3;
private DevExpress.XtraReports.UI.GroupHeaderBand GroupHeader1;
private DevExpress.XtraReports.UI.XRLabel xrLabel4;
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox1;
private DevExpress.XtraReports.UI.XRLabel xrLabel5;
private DevExpress.XtraReports.UI.XRLabel xrLabel6;
private DevExpress.XtraReports.UI.XRPageInfo xrPageInfo3;
private DevExpress.XtraReports.UI.XRLabel xrLabel8;
private DevExpress.XtraReports.UI.XRLabel xrLabel1;
private DevExpress.XtraReports.UI.XRLabel lblAdresse;
private DevExpress.XtraReports.UI.XRLabel lblAnzahl;
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,9 +1,13 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Globalization;
using System.IO;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report;
using BeWo.Report.DefaultReports;
using BeWo.Report.ReportObjects;
using BS.Shared.DataContracts;
using BS.Shared.Core;
using BS.Shared.Extensions;
using DevExpress.XtraReports.UI;
@@ -76,7 +80,7 @@ namespace Mittelpunkt
return CreateServicesOverviewReportForRo(ro, serviceCategoryOid);
}
private XtraReport CreateServicesOverviewReportForRo(ServicesOverviewRO ro, long? serviceCategoryOid)
{
@@ -180,7 +184,7 @@ namespace Mittelpunkt
xreport.CreateDocument();
// Bei Tagesansicht für jeden MA eine zweite Seite erstellt werden, die alle gesammelt am Ende angefügt werden
if (ansicht == 1)
{
{
var reportObjectSeite2 = MitarbeiterstundenkontoRO.Create(employeeOid, teamOids, startDate, endDate, null);
IBeWoReport<MitarbeiterstundenkontoRO> report2 = new MitarbeiterarbeitszeitkontoSeite2();
report2.SetReportDataSource(reportObjectSeite2);
@@ -192,5 +196,120 @@ namespace Mittelpunkt
return xreport;
}
public override XtraReport CreateQueryReport(long queryOid, string queryReportId)
{
if (queryOid == 100 || queryOid == 101)
{
return CreateQueryReportArbeitstageMehrAls8h(queryOid, queryReportId);
}
return base.CreateQueryReport(queryOid, queryReportId);
}
private XtraReport CreateQueryReportArbeitstageMehrAls8h(long queryOid, string queryReportId)
{
var query = DAOFactory.GenericDAO.LoadByID<Query>(queryOid);
if (query == null)
return new XtraReport();
var path = Path.Combine(TempPath, queryReportId + ".xml");
var table = Utils.XMLDeserialize<DataTable>(path);
var qro = QueryRO.Create(query, table);
if (qro.Rows.Count > 0)
{
DateTime startDate = DateTime.ParseExact(qro.Rows[0].Field1.ToString(), "yyyy-MM-dd", CultureInfo.InvariantCulture);
DateTime endDate = new DateTime(startDate.Year, 12, 31);
long? employeeOid = null;
long? teamOid = null;
if (qro.Rows[0].Field2 != null && qro.Rows[0].Field2.ToString() != "0")
{
long oid = Int64.Parse(qro.Rows[0].Field2.ToString());
if (queryOid == 100)
employeeOid = oid;
else if (queryOid == 101)
teamOid = oid;
}
XtraReport bericht = null;
if (employeeOid != null)
{
bericht = CreateAndAddArbeitstageMehrAls8hBericht((long)employeeOid, startDate, endDate, bericht);
}
else if (teamOid != null)
{
Team team = DAOFactory.GenericDAO.GetByID<Team>((long)teamOid);
if (team != null)
{
foreach (var employee in team.MemberList)
{
bericht = CreateAndAddArbeitstageMehrAls8hBericht((long)employee.Oid, startDate, endDate, bericht);
}
}
}
else
{
// kein Mitarbeiter oder Team ausgewaehlt, Bericht wird fuer alle Mitarbeiter erstellt
var allEmployees = DAOFactory.GenericDAO.GetAllActiveAndArchived<Employee>();
foreach (var employee in allEmployees)
{
bericht = CreateAndAddArbeitstageMehrAls8hBericht((long)employee.Oid, startDate, endDate, bericht);
}
}
if (bericht != null)
{
return bericht;
}
}
return new XtraReport();
}
private XtraReport CreateAndAddArbeitstageMehrAls8hBericht(long employeeOid, DateTime startDate, DateTime endDate, XtraReport bericht)
{
XtraReport result = bericht;
MitarbeiterstundenkontoMonateRO ro = new MitarbeiterstundenkontoMonateRO(employeeOid, null, startDate, endDate, null);
var msbm = new CustomMitarbeiterstundenkontoBerechnungMonate();
msbm.CreateReport(ro);
var arbeitstageMehrAls8h = FindeArbeitstageMehrAls8h(ro.EmployeeInfoList[0]);
if (arbeitstageMehrAls8h.Count > 0)
{
ro.EmployeeInfoList[0].EmployeeDetails[0].EmployeeDetail.Days = arbeitstageMehrAls8h;
ArbeitstageMehrAls8h employeeBericht = new ArbeitstageMehrAls8h();
employeeBericht.SetReportDataSource(ro);
employeeBericht.CreateDocument();
if (bericht == null)
result = employeeBericht;
else
result.Pages.AddRange(employeeBericht.Pages);
}
return result;
}
private IList<MitarbeiterstundenkontoRO.DayDetail> FindeArbeitstageMehrAls8h(MitarbeiterstundenkontoMonateRO.EmployeeInfo employeeInfo)
{
IList<MitarbeiterstundenkontoRO.DayDetail> arbeitstageMehrAls8h = new List<MitarbeiterstundenkontoRO.DayDetail>();
foreach (var employeeDetail in employeeInfo.EmployeeDetails)
{
foreach (var day in employeeDetail.EmployeeDetail.Days)
{
if (day.MinutesTotal > 480)
{
arbeitstageMehrAls8h.Add(day);
}
}
}
return arbeitstageMehrAls8h;
}
}
}

View File

@@ -103,6 +103,12 @@
<Compile Include="Mitarbeiterstundenkonto.designer.cs">
<DependentUpon>Mitarbeiterstundenkonto.cs</DependentUpon>
</Compile>
<Compile Include="ArbeitstageMehrAls8h.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="ArbeitstageMehrAls8h.designer.cs">
<DependentUpon>ArbeitstageMehrAls8h.cs</DependentUpon>
</Compile>
<Compile Include="MitarbeiterstundenkontoJahr.cs">
<SubType>Component</SubType>
</Compile>
@@ -201,6 +207,10 @@
<DependentUpon>Mitarbeiterstundenkonto.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="ArbeitstageMehrAls8h.resx">
<DependentUpon>ArbeitstageMehrAls8h.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="MitarbeiterstundenkontoJahr.resx">
<DependentUpon>MitarbeiterstundenkontoJahr.cs</DependentUpon>
<SubType>Designer</SubType>