private ItemCatalog SelectLastStoreByAddress() { if (OrderService == null || OrderService.OrderModel == null || OrderService.OrderModel.LastStoreModelByClientAddress == null) { return(null); } return(LstStores.FirstOrDefault(e => e.Id == OrderService.OrderModel.LastStoreModelByClientAddress.IdKey)); }
public void OnPosOrderChanged(PosCheck posCheck) { PosCheck = posCheck; if (_currentFranchiseCode == OrderService.OrderModel.Franchise.Code) { return; } _currentFranchiseCode = OrderService.OrderModel.Franchise.Code; List <ItemCatalog> lstCatalogs; CatalogsClientModel.DicFranchiseStore.TryGetValue(_currentFranchiseCode, out lstCatalogs); RxApp.MainThreadScheduler.Schedule(_ => { LstStores.ClearAndAddRange(lstCatalogs); if (OrderService.OrderModel.StoreModel != null && OrderService.OrderModel.StoreModel.IdKey.HasValue) { PickUpStore = LstStores.FirstOrDefault(e => e.Id == OrderService.OrderModel.StoreModel.IdKey.Value); } }); }