46 lines
1.3 KiB
C#
46 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Windows.Media;
|
|
|
|
using BeWo.ServiceProxy;
|
|
using BeWo.View.Navigation.Filter;
|
|
using BS.Shared.DataContracts.Compact;
|
|
|
|
namespace BeWo.View.Search
|
|
{
|
|
public class CustomerSearchView : GenericSearchView<CompactCustomerDC>
|
|
{
|
|
public List<CompactCustomerDC> Customers
|
|
{
|
|
get => _ObjectList;
|
|
set => base.UpdateObjectList(value);
|
|
}
|
|
|
|
public CustomerSearchView()
|
|
{
|
|
if(!DesignerProperties.GetIsInDesignMode(this))
|
|
{
|
|
ThemeColor = FindResource("CustomerContentBrush") as Brush;
|
|
}
|
|
}
|
|
|
|
public bool FetchReferenceNumbers { get; set; }
|
|
public CustomerFilterEnum CustomerFilter { get; set; }
|
|
|
|
public bool OnlyOwnChat { get; set; }
|
|
protected override void GetAll(Action<List<CompactCustomerDC>> pCallBack)
|
|
{
|
|
if (OnlyOwnChat)
|
|
{
|
|
ServiceFacade.DoCustomerServiceAsync(s => s.GetAllChatActiveCustomersCompact(0), pCallBack);
|
|
}
|
|
else
|
|
{
|
|
ServiceFacade.DoCustomerServiceAsync(s => s.GetAllActiveCustomersForEmployee(FetchReferenceNumbers), pCallBack);
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|