Пример #1
0
        private void ExecuteUpdateCommand()
        {
            Store store = StoreModel.GetAsStore();

            if (store != null)
            {
                StoreLogic storeLogic = new StoreLogic();
                var        res        = storeLogic.UpdateStore(store);
                switch (res)
                {
                case StoreLogic.Status.DBError:
                    SnackbarMessageQueue.Enqueue("Error occur, Can not add store now...");
                    break;

                case StoreLogic.Status.Success:
                    SnackbarMessageQueue.Enqueue(string.Format("{0} Updated successful.", store.Name));

                    break;
                }
            }
        }
Пример #2
0
 private void ExecuteShowSelectedCommand(IceCream iceCream)
 {
     if (iceCream != null)
     {
         MessengerInstance.Send <ViewModelBase>(new StoreAndIceCreamVM(iceCream, StoreModel.GetAsStore()));
     }
 }