diff --git a/MauiAppStock/App.xaml.cs b/MauiAppStock/App.xaml.cs
index 7bb788a..f709f05 100644
--- a/MauiAppStock/App.xaml.cs
+++ b/MauiAppStock/App.xaml.cs
@@ -9,7 +9,7 @@ public partial class App : Application
{
InitializeComponent();
// On démarre sur MainPage dans une NavigationPage pour permettre la navigation
- MainPage = new NavigationPage(new MainPage());
+ MainPage = new AppShell();
InitializeDatabase();
}
diff --git a/MauiAppStock/AppShell.xaml b/MauiAppStock/AppShell.xaml
index 260140d..16d2bb4 100644
--- a/MauiAppStock/AppShell.xaml
+++ b/MauiAppStock/AppShell.xaml
@@ -6,5 +6,12 @@
xmlns:views="clr-namespace:MauiAppStock.Views"
Shell.FlyoutBehavior="Disabled"
Title="MauiAppStock">
-
+
+
+
+
+
+
+
+
diff --git a/MauiAppStock/AppShell.xaml.cs b/MauiAppStock/AppShell.xaml.cs
index 3729ae9..e0da968 100644
--- a/MauiAppStock/AppShell.xaml.cs
+++ b/MauiAppStock/AppShell.xaml.cs
@@ -7,7 +7,10 @@ public partial class AppShell : Shell
public AppShell()
{
InitializeComponent();
-
+ Routing.RegisterRoute(nameof(MainPage), typeof(MainPage));
+ Routing.RegisterRoute(nameof(AppareilsPage), typeof(AppareilsPage));
+ Routing.RegisterRoute(nameof(PiecesPage), typeof(PiecesPage));
+ Routing.RegisterRoute(nameof(SelectAppareilForAssociationPage), typeof(SelectAppareilForAssociationPage));
}
protected override void OnNavigating(ShellNavigatingEventArgs args)
{
diff --git a/MauiAppStock/Data/Database.cs b/MauiAppStock/Data/Database.cs
index 4330285..dbfae7f 100644
--- a/MauiAppStock/Data/Database.cs
+++ b/MauiAppStock/Data/Database.cs
@@ -95,35 +95,6 @@ namespace MauiAppStock.Data
return db.InsertAsync(appareilPiece);
}
- // CRUD pour MouvementStock
- public static Task AddMouvementStockAsync(MouvementStock mouvement)
- {
- return db.InsertAsync(mouvement);
- }
-
- public static Task> GetMouvementsStockAsync()
- {
- return db.Table().OrderByDescending(m => m.DateMouvement).ToListAsync();
- }
-
- public static async Task> GetMouvementsStockForPieceAsync(int pieceId)
- {
- return await db.Table()
- .Where(m => m.PieceId == pieceId)
- .OrderByDescending(m => m.DateMouvement)
- .ToListAsync();
- }
-
- public static Task UpdateMouvementStockAsync(MouvementStock mouvement)
- {
- return db.UpdateAsync(mouvement);
- }
-
- public static Task DeleteMouvementStockAsync(MouvementStock mouvement)
- {
- return db.DeleteAsync(mouvement);
- }
-
// Met à jour une association existante
public static Task UpdateAppareilPieceAsync(AppareilPiece appareilPiece)
{
diff --git a/MauiAppStock/Views/MainPage.xaml b/MauiAppStock/Views/MainPage.xaml
index ae39711..2f892d9 100644
--- a/MauiAppStock/Views/MainPage.xaml
+++ b/MauiAppStock/Views/MainPage.xaml
@@ -8,7 +8,6 @@
-