diff --git a/BBWY.Client/ViewModels/Order/OrderListViewModel_SDGroup.cs b/BBWY.Client/ViewModels/Order/OrderListViewModel_SDGroup.cs index 78c59700..5a10a6b3 100644 --- a/BBWY.Client/ViewModels/Order/OrderListViewModel_SDGroup.cs +++ b/BBWY.Client/ViewModels/Order/OrderListViewModel_SDGroup.cs @@ -1,5 +1,7 @@ using BBWY.Client.Models; +using BBWY.Client.Views.SelectShop; using GalaSoft.MvvmLight.Command; +using System; using System.Windows.Input; namespace BBWY.Client.ViewModels @@ -9,9 +11,10 @@ namespace BBWY.Client.ViewModels private int sdGroupButtonIndex; private Shop sdGroupSelectedShop; - public int SDGroupButtonIndex { get => sdGroupButtonIndex; set { Set(ref sdGroupButtonIndex, value); }} + public int SDGroupButtonIndex { get => sdGroupButtonIndex; set { Set(ref sdGroupButtonIndex, value); } } public ICommand SetSDButtinIndexCommand { get; set; } + public ICommand SDGroupSelectedShopChangedCommand { get; set; } public Shop SdGroupSelectedShop { get => sdGroupSelectedShop; set { Set(ref sdGroupSelectedShop, value); } } @@ -19,11 +22,19 @@ namespace BBWY.Client.ViewModels private void SDGroupInit() { SetSDButtinIndexCommand = new RelayCommand(SetSDButtinIndex); + SDGroupSelectedShopChangedCommand = new RelayCommand(SDGroupSelectedShopChanged); } private void SetSDButtinIndex(int index) { SDGroupButtonIndex = index; } + + private void SDGroupSelectedShopChanged(OnShopChangedEventArgs args) + { + this.SdGroupSelectedShop = args.SelectedShop; + } + + } } diff --git a/BBWY.Client/Views/Order/SDGroup.xaml b/BBWY.Client/Views/Order/SDGroup.xaml index 2e77e4ec..cd53353b 100644 --- a/BBWY.Client/Views/Order/SDGroup.xaml +++ b/BBWY.Client/Views/Order/SDGroup.xaml @@ -8,6 +8,7 @@ xmlns:selectShop="clr-namespace:BBWY.Client.Views.SelectShop" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" + xmlns:b="http://schemas.microsoft.com/xaml/behaviors" mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800" Title="SDGroup" @@ -48,10 +49,16 @@ Visibility="{Binding SDGroupButtonIndex,ConverterParameter=0:Visible:Collapsed,Converter={StaticResource objConverter}}"> - + + + + + + + - +