예제 #1
0
        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));
        }
예제 #2
0
        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);
                }
            });
        }