Ejemplo n.º 1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            addFarm add = new addFarm();

            add.Closed += (asd, dsa) => { Show(); Refresh(); };
            Hide();
            add.Show();
        }
Ejemplo n.º 2
0
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     if (farmDataGrid.SelectedItem != null)
     {
         addFarm add = new addFarm(farmDataGrid.SelectedItem as Farm);
         add.Closed += (asd, dsa) => { Show(); Refresh(); };
         Hide();
         add.Show();
     }
     else
     {
         MessageBox.Show("Выберите ферму для внесения изменений");
     }
 }