private void btnAddE_Click(object sender, RoutedEventArgs e) { WinEnterprise window = new WinEnterprise(); window.ShowDialog(); dgEnterprise.ItemsSource = ProcessFactory.GetEnterpriseProcess().GetList(); }
private void btnEditE_Click(object sender, RoutedEventArgs e) { EnterpriseDto item = dgEnterprise.SelectedItem as EnterpriseDto; if (item == null) { MessageBox.Show("Выберите запись для редактирования", "Редактирование"); return; } WinEnterprise window = new WinEnterprise(); window.Load(item); window.ShowDialog(); btnUpdateE_Click(sender, e); }