private void BtnAdd_Click(object sender, RoutedEventArgs e) { AddClientW add = new AddClientW(); add.ShowDialog(); ClientUpdate(); }
private void BtnEdit_Click(object sender, RoutedEventArgs e) { if (DGClient.SelectedItem != null) { AddClientW add = new AddClientW(DGClient.SelectedItem as Client); add.ShowDialog(); ClientUpdate(); } else { MessageBox.Show("Вы не выбрать кого редактировать"); } }