private void Button_Click(object sender, RoutedEventArgs e)
        {
            addProduct add = new addProduct();

            add.Closed += (asd, dsa) => { Show(); Refresh(); };
            Hide();
            add.Show();
        }
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     if (productDataGrid.SelectedItem != null)
     {
         addProduct add = new addProduct(productDataGrid.SelectedItem as Product);
         add.Closed += (asd, dsa) => { Show(); Refresh(); };
         Hide();
         add.Show();
     }
     else
     {
         MessageBox.Show("Выберите продукт для внесения изменений");
     }
 }