|
|
@ -72,7 +72,9 @@ namespace BBWY.Client.ViewModels |
|
|
|
#region Commands
|
|
|
|
public ICommand ClosingCommand { get; set; } |
|
|
|
|
|
|
|
public ICommand ChooseShopCommand { get; set; } |
|
|
|
//public ICommand ChooseShopCommand { get; set; }
|
|
|
|
|
|
|
|
public ICommand OpenSelectShopCommand { get; set; } |
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region Methods
|
|
|
@ -82,7 +84,8 @@ namespace BBWY.Client.ViewModels |
|
|
|
this.mdsApiService = mdsApiService; |
|
|
|
this.logisticsService = logisticsService; |
|
|
|
ClosingCommand = new RelayCommand<System.ComponentModel.CancelEventArgs>(Exit); |
|
|
|
ChooseShopCommand = new RelayCommand<Shop>((s) => ChooseShop(s)); |
|
|
|
//ChooseShopCommand = new RelayCommand<Shop>((s) => ChooseShop(s));
|
|
|
|
OpenSelectShopCommand = new RelayCommand(OpenSelectShop); |
|
|
|
this.GlobalContext = globalContext; |
|
|
|
ShopList = new ObservableCollection<Shop>(); |
|
|
|
MenuList = new ObservableCollection<MenuModel>() |
|
|
@ -240,6 +243,23 @@ namespace BBWY.Client.ViewModels |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void OpenSelectShop() |
|
|
|
{ |
|
|
|
var selectShop = new SelectShop(GlobalContext.User.DepartmentList); |
|
|
|
if (selectShop.ShowDialog() == true) |
|
|
|
{ |
|
|
|
ChooseShop(selectShop.Shop, true); |
|
|
|
var vm = App.Current.Resources["Locator"] as ViewModelLocator; |
|
|
|
if (vm.IsCreateOrderList) |
|
|
|
vm.OrderList.Refresh(); |
|
|
|
if (vm.IsCreateWareManager) |
|
|
|
vm.WareManager.Refresh(); |
|
|
|
if (vm.IsCreateWareStock) |
|
|
|
vm.WareStock.Refresh(); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
private void ChooseShop(Shop shop, bool _throw = false) |
|
|
|
{ |
|
|
|
if (shop.ShopId == 0 || |
|
|
|