public Artist(string name, int age, string specialty, Troupe troupe) { Name = name; Age = age; Specialty = specialty; Troupe = troupe; }
public Show(string name, Troupe troupe, string description, List <Event> events, double ticketPrice) { Name = name; Troupe = troupe; Description = description; Events = events; TicketPrice = ticketPrice; }
private void TroupeComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (TroupeComboBox.SelectedItem != null) { string selectedTroupeName = TroupeComboBox.SelectedItem.ToString(); Troupe selectedTroupe = TroupeList.FirstOrDefault(n => n.Name == selectedTroupeName); List <Artist> artistsOfSelectedTroupe = DisplayInformation.GetArtistsFromTroupe(selectedTroupe); ArtistListView.Visibility = Visibility.Visible; ArtistListView.ItemsSource = artistsOfSelectedTroupe; TroupeNameTxtBlock.Text = selectedTroupe.Name; } }
private void ShowsComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (ShowsComboBox.SelectedItem != null) { string selectedShowName = ShowsComboBox.SelectedItem.ToString(); Show selectedShow = ShowsList.FirstOrDefault(n => n.Name == selectedShowName); ShowTitleTxtBlock.Text = selectedShow.Name; Troupe troupeOfSelectedShow = DisplayInformation.GetTroupeFromShow(selectedShow); TroupeNameTxtBlock.Text = troupeOfSelectedShow.Name; DescriptionTxtBlock.Text = selectedShow.Description; PriceTxtBlock.Text = selectedShow.TicketPrice.ToString(); List <Event> eventsFromSelectedShow = DisplayInformation.GetEventListFromShow(selectedShow); EventListView.ItemsSource = eventsFromSelectedShow; } }