示例#1
0
        private void ButtonEditAnimal_OnClick(object sender, RoutedEventArgs e)
        {
            var animal = (AnimalDetailed)ListBoxResultList.SelectedItem;

            if (animal != null)
            {
                AddOrEditAnimal addOrEdit = new AddOrEditAnimal(animal);
                addOrEdit.Show();
            }
            else
            {
                MessageBox.Show("Inget djur är markerat för redigering.");
            }
        }
示例#2
0
        private void MenuItemAddAnimals_OnClick(object sender, RoutedEventArgs e)
        {
            AddOrEditAnimal addOrEdit = new AddOrEditAnimal();

            addOrEdit.Show();
        }