diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj index 4f8390765..26cdfa6fe 100644 --- a/BeWo/BeWo.csproj +++ b/BeWo/BeWo.csproj @@ -151,7 +151,11 @@ + + + + @@ -199,9 +203,13 @@ AiConfigView.xaml + + DatenbereinigungView.xaml + RtfEditView.xaml + AnimatedBeWoWindow.xaml @@ -330,6 +338,10 @@ Designer MSBuild:Compile + + MSBuild:Compile + Designer + MSBuild:Compile Designer @@ -659,6 +671,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -1597,6 +1613,9 @@ ColorPicker.xaml + + HelpInfoControl.xaml + CustomerWohnhilfeControl.xaml diff --git a/BeWo/Converter/FilterDCConverter.cs b/BeWo/Converter/FilterDCConverter.cs index 9d39f725c..8c56b8e5b 100644 --- a/BeWo/Converter/FilterDCConverter.cs +++ b/BeWo/Converter/FilterDCConverter.cs @@ -18,7 +18,7 @@ namespace BeWo.Converter { var showOnlyArchived = false; var showOnlyOnlyDeleted = false; - CustomFilter customFilter = null; + IList customFilters = null; if (values.Length >= 3) { @@ -29,9 +29,9 @@ namespace BeWo.Converter if (values.Length >= 4) { - if (values[3] is CustomFilter) + if (values[3] is IList) { - customFilter = values[3] as CustomFilter; + customFilters = values[3] as IList; } if (values.Length >= 5) @@ -51,14 +51,15 @@ namespace BeWo.Converter var ret = (values[0] as IEnumerable).Where( dc => { - var filterRelevants = dc.FilterRelevants != null && dc.FilterRelevants.ContainsAll(lFilter) && (customFilter == null || customFilter.IsValid(dc)); + var filterRelevants = dc.FilterRelevants != null && dc.FilterRelevants.ContainsAll(lFilter); var aktiv = (!showOnlyOnlyDeleted && !showOnlyArchived && dc.ActivationType == ActivationTypeId.Active); var archiviert = ((showOnlyArchived && dc.ActivationType == ActivationTypeId.Archived)); var geloescht = ((!showOnlyArchived && showOnlyOnlyDeleted && dc.ActivationType == ActivationTypeId.Deleted)); - var geloeschtOderArchiviert = (showOnlyArchived && dc.ActivationType == ActivationTypeId.Archived || showOnlyOnlyDeleted && dc.ActivationType == ActivationTypeId.Deleted) && filterRelevants; - var ergebnis = (aktiv || archiviert || geloescht || geloeschtOderArchiviert) && filterRelevants; + var customerFilterValid = (customFilters == null || customFilters.All(f => f.IsValid(dc))); + + var ergebnis = (aktiv || archiviert || geloescht || geloeschtOderArchiviert) && filterRelevants && customerFilterValid; return ergebnis; }); diff --git a/BeWo/ServiceProxy/GeneratedAnalysisService.cs b/BeWo/ServiceProxy/GeneratedAnalysisService.cs index 9565c7f1d..6435ce83a 100644 --- a/BeWo/ServiceProxy/GeneratedAnalysisService.cs +++ b/BeWo/ServiceProxy/GeneratedAnalysisService.cs @@ -100,6 +100,10 @@ namespace BeWo.ServiceProxy [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IAnalysisService/CreateAnnualReportBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")] System.Collections.Generic.List CreateAnnualReport(System.Nullable costbearerOid, System.Nullable teamOid, System.Nullable customerCareTypeValueListEntryOid, System.DateTime startDate, System.DateTime endDate); + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAnalysisService/CreateAnnualReport2", ReplyAction="http://tempuri.org/IAnalysisService/CreateAnnualReport2Response")] + [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IAnalysisService/CreateAnnualReport2BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")] + System.Collections.Generic.List CreateAnnualReport2(BS.Shared.DataContracts.AnnualReportConfigDC config); + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAnalysisService/CreateAccountingReport", ReplyAction="http://tempuri.org/IAnalysisService/CreateAccountingReportResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IAnalysisService/CreateAccountingReportBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")] BS.Shared.DataContracts.Reports.AccountingReportDC CreateAccountingReport(System.DateTime start, System.DateTime end); @@ -243,6 +247,11 @@ namespace BeWo.ServiceProxy return base.Channel.CreateAnnualReport(costbearerOid, teamOid, customerCareTypeValueListEntryOid, startDate, endDate); } + public System.Collections.Generic.List CreateAnnualReport2(BS.Shared.DataContracts.AnnualReportConfigDC config) + { + return base.Channel.CreateAnnualReport2(config); + } + public BS.Shared.DataContracts.Reports.AccountingReportDC CreateAccountingReport(System.DateTime start, System.DateTime end) { return base.Channel.CreateAccountingReport(start, end); diff --git a/BeWo/ServiceProxy/GeneratedEmployeeService.cs b/BeWo/ServiceProxy/GeneratedEmployeeService.cs index fdfee82de..3fab36220 100644 --- a/BeWo/ServiceProxy/GeneratedEmployeeService.cs +++ b/BeWo/ServiceProxy/GeneratedEmployeeService.cs @@ -217,6 +217,11 @@ namespace BeWo.ServiceProxy "lt", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")] System.Collections.Generic.List FindLeadingCompactTeamsOfEmployee(long employeeOid); + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IEmployeeService/GetActiveCompactEmployeesByOids", ReplyAction="http://tempuri.org/IEmployeeService/GetActiveCompactEmployeesByOidsResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IEmployeeService/GetActiveCompactEmployeesByOidsBeWoFaultFault" + + "", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")] + System.Collections.Generic.List GetActiveCompactEmployeesByOids(System.Collections.Generic.List employeeOids); + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IEmployeeService/ArchiveEmployee", ReplyAction="http://tempuri.org/IEmployeeService/ArchiveEmployeeResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IEmployeeService/ArchiveEmployeeBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")] void ArchiveEmployee(long pOid, long pVersion); @@ -838,6 +843,11 @@ namespace BeWo.ServiceProxy return base.Channel.FindLeadingCompactTeamsOfEmployee(employeeOid); } + public System.Collections.Generic.List GetActiveCompactEmployeesByOids(System.Collections.Generic.List employeeOids) + { + return base.Channel.GetActiveCompactEmployeesByOids(employeeOids); + } + public void ArchiveEmployee(long pOid, long pVersion) { base.Channel.ArchiveEmployee(pOid, pVersion); diff --git a/BeWo/ServiceProxy/GeneratedOperationsService.cs b/BeWo/ServiceProxy/GeneratedOperationsService.cs index 3b5989f76..f4e47b03b 100644 --- a/BeWo/ServiceProxy/GeneratedOperationsService.cs +++ b/BeWo/ServiceProxy/GeneratedOperationsService.cs @@ -25,6 +25,18 @@ namespace BeWo.ServiceProxy [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAIVoiceTranscriptBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")] BS.Shared.DataContracts.AiVoiceDataDC GetAIVoiceTranscript(BS.Shared.DataContracts.AiVoiceDataDC data); + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetResourcesByOids", ReplyAction="http://tempuri.org/IOperationsService/GetResourcesByOidsResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/GetResourcesByOidsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")] + System.Collections.Generic.List GetResourcesByOids(System.Collections.Generic.List resourceOids); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetInactivePersons", ReplyAction="http://tempuri.org/IOperationsService/GetInactivePersonsResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/GetInactivePersonsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")] + System.Collections.Generic.List GetInactivePersons(int jahreUngenutzt, BS.Shared.TableID tableId); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeleteInactivePersons", ReplyAction="http://tempuri.org/IOperationsService/DeleteInactivePersonsResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/DeleteInactivePersonsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")] + string DeleteInactivePersons(System.Collections.Generic.List persons, bool anonymisieren); + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateDienstEintrag", ReplyAction="http://tempuri.org/IOperationsService/UpdateDienstEintragResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateDienstEintragBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")] void UpdateDienstEintrag(BS.Shared.DataContracts.DienstEintragDC dienstEintrag); @@ -367,6 +379,11 @@ namespace BeWo.ServiceProxy [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisSupportConceptDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AiVoiceDataDC))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ResourceDC))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ValueListEntryDC))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.InactivePersonDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstEintragDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstvertretungDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] @@ -375,7 +392,6 @@ namespace BeWo.ServiceProxy [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceRecordDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CostRatePeriodDC))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ValueListEntryDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AbsenceTimeDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AbsenceReasonDC))] @@ -471,8 +487,6 @@ namespace BeWo.ServiceProxy [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SchedulerAppointmentDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Employee2SchedulerAppointmentDC))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ResourceDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.BargeldtransaktionshistoryDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] @@ -614,26 +628,10 @@ namespace BeWo.ServiceProxy [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Core.BeWoFault))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Core.BeWoFaultType))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Core.DateTimeSpan))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactOrganisationDC))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactCustomerDC))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactEmployeeDC))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactSupportConceptDC))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactCostBearerDC))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactPersonDC))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactWohnheimDC))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactTokenDC))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactTeamDC))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactVertreterEmployeeDC))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ValueListEntryType))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.TableID))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ActivationTypeId))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.CostRatePeriodType))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ValueListEntryType))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.AbsenceReasonVisibilityType))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Sex))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SubstitutionNeed))] @@ -648,7 +646,6 @@ namespace BeWo.ServiceProxy [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SignatureType))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SystemEntryID))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.FileAttachmentType))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.TableID))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SupportConceptApprovalInterval))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Bewilligungsart))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.FamilyStatus))] @@ -680,6 +677,23 @@ namespace BeWo.ServiceProxy [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Priority))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Status))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.VertretungsStatus))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactOrganisationDC))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactCustomerDC))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactEmployeeDC))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactSupportConceptDC))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactCostBearerDC))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactPersonDC))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactWohnheimDC))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactTokenDC))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactTeamDC))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Compact.CompactVertreterEmployeeDC))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.CustomerWohnhilfeDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Wohnhilfe.CustomerWohnhilfeBereichBundDC))] @@ -2008,6 +2022,21 @@ namespace BeWo.ServiceProxy return base.Channel.GetAIVoiceTranscript(data); } + public System.Collections.Generic.List GetResourcesByOids(System.Collections.Generic.List resourceOids) + { + return base.Channel.GetResourcesByOids(resourceOids); + } + + public System.Collections.Generic.List GetInactivePersons(int jahreUngenutzt, BS.Shared.TableID tableId) + { + return base.Channel.GetInactivePersons(jahreUngenutzt, tableId); + } + + public string DeleteInactivePersons(System.Collections.Generic.List persons, bool anonymisieren) + { + return base.Channel.DeleteInactivePersons(persons, anonymisieren); + } + public void UpdateDienstEintrag(BS.Shared.DataContracts.DienstEintragDC dienstEintrag) { base.Channel.UpdateDienstEintrag(dienstEintrag); diff --git a/BeWo/View/AssessmentSheetRow.cs b/BeWo/View/AssessmentSheetRow.cs index 027667257..4a646c8f0 100644 --- a/BeWo/View/AssessmentSheetRow.cs +++ b/BeWo/View/AssessmentSheetRow.cs @@ -17,7 +17,8 @@ namespace BeWo.View private readonly long _CustomerOid; - private readonly Dictionary _Day2Entries = new Dictionary(); + private readonly Dictionary _Day2Values = new Dictionary(); + private readonly Dictionary _Day2Entries = new Dictionary(); private readonly AssessmentSheetEntryListVM _EntryList; @@ -45,11 +46,13 @@ namespace BeWo.View if (showWeek) { TimeSpan ts = entry.Day.Value.Subtract(_StartDate); - _Day2Entries[(int) ts.TotalDays + 1] = PossibleValues.SingleOrDefault(vm => vm.DataContract.AssessmentSheetValueOid.Equals(entry.ValueOid)); + _Day2Values[(int) ts.TotalDays + 1] = PossibleValues.SingleOrDefault(vm => vm.DataContract.AssessmentSheetValueOid.Equals(entry.ValueOid)); + _Day2Entries[(int)ts.TotalDays + 1] = entry; } else { - _Day2Entries[entry.Day.Value.Day] = PossibleValues.SingleOrDefault(vm => vm.DataContract.AssessmentSheetValueOid.Equals(entry.ValueOid)); + _Day2Values[entry.Day.Value.Day] = PossibleValues.SingleOrDefault(vm => vm.DataContract.AssessmentSheetValueOid.Equals(entry.ValueOid)); + _Day2Entries[entry.Day.Value.Day] = entry; } } } @@ -471,7 +474,13 @@ namespace BeWo.View private AssessmentSheetValueVM Get(int day) { - return this._Day2Entries.ContainsKey(day) ? this._Day2Entries[day] : null; + var v = this._Day2Values.ContainsKey(day) ? this._Day2Values[day] : null; + if (v != null && this._Day2Entries.ContainsKey(day)) + { + var e = _Day2Entries[day]; + v.Tooltip = string.Format("{0}, {1:dd.MM.yyyy HH:mm} von {2}", v.Description, e.DataContract.InsTs, e.DataContract.InsUser); + } + return v; } private void Set(int day, AssessmentSheetValueVM value) @@ -480,11 +489,13 @@ namespace BeWo.View if (value.IsNew) { value = null; + this._Day2Values.Remove(day); this._Day2Entries.Remove(day); } else { - this._Day2Entries[day] = value; + this._Day2Values[day] = value; + this._Day2Entries.Remove(day); } var list = this._EntryList.VMList.Where(vm => vm.CategoryOid.Equals(this._Category.AssessmentSheetCategoryOid) && vm.Day.HasValue && vm.Day.Value.Equals(date)).ToList(); diff --git a/BeWo/View/Controls/AssessmentSheetValueControl.xaml.cs b/BeWo/View/Controls/AssessmentSheetValueControl.xaml.cs index e477ef077..89ee5b778 100644 --- a/BeWo/View/Controls/AssessmentSheetValueControl.xaml.cs +++ b/BeWo/View/Controls/AssessmentSheetValueControl.xaml.cs @@ -29,7 +29,7 @@ namespace BeWo.View.Controls c.shine.Visibility = Visibility.Visible; c.tb.Text = vm.Sign; c.border.Background = vm.Brush; - c.border.ToolTip = vm.DataContract.Tooltip; + c.border.ToolTip = vm.Tooltip; } else { diff --git a/BeWo/View/Controls/Utils/HelpInfoControl.xaml b/BeWo/View/Controls/Utils/HelpInfoControl.xaml new file mode 100644 index 000000000..ddd46e2a3 --- /dev/null +++ b/BeWo/View/Controls/Utils/HelpInfoControl.xaml @@ -0,0 +1,50 @@ + + + diff --git a/BeWo/View/Controls/Utils/HelpInfoControl.xaml.cs b/BeWo/View/Controls/Utils/HelpInfoControl.xaml.cs new file mode 100644 index 000000000..0e7266179 --- /dev/null +++ b/BeWo/View/Controls/Utils/HelpInfoControl.xaml.cs @@ -0,0 +1,38 @@ +using System.Diagnostics; +using System.Windows; +using System.Windows.Controls; + +namespace BeWo.View.Controls.Utils +{ + public partial class HelpInfoControl : UserControl + { + public static readonly DependencyProperty UrlProperty = + DependencyProperty.Register("Url", typeof(string), typeof(HelpInfoControl), new PropertyMetadata(null)); + + public string Url + { + get => (string)GetValue(UrlProperty); + set => SetValue(UrlProperty, value); + } + + public static readonly DependencyProperty HelpToolTipProperty = + DependencyProperty.Register("HelpToolTip", typeof(string), typeof(HelpInfoControl), new PropertyMetadata("Hilfe aufrufen")); + + public string HelpToolTip + { + get => (string)GetValue(HelpToolTipProperty); + set => SetValue(HelpToolTipProperty, value); + } + + public HelpInfoControl() + { + InitializeComponent(); + } + + private void btn_Click(object sender, RoutedEventArgs e) + { + if (!string.IsNullOrWhiteSpace(Url)) + Process.Start(new ProcessStartInfo(Url) { UseShellExecute = true }); + } + } +} diff --git a/BeWo/View/Detail/AI/AiPromptbausteinActionResultView.xaml b/BeWo/View/Detail/AI/AiPromptbausteinActionResultView.xaml index c9735d083..7cb64d9e4 100644 --- a/BeWo/View/Detail/AI/AiPromptbausteinActionResultView.xaml +++ b/BeWo/View/Detail/AI/AiPromptbausteinActionResultView.xaml @@ -9,8 +9,8 @@ d:DataContext="{d:DesignInstance Type=ai:AiPromptbausteinActionResultViewModel}" d:DesignHeight="600" d:DesignWidth="600" - mc:Ignorable="d" - Background="{StaticResource ObjectEditBackgroundBrush}"> + Background="{StaticResource ObjectEditBackgroundBrush}" + mc:Ignorable="d"> diff --git a/BeWo/View/Detail/AccountingTransactionBookingView.xaml b/BeWo/View/Detail/AccountingTransactionBookingView.xaml index 09ebbcc13..0dc464a0c 100644 --- a/BeWo/View/Detail/AccountingTransactionBookingView.xaml +++ b/BeWo/View/Detail/AccountingTransactionBookingView.xaml @@ -107,6 +107,7 @@ IsReadOnly="True" PopUpClick="popupedit_file_PopUpClick" />