From 9d1f77e470764fbdd857d23993d4254e71a2fa12 Mon Sep 17 00:00:00 2001 From: Marcel Hirschle Date: Tue, 6 Apr 2021 08:06:51 +0200 Subject: [PATCH] MH: Arbeiten am Dienstplaner --- BeWo/ServiceProxy/Generated.cs | 25 +- BeWo/View/Controls/DPCtrlDay.cs | 37 ++- BeWo/View/Controls/DienstplanerControl.xaml | 8 + BeWo/View/Detail/Report/DienstplanerView.xaml | 7 +- .../Detail/Report/DienstplanerView.xaml.cs | 25 +- .../Navigation/WohnheimNavigationView.xaml | 8 +- BeWo/ownChat/ChatView.xaml.cs | 3 +- Report/DefaultReportCreator.cs | 21 +- .../DefaultReports/RosterReport.Designer.cs | 38 ++- Report/DefaultReports/RosterReport.cs | 86 ++++++- Report/ReportObjects/RosterRO.cs | 243 ++++++++++++++++++ .../Dienstplanung/DienstplanungsManager.cs | 6 +- Service/Plugins/TranslationDictionary.cs | 4 +- .../ServiceContracts/IOperationsService.cs | 4 + .../OperationsServiceImp.cs | 12 + Shared/DataContracts/DienstInfoDC.cs | 22 +- 16 files changed, 490 insertions(+), 59 deletions(-) diff --git a/BeWo/ServiceProxy/Generated.cs b/BeWo/ServiceProxy/Generated.cs index 7f5cd6494..31551b9d2 100644 --- a/BeWo/ServiceProxy/Generated.cs +++ b/BeWo/ServiceProxy/Generated.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. // //------------------------------------------------------------------------------ @@ -3616,24 +3616,24 @@ namespace BeWo.ServiceProxy [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IStreamingService/UpdateBeWoFoldersBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] void UpdateBeWoFolders(System.Collections.Generic.List dcs); - // CODEGEN: Generating message contract since the wrapper name (UploadPackage) of message UploadPackage does not match the default value (UploadDocument) + // CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (UploadPackage) von Nachricht "UploadPackage" nicht mit dem Standardwert (UploadDocument) übereinstimmt. [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStreamingService/UploadDocument", ReplyAction="http://tempuri.org/IStreamingService/UploadDocumentResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IStreamingService/UploadDocumentBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] BeWo.ServiceProxy.UploadResult UploadDocument(BeWo.ServiceProxy.UploadPackage request); - // CODEGEN: Generating message contract since the wrapper name (UpdatePackage) of message UpdatePackage does not match the default value (UpdateDocument) + // CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (UpdatePackage) von Nachricht "UpdatePackage" nicht mit dem Standardwert (UpdateDocument) übereinstimmt. [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStreamingService/UpdateDocument", ReplyAction="http://tempuri.org/IStreamingService/UpdateDocumentResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IStreamingService/UpdateDocumentBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] BeWo.ServiceProxy.UploadResult UpdateDocument(BeWo.ServiceProxy.UpdatePackage request); - // CODEGEN: Generating message contract since the wrapper name (UploadChatPackage) of message UploadChatPackage does not match the default value (CreateNewSpeziallStreamChatMessagesDC) + // CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (UploadChatPackage) von Nachricht "UploadChatPackage" nicht mit dem Standardwert (CreateNewSpeziallStreamChatMessagesDC) übereinstimmt. [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStreamingService/CreateNewSpeziallStreamChatMessagesDC", ReplyAction="http://tempuri.org/IStreamingService/CreateNewSpeziallStreamChatMessagesDCRespons" + "e")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IStreamingService/CreateNewSpeziallStreamChatMessagesDCBeWoFau" + "ltFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] BeWo.ServiceProxy.UploadChatResult CreateNewSpeziallStreamChatMessagesDC(BeWo.ServiceProxy.UploadChatPackage request); - // CODEGEN: Generating message contract since the wrapper name (UploadPackage) of message UploadPackage does not match the default value (UploadImportFile) + // CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (UploadPackage) von Nachricht "UploadPackage" nicht mit dem Standardwert (UploadImportFile) übereinstimmt. [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStreamingService/UploadImportFile", ReplyAction="http://tempuri.org/IStreamingService/UploadImportFileResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IStreamingService/UploadImportFileBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] BeWo.ServiceProxy.UploadImportFileResult UploadImportFile(BeWo.ServiceProxy.UploadPackage request); @@ -4907,6 +4907,10 @@ namespace BeWo.ServiceProxy [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetColorForStatusBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] string GetColorForStatus(bool status); + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetColorForForeground", ReplyAction="http://tempuri.org/IOperationsService/GetColorForForegroundResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetColorForForegroundBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + string GetColorForForeground(); + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetColorForServiceRecordView2", ReplyAction="http://tempuri.org/IOperationsService/GetColorForServiceRecordView2Response")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetColorForServiceRecordView2BeWoFaultFault" + "", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] @@ -6186,6 +6190,11 @@ namespace BeWo.ServiceProxy return base.Channel.GetColorForStatus(status); } + public string GetColorForForeground() + { + return base.Channel.GetColorForForeground(); + } + public string GetColorForServiceRecordView2() { return base.Channel.GetColorForServiceRecordView2(); diff --git a/BeWo/View/Controls/DPCtrlDay.cs b/BeWo/View/Controls/DPCtrlDay.cs index e1b3a964e..2df2f75f6 100644 --- a/BeWo/View/Controls/DPCtrlDay.cs +++ b/BeWo/View/Controls/DPCtrlDay.cs @@ -18,6 +18,8 @@ namespace BeWo.View.Controls { public class DPCtrlDay : DienstplanerControl { + public static bool bemerkungVorhanden = false; + public static readonly DependencyProperty DPCtrlDayInformationProperty = DependencyProperty.Register( "DPCtrlDayInformation", typeof(DPCtrlDayInformation), @@ -74,9 +76,20 @@ namespace BeWo.View.Controls c.Text = $"{dc.Kurz}"; if (!info.Bemerkung.IsNullOrEmpty()) { + bemerkungVorhanden = true; c.BorderThickness = new Thickness(2, 2, 2, 2); - c.BorderBrush = Brushes.CornflowerBlue; + c.BorderBrush = (SolidColorBrush)new BrushConverter().ConvertFrom(ServiceFacade.DoOperationsServiceSync(se => se.GetColorForForeground())); } + else + { + c.BorderThickness = new Thickness(0, 0, 0, 0); + c.BorderBrush = Brushes.Transparent; + } + } + else + { + c.BorderThickness = new Thickness(0, 0, 0, 0); + c.BorderBrush = Brushes.Transparent; } } else @@ -110,6 +123,10 @@ namespace BeWo.View.Controls //MouseLeftButtonDown += DienstplanerControl_LeftMouseDown; //MouseRightButtonDown += DienstplanerControl_RightMouseDown; MouseDown += DienstplanerControl_MouseDown; + + if(bemerkungVorhanden) + Path_Notice.Visibility = Visibility.Visible; + bemerkungVorhanden = false; } public new Brush Background @@ -131,24 +148,6 @@ namespace BeWo.View.Controls set { SetValue(DPCtrlDayInformationProperty, value); } } - /*private void DienstplanerControl_LeftMouseDown(object sender, MouseButtonEventArgs e) - { - DienstplanerView entryView = null; - - DependencyObject parent = VisualTreeHelper.GetParent(this); - - while (parent != null && entryView == null) - { - entryView = parent as DienstplanerView; - var fe = parent as FrameworkElement; - parent = fe != null ? VisualTreeHelper.GetParent(fe) : null; - } - - if (entryView != null) - { - entryView.DienstplanerControl_LeftMouseDown(sender, e); - } - }*/ private void DienstplanerControl_MouseDown(object sender, MouseButtonEventArgs e) { DienstplanerView entryView = null; diff --git a/BeWo/View/Controls/DienstplanerControl.xaml b/BeWo/View/Controls/DienstplanerControl.xaml index 1f5eb4614..6cca144f3 100644 --- a/BeWo/View/Controls/DienstplanerControl.xaml +++ b/BeWo/View/Controls/DienstplanerControl.xaml @@ -3,5 +3,13 @@ + \ No newline at end of file diff --git a/BeWo/View/Detail/Report/DienstplanerView.xaml b/BeWo/View/Detail/Report/DienstplanerView.xaml index e057db51f..e28fa3b60 100644 --- a/BeWo/View/Detail/Report/DienstplanerView.xaml +++ b/BeWo/View/Detail/Report/DienstplanerView.xaml @@ -10,6 +10,7 @@ xmlns:dxschi="http://schemas.devexpress.com/winfx/2008/xaml/scheduler/internal" xmlns:XtraScheduler="clr-namespace:DevExpress.XtraScheduler;assembly=DevExpress.XtraScheduler.v17.1.Core" xmlns:controls="clr-namespace:BeWo.View.Controls" + xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup" x:Class="BeWo.View.Detail.Report.DienstplanerView" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True" Loaded="BeWoView_Loaded"> @@ -60,7 +61,7 @@ -