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

            dialog.ShowDialog();
        }
Exemple #3
0
        private void Dg_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            ContractsDialog dialog = new ContractsDialog(mode.Update, this, (int)dg.SelectedValue);

            dialog.ShowDialog();
        }