From 1ede23b8ec6d73cc274b8e4b9c8a07537e31e191 Mon Sep 17 00:00:00 2001 From: Lyndon Jetten Date: Mon, 27 Mar 2023 17:41:58 +0200 Subject: [PATCH] MoK: ReportViewer weiterentwickelt. Ist noch nicht fertig und nur im Debug-Modus sichtbar. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FaC: Quittierungsbeleg für Lisa Wöller GmbH mit Klientenunterschrift und -datum versehen. Quittierungsbeleg von Club 74 mit Quittierungsbelegunterschriften versehen. --- BeWoPlanerMobil/BeWoPlanerMobil.csproj.user | 4 +- .../Controllers/AbstractBaseController.cs | 4 +- .../Controllers/ReportViewerController.cs | 85 ++++++++++++++++++- BeWoPlanerMobil/Models/ReportViewerModel.cs | 3 +- .../DocumentWebViewerPartial.cshtml | 14 +-- .../Views/ReportViewer/ReportViewer.cshtml | 28 +++--- BeWoPlanerMobil/Views/Shared/Error.cshtml | 14 +-- Host/ReportView.aspx.cs | 6 +- Report/DefaultReportCreator.cs | 11 ++- ReportImp/AKGG/CustomReportCreator.cs | 1 - .../QuittierungsbelegASL.designer.cs | 79 ++++++++++++----- .../QuittierungsbelegFLS.designer.cs | 67 ++++++++++++--- .../Club74/ServicesOverviewReport.Designer.cs | 43 +++++++++- ReportImp/Club74/ServicesOverviewReport.cs | 4 +- .../ServicesOverviewReport.Designer.cs | 40 ++++++++- Service/Plugins/PluginLoader.cs | 6 +- Service/Security/SecurityUtils.cs | 16 +++- .../ServiceImplementations/QueryServiceImp.cs | 24 +++++- Shared/Core/Utils.cs | 11 ++- 19 files changed, 367 insertions(+), 93 deletions(-) diff --git a/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user b/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user index b9aa0bdbd..43eee4c13 100644 --- a/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user +++ b/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user @@ -29,14 +29,14 @@ http://localhost/BeWoPlanerMobil - CurrentPage + URL True False False False - http://localhost/BeWoPlanerMobil/ + http://localhost/BeWoPlanerMobil/Main/Main diff --git a/BeWoPlanerMobil/Controllers/AbstractBaseController.cs b/BeWoPlanerMobil/Controllers/AbstractBaseController.cs index c7ce27cea..9beba6d32 100644 --- a/BeWoPlanerMobil/Controllers/AbstractBaseController.cs +++ b/BeWoPlanerMobil/Controllers/AbstractBaseController.cs @@ -22,8 +22,8 @@ namespace BeWoPlanerMobil.Controllers protected readonly IUserService UserService = new MobileSessionFacade().UserService; protected readonly IDownloadService DownloadService = new MobileSessionFacade().DownloadService; protected readonly IReportService ReportService = new MobileSessionFacade().ReportService; - protected readonly IQueryService QueryService = new MobileSessionFacade().QueryService; - + protected readonly IQueryService QueryService = new MobileSessionFacade().QueryService; + protected const string LeerzeichenFuerGetMethoden = " "; protected static readonly log4net.ILog Log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); diff --git a/BeWoPlanerMobil/Controllers/ReportViewerController.cs b/BeWoPlanerMobil/Controllers/ReportViewerController.cs index faa7ad753..ee21aea61 100644 --- a/BeWoPlanerMobil/Controllers/ReportViewerController.cs +++ b/BeWoPlanerMobil/Controllers/ReportViewerController.cs @@ -1,15 +1,26 @@ using System; using System.Collections.Generic; +using System.Data; +using System.IO; +using System.Linq; +using System.Net; using System.Web.Mvc; +using BeWo.Service.Security; using BeWoPlanerMobil.Models; using BeWoPlanerMobil.Service; using BeWoPlanerMobil.Util; using BS.Shared; +using BS.Shared.Core; +using BS.Shared.DataContracts; +using DevExpress.CodeParser; +using DevExpress.XtraReports.UI; namespace BeWoPlanerMobil.Controllers { public class ReportViewerController : AbstractBaseController { + + private ReportViewerModel _Model; public ReportViewerModel Model @@ -72,7 +83,7 @@ namespace BeWoPlanerMobil.Controllers } [Authorize] - public ActionResult DocumentViewerPartial() + public ActionResult DocumentWebViewerPartial() { return PartialView("DocumentWebViewerPartial", Model); } @@ -82,5 +93,77 @@ namespace BeWoPlanerMobil.Controllers { throw new NotImplementedException("Service dafür implementieren!"); } + + [Authorize] + public ActionResult LoadCustomReport(long? reportOid) + { + if(Model?.Employee?.EmployeeOid is null || reportOid is null) + { + return Logout(); + } + + var selectedQuery = Model.Queries.FirstOrDefault(query => query.Oid.Equals(reportOid.Value)); + + if(selectedQuery is null) + { + Model.Report = null; + return PartialView("DocumentWebViewerPartial", Model); + } + + var queryReportUri = GetQueryReportUrl(selectedQuery); + var baseUri = SecurityUtils.RemoveAuthenticationInfoFromUri(queryReportUri); + + var test = QueryService.ExecuteQuery(selectedQuery.Oid, null); + + if(test is null) + { + return PartialView("DocumentWebViewerPartial", Model); + } + + QueryService.PrepareQueryReport(test, $"{MobileSessionFacade.Tenant}queryeoid{Model.Employee.EmployeeOid.Value}"); + + var tempToken = DownloadService.CreateTemporaryToken(baseUri, false); + + var addChar = baseUri.Contains("?") ? "&" : "?"; + var finalUri = $"{baseUri}{addChar}token={tempToken}"; + + var webClient = new WebClient(); + + var data = webClient.DownloadData(finalUri); + + var report = new XtraReport(); + + using(var memoryStream = new MemoryStream(data)) + { + report.PrintingSystem.LoadDocument(memoryStream); + } + + Model.Report = report; + + return PartialView("DocumentWebViewerPartial", Model); + } + + [Authorize] + private string GetQueryReportUrl(QueryDC query) + { + var url = Request?.Url; + + if(Model?.Employee?.EmployeeOid is null || url is null || query is null) + { + return null; + } + + //DEBUG: http://localhost:3777/service + //RELEASE: https://app4.bewoplaner.de/service + // http://localhost:3777/Host/ReportView.aspx?dcid=demoqueryeoid372&qoid=1304&type=QueryReport + + var urlSuffix = $"/ReportView.aspx?dcid={MobileSessionFacade.Tenant}queryeoid{Model.Employee.EmployeeOid.Value}&qoid={query.Oid}&type={Utils.EnumName(ReportTypes.QueryReport)}"; + + #if DEBUG + return $"http://localhost:3777/Host{urlSuffix}"; + #endif + + return $"{url.Scheme}//{url.Host}{urlSuffix}"; + } } } \ No newline at end of file diff --git a/BeWoPlanerMobil/Models/ReportViewerModel.cs b/BeWoPlanerMobil/Models/ReportViewerModel.cs index 9db004110..aefbd288a 100644 --- a/BeWoPlanerMobil/Models/ReportViewerModel.cs +++ b/BeWoPlanerMobil/Models/ReportViewerModel.cs @@ -133,7 +133,8 @@ namespace BeWoPlanerMobil.Models } - + public List SelectedEmployees { get; set; } + public List SelectedTeams { get; set; } diff --git a/BeWoPlanerMobil/Views/ReportViewer/DocumentWebViewerPartial.cshtml b/BeWoPlanerMobil/Views/ReportViewer/DocumentWebViewerPartial.cshtml index 8caf22bb1..e3c2835e4 100644 --- a/BeWoPlanerMobil/Views/ReportViewer/DocumentWebViewerPartial.cshtml +++ b/BeWoPlanerMobil/Views/ReportViewer/DocumentWebViewerPartial.cshtml @@ -2,11 +2,11 @@ @model BeWoPlanerMobil.Models.ReportViewerModel @Html.DevExpress().DocumentViewer(settings =>{ - // The following settings are required for a Document Viewer. - settings.Name = "documentViewer1"; - settings.Report = Model.Report; - // Callback and export route values specify corresponding controllers and their actions. - // These settings are also required. - settings.CallbackRouteValues = new { Controller="ReportViewer", Action="DocumentWebViewerPartial" }; - settings.ExportRouteValues = new { Controller="ReportViewer", Action="ExportDocumentWebViewer" }; + // The following settings are required for a Document Viewer. + settings.Name = "documentViewer1"; + settings.Report = Model.Report; + // Callback and export route values specify corresponding controllers and their actions. + // These settings are also required. + settings.CallbackRouteValues = new { Controller="ReportViewer", Action= "DocumentWebViewerPartial" }; + settings.ExportRouteValues = new { Controller="ReportViewer", Action="ExportDocumentWebViewer" }; }).GetHtml() \ No newline at end of file diff --git a/BeWoPlanerMobil/Views/ReportViewer/ReportViewer.cshtml b/BeWoPlanerMobil/Views/ReportViewer/ReportViewer.cshtml index 62bf3e619..544ac4926 100644 --- a/BeWoPlanerMobil/Views/ReportViewer/ReportViewer.cshtml +++ b/BeWoPlanerMobil/Views/ReportViewer/ReportViewer.cshtml @@ -11,12 +11,11 @@ Mitarbeiterstundenkonto $(window).ready(function () { var isEmployeeFormSelected = $("#filterForEmployeesRadio").prop("checked"); - $("#employee-form").show(); - $("#team-form").hide(); - - + $((isEmployeeFormSelected ? "#employee-form" : "#team-form")).show(); + $((isEmployeeFormSelected ? "#team-form" : "#employee-form")).hide(); }); + // ToDo: function changeReportElements() { try { var selectedCustomReportOid = $("#customReportSelect :selected").val(); @@ -25,6 +24,7 @@ Mitarbeiterstundenkonto } } + // ToDo: function reportFilterOnChange() { try { //team oder mitarbeiter @@ -34,6 +34,7 @@ Mitarbeiterstundenkonto } } + // ToDo: Alle Mitarbeiter auswählen und gegebenenfalls Report erstellen? function allEmployeesCbOnClick() { try { @@ -42,6 +43,7 @@ Mitarbeiterstundenkonto } } + // ToDo: Alle Teams auswählen und gegebenenfalls Report erstellen? function allTeamsCbOnClick() { try { @@ -49,6 +51,16 @@ Mitarbeiterstundenkonto showErrorPopup(error); } } + + function loadCustomReport() { + try { + var selectedReportOid = $("#customReportSelect").val(); + + $("#report-container").load("@Url.Action("LoadCustomReport")", { reportOid: selectedReportOid}); + } catch (error) { + showErrorPopup(error); + } + }
@@ -64,7 +76,7 @@ Mitarbeiterstundenkonto
@if(Model.SelectedReportType == ReportType.Berichte) { - @Html.DropDownListFor(model => model.SelectedCustomReport, Model.CustomReports, new { @class = "custom-select", id = "customReportSelect" }); + @Html.DropDownListFor(model => model.SelectedCustomReport, Model.CustomReports, new { @class = "custom-select", id = "customReportSelect", onchange="loadCustomReport()" }); } @if(Model.SelectedReportType == ReportType.Mitarbeiterstundenkonto) @@ -112,16 +124,12 @@ Mitarbeiterstundenkonto
- - - - } -
+
@if(!(Model.Report is null)) { @Html.Partial("DocumentWebViewerPartial", Model); diff --git a/BeWoPlanerMobil/Views/Shared/Error.cshtml b/BeWoPlanerMobil/Views/Shared/Error.cshtml index 122a71dae..11a4c71c2 100644 --- a/BeWoPlanerMobil/Views/Shared/Error.cshtml +++ b/BeWoPlanerMobil/Views/Shared/Error.cshtml @@ -6,14 +6,14 @@ - Error - + Error + -
-

Error.

-

An error occurred while processing your request.

-

@ViewData["BeWoError"]

-
+
+

Error.

+

An error occurred while processing your request.

+

@ViewData["BeWoError"]

+
\ No newline at end of file diff --git a/Host/ReportView.aspx.cs b/Host/ReportView.aspx.cs index 6271ba345..89bb740e4 100644 --- a/Host/ReportView.aspx.cs +++ b/Host/ReportView.aspx.cs @@ -22,8 +22,6 @@ using System.Globalization; using BeWo.Data.Access; using BeWo.Data.Entities; using BeWo.Service.DCEntityMapper; -using DevExpress.XtraScheduler.Native; -using DevExpress.XtraReports.Design; namespace Host { @@ -36,8 +34,10 @@ namespace Host { try { - if (!SessionFacade.IsUserLoggedIn()) + if(!SessionFacade.IsUserLoggedIn()) + { throw new SecurityException("Anmeldung erforderlich!"); + } var report = CreateReport(); using (var repxStream = new MemoryStream()) diff --git a/Report/DefaultReportCreator.cs b/Report/DefaultReportCreator.cs index 5d19279bd..c9e40a76a 100644 --- a/Report/DefaultReportCreator.cs +++ b/Report/DefaultReportCreator.cs @@ -223,15 +223,20 @@ namespace BeWo.Report { var query = DAOFactory.GenericDAO.LoadByID(queryOid); - if (query == null) + if(query is null) + { return new XtraReport(); + } - var path = BS.Shared.Core.Utils.CreateSavePath(TempPath, queryReportId + ".xml"); + var path = Utils.CreateSavePath(TempPath, queryReportId + ".xml"); var table = Utils.XMLDeserialize(path); var queryReport = FindReportImp(null, query.ReportTypeName); - queryReport.SetReportDataSource(QueryRO.Create(query, table)); + + var queryReportObject = QueryRO.Create(query, table); + + queryReport.SetReportDataSource(queryReportObject); return queryReport as XtraReport; } diff --git a/ReportImp/AKGG/CustomReportCreator.cs b/ReportImp/AKGG/CustomReportCreator.cs index 71b2ac33e..93206e349 100644 --- a/ReportImp/AKGG/CustomReportCreator.cs +++ b/ReportImp/AKGG/CustomReportCreator.cs @@ -6,7 +6,6 @@ using BeWo.Data.Access; using BeWo.Data.Entities; using BeWo.Report; using BeWo.Report.ReportObjects; -using BeWo.Service.DCEntityMapper; using BS.Shared.Core; using DevExpress.XtraReports.UI; diff --git a/ReportImp/BetreutesWohnenWoellReports/QuittierungsbelegASL.designer.cs b/ReportImp/BetreutesWohnenWoellReports/QuittierungsbelegASL.designer.cs index ab3e877a0..0a28077a0 100644 --- a/ReportImp/BetreutesWohnenWoellReports/QuittierungsbelegASL.designer.cs +++ b/ReportImp/BetreutesWohnenWoellReports/QuittierungsbelegASL.designer.cs @@ -50,6 +50,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell(); this.picSignature = new DevExpress.XtraReports.UI.XRPictureBox(); this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand(); + this.xrLabel11 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel(); @@ -57,7 +58,6 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel(); - this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule(); this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox(); @@ -84,6 +84,9 @@ namespace BeWo.BetreutesWohnenWoellReports this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); this.fieldAbrechenbareMinuten = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldFLSBillable = new DevExpress.XtraReports.UI.CalculatedField(); + this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); @@ -109,7 +112,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableServiceRecords1.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.xrTableServiceRecords1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTableRow2}); - this.xrTableServiceRecords1.SizeF = new System.Drawing.SizeF(675F, 22F); + this.xrTableServiceRecords1.SizeF = new System.Drawing.SizeF(719.9999F, 22F); this.xrTableServiceRecords1.StylePriority.UseBackColor = false; this.xrTableServiceRecords1.StylePriority.UseFont = false; this.xrTableServiceRecords1.StylePriority.UseTextAlignment = false; @@ -122,6 +125,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell4, this.xrTableCell9, this.xrTableCell12, + this.xrTableCell5, this.xrTableCell1}); this.xrTableRow2.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.xrTableRow2.Name = "xrTableRow2"; @@ -137,7 +141,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell3.StylePriority.UseFont = false; this.xrTableCell3.StylePriority.UseTextAlignment = false; this.xrTableCell3.Text = "Datum"; - this.xrTableCell3.Weight = 0.25605213908392394D; + this.xrTableCell3.Weight = 0.2123404062766876D; // // xrTableCell4 // @@ -147,7 +151,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell4.StylePriority.UseFont = false; this.xrTableCell4.StylePriority.UseTextAlignment = false; this.xrTableCell4.Text = "Uhrzeit von - bis"; - this.xrTableCell4.Weight = 0.47552540183240349D; + this.xrTableCell4.Weight = 0.36405647615727033D; // // xrTableCell9 // @@ -156,7 +160,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell9.StylePriority.UseFont = false; this.xrTableCell9.StylePriority.UseTextAlignment = false; this.xrTableCell9.Text = "Personenzahl"; - this.xrTableCell9.Weight = 0.32189411849476823D; + this.xrTableCell9.Weight = 0.31828714609536107D; // // xrTableCell12 // @@ -166,7 +170,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell12.StylePriority.UseFont = false; this.xrTableCell12.StylePriority.UseTextAlignment = false; this.xrTableCell12.Text = "Minuten"; - this.xrTableCell12.Weight = 0.24142059080493378D; + this.xrTableCell12.Weight = 0.2194732989063812D; // // xrTableCell1 // @@ -174,7 +178,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell1.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F); this.xrTableCell1.StylePriority.UsePadding = false; this.xrTableCell1.Text = "Unterschrift"; - this.xrTableCell1.Weight = 0.35115722230643115D; + this.xrTableCell1.Weight = 0.46089351900561043D; // // DetailReport // @@ -208,7 +212,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTable3.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.xrTable3.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTableRow6}); - this.xrTable3.SizeF = new System.Drawing.SizeF(675F, 25F); + this.xrTable3.SizeF = new System.Drawing.SizeF(720F, 25F); this.xrTable3.StylePriority.UseFont = false; this.xrTable3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // @@ -219,6 +223,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell14, this.xrTableCell16, this.xrTableCell17, + this.xrTableCell6, this.xrTableCell2}); this.xrTableRow6.Name = "xrTableRow6"; this.xrTableRow6.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); @@ -236,7 +241,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell13.StylePriority.UseTextAlignment = false; this.xrTableCell13.Text = "xrTableCell13"; this.xrTableCell13.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; - this.xrTableCell13.Weight = 0.13257575363470647D; + this.xrTableCell13.Weight = 0.10227272351322884D; // // xrTableCell14 // @@ -249,7 +254,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell14.StylePriority.UseTextAlignment = false; this.xrTableCell14.Text = "xrTableCell14"; this.xrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; - this.xrTableCell14.Weight = 0.24621210235959995D; + this.xrTableCell14.Weight = 0.17535353379452265D; // // xrTableCell16 // @@ -261,7 +266,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell16.StylePriority.UseTextAlignment = false; this.xrTableCell16.Text = "xrTableCell16"; this.xrTableCell16.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; - this.xrTableCell16.Weight = 0.16666665861053989D; + this.xrTableCell16.Weight = 0.15329546050762519D; // // xrTableCell17 // @@ -274,7 +279,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell17.StylePriority.UseTextAlignment = false; this.xrTableCell17.Text = "xrTableCell17"; this.xrTableCell17.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.xrTableCell17.Weight = 0.12499999970715883D; + this.xrTableCell17.Weight = 0.10570707236348702D; // // xrTableCell2 // @@ -286,16 +291,16 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell2.StylePriority.UseTextAlignment = false; this.xrTableCell2.Text = "xrTableCell2"; this.xrTableCell2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.xrTableCell2.Weight = 0.18181817927995625D; + this.xrTableCell2.Weight = 0.22198232491286482D; // // picSignature // this.picSignature.Borders = DevExpress.XtraPrinting.BorderSide.None; this.picSignature.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Tag", null, "Services.Signature")}); - this.picSignature.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.picSignature.LocationFloat = new DevExpress.Utils.PointFloat(0.2221849F, 0F); this.picSignature.Name = "picSignature"; - this.picSignature.SizeF = new System.Drawing.SizeF(135F, 24F); + this.picSignature.SizeF = new System.Drawing.SizeF(174.347F, 24F); this.picSignature.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage; this.picSignature.StylePriority.UseBorders = false; this.picSignature.BeforePrint += new System.Drawing.Printing.PrintEventHandler(this.picSignature_BeforePrint); @@ -303,6 +308,7 @@ namespace BeWo.BetreutesWohnenWoellReports // GroupFooter1 // this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLabel11, this.xrLabel10, this.xrLabel8, this.xrLabel7, @@ -316,6 +322,17 @@ namespace BeWo.BetreutesWohnenWoellReports this.GroupFooter1.Name = "GroupFooter1"; this.GroupFooter1.StylePriority.UseFont = false; // + // xrLabel11 + // + this.xrLabel11.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "CustomerSignatureDate", "{0:dd.MM.yyyy}")}); + this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(414F, 71.99999F); + this.xrLabel11.Name = "xrLabel11"; + this.xrLabel11.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel11.SizeF = new System.Drawing.SizeF(189F, 35.50002F); + this.xrLabel11.StylePriority.UseTextAlignment = false; + this.xrLabel11.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomCenter; + // // xrLabel10 // this.xrLabel10.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { @@ -397,10 +414,6 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrLabel3.StylePriority.UseFont = false; this.xrLabel3.Text = "Summe unmittelbarer Betreuungsleistungen in Minuten"; // - // bindingSource1 - // - this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO); - // // formattingRuleStartDate // this.formattingRuleStartDate.Condition = "[StartDate2] < [StartDate]"; @@ -651,6 +664,29 @@ namespace BeWo.BetreutesWohnenWoellReports this.fieldFLSBillable.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; this.fieldFLSBillable.Name = "fieldFLSBillable"; // + // xrTableCell5 + // + this.xrTableCell5.Name = "xrTableCell5"; + this.xrTableCell5.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F); + this.xrTableCell5.StylePriority.UsePadding = false; + this.xrTableCell5.Text = "Datum der Unterschrift"; + this.xrTableCell5.Weight = 0.31241921688608376D; + // + // xrTableCell6 + // + this.xrTableCell6.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.SignatureDate", "{0:dd.MM.yyyy}")}); + this.xrTableCell6.Name = "xrTableCell6"; + this.xrTableCell6.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 5, 0, 0, 100F); + this.xrTableCell6.StylePriority.UsePadding = false; + this.xrTableCell6.StylePriority.UseTextAlignment = false; + this.xrTableCell6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.xrTableCell6.Weight = 0.15047979871237002D; + // + // bindingSource1 + // + this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO); + // // QuittierungsbelegASL // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { @@ -668,7 +704,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.formattingRuleServiceDesc, this.formattingRuleCostBearer, this.formattingRuleEmployeeName}); - this.Margins = new System.Drawing.Printing.Margins(75, 75, 50, 30); + this.Margins = new System.Drawing.Printing.Margins(29, 75, 50, 30); this.PageHeight = 1169; this.PageWidth = 827; this.PaperKind = System.Drawing.Printing.PaperKind.A4; @@ -737,5 +773,8 @@ namespace BeWo.BetreutesWohnenWoellReports private DevExpress.XtraReports.UI.XRTableCell xrTableCell1; private DevExpress.XtraReports.UI.XRTableCell xrTableCell2; private DevExpress.XtraReports.UI.XRPictureBox picSignature; + private DevExpress.XtraReports.UI.XRLabel xrLabel11; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell5; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell6; } } diff --git a/ReportImp/BetreutesWohnenWoellReports/QuittierungsbelegFLS.designer.cs b/ReportImp/BetreutesWohnenWoellReports/QuittierungsbelegFLS.designer.cs index 27656acf7..4ccd89393 100644 --- a/ReportImp/BetreutesWohnenWoellReports/QuittierungsbelegFLS.designer.cs +++ b/ReportImp/BetreutesWohnenWoellReports/QuittierungsbelegFLS.designer.cs @@ -84,6 +84,9 @@ namespace BeWo.BetreutesWohnenWoellReports this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); this.fieldAbrechenbareMinuten = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldFLSBillable = new DevExpress.XtraReports.UI.CalculatedField(); + this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrLabel11 = new DevExpress.XtraReports.UI.XRLabel(); ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); @@ -109,7 +112,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableServiceRecords1.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.xrTableServiceRecords1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTableRow2}); - this.xrTableServiceRecords1.SizeF = new System.Drawing.SizeF(672F, 22F); + this.xrTableServiceRecords1.SizeF = new System.Drawing.SizeF(719.99F, 22F); this.xrTableServiceRecords1.StylePriority.UseBackColor = false; this.xrTableServiceRecords1.StylePriority.UseFont = false; this.xrTableServiceRecords1.StylePriority.UseTextAlignment = false; @@ -122,6 +125,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell4, this.xrTableCell9, this.xrTableCell12, + this.xrTableCell5, this.xrTableCell2}); this.xrTableRow2.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.xrTableRow2.Name = "xrTableRow2"; @@ -137,7 +141,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell3.StylePriority.UseFont = false; this.xrTableCell3.StylePriority.UseTextAlignment = false; this.xrTableCell3.Text = "Datum"; - this.xrTableCell3.Weight = 0.25605213908392394D; + this.xrTableCell3.Weight = 0.19752594904022897D; // // xrTableCell4 // @@ -147,7 +151,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell4.StylePriority.UseFont = false; this.xrTableCell4.StylePriority.UseTextAlignment = false; this.xrTableCell4.Text = "Uhrzeit von - bis"; - this.xrTableCell4.Weight = 0.47552540183240349D; + this.xrTableCell4.Weight = 0.33864727526306765D; // // xrTableCell9 // @@ -156,7 +160,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell9.StylePriority.UseFont = false; this.xrTableCell9.StylePriority.UseTextAlignment = false; this.xrTableCell9.Text = "Personenzahl"; - this.xrTableCell9.Weight = 0.3218941929146843D; + this.xrTableCell9.Weight = 0.29606947506888553D; // // xrTableCell12 // @@ -166,7 +170,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell12.StylePriority.UseFont = false; this.xrTableCell12.StylePriority.UseTextAlignment = false; this.xrTableCell12.Text = "Minuten"; - this.xrTableCell12.Weight = 0.24142068144853554D; + this.xrTableCell12.Weight = 0.20415892383241957D; // // xrTableCell2 // @@ -174,7 +178,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell2.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F); this.xrTableCell2.StylePriority.UsePadding = false; this.xrTableCell2.Text = "Unterschrift"; - this.xrTableCell2.Weight = 0.34384135611062244D; + this.xrTableCell2.Weight = 0.42872883164278197D; // // DetailReport // @@ -208,7 +212,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTable3.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.xrTable3.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTableRow6}); - this.xrTable3.SizeF = new System.Drawing.SizeF(672F, 25F); + this.xrTable3.SizeF = new System.Drawing.SizeF(719.99F, 25F); this.xrTable3.StylePriority.UseFont = false; this.xrTable3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // @@ -219,6 +223,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell14, this.xrTableCell16, this.xrTableCell17, + this.xrTableCell6, this.xrTableCell1}); this.xrTableRow6.Name = "xrTableRow6"; this.xrTableRow6.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); @@ -236,7 +241,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell13.StylePriority.UseTextAlignment = false; this.xrTableCell13.Text = "xrTableCell13"; this.xrTableCell13.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; - this.xrTableCell13.Weight = 0.13257575363470647D; + this.xrTableCell13.Weight = 0.10227271744316972D; // // xrTableCell14 // @@ -249,7 +254,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell14.StylePriority.UseTextAlignment = false; this.xrTableCell14.Text = "xrTableCell14"; this.xrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; - this.xrTableCell14.Weight = 0.24621210235959995D; + this.xrTableCell14.Weight = 0.17534088319775293D; // // xrTableCell16 // @@ -261,7 +266,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell16.StylePriority.UseTextAlignment = false; this.xrTableCell16.Text = "xrTableCell16"; this.xrTableCell16.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; - this.xrTableCell16.Weight = 0.16666669714283369D; + this.xrTableCell16.Weight = 0.15329543349935004D; // // xrTableCell17 // @@ -274,7 +279,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell17.StylePriority.UseTextAlignment = false; this.xrTableCell17.Text = "xrTableCell17"; this.xrTableCell17.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.xrTableCell17.Weight = 0.12499995243419743D; + this.xrTableCell17.Weight = 0.10570706559889112D; // // xrTableCell1 // @@ -285,7 +290,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.xrTableCell1.StylePriority.UsePadding = false; this.xrTableCell1.StylePriority.UseTextAlignment = false; this.xrTableCell1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.xrTableCell1.Weight = 0.17803027018512233D; + this.xrTableCell1.Weight = 0.22198227224030523D; // // picSignature // @@ -294,7 +299,7 @@ namespace BeWo.BetreutesWohnenWoellReports new DevExpress.XtraReports.UI.XRBinding("Tag", null, "Services.Signature")}); this.picSignature.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); this.picSignature.Name = "picSignature"; - this.picSignature.SizeF = new System.Drawing.SizeF(135F, 26.99998F); + this.picSignature.SizeF = new System.Drawing.SizeF(174.5834F, 26.99998F); this.picSignature.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage; this.picSignature.StylePriority.UseBorders = false; this.picSignature.BeforePrint += new System.Drawing.Printing.PrintEventHandler(this.picSignature_BeforePrint); @@ -302,6 +307,7 @@ namespace BeWo.BetreutesWohnenWoellReports // GroupFooter1 // this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLabel11, this.xrLabel10, this.xrLabel8, this.xrLabel7, @@ -650,6 +656,36 @@ namespace BeWo.BetreutesWohnenWoellReports this.fieldFLSBillable.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; this.fieldFLSBillable.Name = "fieldFLSBillable"; // + // xrTableCell5 + // + this.xrTableCell5.Name = "xrTableCell5"; + this.xrTableCell5.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F); + this.xrTableCell5.StylePriority.UsePadding = false; + this.xrTableCell5.Text = "Datum der Unterschrift"; + this.xrTableCell5.Weight = 0.29063139487824013D; + // + // xrTableCell6 + // + this.xrTableCell6.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.SignatureDate", "{0:dd.MM.yyyy}")}); + this.xrTableCell6.Name = "xrTableCell6"; + this.xrTableCell6.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 5, 0, 0, 100F); + this.xrTableCell6.StylePriority.UsePadding = false; + this.xrTableCell6.StylePriority.UseTextAlignment = false; + this.xrTableCell6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; + this.xrTableCell6.Weight = 0.15047978618305308D; + // + // xrLabel11 + // + this.xrLabel11.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "CustomerSignatureDate", "{0:dd.MM.yyyy}")}); + this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(413.9999F, 71.99999F); + this.xrLabel11.Name = "xrLabel11"; + this.xrLabel11.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel11.SizeF = new System.Drawing.SizeF(189F, 35.50002F); + this.xrLabel11.StylePriority.UseTextAlignment = false; + this.xrLabel11.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomCenter; + // // QuittierungsbelegFLS // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { @@ -667,7 +703,7 @@ namespace BeWo.BetreutesWohnenWoellReports this.formattingRuleServiceDesc, this.formattingRuleCostBearer, this.formattingRuleEmployeeName}); - this.Margins = new System.Drawing.Printing.Margins(75, 75, 50, 30); + this.Margins = new System.Drawing.Printing.Margins(31, 75, 50, 30); this.PageHeight = 1169; this.PageWidth = 827; this.PaperKind = System.Drawing.Printing.PaperKind.A4; @@ -736,5 +772,8 @@ namespace BeWo.BetreutesWohnenWoellReports private DevExpress.XtraReports.UI.XRTableCell xrTableCell2; private DevExpress.XtraReports.UI.XRTableCell xrTableCell1; private DevExpress.XtraReports.UI.XRPictureBox picSignature; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell5; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell6; + private DevExpress.XtraReports.UI.XRLabel xrLabel11; } } diff --git a/ReportImp/Club74/ServicesOverviewReport.Designer.cs b/ReportImp/Club74/ServicesOverviewReport.Designer.cs index af75dd9ff..fc1cb1192 100644 --- a/ReportImp/Club74/ServicesOverviewReport.Designer.cs +++ b/ReportImp/Club74/ServicesOverviewReport.Designer.cs @@ -29,7 +29,6 @@ namespace BeWo.Club74 /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); DevExpress.XtraReports.UI.XRSummary xrSummary1 = new DevExpress.XtraReports.UI.XRSummary(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Stundenzettel)); this.Detail = new DevExpress.XtraReports.UI.DetailBand(); @@ -88,13 +87,16 @@ namespace BeWo.Club74 this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); this.ReportFooter = new DevExpress.XtraReports.UI.ReportFooterBand(); + this.xrPictureBox2 = new DevExpress.XtraReports.UI.XRPictureBox(); + this.xrPictureBox3 = new DevExpress.XtraReports.UI.XRPictureBox(); this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel(); this.fieldAbrechenbareMinuten = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldRecordCount = new DevExpress.XtraReports.UI.CalculatedField(); - this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.bindingSource1 = new System.Windows.Forms.BindingSource(); + this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel(); ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); @@ -647,6 +649,9 @@ namespace BeWo.Club74 // ReportFooter // this.ReportFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLabel3, + this.xrPictureBox2, + this.xrPictureBox3, this.xrLabel7, this.xrLabel6, this.xrLabel5, @@ -654,6 +659,25 @@ namespace BeWo.Club74 this.ReportFooter.HeightF = 80.99995F; this.ReportFooter.Name = "ReportFooter"; // + // xrPictureBox2 + // + this.xrPictureBox2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Image", null, "CustomerSignature")}); + this.xrPictureBox2.LocationFloat = new DevExpress.Utils.PointFloat(477.0001F, 26.99998F); + this.xrPictureBox2.Name = "xrPictureBox2"; + this.xrPictureBox2.SizeF = new System.Drawing.SizeF(225F, 35.50002F); + this.xrPictureBox2.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage; + // + // xrPictureBox3 + // + this.xrPictureBox3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Image", null, "EmployeeSignature")}); + this.xrPictureBox3.LocationFloat = new DevExpress.Utils.PointFloat(207F, 26.99998F); + this.xrPictureBox3.Name = "xrPictureBox3"; + this.xrPictureBox3.Scripts.OnBeforePrint = "xrPictureBox1_BeforePrint"; + this.xrPictureBox3.SizeF = new System.Drawing.SizeF(225F, 35.50002F); + this.xrPictureBox3.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage; + // // xrLabel7 // this.xrLabel7.Borders = DevExpress.XtraPrinting.BorderSide.Top; @@ -732,6 +756,17 @@ namespace BeWo.Club74 // this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO); // + // xrLabel3 + // + this.xrLabel3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "CustomerSignatureDate", "{0:dd.MM.yyyy}")}); + this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(27F, 26.99998F); + this.xrLabel3.Name = "xrLabel3"; + this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel3.SizeF = new System.Drawing.SizeF(135F, 35.50002F); + this.xrLabel3.StylePriority.UseTextAlignment = false; + this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomCenter; + // // Stundenzettel // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { @@ -829,6 +864,8 @@ namespace BeWo.Club74 private DevExpress.XtraReports.UI.XRTableCell xrTableCell23; private DevExpress.XtraReports.UI.XRTableCell xrTableCell24; private DevExpress.XtraReports.UI.CalculatedField fieldRecordCount; - + private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox2; + private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox3; + private DevExpress.XtraReports.UI.XRLabel xrLabel3; } } diff --git a/ReportImp/Club74/ServicesOverviewReport.cs b/ReportImp/Club74/ServicesOverviewReport.cs index 3d33d0ebf..51179b3a0 100644 --- a/ReportImp/Club74/ServicesOverviewReport.cs +++ b/ReportImp/Club74/ServicesOverviewReport.cs @@ -1,7 +1,5 @@ using System; -using System.Collections; using System.Collections.Generic; -using System.ComponentModel; using BeWo.Report.ReportObjects; using BeWo.Report; @@ -16,7 +14,7 @@ namespace BeWo.Club74 public void SetReportDataSource(ServicesOverviewRO pRO) { - if (String.IsNullOrEmpty(pRO.ApprovedStartDate)) + if(string.IsNullOrEmpty(pRO.ApprovedStartDate)) { lblZeitraum.Text = "Nicht bewilligt"; diff --git a/ReportImp/Club74DB2/ServicesOverviewReport.Designer.cs b/ReportImp/Club74DB2/ServicesOverviewReport.Designer.cs index 0a99934ab..f76c4b5f9 100644 --- a/ReportImp/Club74DB2/ServicesOverviewReport.Designer.cs +++ b/ReportImp/Club74DB2/ServicesOverviewReport.Designer.cs @@ -88,6 +88,8 @@ namespace BeWo.Club74 this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); this.ReportFooter = new DevExpress.XtraReports.UI.ReportFooterBand(); + this.xrPictureBox3 = new DevExpress.XtraReports.UI.XRPictureBox(); + this.xrPictureBox2 = new DevExpress.XtraReports.UI.XRPictureBox(); this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel(); @@ -95,6 +97,7 @@ namespace BeWo.Club74 this.fieldAbrechenbareMinuten = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldRecordCount = new DevExpress.XtraReports.UI.CalculatedField(); this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel(); ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); @@ -647,6 +650,9 @@ namespace BeWo.Club74 // ReportFooter // this.ReportFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLabel3, + this.xrPictureBox3, + this.xrPictureBox2, this.xrLabel7, this.xrLabel6, this.xrLabel5, @@ -654,6 +660,25 @@ namespace BeWo.Club74 this.ReportFooter.HeightF = 80.99995F; this.ReportFooter.Name = "ReportFooter"; // + // xrPictureBox3 + // + this.xrPictureBox3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Image", null, "EmployeeSignature")}); + this.xrPictureBox3.LocationFloat = new DevExpress.Utils.PointFloat(207F, 27.00005F); + this.xrPictureBox3.Name = "xrPictureBox3"; + this.xrPictureBox3.Scripts.OnBeforePrint = "xrPictureBox1_BeforePrint"; + this.xrPictureBox3.SizeF = new System.Drawing.SizeF(225F, 35.50002F); + this.xrPictureBox3.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage; + // + // xrPictureBox2 + // + this.xrPictureBox2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Image", null, "CustomerSignature")}); + this.xrPictureBox2.LocationFloat = new DevExpress.Utils.PointFloat(477.0001F, 26.99998F); + this.xrPictureBox2.Name = "xrPictureBox2"; + this.xrPictureBox2.SizeF = new System.Drawing.SizeF(225F, 35.50002F); + this.xrPictureBox2.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage; + // // xrLabel7 // this.xrLabel7.Borders = DevExpress.XtraPrinting.BorderSide.Top; @@ -732,6 +757,17 @@ namespace BeWo.Club74 // this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO); // + // xrLabel3 + // + this.xrLabel3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "CustomerSignatureDate", "{0:dd.MM.yyyy}")}); + this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(27F, 26.99998F); + this.xrLabel3.Name = "xrLabel3"; + this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel3.SizeF = new System.Drawing.SizeF(135F, 35.50002F); + this.xrLabel3.StylePriority.UseTextAlignment = false; + this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomCenter; + // // Stundenzettel // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { @@ -829,6 +865,8 @@ namespace BeWo.Club74 private DevExpress.XtraReports.UI.XRTableCell xrTableCell23; private DevExpress.XtraReports.UI.XRTableCell xrTableCell24; private DevExpress.XtraReports.UI.CalculatedField fieldRecordCount; - + private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox2; + private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox3; + private DevExpress.XtraReports.UI.XRLabel xrLabel3; } } diff --git a/Service/Plugins/PluginLoader.cs b/Service/Plugins/PluginLoader.cs index b15f7b997..1c17bdf5a 100644 --- a/Service/Plugins/PluginLoader.cs +++ b/Service/Plugins/PluginLoader.cs @@ -39,7 +39,7 @@ namespace BeWo.Service.Plugins //t = "5926081834"; // Spektrum //t = "1378137009"; // BeWo Direkt+ //t = "3010479871"; // Aachener Verein - //t = "3849764093"; // Club 74 + t = "3849764093"; // Club 74 //t = "5805202339"; // Wegweiser Betreuungsdienst //t = "2301474784"; // Hauskrankenpflege Leiendecker //t = "8243565510"; // Der Karren @@ -167,7 +167,7 @@ namespace BeWo.Service.Plugins //t = "3614251071"; // Pusteblume //t = "7755740484"; // Sawo //t = "8275654834"; // Twg Jonathan - t = "6586058528"; // Freundeskreis Suchtkrankenhilfe e.V. (FFS) + //t = "6586058528"; // Freundeskreis Suchtkrankenhilfe e.V. (FFS) //t = "2632162696"; // Hand in Hand (ehemals Pro BeWo Düren) //t = "6340891020"; // Caritas Ahlen //t = "3659854106"; // alpha e.V. @@ -226,7 +226,7 @@ namespace BeWo.Service.Plugins //t = "6782533512"; // LH Dorsten //t = "5890882255"; // Fortis Nova //t = "2422863972"; // Diakonisches Werk Mülheim (Therapeutische Wohngemeinschaft) - t = "2141858509"; // INKOMM GmbH + //t = "2141858509"; // INKOMM GmbH //t = "8975059766"; // Quer-Fällt-Ein //t = "8928179244"; // ASB Ruhr e.V. Regionalverband //t = "4423043131"; // Die Perspektive e.V. diff --git a/Service/Security/SecurityUtils.cs b/Service/Security/SecurityUtils.cs index 3568d54ab..16e6c30c6 100644 --- a/Service/Security/SecurityUtils.cs +++ b/Service/Security/SecurityUtils.cs @@ -8,7 +8,6 @@ using System.Security.Cryptography; using System.Text; using System.Text.RegularExpressions; using System.Web; -using System.Windows; using BeWo.Data; using BeWo.Data.Access; using BeWo.Data.Entities; @@ -23,6 +22,8 @@ namespace BeWo.Service.Security private static readonly byte[] _Rc2Key = { 174, 130, 219, 185, 185, 221, 96, 50, 37, 212, 81, 121, 71, 206, 130, 153 }; + private static readonly Regex _AuthenticationRegex = new Regex(@"[\&|\?]?token\=[A-Za-z0-9]+|[\&|\?]?tenant\=[A-Za-z0-9]+|[\&|\?]?username\=[A-Za-z0-9.]+"); + public static string EncryptString(string strToEncrypt) { var lRc2CSP = new RC2CryptoServiceProvider(); @@ -91,9 +92,7 @@ namespace BeWo.Service.Security return HttpUtility.UrlEncode(EncryptString(tokendata)); } - - - + public static bool CheckToken(string token, string link) { if (string.IsNullOrEmpty(token)) @@ -335,5 +334,14 @@ namespace BeWo.Service.Security return result.ToString(); } + + public static string RemoveAuthenticationInfoFromUri(string navigateUri) + { + var splittedUri = _AuthenticationRegex.Split(navigateUri.Split('?')[1]); + var cleanedSplittedUri = splittedUri.Where(t => !string.IsNullOrWhiteSpace(t)).ToArray(); + var uriValues = cleanedSplittedUri.Aggregate(string.Empty, (current, item) => current + item); + + return navigateUri.Split('?')[0] + "?" + uriValues; + } } } diff --git a/Service/ServiceImplementations/QueryServiceImp.cs b/Service/ServiceImplementations/QueryServiceImp.cs index e07b74b93..fff6fdf74 100644 --- a/Service/ServiceImplementations/QueryServiceImp.cs +++ b/Service/ServiceImplementations/QueryServiceImp.cs @@ -71,15 +71,35 @@ namespace BeWo.Service.ServiceImplementations try { var lResult = id + ".xml"; + + var tenant = MultitenancyOperationContextExt.Current?.Tenant ?? SessionFacade.Tenant; - var lDir = BS.Shared.Core.Utils.CreateSavePath(AppDomain.CurrentDomain.BaseDirectory, MultitenancyOperationContextExt.Current.Tenant + @"\temp"); + // FaC: C:\Users\Lyndon Jetten\Entwicklung\BeWo\Host\demo\temp\ + // MoK: C:\Users\Lyndon Jetten\Entwicklung\BeWo\BeWoPlanerMobil\demo\temp + + var baseDirectory = AppDomain.CurrentDomain.BaseDirectory; + if(baseDirectory.Contains("BeWoPlanerMobil")) + { + baseDirectory = baseDirectory.Replace("BeWoPlanerMobil", "Host"); + } + + var lDir = BS.Shared.Core.Utils.CreateSavePath(baseDirectory, tenant + @"\temp"); var lPath = BS.Shared.Core.Utils.CreateSavePath(lDir, lResult); + + var table = BS.Shared.Core.Utils.XMLDeserializeFromString(dataTableJsonString); BS.Shared.Core.Utils.XMLSerialize(lPath, table); + if(!Directory.Exists(lDir)) + { - + } + + if(!File.Exists(lPath)) + { + + } return lResult; } diff --git a/Shared/Core/Utils.cs b/Shared/Core/Utils.cs index 0dfdf724d..e768c9520 100644 --- a/Shared/Core/Utils.cs +++ b/Shared/Core/Utils.cs @@ -1004,13 +1004,12 @@ namespace BS.Shared.Core public static string CreateSavePath(string tempPath, string filename) { - if (!filename.Contains("temp.txt")) - { - String test = @"c:\temp.txt"; - var test2 = CreateSavePath(tempPath, test); - } + var saveFilename = filename.Replace("..", "") + .Replace("\"", "") + .Replace("/", "") + .Replace(":", "") + .Replace(";", ""); - String saveFilename = filename.Replace("..", "").Replace("\"", "").Replace("/", "").Replace(":", "").Replace(";", ""); return Path.Combine(tempPath, saveFilename); }