private void ButtonEdit_Click(object sender, RoutedEventArgs e)
        {
            int selectedIndex = dataGridCars.SelectedIndex;

            if (selectedIndex < 0)
            {
                MessageBox.Show("Не выбран товар для редактирования");
                return;
            }

            var ap = new DBManager().getAnimalparkList();

            Models.ModelAnimalpark modelAnimalpark = null;
            foreach (var it in ap)
            {
                if (it.ID_animalpark == listAnimal[selectedIndex].ID_animalpark)
                {
                    modelAnimalpark = it;
                    break;
                }
            }

            var ce = new AnimalEdit(modelAnimalpark);

            ce.ShowDialog();
        }
        private void ButtonAdd_Click(object sender, RoutedEventArgs e)
        {
            var ce = new AnimalEdit(null);

            ce.ShowDialog();
        }