fix problems
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<Page x:Class="SkyTeam.MeineBuchungenPage"
|
||||
<Page x:Class="SkyTeam.BuchungenPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
|
||||
Title="MeineBuchungenPage">
|
||||
Title="BuchungenPage">
|
||||
|
||||
<Grid>
|
||||
|
||||
@@ -20,8 +20,7 @@
|
||||
Grid.ColumnSpan="2"
|
||||
Background="#FF1E88E5"
|
||||
Padding="15">
|
||||
<StackPanel Orientation="Horizontal"
|
||||
VerticalAlignment="Center">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Ellipse Width="36" Height="36" Fill="White" Margin="0,0,10,0"/>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Sky Team Airlines"
|
||||
@@ -37,135 +36,90 @@
|
||||
|
||||
<StackPanel Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Background="#FFE3F2FD"
|
||||
Orientation="Vertical">
|
||||
Background="#FFE3F2FD">
|
||||
|
||||
<Button x:Name="HomeButton"
|
||||
Height="50"
|
||||
Margin="5"
|
||||
Click="HomeButton_Click">
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<iconPacks:PackIconMaterial Kind="Home" Width="20" Height="20" Margin="0,0,10,0"/>
|
||||
<Button Height="50" Margin="5" Click="HomeButton_Click">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<iconPacks:PackIconMaterial Kind="Home" Width="20" Margin="0,0,10,0"/>
|
||||
<TextBlock Text="Home"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Button x:Name="BookingsButton"
|
||||
Height="50"
|
||||
|
||||
<Button Height="50"
|
||||
Margin="5"
|
||||
Click="BookingsButton_Click"
|
||||
Background="#FFBBDEFB">
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<iconPacks:PackIconMaterial Kind="Airplane" Width="20" Height="20" Margin="0,0,10,0"/>
|
||||
Background="#FFBBDEFB"
|
||||
Click="BookingsButton_Click">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<iconPacks:PackIconMaterial Kind="Airplane" Width="20" Margin="0,0,10,0"/>
|
||||
<TextBlock Text="Meine Buchungen"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Button x:Name="SettingsButton"
|
||||
Height="50"
|
||||
Margin="5"
|
||||
Click="SettingsButton_Click">
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<iconPacks:PackIconMaterial Kind="Cog" Width="20" Height="20" Margin="0,0,10,0"/>
|
||||
<Button Height="50" Margin="5" Click="SettingsButton_Click">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<iconPacks:PackIconMaterial Kind="Cog" Width="20" Margin="0,0,10,0"/>
|
||||
<TextBlock Text="Einstellungen"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Button x:Name="LogoutButton"
|
||||
Height="50"
|
||||
<Button Height="50"
|
||||
Margin="5"
|
||||
Background="#FFEBEB"
|
||||
BorderBrush="#FFB71C1C"
|
||||
Foreground="#D32F2F"
|
||||
FontWeight="Bold"
|
||||
Click="LogoutButton_Click">
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<iconPacks:PackIconMaterial Kind="Logout" Width="20" Height="20" Margin="0,0,10,0"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<iconPacks:PackIconMaterial Kind="Logout" Width="20" Margin="0,0,10,0"/>
|
||||
<TextBlock Text="Abmelden"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
|
||||
<Grid Grid.Row="1" Grid.Column="1" Margin="30">
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0"
|
||||
Orientation="Horizontal"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,20">
|
||||
<iconPacks:PackIconMaterial Kind="Airplane" Width="28" Height="28" Margin="0,0,10,0"/>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Meine Buchungen"
|
||||
FontSize="24"
|
||||
FontWeight="Bold"/>
|
||||
<TextBlock Text="Übersicht über Ihre gebuchten Flüge"
|
||||
FontSize="14"
|
||||
Foreground="#666"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="0,0,0,25">
|
||||
<TextBlock Text="Meine Buchungen"
|
||||
FontSize="28"
|
||||
FontWeight="Bold"/>
|
||||
<TextBlock Text="Ihre reservierten Flüge im Überblick"
|
||||
FontSize="16"
|
||||
Foreground="#666"/>
|
||||
</StackPanel>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Background="#F5F7FA"
|
||||
CornerRadius="12"
|
||||
Padding="40">
|
||||
|
||||
<Grid Grid.Row="0" Margin="0,0,0,20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="200"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="200"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel HorizontalAlignment="Center">
|
||||
<iconPacks:PackIconMaterial Kind="AirplaneOff"
|
||||
Width="50"
|
||||
Height="50"
|
||||
Foreground="#888"/>
|
||||
|
||||
<Label Content="Von:" Grid.Column="0" VerticalAlignment="Center" Margin="0,0,8,0"/>
|
||||
<TextBox x:Name="FromFilterTextBox" Grid.Column="1" Height="36" Margin="0,0,12,0"/>
|
||||
<TextBlock Text="Sie haben noch keinen Flug reserviert."
|
||||
FontSize="18"
|
||||
Margin="0,15,0,5"
|
||||
TextAlignment="Center"/>
|
||||
|
||||
<Label Content="Nach:" Grid.Column="2" VerticalAlignment="Center" Margin="0,0,8,0"/>
|
||||
<TextBox x:Name="ToFilterTextBox" Grid.Column="3" Height="36" Margin="0,0,12,0"/>
|
||||
<TextBlock Text="Reservieren Sie jetzt Ihren ersten Flug!"
|
||||
FontSize="14"
|
||||
Foreground="#666"
|
||||
Margin="0,0,0,20"
|
||||
TextAlignment="Center"/>
|
||||
|
||||
<Button x:Name="SearchBookingsButton"
|
||||
Grid.Column="4"
|
||||
Width="100"
|
||||
Height="36"
|
||||
Margin="0,0,0,0"
|
||||
HorizontalAlignment="Right"
|
||||
Click="SearchBookingsButton_Click">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<iconPacks:PackIconMaterial Kind="Magnify" Width="18" Height="18" Margin="0,0,6,0"/>
|
||||
<TextBlock Text="Suchen"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Button Content="Jetzt reservieren"
|
||||
Width="180"
|
||||
Height="45"
|
||||
Click="OpenReservierungSuche_Click"/>
|
||||
</StackPanel>
|
||||
|
||||
<DataGrid x:Name="BookingsDataGrid"
|
||||
Grid.Row="1"
|
||||
AutoGenerateColumns="False"
|
||||
IsReadOnly="True"
|
||||
CanUserAddRows="False"
|
||||
GridLinesVisibility="Horizontal"
|
||||
HeadersVisibility="Column">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="Buchungsnummer" Width="120" Binding="{Binding BookingNumber}"/>
|
||||
<DataGridTextColumn Header="Von" Width="80" Binding="{Binding From}"/>
|
||||
<DataGridTextColumn Header="Nach" Width="80" Binding="{Binding To}"/>
|
||||
<DataGridTextColumn Header="Flugzeug" Width="100" Binding="{Binding Flugzeug}"/>
|
||||
<DataGridTextColumn Header="Pilot" Width="100" Binding="{Binding Pilots}"/>
|
||||
<DataGridTextColumn Header="Abflug" Width="140" Binding="{Binding DepartureTime}"/>
|
||||
<DataGridTextColumn Header="Ankunft" Width="140" Binding="{Binding ArrivalTime}"/>
|
||||
<DataGridTextColumn Header="Status" Width="100" Binding="{Binding Status}"/>
|
||||
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -8,27 +8,19 @@ namespace SkyTeam
|
||||
{
|
||||
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)
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace SkyTeam
|
||||
{
|
||||
class FlugeRepo
|
||||
class FlugeRepo : databaseServices
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace SkyTeam
|
||||
{
|
||||
class FlugzeugRepo
|
||||
class FlugzeugRepo : databaseServices
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace SkyTeam
|
||||
{
|
||||
class PilotenRepo
|
||||
class PilotenRepo : databaseServices
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MahApps.Metro.IconPacks" Version="6.2.1" />
|
||||
<PackageReference Include="MySql.Data" Version="9.6.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
23
SkyTeam/databaseServices.cs
Normal file
23
SkyTeam/databaseServices.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SkyTeam
|
||||
{
|
||||
class databaseServices
|
||||
{
|
||||
private string ConnectionString = "Server=mysql.pb.bib.de;uid=pbt3h24akh;pwd=Dd3dwQgPeNxW;database=pbt3h24akh_SkyTeam;";
|
||||
|
||||
|
||||
protected virtual string connectionString
|
||||
{
|
||||
get { return ConnectionString; }
|
||||
private set { ConnectionString = value; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,10 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace SkyTeam
|
||||
{
|
||||
class mitarbeiterRepo
|
||||
class mitarbeiterRepo : databaseServices
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
112
SkyTeam/reservierungsSuche.xaml
Normal file
112
SkyTeam/reservierungsSuche.xaml
Normal file
@@ -0,0 +1,112 @@
|
||||
<Page x:Class="SkyTeam.ReservierungssuchePage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
|
||||
Title="ReservierungssuchePage">
|
||||
|
||||
<Grid>
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="180"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Border Grid.ColumnSpan="2"
|
||||
Background="#FF1E88E5"
|
||||
Padding="15">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Ellipse Width="36" Height="36" Fill="White" Margin="0,0,10,0"/>
|
||||
<TextBlock Text="Flug reservieren"
|
||||
FontSize="20"
|
||||
FontWeight="Bold"
|
||||
Foreground="White"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<StackPanel Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Background="#FFE3F2FD">
|
||||
|
||||
<Button Height="50" Margin="5" Click="HomeButton_Click">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<iconPacks:PackIconMaterial Kind="Home" Width="20" Margin="0,0,10,0"/>
|
||||
<TextBlock Text="Home"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Button Height="50" Margin="5" Click="BookingsButton_Click">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<iconPacks:PackIconMaterial Kind="Airplane" Width="20" Margin="0,0,10,0"/>
|
||||
<TextBlock Text="Meine Buchungen"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Button Height="50" Margin="5" Click="SettingsButton_Click">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<iconPacks:PackIconMaterial Kind="Cog" Width="20" Margin="0,0,10,0"/>
|
||||
<TextBlock Text="Einstellungen"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Button Height="50"
|
||||
Margin="5"
|
||||
Background="#FFEBEB"
|
||||
BorderBrush="#FFB71C1C"
|
||||
Foreground="#D32F2F"
|
||||
FontWeight="Bold"
|
||||
Click="LogoutButton_Click">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<iconPacks:PackIconMaterial Kind="Logout" Width="20" Margin="0,0,10,0"/>
|
||||
<TextBlock Text="Abmelden"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<Grid Grid.Row="1" Grid.Column="1" Margin="30">
|
||||
|
||||
<StackPanel Margin="0,0,0,25">
|
||||
<TextBlock Text="Flug suchen"
|
||||
FontSize="28"
|
||||
FontWeight="Bold"/>
|
||||
<TextBlock Text="Wählen Sie Datum und Strecke für Ihre Reservierung"
|
||||
FontSize="16"
|
||||
Foreground="#666"/>
|
||||
</StackPanel>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="180"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="180"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="180"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Content="Von:"/>
|
||||
<TextBox Grid.Column="1"/>
|
||||
|
||||
<Label Grid.Column="2" Content="Nach:"/>
|
||||
<TextBox Grid.Column="3"/>
|
||||
|
||||
<Label Grid.Column="4" Content="Abflugdatum:"/>
|
||||
<DatePicker Grid.Column="5"/>
|
||||
</Grid>
|
||||
|
||||
<Button Content="Flüge anzeigen"
|
||||
Width="200"
|
||||
Height="45"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="0,30,0,0"
|
||||
Click="SearchFlights_Click"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
28
SkyTeam/reservierungsSuche.xaml.cs
Normal file
28
SkyTeam/reservierungsSuche.xaml.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace SkyTeam
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for reservierungsSuche.xaml
|
||||
/// </summary>
|
||||
public partial class reservierungsSuche : Page
|
||||
{
|
||||
public reservierungsSuche()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user