Esempio n. 1
0
        private void SearchBooking_Click(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrWhiteSpace(lastNameText.Text))
            {
                MessageBox.Show("Enter a valid last name", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
            }

            var bookings = _db.SearchBookings(lastNameText.Text);

            // associates bookings to our list box on the form so we can use Binding to access properties
            bookingList.ItemsSource = bookings;

            lastNameText.Text = "";
        }
Esempio n. 2
0
        private void searchForGuest_Click(object sender, RoutedEventArgs e)
        {
            List <BookingFullModel> bookings = _db.SearchBookings(lastNameText.Text);

            resultList.ItemsSource = bookings;
        }