private void copy_Click(object sender, RoutedEventArgs e) { if (dg.SelectedIndex > -1) { BuildingsDialog dialog = new BuildingsDialog(mode.Copy, this, (int)dg.SelectedValue); dialog.ShowDialog(); } else { MessageBox.Show("Не выбрано поле!"); } }
private void add_Click(object sender, RoutedEventArgs e) { BuildingsDialog dialog = new BuildingsDialog(mode.Add, this); dialog.ShowDialog(); }
private void Dg_MouseDoubleClick(object sender, MouseButtonEventArgs e) { BuildingsDialog dialog = new BuildingsDialog(mode.Update, this, (int)dg.SelectedValue); dialog.ShowDialog(); }