diff --git a/.gitignore b/.gitignore index 870daf63a..97bc03a0e 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ /BeWoPlanerMobil/bin /BeWoPlanerMobil/obj /Host/bin +/Host/binRelease /Host/obj /Controls/bin /Controls/obj diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj index 3bae79ba7..a51f72198 100644 --- a/BeWo/BeWo.csproj +++ b/BeWo/BeWo.csproj @@ -391,6 +391,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -399,6 +403,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -1301,12 +1309,19 @@ + + ComboBoxEmployeeSearch.xaml + + CustomerVermittlungArbeitControl.xaml CustomerWohnhilfeControl.xaml + + SoziotherapieSettingsView.xaml + CustomerVermittlungArbeitView.xaml diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs index 276a03ff4..8aaf8253d 100644 --- a/BeWo/BeWoApp.xaml.cs +++ b/BeWo/BeWoApp.xaml.cs @@ -45,7 +45,6 @@ namespace BeWo { private static DebugMessageLogView _DebugMessageLogView; - private static FrameworkElement _lockedContent; public static LoginControl LoginControl; @@ -56,6 +55,8 @@ namespace BeWo public static int RenderTier = 0; + public static bool IsInDesignMode = DesignerProperties.GetIsInDesignMode(new DependencyObject()); + internal static string IpAddress = string.Empty; internal static string Tenant = string.Empty; @@ -976,6 +977,11 @@ namespace BeWo FrameworkElement.LanguageProperty.OverrideMetadata(typeof(FrameworkElement), new FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag))); } + public static void ShowInfoMessage(string message) + { + MessageBox.Show(message, "Information", MessageBoxButton.OK, MessageBoxImage.Exclamation); + } + public static void ShowErrorMessage(Exception e) { if (e is FaultException) diff --git a/BeWo/Converter/GkvState2StringConverter.cs b/BeWo/Converter/GkvState2StringConverter.cs index b6b4f9ab0..095a9845a 100644 --- a/BeWo/Converter/GkvState2StringConverter.cs +++ b/BeWo/Converter/GkvState2StringConverter.cs @@ -27,7 +27,7 @@ namespace BeWo.Converter case GkvState.WaitingForDakota: return "Warte auf Übertragung"; case GkvState.WaitingForKrankenkasse: return "Warte auf Gkv"; case GkvState.WaitingForKrankenkasseTooLong: return "Keine Antwort von Gkv"; - case GkvState.WaitingForUrbelege: return "Sende Urbelege"; + case GkvState.WaitingForUrbelege: return "Urbelege per Post senden"; } return state.ToString(); 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/Converter/UserPermission2BoolConverter.cs b/BeWo/Converter/UserPermission2BoolConverter.cs index a4a18ae83..e61ade63d 100644 --- a/BeWo/Converter/UserPermission2BoolConverter.cs +++ b/BeWo/Converter/UserPermission2BoolConverter.cs @@ -14,20 +14,28 @@ namespace BeWo.Converter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { - if (value is UserRightType type) + try { - return BeWoApp.HasLoggedOnUserRight(type); - } + if (value is UserRightType type) + { + return BeWoApp.HasLoggedOnUserRight(type); + } - if (parameter is UserRightType type2) - { - return BeWoApp.HasLoggedOnUserRight(type2); - } + if (parameter is UserRightType type2) + { + return BeWoApp.HasLoggedOnUserRight(type2); + } - if (parameter is string setting && !string.IsNullOrWhiteSpace(setting)) + if (parameter is string setting && !string.IsNullOrWhiteSpace(setting)) + { + if (setting == SettingsKeys.AllowGkvAbrechnung) + return BeWoApp.AppSettings.AllowGkvAbrechnung; + } + } + catch (Exception) { - if (setting == SettingsKeys.AllowGkvAbrechnung) - return BeWoApp.AppSettings.AllowGkvAbrechnung; + if (BeWoApp.IsInDesignMode) + return true; } return false; diff --git a/BeWo/Core/Config/AppSettings.cs b/BeWo/Core/Config/AppSettings.cs index 0e9ddc202..a9c6db339 100644 --- a/BeWo/Core/Config/AppSettings.cs +++ b/BeWo/Core/Config/AppSettings.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using BeWo.View.Navigation.Filter; using BS.Shared; +using DevExpress.Xpf.Accordion; using DevExpress.Xpf.Scheduling; using DevExpress.XtraScheduler; @@ -421,6 +422,8 @@ namespace BeWo.Core.Config public bool ShowPivotGrid { get; set; } public string ExpandedAdministrationItems { get; set; } + public string SelectedAdministrationItem { get; set; } + public bool ShowUrlaubsplanung { get; set; } public bool DontShowSpitzabrechnung { get; set; } public bool ShowDienstplanung { get; set; } diff --git a/BeWo/DebugConfig.cs b/BeWo/DebugConfig.cs index e9469f8cb..668901304 100644 --- a/BeWo/DebugConfig.cs +++ b/BeWo/DebugConfig.cs @@ -122,12 +122,12 @@ namespace BeWo new DebugConfig() { DebugConfigMode = DebugConfigMode.FeatureDakota, - AutoLogin = false, - //SelectView = UIContext.Finance, + AutoLogin = true, + SelectView = UIContext.Finance, SelectIndex = 8, - Username = "m1", - Password = "bewobewo", - Profilename = "5000000000" + //Username = "m1", + //Password = "bewobewo", + //Profilename = "5000000000" }); return name2config; 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/ServiceProxy/ServiceFacade.cs b/BeWo/ServiceProxy/ServiceFacade.cs index 688e95432..fc70f3866 100644 --- a/BeWo/ServiceProxy/ServiceFacade.cs +++ b/BeWo/ServiceProxy/ServiceFacade.cs @@ -4,6 +4,7 @@ using System.Diagnostics; using System.Linq; using System.ServiceModel; using System.Threading; +using System.Threading.Tasks; using System.Windows; using BeWo.Multitenancy; @@ -75,17 +76,14 @@ namespace BeWo.ServiceProxy { DoAsync(pFunc, pCallBack, true); } - public static void DoAccountingServiceAsync(Action pAction) { DoAsync(pAction, true); } - public static void DoAccountingServiceAsync(Action pAction, Action callback) { DoAsync(pAction, callback, true); } - public static T DoAccountingServiceSync(Func pFunc) { try @@ -99,19 +97,16 @@ namespace BeWo.ServiceProxy return default(T); } - public static void DoAnalysisServiceAsync(Func pFunc, Action pCallBack) { DoAsync(pFunc, pCallBack, true); } - public static void DoAnalysisServiceAsync(Func pFunc, Action pCallBack, bool showWaitDialog) { DoAsync(pFunc, pCallBack, showWaitDialog); } - public static void DoAccountingServiceSync(Action pAction) { pAction.Invoke(GetInstance()); @@ -806,17 +801,6 @@ namespace BeWo.ServiceProxy } } - private static void EndWaiting() - { - Monitor.Enter(_Lock); - if ((--_RunningAsyncs) == 0 && BeWoApp.MainControl != null) - { - BeWoApp.MainControl.EndWaiting(); - } - - Monitor.Exit(_Lock); - } - private static TInterface GetInstance() where TClient : ClientBase, TInterface, new() where TInterface : class @@ -878,7 +862,7 @@ namespace BeWo.ServiceProxy BeWoApp.ShowErrorMessage(e); } - private static void StartWaiting() + private static void StartWaiting() { Monitor.Enter(_Lock); if ((++_RunningAsyncs) == 1 && BeWoApp.MainControl != null) @@ -889,5 +873,49 @@ namespace BeWo.ServiceProxy Monitor.Exit(_Lock); } + private static void EndWaiting() + { + Monitor.Enter(_Lock); + if ((--_RunningAsyncs) == 0 && BeWoApp.MainControl != null) + { + BeWoApp.MainControl.EndWaiting(); + } + + Monitor.Exit(_Lock); + } + + //public static bool IsWaiting() + //{ + // return _RunningAsyncs != 0; + //} + //public static void WaitUntilAsyncIsFinished(Action callback = null) + //{ + // if (!IsWaiting()) + // { + // callback(true); + // return; + // } + + // try + // { + // Task.Run(() => WaitUntil(() => !IsWaiting(), callback)); + // } + // catch(Exception) + // { + // callback(false); + // } + //} + //private static async Task WaitUntil(Func condition, Action callback, int frequency = 25, int timeout = -1) + //{ + // var waitTask = Task.Run(async () => + // { + // while (!condition()) await Task.Delay(frequency); + // callback(true); + // }); + + // if (waitTask != await Task.WhenAny(waitTask, + // Task.Delay(timeout))) + // throw new TimeoutException(); + //} } } \ No newline at end of file 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/BeWoView.cs b/BeWo/View/BeWoView.cs index 38375b469..03117785b 100644 --- a/BeWo/View/BeWoView.cs +++ b/BeWo/View/BeWoView.cs @@ -10,194 +10,198 @@ using BS.Shared; namespace BeWo.View { - public class BeWoView : UserControl - { - public Action ModalEditViewUpdateCallback; + public class BeWoView : UserControl + { + public Action ModalEditViewUpdateCallback; - public virtual bool IsDoneWithInsertOrUpdate { get; set; } + public virtual bool IsDoneWithInsertOrUpdate { get; set; } - public event EventHandler BlendOutComplete; + public event EventHandler BlendOutComplete; - public virtual bool CanDelete - { - get - { - return false; - } - } + public virtual bool CanDelete + { + get + { + return false; + } + } - public virtual bool CanExcelExport - { - get - { - return false; - } - } + public virtual bool CanExcelExport + { + get + { + return false; + } + } - public virtual bool CanWordExport - { - get - { - return false; - } - } + public virtual bool CanWordExport + { + get + { + return false; + } + } - public virtual bool IsDirty - { - get - { - return false; - } - } + public virtual bool IsDirty + { + get + { + return false; + } + } - public virtual BeWoView ParentView { get; set; } + public virtual BeWoView ParentView { get; set; } - public virtual string SaveObjectName - { - get - { - return this.Title; - } - } + public virtual string SaveObjectName + { + get + { + return this.Title; + } + } - public virtual string Title - { - get - { - return string.Empty; - } - } + public virtual string Title + { + get + { + return string.Empty; + } + } - public virtual bool IsInWindow { get; set; } + public virtual bool IsInWindow { get; set; } - internal virtual DependencyObject ValidationOnSaveRootElement - { - get - { - return this; - } - } + internal virtual DependencyObject ValidationOnSaveRootElement + { + get + { + return this; + } + } - protected MainControl MainControl - { - get - { - return BeWoApp.MainControl; - } - } + protected MainControl MainControl + { + get + { + return BeWoApp.MainControl; + } + } - public void BlendIn() - { - DoubleAnimation lAnim = new DoubleAnimation(1, new Duration(TimeSpan.FromSeconds(0.3))); - this.BeginAnimation(OpacityProperty, lAnim); - } + public void BlendIn() + { + DoubleAnimation lAnim = new DoubleAnimation(1, new Duration(TimeSpan.FromSeconds(0.3))); + this.BeginAnimation(OpacityProperty, lAnim); + } - public void BlendOut() - { - DoubleAnimation lAnim = new DoubleAnimation(0, new Duration(TimeSpan.FromSeconds(0.3))); - lAnim.Completed += (s, e) => - { - if (this.BlendOutComplete != null) - { - this.BlendOutComplete(this, e); - } - }; - this.BeginAnimation(OpacityProperty, lAnim); - } + public void BlendOut() + { + DoubleAnimation lAnim = new DoubleAnimation(0, new Duration(TimeSpan.FromSeconds(0.3))); + lAnim.Completed += (s, e) => + { + if (this.BlendOutComplete != null) + { + this.BlendOutComplete(this, e); + } + }; + this.BeginAnimation(OpacityProperty, lAnim); + } - public virtual void Delete() - { - } + public virtual void Delete() + { + } - public virtual void ExportToExcel(string pFileID) - { - } + public virtual void ExportToExcel(string pFileID) + { + } - public virtual void ExportToWord(string pFileID) - { - } + public virtual void ExportToWord(string pFileID) + { + } - public virtual void ModalPopUpCloseInvoked() - { - } + public virtual void ModalPopUpCloseInvoked() + { + } - public virtual void ModalPopUpSaveInvoked() - { - } + public virtual void ModalPopUpSaveInvoked() + { + } - public virtual void ChildViewClosed() - { - } + public virtual void ChildViewClosed() + { + } - public bool SaveData() - { - if (!BeWoApp.HasLoggedOnUserRight(this.GetSaveDemands())) - { - MessageBox.Show("Sie besitzen nicht die nötigen Rechte um zu speichern. Bitte wenden Sie sich an den Administrator!", "Autorisierung fehlgeschlagen", MessageBoxButton.OK, MessageBoxImage.Warning); - return false; - } + public bool SaveData() + { + if (!BeWoApp.HasLoggedOnUserRight(this.GetSaveDemands())) + { + MessageBox.Show("Sie besitzen nicht die nötigen Rechte um zu speichern. Bitte wenden Sie sich an den Administrator!", "Autorisierung fehlgeschlagen", MessageBoxButton.OK, MessageBoxImage.Warning); + return false; + } - var lValid = ValidationTrigger.Validate(this.ValidationOnSaveRootElement); - if (lValid) - { - Save(); - } - else - { - MessageBox.Show("Bitte füllen Sie alle Pflichtfelder aus!", "Speichern nicht möglich", MessageBoxButton.OK, MessageBoxImage.Warning); - } + var lValid = ValidationTrigger.Validate(this.ValidationOnSaveRootElement); + if (lValid) + { + Save(); + } + else + { + MessageBox.Show("Bitte füllen Sie alle Pflichtfelder aus!", "Speichern nicht möglich", MessageBoxButton.OK, MessageBoxImage.Warning); + } - return lValid; - } + return lValid; + } - public virtual MessageBoxResult ShowSaveQuestion() - { - return string.IsNullOrEmpty(this.SaveObjectName) ? MessageBox.Show("Wollen Sie die Änderungen speichern?", "Änderungen speichern", MessageBoxButton.YesNoCancel, MessageBoxImage.Question) : MessageBox.Show("Wollen Sie die Änderungen an " + this.SaveObjectName + " speichern?", "Änderungen speichern", MessageBoxButton.YesNoCancel, MessageBoxImage.Question); - } + public virtual MessageBoxResult ShowSaveQuestion() + { + return string.IsNullOrEmpty(this.SaveObjectName) ? MessageBox.Show("Wollen Sie die Änderungen speichern?", "Änderungen speichern", MessageBoxButton.YesNoCancel, MessageBoxImage.Question) : MessageBox.Show("Wollen Sie die Änderungen an " + this.SaveObjectName + " speichern?", "Änderungen speichern", MessageBoxButton.YesNoCancel, MessageBoxImage.Question); + } - internal virtual bool DoSaveCheck() - { - if (this.IsDirty) - { - MessageBoxResult lResult = this.ShowSaveQuestion(); - if (lResult == MessageBoxResult.Cancel) - { - this.Focus(); - return false; - } + /// + /// Gibt false zurück, wenn Speicherfrage abgelehnt wird, sonst true + /// + /// + internal virtual bool DoSaveCheck() + { + if (!IsDirty) + return true; - if (lResult == MessageBoxResult.Yes) - { - this.SaveData(); - } - } + MessageBoxResult lResult = this.ShowSaveQuestion(); + if (lResult == MessageBoxResult.Cancel) + { + this.Focus(); + return false; + } - return true; - } + if (lResult == MessageBoxResult.Yes) + { + this.SaveData(); + } - protected virtual UserRightType[] GetSaveDemands() - { - return null; - } + return true; + } + + protected virtual UserRightType[] GetSaveDemands() + { + return null; + } - protected virtual void Save() - { - } + protected virtual void Save() + { + } - protected bool Validate(DependencyObject lElement) - { - return ValidationTrigger.Validate(lElement); - } + protected bool Validate(DependencyObject lElement) + { + return ValidationTrigger.Validate(lElement); + } - protected virtual void popup_Closed(object sender, EventArgs e) - { - this.MainControl.AnimateOpacity(1, 100); - } + protected virtual void popup_Closed(object sender, EventArgs e) + { + this.MainControl.AnimateOpacity(1, 100); + } - protected virtual void popup_Opened(object sender, EventArgs e) - { - this.MainControl.AnimateOpacity(0.5, 200); - } - } + protected virtual void popup_Opened(object sender, EventArgs e) + { + this.MainControl.AnimateOpacity(0.5, 200); + } + } } \ No newline at end of file diff --git a/BeWo/View/BeWoWindow.xaml b/BeWo/View/BeWoWindow.xaml index 981fccac6..9d01b83c7 100644 --- a/BeWo/View/BeWoWindow.xaml +++ b/BeWo/View/BeWoWindow.xaml @@ -1,15 +1,22 @@ - + - - - + diff --git a/BeWo/View/BeWoWindowBuilder.cs b/BeWo/View/BeWoWindowBuilder.cs index 9e593b68c..78b14db8a 100644 --- a/BeWo/View/BeWoWindowBuilder.cs +++ b/BeWo/View/BeWoWindowBuilder.cs @@ -12,7 +12,7 @@ namespace BeWo.View { public static class BeWoWindowBuilder { - public static BeWoWindow GetTextViewer(string title, string text, bool fixed_size = false, double height = 600, double width = 400) + public static BeWoWindow GetTextViewer(string title, string text, bool fixed_size = false, double height = 600, double width = 600) { if (fixed_size) return GetTextViewer(title, text, height, height, height, width, width, width); @@ -36,11 +36,12 @@ namespace BeWo.View return beWoWindow; } - public static BeWoWindow GetGkvAbrechnungDetailWindow(GkvAbrechnungVM vM, double height = 800, double width = 600) + public static BeWoWindow GetGkvAbrechnungDetailWindow(GkvAbrechnungVM vM, double height = 800, double width = 900) { - var detail = new GkvAbrechnungDetailControl(vM); - var beWoWindow = GetGenericBeWoWindow("GKV-Abrechnung Nr. " + vM.GkvAbrechnungOid + ": Details", 100, height, 1000, 400, width, 1600); + + var detail = new GkvAbrechnungDetailControl(vM, beWoWindow); + beWoWindow.GroupBoxContent = detail; return beWoWindow; 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/GkvAbrechnungDetailControl.xaml b/BeWo/View/Controls/GkvAbrechnungDetailControl.xaml index c69e46851..9f1f7e242 100644 --- a/BeWo/View/Controls/GkvAbrechnungDetailControl.xaml +++ b/BeWo/View/Controls/GkvAbrechnungDetailControl.xaml @@ -352,6 +352,11 @@ FieldName="IKKostentrager" Header="Kostentrager" ReadOnly="True" /> + + + + + + + +