private void EndButton_OnClick(object sender, RoutedEventArgs e) { end = (RentalQh)EndComboBox.SelectedItem; if (end == null) { MessageBox.Show("Choose rental to continue"); return; } ManagerComboBox.IsEnabled = true; ManagerButton.IsEnabled = true; ManagerComboBox.ItemsSource = null; ManagerComboBox.ItemsSource = qm.QueryManagers(connection); EndComboBox.IsEnabled = false; EndButton.IsEnabled = false; }
private void StartButton_OnClick(object sender, RoutedEventArgs e) { start = (RentalQh)StartComboBox.SelectedItem; if (start == null) { MessageBox.Show("Choose rental to continue"); return; } EndComboBox.IsEnabled = true; EndButton.IsEnabled = true; EndComboBox.ItemsSource = null; EndComboBox.ItemsSource = qm.QueryRentals(connection); StartComboBox.IsEnabled = false; StartButton.IsEnabled = false; }