From 730555932e57a02c742b7cbec79e3314b81d2fdd Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Tue, 26 Nov 2024 13:57:50 +0100 Subject: [PATCH] Mandator Soziotherapie Ansprechpartner + ComboBoxEmployeeSearch + ComboBoxGenericSearch + Formate --- BeWo/BeWo.csproj | 164 +++++------ BeWo/Converter/TestDebugConverter.cs | 2 +- BeWo/DebugConfig.cs | 2 +- BeWo/MainControl.xaml.cs | 8 +- BeWo/Styles/OrangeBlack.xaml | 4 +- .../ComboBoxes/ComboBoxEmployeeSearch.xaml | 31 +++ .../ComboBoxes/ComboBoxEmployeeSearch.xaml.cs | 85 ++++++ .../ComboBoxes/ComboBoxGenericSearch.cs | 34 +++ BeWo/View/Controls/ListboxSelectControl.xaml | 70 +++-- BeWo/View/Detail/MandatorView.xaml | 60 +++-- ...SupportConceptAnalysisListViewItem.xaml.cs | 6 +- BeWo/View/Search/GenericSearchView.cs | 1 - BeWo/View/Search/MultiEmployeeSearch.xaml | 255 +++++++++++------- BeWo/ViewModel/MandatorVM.cs | 19 ++ Data/Entities/Mandator.cs | 1 + Data/Mappings/Mandator.hbm.xml | 1 + ... Mandator SoziotherapieAnsprechpartner.txt | 2 + Service/DCEntityMapper/MandatorDC_Mandator.cs | 120 +++++---- Shared/DataContracts/MandatorDC.cs | 2 + 19 files changed, 584 insertions(+), 283 deletions(-) create mode 100644 BeWo/View/Controls/ComboBoxes/ComboBoxEmployeeSearch.xaml create mode 100644 BeWo/View/Controls/ComboBoxes/ComboBoxEmployeeSearch.xaml.cs create mode 100644 BeWo/View/Controls/ComboBoxes/ComboBoxGenericSearch.cs create mode 100644 Model/Changes_2024_11_26 Mandator SoziotherapieAnsprechpartner.txt diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj index fe483583f..139a53d34 100644 --- a/BeWo/BeWo.csproj +++ b/BeWo/BeWo.csproj @@ -391,6 +391,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -1301,6 +1305,10 @@ + + ComboBoxEmployeeSearch.xaml + + CustomerVermittlungArbeitControl.xaml @@ -2890,392 +2898,392 @@ 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 False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly diff --git a/BeWo/Converter/TestDebugConverter.cs b/BeWo/Converter/TestDebugConverter.cs index 9bff02a21..d428f40b1 100644 --- a/BeWo/Converter/TestDebugConverter.cs +++ b/BeWo/Converter/TestDebugConverter.cs @@ -12,7 +12,7 @@ namespace BeWo.Converter if (value is null) return null; - return "Test"; + return value; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) diff --git a/BeWo/DebugConfig.cs b/BeWo/DebugConfig.cs index 0c7d5f04e..7431fa369 100644 --- a/BeWo/DebugConfig.cs +++ b/BeWo/DebugConfig.cs @@ -117,7 +117,7 @@ namespace BeWo { DebugConfigMode = DebugConfigMode.FeatureDakota, AutoLogin = true, - SelectView = UIContext.Finance, + SelectView = UIContext.Administration, SelectIndex = 8, //Username = "m1", //Password = "bewobewo", diff --git a/BeWo/MainControl.xaml.cs b/BeWo/MainControl.xaml.cs index 1b36e8300..d6a4c7f62 100644 --- a/BeWo/MainControl.xaml.cs +++ b/BeWo/MainControl.xaml.cs @@ -51,7 +51,8 @@ namespace BeWo Vertretungen, CustomerTeam, Scheduling, - Finance + Finance, + Administration } public partial class MainControl @@ -246,6 +247,9 @@ namespace BeWo private BeWoView GetViewForUIContext(UIContext uiContext) { + if (uiContext == UIContext.Administration) + return new AdministrationView(); + if (!_Views.ContainsKey(uiContext)) { BeWoView view = null; @@ -913,7 +917,7 @@ namespace BeWo { if (DoSaveCheck()) { - NavigateTo(new AdministrationView()); + NavigateTo(GetViewForUIContext(UIContext.Administration)); } } diff --git a/BeWo/Styles/OrangeBlack.xaml b/BeWo/Styles/OrangeBlack.xaml index 8830a0f09..1750759f1 100644 --- a/BeWo/Styles/OrangeBlack.xaml +++ b/BeWo/Styles/OrangeBlack.xaml @@ -2515,7 +2515,7 @@ x:Name="PART_NewButton" Grid.Column="2" Width="{Binding Path=ActualHeight, RelativeSource={RelativeSource Self}}" - Height="20" + Height="18" Margin="1,0,1,0" Padding="0" VerticalAlignment="Stretch" @@ -2537,7 +2537,7 @@ x:Name="PART_DeleteButton" Grid.Column="3" Width="{Binding Path=ActualHeight, RelativeSource={RelativeSource Self}}" - Height="20" + Height="18" Margin="1,0,1,0" Padding="0" VerticalAlignment="Stretch" diff --git a/BeWo/View/Controls/ComboBoxes/ComboBoxEmployeeSearch.xaml b/BeWo/View/Controls/ComboBoxes/ComboBoxEmployeeSearch.xaml new file mode 100644 index 000000000..8b0843804 --- /dev/null +++ b/BeWo/View/Controls/ComboBoxes/ComboBoxEmployeeSearch.xaml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/BeWo/View/Controls/ComboBoxes/ComboBoxEmployeeSearch.xaml.cs b/BeWo/View/Controls/ComboBoxes/ComboBoxEmployeeSearch.xaml.cs new file mode 100644 index 000000000..60ca6d7e0 --- /dev/null +++ b/BeWo/View/Controls/ComboBoxes/ComboBoxEmployeeSearch.xaml.cs @@ -0,0 +1,85 @@ +using BeWo.View.Search; +using BS.Shared.Core; +using BS.Shared.DataContracts.Compact; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace BeWo.View.Controls.ComboBoxes +{ + /// + /// Interaktionslogik für ComboBoxEmployeeSearch.xaml + /// + public partial class ComboBoxEmployeeSearch : ComboBoxGenericSearch + { + // Using a DependencyProperty as the backing store for SelectedCompactEmployeeDC. This enables animation, styling, binding, etc... + public static readonly DependencyProperty SelectedCompactEmployeeDCProperty = + DependencyProperty.Register("SelectedCompactEmployeeDC", + typeof(CompactEmployeeDC), + typeof(ComboBoxEmployeeSearch), + new UIPropertyMetadata(null, + selectCompactEmployee2)); + + public CompactEmployeeDC SelectedCompactEmployeeDC + { + get { return (CompactEmployeeDC)GetValue(SelectedCompactEmployeeDCProperty); } + set { SetValue(SelectedCompactEmployeeDCProperty, value); } + } + + static ComboBoxEmployeeSearch() + { + SearchModeProperty.OverrideMetadata(typeof(ComboBoxEmployeeSearch), new UIPropertyMetadata(SearchMode.All, updateSearchMode)); + } + + public ComboBoxEmployeeSearch() + { + InitializeComponent(); + } + + private void popupedit_PopUpClick(object sender, EventArgs e) + { + searchview.ItemSelected += searchview_Selected; + popup.IsOpen = true; + } + + private void searchview_Selected(object sender, EventArgs e) + { + popup.IsOpen = false; + searchview.ItemSelected -= searchview_Selected; + + SelectedCompactEmployeeDC = e.Data; + + popupedit.Focus(); + } + + private static void selectCompactEmployee2(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + var control = d as ComboBoxEmployeeSearch; + + control.popupedit.Text = e.NewValue?.ToString(); + } + + private static void updateSearchMode(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + var control = d as ComboBoxEmployeeSearch; + + control.searchview.SearchMode = (SearchMode)e.NewValue; + } + + private void popupedit_DeleteClick(object sender, RoutedEventArgs e) + { + SelectedCompactEmployeeDC = null; + } + } +} diff --git a/BeWo/View/Controls/ComboBoxes/ComboBoxGenericSearch.cs b/BeWo/View/Controls/ComboBoxes/ComboBoxGenericSearch.cs new file mode 100644 index 000000000..843b69318 --- /dev/null +++ b/BeWo/View/Controls/ComboBoxes/ComboBoxGenericSearch.cs @@ -0,0 +1,34 @@ +using BeWo.View.Search; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; + +namespace BeWo.View.Controls.ComboBoxes +{ + public class ComboBoxGenericSearch : UserControl + { + // Using a DependencyProperty as the backing store for DeleteButtonVisibility. This enables animation, styling, binding, etc... + public static readonly DependencyProperty DeleteButtonVisibilityProperty = + DependencyProperty.Register("DeleteButtonVisibility", typeof(Visibility), typeof(ComboBoxGenericSearch), new PropertyMetadata(null)); + + // Using a DependencyProperty as the backing store for MyProperty. This enables animation, styling, binding, etc... + public static readonly DependencyProperty SearchModeProperty = + DependencyProperty.Register("SearchMode", typeof(SearchMode), typeof(ComboBoxGenericSearch), new UIPropertyMetadata(SearchMode.All)); + + public Visibility DeleteButtonVisibility + { + get { return (Visibility)GetValue(DeleteButtonVisibilityProperty); } + set { SetValue(DeleteButtonVisibilityProperty, value); } + } + + public SearchMode SearchMode + { + get { return (SearchMode)GetValue(SearchModeProperty); } + set { SetValue(SearchModeProperty, value); } + } + } +} diff --git a/BeWo/View/Controls/ListboxSelectControl.xaml b/BeWo/View/Controls/ListboxSelectControl.xaml index 6420a7a0d..bd78f87dc 100644 --- a/BeWo/View/Controls/ListboxSelectControl.xaml +++ b/BeWo/View/Controls/ListboxSelectControl.xaml @@ -1,26 +1,46 @@ - - - - - - - - - - - - -