private void btnAddM_Click(object sender, RoutedEventArgs e) { AddManagerData window = new AddManagerData(); window.ShowDialog(); dgManagers.ItemsSource = ProcessFactory.GetManagersProcess().GetList(); }
private void btnEditM_Click(object sender, RoutedEventArgs e) { ManagersDto item = dgManagers.SelectedItem as ManagersDto; if (item == null) { MessageBox.Show("Выберите запись для редактирования", "Редактирование"); return; } AddManagerData window = new AddManagerData(); window.Load(item); window.ShowDialog(); btnUpdateM_Click(sender, e); }