diff --git a/.gitignore b/.gitignore index a6b7b824a..642987cac 100644 --- a/.gitignore +++ b/.gitignore @@ -463,3 +463,5 @@ /ReportImp/BellaDonna/obj/Release /ReportImp/PsychosozialeHilfenBochum/obj/Debug /ReportImp/PsychosozialeHilfenBochum/obj/Release +/ReportImp/DieBrueckeHilfeUndHalt/obj/Debug +/ReportImp/DieBrueckeHilfeUndHalt/obj/Release diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj index 9efcfa014..d29fd0693 100644 --- a/BeWo/BeWo.csproj +++ b/BeWo/BeWo.csproj @@ -39,16 +39,16 @@ false true false - http://app.beyondsoft.de/sbdtest/ + http://app.beyondsoft.de/dev/ de-DE BeWoPlaner beyondSoft GmbH - 2.0.1.184 + 2.0.1.186 true publish.htm false true - 185 + 187 2.0.1.%2a false true @@ -116,6 +116,9 @@ + + + @@ -151,21 +154,12 @@ - - ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll - 3.0 3.0 - - ..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll - - - ..\packages\System.ValueTuple.4.4.0\lib\netstandard1.0\System.ValueTuple.dll - @@ -278,6 +272,26 @@ Designer MSBuild:Compile + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + MSBuild:Compile Designer @@ -318,7 +332,7 @@ MSBuild:Compile Designer - + MSBuild:Compile Designer @@ -334,6 +348,10 @@ MSBuild:Compile Designer + + MSBuild:Compile + Designer + MSBuild:Compile Designer @@ -826,7 +844,7 @@ - + @@ -916,6 +934,25 @@ + + DPCtrlEmployeeContractTooltip.xaml + + + DPCtrlEmployeeTooltip.xaml + + + DPCtrlDienstTooltip.xaml + + + MonthPicker.xaml + + + DienstplanerControl.xaml + + + + + GoalRatingControl.xaml @@ -943,8 +980,8 @@ AbsenceTimesView.xaml - - Dienstplaner.xaml + + DienstplanerView.xaml AbwesenheitstabelleView.xaml @@ -952,6 +989,9 @@ AbwesenheitsEditView.xaml + + AbwesenheitsPrintControl.xaml + IcfImportControl.xaml @@ -2348,372 +2388,372 @@ False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly False - Include - True + Include + True Assembly @@ -2828,6 +2868,12 @@ + + + + + + diff --git a/BeWo/BeWo.csproj.user b/BeWo/BeWo.csproj.user index f7752167d..e8b054f48 100644 --- a/BeWo/BeWo.csproj.user +++ b/BeWo/BeWo.csproj.user @@ -2,7 +2,7 @@ D:\Projects\beyondsoft\BeWoPlaner\Publish\|D:\Projects\beyondsoft\BeWoPlaner\PublishTest\|D:\Projects\beyondsoft\BeWoPlaner\PublishDev\|D:\Projects\beyondsoft\BeWoPlaner\Publish45\|C:\Projects\beyondsoft\BeWoPlaner\Publish\ - http://app.beyondsoft.de/sbdtest/|http://app.beyondsoft.de/dev/|http://app.beyondsoft.de/sbd/|http://app.beyondsoft.de/lha/|http://fortis-bewoplaner.fortis-ev.org.local/ + http://app.beyondsoft.de/dev/|http://app.beyondsoft.de/sbdtest/|http://app.beyondsoft.de/sbd/|http://app.beyondsoft.de/lha/|http://fortis-bewoplaner.fortis-ev.org.local/ diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs index 93f2f45e2..3f601d337 100644 --- a/BeWo/BeWoApp.xaml.cs +++ b/BeWo/BeWoApp.xaml.cs @@ -44,7 +44,7 @@ namespace BeWo public static MainControl MainControl; - public static string Version = "Version 2.4.7 Test"; + public static string Version = "Version 2.4.8 Test"; public static int RenderTier = 0; @@ -731,8 +731,9 @@ namespace BeWo Dispatcher.UnhandledException += (s, ex) => { - if (ex.Exception == null || String.IsNullOrEmpty(ex.Exception.Message) || !ex.Exception.ToString().Contains("DevExpress.Xpf.Bars.Customization.CustomizationControl.OnLoaded")) - { + if (ex.Exception == null || String.IsNullOrEmpty(ex.Exception.Message) || !ex.Exception.ToString().Contains("DevExpress.Xpf.Bars.Customization.CustomizationControl.OnLoaded") || !ex.Exception.ToString().Contains("DevExpress.Xpf.Grid.Native.SelectionStrategyCellBase.IsCellSelected")) + + { ShowError(null, ex.Exception, true); } ex.Handled = true; diff --git a/BeWo/Core/BeWoUtils.cs b/BeWo/Core/BeWoUtils.cs index 3e770800a..90f7c997f 100644 --- a/BeWo/Core/BeWoUtils.cs +++ b/BeWo/Core/BeWoUtils.cs @@ -55,6 +55,7 @@ using DevExpress.XtraScheduler; using RestSharp; using Control = System.Windows.Controls.Control; using Utils = BS.Shared.Core.Utils; +using Brush = System.Windows.Media.Brush; namespace BeWo.Core { @@ -2192,6 +2193,6 @@ namespace BeWo.Core var storage = pAppointment.GetCustomFieldStorage(); return Utils.CheckSchedulerRights(storage.CustomerList, storage.ResourceList, storage.EmployeeList.ToList(), storage.Originator, pIsNew, pCheckType, BeWoApp.LoggedOnUser); - } + } } } diff --git a/BeWo/Core/Service/SupportConceptService.cs b/BeWo/Core/Service/SupportConceptService.cs index 2dfff3c29..ed7fac0ea 100644 --- a/BeWo/Core/Service/SupportConceptService.cs +++ b/BeWo/Core/Service/SupportConceptService.cs @@ -26,6 +26,7 @@ namespace BeWo.Core.Service { var treeItem = new SupportConceptGoalDC { + CheckRecursive = false, GoalEntryDC = goalCat, IsExpanded = allGoalsAndCategories.Count <= 30 }; @@ -57,15 +58,20 @@ namespace BeWo.Core.Service } } - var zieleOhneKinder = goalCategoryDict.Values.Where(w => w.Children.Count == 0).ToList(); - foreach (var ziel in zieleOhneKinder) - { - CheckIfSelected(ziel, selectedGoals); - } + //var zieleOhneKinder = goalCategoryDict.Values.Where(w => w.Children.Count == 0).ToList(); + //foreach (var ziel in zieleOhneKinder) + //{ + // CheckIfSelected(ziel, selectedGoals); + //} + var alleZiele = goalCategoryDict.Values.ToList(); + foreach (var ziel in alleZiele) + { + CheckIfSelected(ziel, selectedGoals); + } foreach (var goal in massnahmen) { - var kind = new SupportConceptGoalDC { GoalEntryDC = goal }; + var kind = new SupportConceptGoalDC { GoalEntryDC = goal, CheckRecursive = false }; CheckIfSelected(kind, selectedGoals); @@ -104,25 +110,25 @@ namespace BeWo.Core.Service } } - goal.PropertyChanged += (s, e) => - { - var selectedGoal = s as SupportConceptGoalDC; - if (selectedGoal != null) - { - if (selectedGoal.IsChecked) - { - if (!selectedGoals.Contains(selectedGoal.GoalEntryDC)) - { - selectedGoals.Add(selectedGoal.GoalEntryDC); - } + //goal.PropertyChanged += (s, e) => + //{ + // var selectedGoal = s as SupportConceptGoalDC; + // if (selectedGoal != null) + // { + // if (selectedGoal.IsChecked) + // { + // if (!selectedGoals.Contains(selectedGoal.GoalEntryDC)) + // { + // selectedGoals.Add(selectedGoal.GoalEntryDC); + // } - } - else - { - selectedGoals.Remove(selectedGoal.GoalEntryDC); - } - } - }; + // } + // else + // { + // selectedGoals.Remove(selectedGoal.GoalEntryDC); + // } + // } + //}; } } diff --git a/BeWo/Core/SupportConceptGoalTreeItem.cs b/BeWo/Core/SupportConceptGoalTreeItem.cs index d42f70d27..cc6f0cdc2 100644 --- a/BeWo/Core/SupportConceptGoalTreeItem.cs +++ b/BeWo/Core/SupportConceptGoalTreeItem.cs @@ -20,10 +20,34 @@ namespace BeWo.Core set => _GoalEntryVM = value; } + //CB Das ist doch genau falsch herum? public bool IsGoal => GoalEntryVM != null ? GoalEntryVM.Type.Equals(ValueListEntryType.SupportConceptGoalType) || GoalEntryVM.Type.Equals(ValueListEntryType.SupportConceptIndividualGoalType) : GoalEntryDC.Type.Equals(ValueListEntryType.SupportConceptGoalType) || GoalEntryDC.Type.Equals(ValueListEntryType.SupportConceptIndividualGoalType); + public bool IsMassnahme + { + get + { + bool ism = false; + if (GoalEntryVM != null) + { + ism = GoalEntryVM.Type.Equals(ValueListEntryType.SupportConceptGoalType) || GoalEntryVM.Type.Equals(ValueListEntryType.SupportConceptIndividualGoalType); + } + else if (GoalEntryDC != null) + { + ism = GoalEntryDC.Type.Equals(ValueListEntryType.SupportConceptGoalType) || GoalEntryDC.Type.Equals(ValueListEntryType.SupportConceptIndividualGoalType); + } + + return ism; + } + + + } + //public bool IsGoal => GoalEntryVM != null ? + // GoalEntryVM.Type.Equals(ValueListEntryType.SupportConceptGoalType) || GoalEntryVM.Type.Equals(ValueListEntryType.SupportConceptIndividualGoalType) : + // GoalEntryDC.Type.Equals(ValueListEntryType.SupportConceptGoalType) || GoalEntryDC.Type.Equals(ValueListEntryType.SupportConceptIndividualGoalType); + public bool ShowNotice diff --git a/BeWo/LoginControl.xaml.cs b/BeWo/LoginControl.xaml.cs index 10ec5581f..171623dd5 100644 --- a/BeWo/LoginControl.xaml.cs +++ b/BeWo/LoginControl.xaml.cs @@ -997,7 +997,7 @@ namespace BeWo BeWoApp.PasswortStrength = BeWoUtils.CheckPasswordSecurity(lPassword); - ServiceFacade.DoUserServiceAsync(s2 => s2.LoadUserByLoginName(lUserName), + ServiceFacade.DoUserServiceAsync(s2 => s2.LoadUserByNameAndPassword(lUserName, lPassword), r2 => { BeWoApp.LoggedOnUser = r2; diff --git a/BeWo/Ressources/Icons/massnahme.png b/BeWo/Ressources/Icons/massnahme.png new file mode 100644 index 000000000..26fd4e390 Binary files /dev/null and b/BeWo/Ressources/Icons/massnahme.png differ diff --git a/BeWo/Ressources/Icons/ziel.png b/BeWo/Ressources/Icons/ziel.png new file mode 100644 index 000000000..c8db1f45e Binary files /dev/null and b/BeWo/Ressources/Icons/ziel.png differ diff --git a/BeWo/ServiceProxy/Generated.cs b/BeWo/ServiceProxy/Generated.cs index 139824b9a..48af73cb6 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. // //------------------------------------------------------------------------------ @@ -1527,7 +1527,12 @@ namespace BeWo.ServiceProxy [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Employee2SchedulerAppointmentDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary>))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisRootDC))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisEmployeeDC))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisSupportConceptDC))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Tuple, System.Collections.Generic.List>))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.FlexibleReportFilterDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.FlexibleReportResultDC))] @@ -1542,11 +1547,14 @@ namespace BeWo.ServiceProxy [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ReportTemplateDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ReportTypes))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstDC))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstInfoDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ConfirmationReceiptSignatureDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstBlockDC))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstEintragDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.BargeldkassenDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] @@ -1632,6 +1640,8 @@ namespace BeWo.ServiceProxy [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ServiceRecordValidationResult))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.UiElementType))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List>))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary>))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary))] @@ -1640,11 +1650,7 @@ namespace BeWo.ServiceProxy [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary>))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisRootDC))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisEmployeeDC))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisSupportConceptDC))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AccountingReportDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] @@ -3255,6 +3261,10 @@ namespace BeWo.ServiceProxy [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IUserService/LoadUserByLoginNameBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] BS.Shared.DataContracts.UserDC LoadUserByLoginName(string pUserName); + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IUserService/LoadUserByNameAndPassword", ReplyAction="http://tempuri.org/IUserService/LoadUserByNameAndPasswordResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IUserService/LoadUserByNameAndPasswordBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + BS.Shared.DataContracts.UserDC LoadUserByNameAndPassword(string pUserName, string password); + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IUserService/LoadUserGroup", ReplyAction="http://tempuri.org/IUserService/LoadUserGroupResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IUserService/LoadUserGroupBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] BS.Shared.DataContracts.UserGroupDC LoadUserGroup(long pOid); @@ -3431,6 +3441,11 @@ namespace BeWo.ServiceProxy return base.Channel.LoadUserByLoginName(pUserName); } + public BS.Shared.DataContracts.UserDC LoadUserByNameAndPassword(string pUserName, string password) + { + return base.Channel.LoadUserByNameAndPassword(pUserName, password); + } + public BS.Shared.DataContracts.UserGroupDC LoadUserGroup(long pOid) { return base.Channel.LoadUserGroup(pOid); @@ -3508,24 +3523,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); @@ -4737,9 +4752,25 @@ namespace BeWo.ServiceProxy [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetReportTemplatesBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] System.Collections.Generic.List GetReportTemplates(string url); - [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCsFilter", ReplyAction="http://tempuri.org/IOperationsService/GetAbsenceTimeDCsFilterResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCsFilterBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] - System.Collections.Generic.List GetAbsenceTimeDCsFilter(System.DateTime start, System.DateTime end); + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee11", ReplyAction="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee11Response")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee11BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + System.Tuple, System.Collections.Generic.List> GetAbsenceTimeDCEmployee11(); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee21", ReplyAction="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee21Response")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee21BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + System.Tuple, System.Collections.Generic.List> GetAbsenceTimeDCEmployee21(System.Collections.Generic.List absenceReasons, System.Collections.Generic.List employmentTypes); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee31", ReplyAction="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee31Response")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee31BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + System.Tuple, System.Collections.Generic.List> GetAbsenceTimeDCEmployee31(System.DateTime start, System.DateTime end); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee41", ReplyAction="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee41Response")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee41BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + System.Tuple, System.Collections.Generic.List> GetAbsenceTimeDCEmployee41(System.DateTime start, System.DateTime end, System.Collections.Generic.List absenceReasons, System.Collections.Generic.List employmentTypes); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee51", ReplyAction="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee51Response")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee51BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + System.Tuple, System.Collections.Generic.List> GetAbsenceTimeDCEmployee51(System.DateTime start, System.DateTime end, System.Collections.Generic.List absenceReasonIDs, System.Collections.Generic.List employmentTypeIDs); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAllAbsenceReason", ReplyAction="http://tempuri.org/IOperationsService/GetAllAbsenceReasonResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAllAbsenceReasonBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] @@ -4765,20 +4796,16 @@ namespace BeWo.ServiceProxy [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAllDienste", ReplyAction="http://tempuri.org/IOperationsService/GetAllDiensteResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAllDiensteBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] - System.Collections.Generic.List GetAllDienste(); + System.Collections.Generic.List GetAllDienste(); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/InsertNewDienst", ReplyAction="http://tempuri.org/IOperationsService/InsertNewDienstResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/InsertNewDienstBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] - void InsertNewDienst(System.Collections.Generic.List dienst); + void InsertNewDienst(System.Collections.Generic.List dienst); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeactivateDienst", ReplyAction="http://tempuri.org/IOperationsService/DeactivateDienstResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/DeactivateDienstBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] void DeactivateDienst(System.Collections.Generic.Dictionary pOid2Version); - [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateDienst", ReplyAction="http://tempuri.org/IOperationsService/UpdateDienstResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateDienstBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] - void UpdateDienst(System.Collections.Generic.List dienste); - [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAllRatingTypes", ReplyAction="http://tempuri.org/IOperationsService/GetAllRatingTypesResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAllRatingTypesBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] System.Collections.Generic.List GetAllRatingTypes(); @@ -4833,11 +4860,37 @@ namespace BeWo.ServiceProxy "cordBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] System.Collections.Generic.List GetConfirmationReceiptSignaturesByServiceRecord(long serviceRecordOid); + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAllConnfirConfirmationReceiptSignatures", ReplyAction="http://tempuri.org/IOperationsService/GetAllConnfirConfirmationReceiptSignaturesR" + "esponse")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAllConnfirConfirmationReceiptSignaturesB" + "eWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] System.Collections.Generic.List GetAllConnfirConfirmationReceiptSignatures(); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateDienst", ReplyAction="http://tempuri.org/IOperationsService/UpdateDienstResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateDienstBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + void UpdateDienst(System.Collections.Generic.List dienste); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetDienstEintraege", ReplyAction="http://tempuri.org/IOperationsService/GetDienstEintraegeResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetDienstEintraegeBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + System.Collections.Generic.List GetDienstEintraege(long wOid, int year, int month); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/InsertNewDienstEintrag", ReplyAction="http://tempuri.org/IOperationsService/InsertNewDienstEintragResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/InsertNewDienstEintragBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + void InsertNewDienstEintrag(BS.Shared.DataContracts.DienstEintragDC dienstEintrag); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateDienstEintrag", ReplyAction="http://tempuri.org/IOperationsService/UpdateDienstEintragResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateDienstEintragBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + void UpdateDienstEintrag(BS.Shared.DataContracts.DienstEintragDC dienstEintrag); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeleteDienstEintrag", ReplyAction="http://tempuri.org/IOperationsService/DeleteDienstEintragResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/DeleteDienstEintragBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + void DeleteDienstEintrag(long empId, long wohnId, int Zeile, System.DateTime date); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAbsenceTimeVacationByWohnheim", ReplyAction="http://tempuri.org/IOperationsService/GetAbsenceTimeVacationByWohnheimResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAbsenceTimeVacationByWohnheimBeWoFaultFa" + + "ult", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + System.Collections.Generic.List GetAbsenceTimeVacationByWohnheim(long wohnId, int year, int month); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDC", ReplyAction="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDCResponse" + "")] @@ -5784,9 +5837,29 @@ namespace BeWo.ServiceProxy return base.Channel.GetReportTemplates(url); } - public System.Collections.Generic.List GetAbsenceTimeDCsFilter(System.DateTime start, System.DateTime end) + public System.Tuple, System.Collections.Generic.List> GetAbsenceTimeDCEmployee11() { - return base.Channel.GetAbsenceTimeDCsFilter(start, end); + return base.Channel.GetAbsenceTimeDCEmployee11(); + } + + public System.Tuple, System.Collections.Generic.List> GetAbsenceTimeDCEmployee21(System.Collections.Generic.List absenceReasons, System.Collections.Generic.List employmentTypes) + { + return base.Channel.GetAbsenceTimeDCEmployee21(absenceReasons, employmentTypes); + } + + public System.Tuple, System.Collections.Generic.List> GetAbsenceTimeDCEmployee31(System.DateTime start, System.DateTime end) + { + return base.Channel.GetAbsenceTimeDCEmployee31(start, end); + } + + public System.Tuple, System.Collections.Generic.List> GetAbsenceTimeDCEmployee41(System.DateTime start, System.DateTime end, System.Collections.Generic.List absenceReasons, System.Collections.Generic.List employmentTypes) + { + return base.Channel.GetAbsenceTimeDCEmployee41(start, end, absenceReasons, employmentTypes); + } + + public System.Tuple, System.Collections.Generic.List> GetAbsenceTimeDCEmployee51(System.DateTime start, System.DateTime end, System.Collections.Generic.List absenceReasonIDs, System.Collections.Generic.List employmentTypeIDs) + { + return base.Channel.GetAbsenceTimeDCEmployee51(start, end, absenceReasonIDs, employmentTypeIDs); } public System.Collections.Generic.List GetAllAbsenceReason() @@ -5814,12 +5887,12 @@ namespace BeWo.ServiceProxy return base.Channel.GetSupportConceptCostBearerRelDCsByOids(supportConcept2CostbearerOids); } - public System.Collections.Generic.List GetAllDienste() + public System.Collections.Generic.List GetAllDienste() { return base.Channel.GetAllDienste(); } - public void InsertNewDienst(System.Collections.Generic.List dienst) + public void InsertNewDienst(System.Collections.Generic.List dienst) { base.Channel.InsertNewDienst(dienst); } @@ -5829,11 +5902,6 @@ namespace BeWo.ServiceProxy base.Channel.DeactivateDienst(pOid2Version); } - public void UpdateDienst(System.Collections.Generic.List dienste) - { - base.Channel.UpdateDienst(dienste); - } - public System.Collections.Generic.List GetAllRatingTypes() { return base.Channel.GetAllRatingTypes(); @@ -5893,6 +5961,35 @@ namespace BeWo.ServiceProxy { return base.Channel.GetAllConnfirConfirmationReceiptSignatures(); } + public void UpdateDienst(System.Collections.Generic.List dienste) + { + base.Channel.UpdateDienst(dienste); + } + + public System.Collections.Generic.List GetDienstEintraege(long wOid, int year, int month) + { + return base.Channel.GetDienstEintraege(wOid, year, month); + } + + public void InsertNewDienstEintrag(BS.Shared.DataContracts.DienstEintragDC dienstEintrag) + { + base.Channel.InsertNewDienstEintrag(dienstEintrag); + } + + public void UpdateDienstEintrag(BS.Shared.DataContracts.DienstEintragDC dienstEintrag) + { + base.Channel.UpdateDienstEintrag(dienstEintrag); + } + + public void DeleteDienstEintrag(long empId, long wohnId, int Zeile, System.DateTime date) + { + base.Channel.DeleteDienstEintrag(empId, wohnId, Zeile, date); + } + + public System.Collections.Generic.List GetAbsenceTimeVacationByWohnheim(long wohnId, int year, int month) + { + return base.Channel.GetAbsenceTimeVacationByWohnheim(wohnId, year, month); + } public void UpdateIsChatActiveCustomerAPPCodeDC(long customerOid, int activeType) { diff --git a/BeWo/ServiceProxy/ServiceFacade.cs b/BeWo/ServiceProxy/ServiceFacade.cs index 1364abe31..b3a5ef9f2 100644 --- a/BeWo/ServiceProxy/ServiceFacade.cs +++ b/BeWo/ServiceProxy/ServiceFacade.cs @@ -248,7 +248,21 @@ namespace BeWo.ServiceProxy ShowErrorMessage(e); } } - + + public static T DoWohnheimServiceSync(Func pFunc) + { + try + { + return pFunc.Invoke(GetInstance()); + } + catch (Exception e) + { + ShowErrorMessage(e); + } + + return default(T); + } + public static void DoMailServiceAsync(Func pFunc, Action pCallBack) { DoAsync(pFunc, pCallBack, true); diff --git a/BeWo/View/Controls/ComboBoxTreeViewControl.xaml.cs b/BeWo/View/Controls/ComboBoxTreeViewControl.xaml.cs index aa1cb794d..52bc26e92 100644 --- a/BeWo/View/Controls/ComboBoxTreeViewControl.xaml.cs +++ b/BeWo/View/Controls/ComboBoxTreeViewControl.xaml.cs @@ -15,6 +15,22 @@ namespace BeWo.View.Controls { private SupportConceptGoalDC lastCheckedSupportConceptGoal; + public static readonly DependencyProperty ShowRatingPanelProperty = DependencyProperty.Register("ShowRatingPanel", typeof(bool), typeof(ComboBoxTreeViewControl), new FrameworkPropertyMetadata(false)); + + public bool ShowRatingPanel + { + get { return (bool)GetValue(ShowRatingPanelProperty); } + set { SetValue(ShowRatingPanelProperty, value); } + } + + public static readonly DependencyProperty SelectOnlyLeafsProperty = DependencyProperty.Register("SelectOnlyLeafs", typeof(bool), typeof(ComboBoxTreeViewControl), new FrameworkPropertyMetadata(true)); + + public bool SelectOnlyLeafs + { + get { return (bool)GetValue(SelectOnlyLeafsProperty); } + set { SetValue(SelectOnlyLeafsProperty, value); } + } + public double ParentWindowHeight { get { return (double) GetValue(ParentWindowHeightProperty); } @@ -124,6 +140,14 @@ namespace BeWo.View.Controls } else { + if (!SelectOnlyLeafs) + { + GoalCount++; + if (item.IsChecked) + { + selectedGoals.Add(item.GoalEntryDC); + } + } AddCheckedGoals(item.Children, selectedGoals); } } @@ -195,6 +219,11 @@ namespace BeWo.View.Controls private void SetPopUpVisible(bool visible) { + if (!ShowRatingPanel) + { + return; + } + if (lastCheckedSupportConceptGoal == null) { return; @@ -202,7 +231,7 @@ namespace BeWo.View.Controls if (lastCheckedSupportConceptGoal.Children != null && lastCheckedSupportConceptGoal.Children.Count > 0) { - return; + //return; } RatingPopup.IsOpen = visible; diff --git a/BeWo/View/Controls/DPCtrlDay.cs b/BeWo/View/Controls/DPCtrlDay.cs new file mode 100644 index 000000000..5d0f556cd --- /dev/null +++ b/BeWo/View/Controls/DPCtrlDay.cs @@ -0,0 +1,127 @@ +using BeWo.View.Detail.Report; +using BS.Shared.DataContracts; +using BS.Shared.Extensions; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Input; +using System.Windows.Media; + +namespace BeWo.View.Controls +{ + public class DPCtrlDay : DienstplanerControl + { + public static readonly DependencyProperty DPCtrlDayInformationProperty = DependencyProperty.Register( + "DPCtrlDayInformation", + typeof(DPCtrlDayInformation), + typeof(DPCtrlDay), + new UIPropertyMetadata( + (s, e) => + { + var info = (DPCtrlDayInformation)e.NewValue; + var c = (DPCtrlDay)s; + + if (c != null && info != null) + { + var dc = info.DienstInfoDC; + + var right = info.DayOfWeek == DayOfWeek.Sunday || info.IsLastColumn; + var bottom = info.IsLastRow; + + c.Border = new Thickness(0, 0, Convert.ToDouble(right), Convert.ToDouble(bottom)); + + if (!info.IsInContractRange) + { + c.Background = Brushes.Gray; + c.Foreground = Brushes.Red; + c.Text = string.Empty; + c.ToolTip = "Kein gültiger Arbeitsvertrag"; + } + else if (info.Reason != null) + { + c.Background = Brushes.White; + c.Foreground = Brushes.Red; + c.Text = $"{info.Reason.Description[0]}"; + c.ToolTip = $"{info.Reason.Description}"; + } + else if (dc != null) + { + var bg = string.IsNullOrEmpty(dc.Farbe) ? Brushes.White : (SolidColorBrush)new BrushConverter().ConvertFrom(dc.Farbe); + var grey = 0.2989 * bg.Color.R + 0.5870 * bg.Color.G + 0.1140 * bg.Color.B; + + c.Background = bg; + c.Foreground = grey < 70 ? Brushes.White : Brushes.Black; + c.ToolTip = new DPCtrlDienstTooltip(dc); + } + else + { + c.Background = ((int)info.DayOfWeek % 6 == 0) ? new SolidColorBrush(ColorExtensions.FromHexString("EFEFEF")) : Brushes.White; + c.Text = string.Empty; + c.ToolTip = null; + } + + if (dc != null) + { + c.Text = $"{dc.Kurz}"; + } + } + })); + + public DPCtrlDay() + { + InitializeComponent(); + MouseDown += DienstplanerControl_MouseDown; + } + + public new Brush Background + { + get => BorderLight.Background; + set => BorderLight.Background = value; + } + + public Thickness Border + { + get => BorderBlack.BorderThickness; + set => BorderBlack.BorderThickness = value; + } + + public DPCtrlDayInformation DPCtrlDayInformation + { + get { return (DPCtrlDayInformation)GetValue(DPCtrlDayInformationProperty); } + + set { SetValue(DPCtrlDayInformationProperty, value); } + } + + private void DienstplanerControl_MouseDown(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_MouseDown(sender, e); + } + } + } + + public class DPCtrlDayInformation + { + public DienstInfoDC DienstInfoDC { get; set; } + public AbsenceReasonDC Reason { get; set; } + public bool IsInContractRange { get; set; } + public bool IsLastRow { get; set; } + public bool IsLastColumn { get; set; } + public DayOfWeek DayOfWeek { get; set; } + } +} diff --git a/BeWo/View/Controls/DPCtrlDienstTooltip.xaml b/BeWo/View/Controls/DPCtrlDienstTooltip.xaml new file mode 100644 index 000000000..3a698ce85 --- /dev/null +++ b/BeWo/View/Controls/DPCtrlDienstTooltip.xaml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BeWo/View/Controls/DPCtrlDienstTooltip.xaml.cs b/BeWo/View/Controls/DPCtrlDienstTooltip.xaml.cs new file mode 100644 index 000000000..e36eb5df5 --- /dev/null +++ b/BeWo/View/Controls/DPCtrlDienstTooltip.xaml.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Input; +using System.Windows.Media; +using BeWo.View.Detail; +using BeWo.View.Detail.Report; +using BeWo.ViewModel; +using BS.Shared.DataContracts; + +namespace BeWo.View.Controls +{ + /// + /// Interaction logic for DienstplanerControl.xaml + /// + public partial class DPCtrlDienstTooltip : UserControl + { + public DPCtrlDienstTooltip(DienstInfoDC dienst) + { + InitializeComponent(); + + TxtDienst.Text = $"{dienst.DienstName} ({dienst.Kurz})"; + TxtEnde.Text = dienst.Ende.ToString("HH:mm"); + TxtPausendauer.Text = dienst.Pause.ToString(); + TxtStart.Text = dienst.Start.ToString("HH:mm"); + } + } +} \ No newline at end of file diff --git a/BeWo/View/Controls/DPCtrlEmployee.cs b/BeWo/View/Controls/DPCtrlEmployee.cs new file mode 100644 index 000000000..4b7fa10e1 --- /dev/null +++ b/BeWo/View/Controls/DPCtrlEmployee.cs @@ -0,0 +1,127 @@ +using BS.Shared.DataContracts; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; + +namespace BeWo.View.Controls +{ + public class DPCtrlEmployee : DienstplanerControl + { + public static readonly DependencyProperty EmployeeInformationProperty = DependencyProperty.Register( + "EmployeeInformation", + typeof(DPCtrlEmployeeInformation), + typeof(DPCtrlEmployee), + new UIPropertyMetadata( + (s, e) => + { + var information = (DPCtrlEmployeeInformation)e.NewValue; + var ctrl = (DPCtrlEmployee)s; + + if (ctrl != null) + { + if (information != null) + { + switch (information.Row) + { + case 0: + case 1: + ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 0); + ctrl.BorderLight.BorderThickness = new Thickness(0, 0, 0, 1); + break; + case 2: + ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 1); + ctrl.BorderLight.BorderThickness = new Thickness(0, 0, 0, 1); + break; + } + + ctrl.Text = ctrl.DisplayMember; + + ctrl.ToolTip = new DPCtrlEmployeeTooltip(information.Employee, information.Contracts); + } + else + { + ctrl.ToolTip = null; + } + } + })); + + + + public DPCtrlEmployee() + { + InitializeComponent(); + FontSize = 12; + txt.HorizontalAlignment = HorizontalAlignment.Left; + } + + public DPCtrlEmployeeInformation EmployeeInformation + { + get { return (DPCtrlEmployeeInformation)GetValue(EmployeeInformationProperty); } + + set { SetValue(EmployeeInformationProperty, value); } + } + + public string DisplayMember + { + get + { + var sb = new StringBuilder(); + switch (EmployeeInformation.Row) + { + case 0: return EmployeeInformation.Employee.LastNameFirstName; + + case 1: + + foreach (var contract in EmployeeInformation.Contracts) + { + sb.Append(contract.EmploymentType?.Name); + sb.Append('/'); + } + + sb.Remove(sb.Length - 1, 1); + + return sb.ToString(); + + case 2: + + foreach (var contract in EmployeeInformation.Contracts) + { + sb.Append('('); + + if (contract.EntryDate.HasValue) + sb.Append(contract.EntryDate.Value.ToString("dd.MM")); + else + sb.Append("k.A."); + + sb.Append('-'); + + if (contract.ContractEndDate.HasValue) + sb.Append(contract.ContractEndDate.Value.ToString("dd.MM")); + else + sb.Append("unbefr."); + + sb.Append(')'); + + sb.Append('/'); + } + + sb.Remove(sb.Length - 1, 1); + + return sb.ToString(); + } + + return null; + } + } + } + + public class DPCtrlEmployeeInformation + { + public EmployeeDC Employee { get; set; } + public List Contracts { get; set; } + public int Row { get; set; } + } +} diff --git a/BeWo/View/Controls/DPCtrlEmployeeContractTooltip.xaml b/BeWo/View/Controls/DPCtrlEmployeeContractTooltip.xaml new file mode 100644 index 000000000..8a650a43d --- /dev/null +++ b/BeWo/View/Controls/DPCtrlEmployeeContractTooltip.xaml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BeWo/View/Controls/DPCtrlEmployeeContractTooltip.xaml.cs b/BeWo/View/Controls/DPCtrlEmployeeContractTooltip.xaml.cs new file mode 100644 index 000000000..f59e122cd --- /dev/null +++ b/BeWo/View/Controls/DPCtrlEmployeeContractTooltip.xaml.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Input; +using System.Windows.Media; +using BeWo.View.Detail; +using BeWo.View.Detail.Report; +using BeWo.ViewModel; +using BS.Shared.DataContracts; + +namespace BeWo.View.Controls +{ + /// + /// Interaction logic for DienstplanerControl.xaml + /// + public partial class DPCtrlEmployeeContractTooltip : UserControl + { + public DPCtrlEmployeeContractTooltip(ContractDC contract) + { + InitializeComponent(); + + TxtEmploymentType.Text = contract.EmploymentType.Name; + + if(contract.MonthlyTotalHours != null) + { + TxtArbeitszeit.Text = $"{contract.MonthlyTotalHours.Value} Std/Monat"; + } + else if(contract.WeeklyTotalHours != null) + { + TxtArbeitszeit.Text = $"{contract.WeeklyTotalHours.Value} Std/Woche"; + } + else + { + TxtArbeitszeit.Text = $"k.A."; + } + } + } +} \ No newline at end of file diff --git a/BeWo/View/Controls/DPCtrlEmployeeTooltip.xaml b/BeWo/View/Controls/DPCtrlEmployeeTooltip.xaml new file mode 100644 index 000000000..e427c29a7 --- /dev/null +++ b/BeWo/View/Controls/DPCtrlEmployeeTooltip.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BeWo/View/Controls/DPCtrlEmployeeTooltip.xaml.cs b/BeWo/View/Controls/DPCtrlEmployeeTooltip.xaml.cs new file mode 100644 index 000000000..e4867f7fe --- /dev/null +++ b/BeWo/View/Controls/DPCtrlEmployeeTooltip.xaml.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Input; +using System.Windows.Media; +using BeWo.View.Detail; +using BeWo.View.Detail.Report; +using BeWo.ViewModel; +using BS.Shared.DataContracts; + +namespace BeWo.View.Controls +{ + /// + /// Interaction logic for DienstplanerControl.xaml + /// + public partial class DPCtrlEmployeeTooltip : UserControl + { + public DPCtrlEmployeeTooltip(EmployeeDC employeeDC, List contractDCs) + { + InitializeComponent(); + + TxtMitarbeiter.Text = employeeDC.LastNameFirstName; + + var separator = new Separator(); + + foreach (var contract in contractDCs) + { + var sep = new Separator(); + var txtType1 = new TextBlock(); + var txtType2 = new TextBlock(); + var txtArbeit1 = new TextBlock(); + var txtArbeit2 = new TextBlock(); + + txtType1.Text = "Beschäftigungsart:"; + txtType2.Text = $"{contract.EmploymentType?.Name}"; + + txtArbeit1.Text = "Vereinbarte Regelarbeitszeit:"; + + if (contract.MonthlyTotalHours != null) + { + txtArbeit2.Text = $"{contract.MonthlyTotalHours.Value} Std/Monat"; + } + else if (contract.WeeklyTotalHours != null) + { + txtArbeit2.Text = $"{contract.WeeklyTotalHours.Value} Std/Woche"; + } + else + { + txtArbeit2.Text = $"k.A."; + } + + RootGrid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto }); + RootGrid.Children.Add(sep); + + Grid.SetRow(sep, RootGrid.RowDefinitions.Count - 1); + Grid.SetColumnSpan(sep, 3); + + RootGrid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto }); + RootGrid.Children.Add(txtType1); + RootGrid.Children.Add(txtType2); + + Grid.SetRow(txtType1, RootGrid.RowDefinitions.Count - 1); + Grid.SetRow(txtType2, RootGrid.RowDefinitions.Count - 1); + Grid.SetColumn(txtType2, 2); + + RootGrid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto }); + RootGrid.Children.Add(txtArbeit1); + RootGrid.Children.Add(txtArbeit2); + + Grid.SetRow(txtArbeit1, RootGrid.RowDefinitions.Count - 1); + Grid.SetRow(txtArbeit2, RootGrid.RowDefinitions.Count - 1); + Grid.SetColumn(txtArbeit2, 2); + } + } + } +} \ No newline at end of file diff --git a/BeWo/View/Controls/DPCtrlIcon.cs b/BeWo/View/Controls/DPCtrlIcon.cs new file mode 100644 index 000000000..f34852b96 --- /dev/null +++ b/BeWo/View/Controls/DPCtrlIcon.cs @@ -0,0 +1,68 @@ +using BS.Shared.DataContracts; +using BS.Shared.Extensions; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media; + +namespace BeWo.View.Controls +{ + public class DPCtrlIcon : DienstplanerControl + { + public static readonly DependencyProperty DienstValueProperty = DependencyProperty.Register( + "DienstValue", + typeof(DienstInfoDC), + typeof(DienstplanerControl), + new UIPropertyMetadata( + (s, e) => + { + var dc = (DienstInfoDC)e.NewValue; + var c = (DPCtrlIcon)s; + + if (c != null) + { + if (dc != null) + { + // rgb2gray converts RGB values to grayscale values by forming a weighted sum of the R, G, and B components: + // 0.2989 * R + 0.5870 * G + 0.1140 * B + + var color = ColorExtensions.FromHexStringDefault(dc.Farbe, Colors.Transparent); + var brush = new SolidColorBrush(color); + + c.BorderBlack.Background = brush; + c.BorderBlack.ToolTip = dc.DienstName; + c.Foreground = color.IsBrighter(70) ? Brushes.Black : Brushes.White; + c.Text = dc.Kurz; + } + else + { + c.BorderBlack.ToolTip = string.Empty; + c.BorderBlack.Background = Brushes.White; + c.Foreground = Brushes.Black; + c.Text = string.Empty; + } + } + })); + + public DPCtrlIcon() + { + InitializeComponent(); + + BorderBlack.BorderThickness = new Thickness(1); + BorderBlack.CornerRadius = new CornerRadius(4); + BorderBlack.Visibility = Visibility.Visible; + BorderLight.Visibility = Visibility.Hidden; + FontSize = 12; + } + + public DienstInfoDC DienstValue + { + get { return (DienstInfoDC)GetValue(DienstValueProperty); } + + set { SetValue(DienstValueProperty, value); } + } + } +} diff --git a/BeWo/View/Controls/DPCtrlWeek.cs b/BeWo/View/Controls/DPCtrlWeek.cs new file mode 100644 index 000000000..ae13e7d54 --- /dev/null +++ b/BeWo/View/Controls/DPCtrlWeek.cs @@ -0,0 +1,66 @@ +using BS.Shared.DataContracts; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; + +namespace BeWo.View.Controls +{ + public class DPCtrlWeek : DienstplanerControl + { + public static readonly DependencyProperty DienstInfoDCListProperty = DependencyProperty.Register( + "DienstInfoDCList", + typeof(List), + typeof(DPCtrlWeek), + new UIPropertyMetadata( + (s, e) => + { + var dc = (List)e.NewValue; + var c = (DPCtrlWeek)s; + + if (c != null) + { + if (dc != null) + { + dc.RemoveAll(x => x == null); + + c.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 1); + + double res = 0.0; + + if (dc.Count != 0) + foreach (var x in dc) + { + res += x.DurationHours; + } + + c.Text = res.ToString("0.##"); + } + else + { + c.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 0); + + c.Text = ""; + } + } + })); + + public DPCtrlWeek() + { + InitializeComponent(); + + BorderBlack.BorderThickness = new Thickness(0, 0, 1, 0); + txt.TextAlignment = TextAlignment.Left; + txt.HorizontalAlignment = HorizontalAlignment.Left; + } + + public List DienstInfoDCList + { + get { return (List)GetValue(DienstInfoDCListProperty); } + + set { SetValue(DienstInfoDCListProperty, value); } + } + } +} diff --git a/BeWo/View/Controls/DienstplanerControl.xaml b/BeWo/View/Controls/DienstplanerControl.xaml new file mode 100644 index 000000000..1f5eb4614 --- /dev/null +++ b/BeWo/View/Controls/DienstplanerControl.xaml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/BeWo/View/Controls/DienstplanerControl.xaml.cs b/BeWo/View/Controls/DienstplanerControl.xaml.cs new file mode 100644 index 000000000..157f4b6a8 --- /dev/null +++ b/BeWo/View/Controls/DienstplanerControl.xaml.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Input; +using System.Windows.Media; +using BeWo.View.Detail; +using BeWo.View.Detail.Report; +using BeWo.ViewModel; +using BS.Shared.DataContracts; + +namespace BeWo.View.Controls +{ + /// + /// Interaction logic for DienstplanerControl.xaml + /// + public partial class DienstplanerControl : UserControl + { + public DienstplanerControl() + { + InitializeComponent(); + + ToolTipService.SetShowDuration(this, 60000); + } + + public string Text + { + get => txt.Text; + set => txt.Text = value; + } + + public new double FontSize + { + get => txt.FontSize; + set => txt.FontSize = value; + } + + public Border BorderLight + { + get => boLight; + set => boLight = value; + } + + public Border BorderBlack + { + get => bo; + set => bo = value; + } + } +} \ No newline at end of file diff --git a/BeWo/View/Controls/MonthPicker.xaml b/BeWo/View/Controls/MonthPicker.xaml new file mode 100644 index 000000000..90c956d05 --- /dev/null +++ b/BeWo/View/Controls/MonthPicker.xaml @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/BeWo/View/Controls/MonthPicker.xaml.cs b/BeWo/View/Controls/MonthPicker.xaml.cs new file mode 100644 index 000000000..831edea2a --- /dev/null +++ b/BeWo/View/Controls/MonthPicker.xaml.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Input; +using System.Windows.Media; +using BeWo.View.Detail; +using BeWo.View.Detail.Report; +using BeWo.ViewModel; +using BS.Shared.DataContracts; + +namespace BeWo.View.Controls +{ + /// + /// Interaction logic for MonthPicker.xaml + /// + public partial class MonthPicker : UserControl + { + public MonthPicker() + { + InitializeComponent(); + _MonthPicker.ItemsSource = DateTimeFormatInfo.CurrentInfo.MonthNames.Where(s => !string.IsNullOrEmpty(s)); + _MonthPicker.SelectedIndex = 0; + } + + public int SelectedMonth + { + get => _MonthPicker.SelectedIndex + 1; + set => _MonthPicker.SelectedIndex = value - 1; + } + + public string SelectedMonthName + { + get => (string)_MonthPicker.SelectedItem; + } + } +} \ No newline at end of file diff --git a/BeWo/View/Detail/DienstView.xaml.cs b/BeWo/View/Detail/DienstView.xaml.cs index 083fa3ff1..afdcd2c3c 100644 --- a/BeWo/View/Detail/DienstView.xaml.cs +++ b/BeWo/View/Detail/DienstView.xaml.cs @@ -21,9 +21,9 @@ namespace BeWo.View.Detail { public partial class DienstView : BeWoView { - private DienstListVM _ViewModel; + private DienstInfoListVM _ViewModel; - public DienstView(DienstListVM listVM) + public DienstView(DienstInfoListVM listVM) { InitializeComponent(); _FarbeComboBox.ItemTemplateSelector = new ComboBoxTemplateSelector(_FarbeComboBox); @@ -40,7 +40,7 @@ namespace BeWo.View.Detail get { return "Dienste"; } } - private DienstListVM ViewModel + private DienstInfoListVM ViewModel { get { return _ViewModel; } @@ -62,7 +62,7 @@ namespace BeWo.View.Detail if (ViewModel.RemovedCount > 0) { - lToDos.Add(s => s.DeactivateDienst(ViewModel.GetRemoved().ToDictionary(dc => dc.DienstOid.Value, dc => dc.DienstVersion.Value))); + lToDos.Add(s => s.DeactivateDienst(ViewModel.GetRemoved().ToDictionary(dc => dc.Oid.Value, dc => dc.Version.Value))); } if (ViewModel.ChangedCount > 0) @@ -88,7 +88,7 @@ namespace BeWo.View.Detail private void DeleteButton_Click(object sender, RoutedEventArgs e) { - ViewModel.VMList.Remove(_GridControl.GetCurrentValue()); + ViewModel.VMList.Remove(_GridControl.GetCurrentValue()); BeWoWpfUtils.RefreshDXGrid(_GridControl); } @@ -117,7 +117,7 @@ namespace BeWo.View.Detail { int rowHandle = data.RowHandle.Value; - var vm = _GridControl.GetRow(rowHandle) as DienstVM; + var vm = _GridControl.GetRow(rowHandle) as DienstInfoVM; if (vm != null) { diff --git a/BeWo/View/Detail/Report/AbwesenheitsPrintControl.xaml b/BeWo/View/Detail/Report/AbwesenheitsPrintControl.xaml new file mode 100644 index 000000000..7de2ce625 --- /dev/null +++ b/BeWo/View/Detail/Report/AbwesenheitsPrintControl.xaml @@ -0,0 +1,29 @@ + + + + + + + + + + + + +