private void btnAddR_Click(object sender, RoutedEventArgs e) { WinAddRepair window = new WinAddRepair(); window.ShowDialog(); dgRepair.ItemsSource = ProcessFactory.GetRepairProcess().GetList(); }
private void btnEditR_Click(object sender, RoutedEventArgs e) { RepairDto item = dgRepair.SelectedItem as RepairDto; if (item == null) { MessageBox.Show("Выберите запись для редактирования", "Редактирование"); return; } WinAddRepair window = new WinAddRepair(); window.Load(item); window.ShowDialog(); btnUpdateR_Click(sender, e); }