private void btnEdittM_Click(object sender, RoutedEventArgs e) { TypeMachineDto item = dgTypeMachine.SelectedItem as TypeMachineDto; if (item == null) { MessageBox.Show("Выберите запись для редактирования", "Редактирование"); return; } WinTypeMach window = new WinTypeMach(); window.Load(item); window.ShowDialog(); btnUpdatetM_Click(sender, e); }
private void btnAddtM_Click(object sender, RoutedEventArgs e) { WinTypeMach window = new WinTypeMach(); window.ShowDialog(); dgTypeMachine.ItemsSource = ProcessFactory.GetTypeMachinProcess().GetList(); }