private void AddWork_Click(object sender, RoutedEventArgs e) { var window = new CustomerWindow(null); if (window.ShowDialog() ?? false) { UpdateWorkListBox(); } }
private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { Work selectedWork = WorkListView.SelectedItem as Work; if (selectedWork != null) { var window = new CustomerWindow(selectedWork); if (window.ShowDialog() ?? false) { UpdateWorkListBox(); } WorkListView.UnselectAll(); } }