private void btnAddC_Click(object sender, RoutedEventArgs e) { AddCarrier window = new AddCarrier(); window.ShowDialog(); dgCarrier.ItemsSource = ProcessFactory.GetCarrierProcess().Load(); }
private void btnEditC_Click(object sender, RoutedEventArgs e) { CarrierDto item = dgCarrier.SelectedItem as CarrierDto; if (item == null) { MessageBox.Show("Выберите запись для редактирования", "Редактирование"); return; } AddCarrier window = new AddCarrier(); window.Load(item); window.ShowDialog(); btnUpdateTC_Click(sender, e); }