7 changed files with 156 additions and 5 deletions
@ -0,0 +1,18 @@ |
|||
using System.Collections.Generic; |
|||
|
|||
namespace BBWY.Client.Models |
|||
{ |
|||
public class Department2 |
|||
{ |
|||
public string Id { get; set; } |
|||
|
|||
public string Name { get; set; } |
|||
|
|||
public IList<Shop> ShopList { get; set; } |
|||
|
|||
public Department2() |
|||
{ |
|||
ShopList = new List<Shop>(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,55 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.SelectShop" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|||
xmlns:local="clr-namespace:BBWY.Client.Views" |
|||
mc:Ignorable="d" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
Title="SelectShop" Height="200" Width="300" |
|||
CloseButtonVisibility="Visible" |
|||
CloseButtonColor="{StaticResource WindowButtonColor}" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
RightButtonGroupMargin="0,5,5,0"> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="30"/> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="40"/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|||
Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="选择店铺" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
<Grid Grid.Row="1" VerticalAlignment="Center"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<TextBlock Text="团队" HorizontalAlignment="Right" VerticalAlignment="Center"/> |
|||
<ComboBox x:Name="cbx_department" |
|||
ItemsSource="{Binding DepartmentList,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type c:BWindow}}}" |
|||
SelectedIndex="0" |
|||
DisplayMemberPath="Name" |
|||
Width="150" Height="25" |
|||
HorizontalAlignment="Left" VerticalContentAlignment="Center" |
|||
Grid.Column="1" Margin="5,5,0,5"/> |
|||
|
|||
<TextBlock Text="店铺" HorizontalAlignment="Right" Grid.Row="1" VerticalAlignment="Center" /> |
|||
<ComboBox x:Name="cbx_shop" Width="150" Height="25" |
|||
SelectedIndex="0" |
|||
HorizontalAlignment="Left" VerticalContentAlignment="Center" |
|||
DisplayMemberPath="Name" |
|||
Grid.Column="1" Grid.Row="1" Margin="5,5,0,5"/> |
|||
|
|||
</Grid> |
|||
<c:BButton x:Name="btn_ok" Content="确定" Grid.Row="2" Width="60" HorizontalAlignment="Right" Margin="0,0,8,0" |
|||
Click="btn_ok_Click"/> |
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,36 @@ |
|||
using BBWY.Client.Models; |
|||
using BBWY.Controls; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using System.Windows; |
|||
using System.Windows.Controls; |
|||
using System.Windows.Data; |
|||
using System.Windows.Documents; |
|||
using System.Windows.Input; |
|||
using System.Windows.Media; |
|||
using System.Windows.Media.Imaging; |
|||
using System.Windows.Shapes; |
|||
|
|||
namespace BBWY.Client.Views |
|||
{ |
|||
/// <summary>
|
|||
/// SelectShop.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class SelectShop : BWindow |
|||
{ |
|||
public IList<Department2> DepartmentList { get; set; } |
|||
public Shop Shop { get; set; } |
|||
|
|||
public SelectShop(IList<Department2> departmentList) |
|||
{ |
|||
InitializeComponent(); |
|||
this.DepartmentList = departmentList; |
|||
} |
|||
|
|||
private void btn_ok_Click(object sender, RoutedEventArgs e) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
Loading…
Reference in new issue