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