步步为盈
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.4 KiB

3 years ago
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;
3 years ago
this.Loaded += SelectShop_Loaded;
}
private void SelectShop_Loaded(object sender, RoutedEventArgs e)
{
var d = cbx_department.SelectedItem as Department2;
cbx_shop.ItemsSource = d.ShopList;
3 years ago
}
private void btn_ok_Click(object sender, RoutedEventArgs e)
{
3 years ago
Shop = cbx_shop.SelectedItem as Shop;
this.DialogResult = true;
this.Close();
}
3 years ago
3 years ago
private void cbx_department_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
var d = cbx_department.SelectedItem as Department2;
cbx_shop.ItemsSource = d.ShopList;
3 years ago
}
}
}