using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;

namespace SkyTeam
{
    public partial class ReservierungssuchePage : Page
    {
        public ReservierungssuchePage()
        {
            InitializeComponent();
        }

        private void SearchFlights_Click(object sender, RoutedEventArgs e)
        {
           
            string from = FromBox.Text;
            string to = ToBox.Text;
            DateTime? date = DateBox.SelectedDate;

            NavigationService.Navigate(new verfuegbareFluge(from, to, date));
        }

        private void HomeButton_Click(object sender, RoutedEventArgs e) => NavigationService.Navigate(new NavigationPage());
        private void BookingsButton_Click(object sender, RoutedEventArgs e) => NavigationService.Navigate(new BuchungenPage());
        private void SettingsButton_Click(object sender, RoutedEventArgs e) => NavigationService.Navigate(new SettingsPage());
        private void LogoutButton_Click(object sender, RoutedEventArgs e) => NavigationService.Navigate(new LogInPage());
    }
}