private void Worker_Edit(object sender, RoutedEventArgs e) { int i = listWorkers.SelectedIndex; if (i >= 0) { WorkerEdit work = new WorkerEdit(Workers, Departments, i); work.ShowDialog(); listWorkers.ItemsSource = Workers; } }
private void Worker_Add(object sender, RoutedEventArgs e) { WorkerEdit work = new WorkerEdit(Workers, Departments); work.ShowDialog(); }