public MainWindow() { InitializeComponent(); this.department.ItemsSource = ConnectToDB.GetDepartmentList(); this.orderListBox.ItemsSource = ConnectToDB.GetDepartmentList(); this.sellerComboBox.ItemsSource = ConnectToDB.GetEmployeeList(1); this.ordersGrid.ItemsSource = GetOrderListForTable(); }
private void orderListBox_MouseUp(object sender, MouseButtonEventArgs e) { Department dept = ConnectToDB.GetDepartment(this.orderListBox.SelectedItem.ToString()); this.leader.ItemsSource = ConnectToDB.GetEmployeeList(dept.Id); }