private void ShowAnimalButton_Click(object sender, RoutedEventArgs e) { if (animalListView.SelectedItems.Count > 0) { Animal selectedAnimal = (Animal)animalListView.SelectedItems[0]; AnimalInfo animalInfo = new AnimalInfo(selectedAnimal.passportId); animalInfo.Show(); } }
private void showAnimal_Click(object sender, RoutedEventArgs e) { if (adoptionListView.SelectedItems.Count > 0) { int passportId = (int)adoptionListView.SelectedValue; AnimalInfo animalInfo = new AnimalInfo(passportId); animalInfo.Show(); } }