private void btnAddtR_Click(object sender, RoutedEventArgs e) { WinRepairxaml window = new WinRepairxaml(); window.ShowDialog(); dgTypeRepair.ItemsSource = ProcessFactory.GetTypeRepairProcess().GetList(); }
private void btnEdittR_Click(object sender, RoutedEventArgs e) { TypeRepairDto item = dgTypeRepair.SelectedItem as TypeRepairDto; if (item == null) { MessageBox.Show("Выберите запись для редактирования", "Редактирование"); return; } WinRepairxaml window = new WinRepairxaml(); window.Load(item); window.ShowDialog(); btnUpdatetR_Click(sender, e); }