private void AssignClientsToDeliverers_Click(object sender, RoutedEventArgs e) { //Get selected Deliverer from DataGrid Deliverer selectedDeliverer = DeliverersDataGrid.SelectedItem as Deliverer; if (selectedDeliverer != null) { //MessageBox.Show("Assigning Clients to " + selectedDeliverer.LastName + ", " + selectedDeliverer.FirstName + "!"); WindowAssignClientsToDeliverer delivererAssignment = new WindowAssignClientsToDeliverer(selectedDeliverer); delivererAssignment.ShowDialog(); } else { MessageBox.Show("Select a deliverer row in the data grid above fool!"); } }
private void AssignClientsToDeliverers_Click(object sender, RoutedEventArgs e) { //Get selected Deliverer from DataGrid Deliverer selectedDeliverer = DeliverersDataGrid.SelectedItem as Deliverer; if (selectedDeliverer != null) { //MessageBox.Show("Assigning Clients to " + selectedDeliverer.LastName + ", " + selectedDeliverer.FirstName + "!"); WindowAssignClientsToDeliverer delivererAssignment = new WindowAssignClientsToDeliverer(selectedDeliverer); delivererAssignment.ShowDialog(); } else { MessageBox.Show("Select a deliverer row in the data grid above fool!"); } }