70 lines
2.4 KiB
C#
70 lines
2.4 KiB
C#
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Collections.ObjectModel;
|
|
|
|
namespace SkyTeam
|
|
{
|
|
public partial class MeineBuchungenPage : Page
|
|
{
|
|
public MeineBuchungenPage()
|
|
{
|
|
InitializeComponent();
|
|
LoadBookings();
|
|
}
|
|
|
|
private void LoadBookings()
|
|
{
|
|
|
|
var bookings = new ObservableCollection<object>
|
|
{
|
|
new { BookingNumber = "SKY001", From = "FRA", To = "JFK", DepartureTime = "2026-02-01 09:00", ArrivalTime = "2026-02-01 13:30", Status = "Bestätigt" },
|
|
new { BookingNumber = "SKY002", From = "MUC", To = "LAX", DepartureTime = "2026-02-03 14:20", ArrivalTime = "2026-02-04 08:45", Status = "Geplant" }
|
|
};
|
|
BookingsDataGrid.ItemsSource = bookings;
|
|
}
|
|
|
|
private void SearchBookingsButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
string from = FromFilterTextBox.Text;
|
|
string to = ToFilterTextBox.Text;
|
|
|
|
MessageBox.Show($"Suche Flüge von {from} nach {to}", "Suche", MessageBoxButton.OK);
|
|
}
|
|
|
|
private void HomeButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
((MainWindow)Application.Current.MainWindow).MainFrame.Navigate(new NavigationPage());
|
|
}
|
|
|
|
private void BookingsButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
((MainWindow)Application.Current.MainWindow).MainFrame.Navigate(new MeineBuchungenPage());
|
|
}
|
|
|
|
private void SettingsButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
((MainWindow)Application.Current.MainWindow).MainFrame.Navigate(new SettingsPage());
|
|
}
|
|
|
|
private void BookFlightButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
((MainWindow)Application.Current.MainWindow).MainFrame.Navigate(new MeineBuchungenPage());
|
|
}
|
|
private void LogoutButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
var result = MessageBox.Show(
|
|
"Möchten Sie sich wirklich abmelden?",
|
|
"Abmelden",
|
|
MessageBoxButton.YesNo,
|
|
MessageBoxImage.Question);
|
|
if (result == MessageBoxResult.Yes)
|
|
{
|
|
((MainWindow)Application.Current.MainWindow).MainFrame.Navigate(new LogInPage());
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
}
|