comments und quellen hinzufugt

This commit is contained in:
younes elhaddoury
2026-03-05 12:32:01 +01:00
parent 04a18d3c50
commit 4a0f5dc0bd
15 changed files with 182 additions and 21 deletions

View File

@@ -26,11 +26,13 @@ namespace SkyTeam
private void LoadFlights()
{
// Source: Stack Overflow "What is the purpose of using WHERE 1=1 in SQL statements?"
// Link: https://stackoverflow.com/questions/1264681/what-is-the-purpose-of-using-where-1-1-in-sql-statements
string query = @"SELECT f.Id, f.Flugnummer, f.Abflugort AS 'From', f.Zielort AS 'To',
z.Modell AS Plane, f.Abflugdatum AS Date
FROM fluege f
JOIN flugzeuge z ON f.FlugzeugId = z.Id
WHERE 1=1";
WHERE 1=1";
if (!string.IsNullOrWhiteSpace(_fromCity))
{
@@ -86,9 +88,13 @@ namespace SkyTeam
return;
}
// Source: Stack Overflow "Get selected row item in DataGrid WPF"
// Link: https://stackoverflow.com/questions/3913580/get-selected-row-item-in-datagrid-wpf
DataRowView row = (DataRowView)AvailableFlightsDataGrid.SelectedItem;
int flightId = Convert.ToInt32(row["Id"]);
if (SessionManager.CurrentUserId == 0)
{
MessageBox.Show("Fehler: Nicht eingeloggt.");
@@ -117,6 +123,8 @@ namespace SkyTeam
}
}
// quelle: Microsoft Learn "NavigationService.Navigate Method"
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());