diff --git a/MainPage.xaml b/MainPage.xaml
index 9e50782..8c00611 100644
--- a/MainPage.xaml
+++ b/MainPage.xaml
@@ -21,5 +21,8 @@
+
diff --git a/MainPage.xaml.cs b/MainPage.xaml.cs
index 7d78e2f..c7c4233 100644
--- a/MainPage.xaml.cs
+++ b/MainPage.xaml.cs
@@ -2,6 +2,7 @@ using HegreHotel.Views;
using HegreHotel.Views.Chambre;
using HegreHotel.Views.Client;
using HegreHotel.Views.Reservation;
+using HegreHotel.Views.GestionDepart;
using Microsoft.Maui.Controls;
namespace HegreHotel
@@ -27,5 +28,10 @@ namespace HegreHotel
{
await Navigation.PushAsync(new ReservationsPage());
}
+
+ private async void OnGestionDepartClicked(object sender, EventArgs e)
+ {
+ await Navigation.PushAsync(new GestionDepartPage());
+ }
}
}
\ No newline at end of file
diff --git a/Views/GestionDepart/GestionDepartPage.xaml b/Views/GestionDepart/GestionDepartPage.xaml
new file mode 100644
index 0000000..dd43ff7
--- /dev/null
+++ b/Views/GestionDepart/GestionDepartPage.xaml
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Views/GestionDepart/GestionDepartPage.xaml.cs b/Views/GestionDepart/GestionDepartPage.xaml.cs
new file mode 100644
index 0000000..6e1351a
--- /dev/null
+++ b/Views/GestionDepart/GestionDepartPage.xaml.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using HegreHotel.Models;
+using Microsoft.Maui.Controls;
+using System.Collections.ObjectModel;
+using System.IO;
+using Microsoft.Maui.Storage;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HegreHotel.Views.GestionDepart;
+
+public partial class GestionDepartPage : ContentPage
+{
+ public ObservableCollection Reservations { get; set; } = new ObservableCollection();
+ public GestionDepartPage()
+ {
+ InitializeComponent();
+ LoadReservations();
+ }
+
+ private async void LoadReservations()
+ {
+ string dbPath = Path.Combine(FileSystem.AppDataDirectory, "HegreHotel.db3");
+ var db = SingletonConnection.GetInstance(dbPath);
+ var reservationList = await db.Table().ToListAsync();
+ Reservations.Clear();
+ foreach (var reservation in reservationList)
+ {
+ Reservations.Add(reservation);
+ }
+
+ GestionDepartListView.ItemsSource = Reservations;
+ GestionArriveListView.ItemsSource = Reservations;
+ }
+
+ private void GestionPage_OnAppearing(object? sender, EventArgs e)
+ {
+ LoadReservations();
+ }
+}
\ No newline at end of file