Filter nach Betreuungsart bei Hilfeplänen eingebaut
This commit is contained in:
@@ -1,33 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using BeWo.Core;
|
||||
using BeWo.Core;
|
||||
using BeWo.Core.Commands;
|
||||
using BeWo.Core.Config;
|
||||
using BeWo.Core.Service;
|
||||
using BeWo.MultiLanguage;
|
||||
using BeWo.ServiceProxy;
|
||||
using BeWo.View.Detail;
|
||||
using BeWo.View.Navigation.Filter;
|
||||
using BeWo.View.Navigation.Sorter;
|
||||
using BeWo.View.Windows;
|
||||
using BeWo.ViewModel;
|
||||
|
||||
using BeWo.ViewModel.View.AI;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Extensions;
|
||||
using BeWo.Core.Service;
|
||||
using BeWo.MultiLanguage;
|
||||
using BS.Shared.Translation;
|
||||
using Microsoft.Win32;
|
||||
using BeWo.View.Windows;
|
||||
using DevExpress.Mvvm;
|
||||
using DevExpress.Xpf.Editors;
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using BeWo.Core.Commands;
|
||||
using BeWo.ViewModel.View.AI;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace BeWo.View.Navigation
|
||||
{
|
||||
@@ -41,6 +41,7 @@ namespace BeWo.View.Navigation
|
||||
//private readonly CheckBox chkShowOnlyTeamSCs;
|
||||
|
||||
private readonly ComboBox supportConceptFilterComboBox;
|
||||
private readonly ComboBoxEdit betreuungsartFilterComboBox;
|
||||
|
||||
private IEnumerable<IFilterableDC> objectList = null;
|
||||
private IEnumerable<IFilterableDC> recentList = null;
|
||||
@@ -186,6 +187,39 @@ namespace BeWo.View.Navigation
|
||||
this.mainNavigationView.sortPanel.Children.Insert(3, lbl);
|
||||
this.mainNavigationView.sortPanel.Children.Insert(4, this.supportConceptFilterComboBox);
|
||||
|
||||
betreuungsartFilterComboBox = new ComboBoxEdit();
|
||||
betreuungsartFilterComboBox.FontSize = 12;
|
||||
betreuungsartFilterComboBox.Margin = new Thickness(10, 0, 0, 0);
|
||||
betreuungsartFilterComboBox.Width = 180;
|
||||
betreuungsartFilterComboBox.IsTextEditable = false;
|
||||
betreuungsartFilterComboBox.NullText = Translator.Translate("Nach Betreuungsart filtern");
|
||||
betreuungsartFilterComboBox.ItemsSource = ServiceFacade.DoValueListServiceSync(s => s.GetAllValueListEntrysByType(ValueListEntryType.CustomerCareType));
|
||||
betreuungsartFilterComboBox.DisplayMember = "TypeDescription";
|
||||
betreuungsartFilterComboBox.StyleSettings = new CheckedComboBoxStyleSettings();
|
||||
betreuungsartFilterComboBox.EditValueChanged += BetreuungsartComboBox_EditValueChanged;
|
||||
|
||||
//< dxe:ComboBoxEdit x:Name = "checkedComboBox"
|
||||
// NullText = "Select categories"
|
||||
// IsTextEditable = "False"
|
||||
// ItemsSource = "{Binding Categories}"
|
||||
// EditValue = "{Binding SelectedCategories}"
|
||||
// DisplayMember = "CategoryName"
|
||||
// ShowCustomItems = "True" >
|
||||
// < dxe:ComboBoxEdit.StyleSettings >
|
||||
// < dxe:CheckedComboBoxStyleSettings />
|
||||
// </ dxe:ComboBoxEdit.StyleSettings >
|
||||
// </ dxe:ComboBoxEdit >
|
||||
|
||||
lbl = new TextBlock
|
||||
{
|
||||
Text = Translator.Translate("Betreuungsart:"),
|
||||
FontSize = 12,
|
||||
Margin = new Thickness(8, 2, -3, 0)
|
||||
};
|
||||
|
||||
mainNavigationView.sortPanel.Children.Insert(5, lbl);
|
||||
mainNavigationView.sortPanel.Children.Insert(6, betreuungsartFilterComboBox);
|
||||
|
||||
this.UpdateCustomFilter();
|
||||
|
||||
if (BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConceptView_Create))
|
||||
@@ -257,7 +291,12 @@ namespace BeWo.View.Navigation
|
||||
this.UpdateCustomFilter();
|
||||
}
|
||||
|
||||
private CustomFilter CreateNewCustomFilter()
|
||||
private void BetreuungsartComboBox_EditValueChanged(object sender, EditValueChangedEventArgs e)
|
||||
{
|
||||
UpdateCustomFilter();
|
||||
}
|
||||
|
||||
private CustomFilter CreateNewCustomerFilter()
|
||||
{
|
||||
SupportConceptNavigationFilter filter = new SupportConceptNavigationFilter();
|
||||
if (this.supportConceptFilterComboBox.SelectedItem != null)
|
||||
@@ -274,6 +313,24 @@ namespace BeWo.View.Navigation
|
||||
return filter;
|
||||
}
|
||||
|
||||
|
||||
private CustomFilter CreateNewBetreuungsartFilter()
|
||||
{
|
||||
if (betreuungsartFilterComboBox.SelectedItems == null)
|
||||
return null;
|
||||
|
||||
var list = new List<ValueListEntryDC>();
|
||||
foreach (var item in betreuungsartFilterComboBox.SelectedItems)
|
||||
{
|
||||
list.Add(item as ValueListEntryDC);
|
||||
}
|
||||
|
||||
var filter = new ValueListFilter { SelectedValueListEntries = list, ValueListProperty = "CustomerCareTypes" };
|
||||
|
||||
return filter;
|
||||
}
|
||||
|
||||
|
||||
private void OnLoaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ReloadData(false);
|
||||
@@ -283,7 +340,7 @@ namespace BeWo.View.Navigation
|
||||
|
||||
private void UpdateCustomFilter()
|
||||
{
|
||||
mainNavigationView.CustomFilters = new List<CustomFilter> { CreateNewCustomFilter() };
|
||||
mainNavigationView.CustomFilters = new List<CustomFilter> { CreateNewCustomerFilter(), CreateNewBetreuungsartFilter() };
|
||||
}
|
||||
|
||||
private bool mainNavigationView_ArchiveObject(IFilterableDC obj)
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.ComponentModel;
|
||||
using System.Windows.Media;
|
||||
|
||||
using BeWo.ServiceProxy;
|
||||
using BeWo.View.Navigation.Filter;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
|
||||
namespace BeWo.View.Search
|
||||
@@ -25,6 +26,7 @@ namespace BeWo.View.Search
|
||||
}
|
||||
|
||||
public bool FetchReferenceNumbers { get; set; }
|
||||
public CustomerFilterEnum CustomerFilter { get; set; }
|
||||
|
||||
public bool OnlyOwnChat { get; set; }
|
||||
protected override void GetAll(Action<List<CompactCustomerDC>> pCallBack)
|
||||
|
||||
@@ -77,5 +77,7 @@ namespace BS.Shared.DataContracts.Compact
|
||||
public string ExpiredBrush { get; set; }
|
||||
[DataMember]
|
||||
public string DefaultBrush { get; set; }
|
||||
[DataMember]
|
||||
public String CustomerCareTypes { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user