Compare commits
No commits in common. "main" and "feature/lucas" have entirely different histories.
main
...
feature/lu
@ -3,8 +3,14 @@
|
||||
x:Class="MauiAppStock.AppShell"
|
||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:local="clr-namespace:MauiAppStock"
|
||||
xmlns:views="clr-namespace:MauiAppStock.Views"
|
||||
Shell.FlyoutBehavior="Disabled"
|
||||
Title="MauiAppStock">
|
||||
|
||||
<ShellContent
|
||||
Title="Home"
|
||||
ContentTemplate="{DataTemplate views:MainPage}"
|
||||
Route="MainPage" />
|
||||
|
||||
</Shell>
|
||||
|
@ -1,19 +1,9 @@
|
||||
using MauiAppStock.Views;
|
||||
|
||||
namespace MauiAppStock;
|
||||
namespace MauiAppStock;
|
||||
|
||||
public partial class AppShell : Shell
|
||||
{
|
||||
public AppShell()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
protected override void OnNavigating(ShellNavigatingEventArgs args)
|
||||
{
|
||||
base.OnNavigating(args);
|
||||
|
||||
bool isMainPage = args.Target?.Location?.OriginalString == "//MainPage";
|
||||
Shell.SetBackButtonBehavior(this, new BackButtonBehavior { IsVisible = !isMainPage });
|
||||
}
|
||||
}
|
@ -20,7 +20,6 @@ namespace MauiAppStock.Data
|
||||
await db.CreateTableAsync<Appareil>();
|
||||
await db.CreateTableAsync<Piece>();
|
||||
await db.CreateTableAsync<AppareilPiece>(); // Table de liaison
|
||||
await db.CreateTableAsync<MouvementStock>();
|
||||
await db.CreateTableAsync<Fournisseur>();
|
||||
}
|
||||
}
|
||||
@ -96,35 +95,6 @@ namespace MauiAppStock.Data
|
||||
return db.InsertAsync(appareilPiece);
|
||||
}
|
||||
|
||||
// CRUD pour MouvementStock
|
||||
public static Task<int> AddMouvementStockAsync(MouvementStock mouvement)
|
||||
{
|
||||
return db.InsertAsync(mouvement);
|
||||
}
|
||||
|
||||
public static Task<List<MouvementStock>> GetMouvementsStockAsync()
|
||||
{
|
||||
return db.Table<MouvementStock>().OrderByDescending(m => m.DateMouvement).ToListAsync();
|
||||
}
|
||||
|
||||
public static async Task<List<MouvementStock>> GetMouvementsStockForPieceAsync(int pieceId)
|
||||
{
|
||||
return await db.Table<MouvementStock>()
|
||||
.Where(m => m.PieceId == pieceId)
|
||||
.OrderByDescending(m => m.DateMouvement)
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
public static Task<int> UpdateMouvementStockAsync(MouvementStock mouvement)
|
||||
{
|
||||
return db.UpdateAsync(mouvement);
|
||||
}
|
||||
|
||||
public static Task<int> DeleteMouvementStockAsync(MouvementStock mouvement)
|
||||
{
|
||||
return db.DeleteAsync(mouvement);
|
||||
}
|
||||
|
||||
// Met à jour une association existante
|
||||
public static Task<int> UpdateAppareilPieceAsync(AppareilPiece appareilPiece)
|
||||
{
|
||||
|
@ -63,17 +63,4 @@
|
||||
<PackageReference Include="sqlite-net-pcl" Version="1.10.196-beta" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<MauiXaml Update="Views\EditFournisseurPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</MauiXaml>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Views\EditFournisseurPage.xaml.cs">
|
||||
<DependentUpon>EditFournisseurPage.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -9,12 +9,5 @@ namespace MauiAppStock.Models
|
||||
public string Nom { get; set; }
|
||||
public string Description { get; set; }
|
||||
// Vous pouvez ajouter d'autres propriétés (stock, historique, etc.)
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{Nom}";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
using SQLite;
|
||||
|
||||
namespace MauiAppStock.Models
|
||||
{
|
||||
public class MouvementStock
|
||||
{
|
||||
[PrimaryKey, AutoIncrement]
|
||||
public int Id { get; set; }
|
||||
|
||||
public int PieceId { get; set; }
|
||||
|
||||
public DateTime DateMouvement { get; set; }
|
||||
|
||||
public TypeMouvement Type { get; set; }
|
||||
|
||||
public int Quantite { get; set; } // Number of parts moved
|
||||
|
||||
public string? Commentaire { get; set; }
|
||||
|
||||
[Ignore]
|
||||
public string NomPiece { get; set; }
|
||||
|
||||
[Ignore]
|
||||
public bool HasComment => !string.IsNullOrWhiteSpace(Commentaire);
|
||||
}
|
||||
|
||||
public enum TypeMouvement
|
||||
{
|
||||
EntreeStock, // Parts entering stock (purchase)
|
||||
SortieReparation // Parts used for repair
|
||||
}
|
||||
}
|
@ -6,17 +6,13 @@ namespace MauiAppStock.Models
|
||||
{
|
||||
[PrimaryKey, AutoIncrement]
|
||||
public int Id { get; set; }
|
||||
public string? Nom { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public string Nom { get; set; }
|
||||
public string Description { get; set; }
|
||||
public double Prix { get; set; }
|
||||
public int Stock { get; set; }
|
||||
public string? Fournisseur { get; set; }
|
||||
|
||||
// public int Appareil { get; set; }
|
||||
public string Fournisseur { get; set; }
|
||||
|
||||
[Ignore]
|
||||
public bool EstRecommandee { get; set; }
|
||||
|
||||
public string DetailView { get { return " ID : " + Id + @" - " + Description; } }
|
||||
}
|
||||
}
|
@ -15,9 +15,7 @@
|
||||
<ListView x:Name="AssociationsListView" ItemsSource="{Binding AppareilPieces}"
|
||||
IsPullToRefreshEnabled="True"
|
||||
RefreshCommand="{Binding LoadAssociationsCommand}"
|
||||
ItemTapped="OnAssociationTapped"
|
||||
HasUnevenRows="True"
|
||||
HeightRequest="500">
|
||||
ItemTapped="OnAssociationTapped">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ViewCell>
|
||||
|
@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage
|
||||
x:Class="MauiAppStock.Views.EditFournisseurPage"
|
||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
|
||||
|
||||
<StackLayout Padding="10">
|
||||
<Label Text="Modifier l'Appareil" FontSize="24" HorizontalOptions="Center"/>
|
||||
<Entry x:Name="NomEntry" Placeholder="Nom"/>
|
||||
<Entry x:Name="NumEntry" Placeholder="NumTel" Keyboard="Numeric"/>
|
||||
<Button Text="Enregistrer" Clicked="OnSaveClicked"/>
|
||||
<Button Text="Supprimer" Clicked="OnDeleteClicked" TextColor="Red"/>
|
||||
</StackLayout>
|
||||
</ContentPage>
|
@ -1,35 +0,0 @@
|
||||
using MauiAppStock.Models;
|
||||
using MauiAppStock.Data;
|
||||
|
||||
namespace MauiAppStock.Views
|
||||
{
|
||||
public partial class EditFournisseurPage : ContentPage
|
||||
{
|
||||
private Fournisseur _fournisseur;
|
||||
public EditFournisseurPage(Fournisseur fournisseur)
|
||||
{
|
||||
InitializeComponent();
|
||||
_fournisseur = fournisseur;
|
||||
NomEntry.Text = fournisseur.Nom;
|
||||
NumEntry.Text = fournisseur.Numtel;
|
||||
}
|
||||
|
||||
private async void OnSaveClicked(object sender, EventArgs e)
|
||||
{
|
||||
_fournisseur.Nom = NomEntry.Text;
|
||||
_fournisseur.Numtel = NumEntry.Text;
|
||||
await Database.UpdateFournisseursync(_fournisseur);
|
||||
await Navigation.PopAsync();
|
||||
}
|
||||
|
||||
private async void OnDeleteClicked(object sender, EventArgs e)
|
||||
{
|
||||
bool confirm = await DisplayAlert("Confirmation", "Voulez-vous vraiment supprimer ce fournisseur ?", "Oui", "Non");
|
||||
if (confirm)
|
||||
{
|
||||
await Database.DeleteFournisseurAsync(_fournisseur);
|
||||
await Navigation.PopAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -18,7 +18,7 @@
|
||||
<ListView x:Name="FournisseursListView" ItemsSource="{Binding Fournisseurs}"
|
||||
IsPullToRefreshEnabled="True"
|
||||
RefreshCommand="{Binding LoadFournisseursCommand}"
|
||||
ItemTapped="OnFournisseurTapped">
|
||||
>
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextCell Text="{Binding Nom}"/>
|
||||
|
@ -22,14 +22,5 @@ namespace MauiAppStock.Views
|
||||
// Navigation vers la page d'ajout
|
||||
await Navigation.PushAsync(new AddFournisseurPage());
|
||||
}
|
||||
|
||||
private async void OnFournisseurTapped(object sender, ItemTappedEventArgs e)
|
||||
{
|
||||
if (e.Item is Fournisseur selectedFournisseur)
|
||||
{
|
||||
// Navigation vers la page d'édition avec l'appareil sélectionné
|
||||
await Navigation.PushAsync(new EditFournisseurPage(selectedFournisseur));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -8,7 +8,6 @@
|
||||
<Button Text="Gestion des Pièces" BackgroundColor="Black" Clicked="OnPiecesClicked" />
|
||||
<Button Text="Gestion des Fournisseurs" BackgroundColor="Black" Clicked="OnFournisseursClicked" />
|
||||
<Button Text="Associer une Pièce à un Appareil" BackgroundColor="Black" Clicked="OnAssocierPieceClicked" />
|
||||
<Button Text="Mouvement de stock" BackgroundColor="Black" Clicked="OnMouvementStockClicked" />
|
||||
<VerticalStackLayout Padding="20" Spacing="20">
|
||||
<Image Source="logo.png"
|
||||
HeightRequest="200"
|
||||
|
@ -25,15 +25,11 @@ namespace MauiAppStock.Views
|
||||
await Navigation.PushAsync(new FournisseursPage());
|
||||
}
|
||||
|
||||
|
||||
private async void OnAssocierPieceClicked(object sender, EventArgs e)
|
||||
{
|
||||
// On navigue vers une page qui permet de sélectionner un appareil pour ensuite associer une pièce.
|
||||
await Navigation.PushAsync(new SelectAppareilForAssociationPage());
|
||||
}
|
||||
|
||||
private async void OnMouvementStockClicked(object sender, EventArgs e)
|
||||
{
|
||||
await Navigation.PushAsync(new MouvementStockPage());
|
||||
}
|
||||
}
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="MauiAppStock.Views.MouvementStockHistoryPage"
|
||||
Title="Historique des Mouvements">
|
||||
<Grid RowDefinitions="Auto,*">
|
||||
<VerticalStackLayout Grid.Row="0" Spacing="10" Padding="20">
|
||||
<Label Text="Historique des Mouvements de Stock"
|
||||
SemanticProperties.HeadingLevel="Level1"
|
||||
FontSize="24"
|
||||
HorizontalOptions="Center" />
|
||||
|
||||
<Picker x:Name="FilterPicker"
|
||||
Title="Filtrer par type"
|
||||
SelectedIndexChanged="OnFilterChanged">
|
||||
<Picker.Items>
|
||||
<x:String>Tous</x:String>
|
||||
<x:String>Entrée Stock</x:String>
|
||||
<x:String>Sortie Réparation</x:String>
|
||||
</Picker.Items>
|
||||
</Picker>
|
||||
</VerticalStackLayout>
|
||||
|
||||
<CollectionView Grid.Row="1"
|
||||
x:Name="MouvementsCollection"
|
||||
SelectionMode="None">
|
||||
<CollectionView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Frame Margin="10" Padding="10">
|
||||
<Grid ColumnDefinitions="*,Auto" RowDefinitions="Auto,Auto,Auto">
|
||||
<Label Text="{Binding NomPiece}"
|
||||
FontSize="16"
|
||||
FontAttributes="Bold"
|
||||
Grid.Column="0"
|
||||
Grid.Row="0"/>
|
||||
|
||||
<Label Text="{Binding DateMouvement, StringFormat='{0:dd/MM/yyyy HH:mm}'}"
|
||||
Grid.Column="1"
|
||||
Grid.Row="0"/>
|
||||
|
||||
<Label Text="{Binding Type, StringFormat='Type: {0}'}"
|
||||
Grid.Column="0"
|
||||
Grid.Row="1"/>
|
||||
|
||||
<Label Text="{Binding Quantite, StringFormat='Quantité: {0}'}"
|
||||
Grid.Column="1"
|
||||
Grid.Row="1"/>
|
||||
|
||||
<Label Text="{Binding Commentaire}"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Grid.Row="2"
|
||||
IsVisible="{Binding HasComment}"/>
|
||||
</Grid>
|
||||
</Frame>
|
||||
</DataTemplate>
|
||||
</CollectionView.ItemTemplate>
|
||||
</CollectionView>
|
||||
</Grid>
|
||||
</ContentPage>
|
@ -1,60 +0,0 @@
|
||||
using MauiAppStock.Models;
|
||||
using MauiAppStock.Data;
|
||||
|
||||
namespace MauiAppStock.Views;
|
||||
|
||||
public partial class MouvementStockHistoryPage : ContentPage
|
||||
{
|
||||
private List<MouvementStock> allMouvements;
|
||||
private List<Piece> pieces;
|
||||
|
||||
public MouvementStockHistoryPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
LoadData();
|
||||
}
|
||||
|
||||
private async void LoadData()
|
||||
{
|
||||
try
|
||||
{
|
||||
// Load all pieces to get their names
|
||||
pieces = await Database.GetPiecesAsync();
|
||||
|
||||
// Load all movements
|
||||
allMouvements = await Database.GetMouvementsStockAsync();
|
||||
|
||||
// Add piece names to movements
|
||||
foreach (var mouvement in allMouvements)
|
||||
{
|
||||
var piece = pieces.FirstOrDefault(p => p.Id == mouvement.PieceId);
|
||||
if (piece != null)
|
||||
{
|
||||
mouvement.NomPiece = piece.Nom;
|
||||
}
|
||||
}
|
||||
|
||||
// Display all movements initially
|
||||
MouvementsCollection.ItemsSource = allMouvements;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await DisplayAlert("Erreur", "Impossible de charger l'historique: " + ex.Message, "OK");
|
||||
}
|
||||
}
|
||||
|
||||
private void OnFilterChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (allMouvements == null) return;
|
||||
|
||||
var selectedIndex = FilterPicker.SelectedIndex;
|
||||
var filteredMouvements = selectedIndex switch
|
||||
{
|
||||
1 => allMouvements.Where(m => m.Type == TypeMouvement.EntreeStock).ToList(),
|
||||
2 => allMouvements.Where(m => m.Type == TypeMouvement.SortieReparation).ToList(),
|
||||
_ => allMouvements
|
||||
};
|
||||
|
||||
MouvementsCollection.ItemsSource = filteredMouvements;
|
||||
}
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="MauiAppStock.Views.MouvementStockPage"
|
||||
Title="Mouvement de Stock">
|
||||
<ScrollView>
|
||||
<VerticalStackLayout Spacing="10" Padding="20">
|
||||
<Label Text="Mouvement de Stock"
|
||||
SemanticProperties.HeadingLevel="Level1"
|
||||
FontSize="24"
|
||||
HorizontalOptions="Center" />
|
||||
|
||||
<Button Text="Voir l'historique"
|
||||
Clicked="OnViewHistoryClicked"
|
||||
HorizontalOptions="End" />
|
||||
|
||||
<Picker x:Name="TypeMouvementPicker"
|
||||
Title="Type de Mouvement">
|
||||
<Picker.Items>
|
||||
<x:String>Entrée Stock</x:String>
|
||||
<x:String>Sortie Réparation</x:String>
|
||||
</Picker.Items>
|
||||
</Picker>
|
||||
|
||||
<Picker x:Name="PiecePicker"
|
||||
Title="Sélectionner une pièce"
|
||||
ItemDisplayBinding="{Binding Nom}"
|
||||
SelectedIndexChanged="OnPieceSelected"/>
|
||||
|
||||
<Label Text="Quantité:"
|
||||
SemanticProperties.HeadingLevel="Level2"/>
|
||||
<Entry x:Name="QuantiteEntry"
|
||||
Keyboard="Numeric"
|
||||
Placeholder="Entrez la quantité"/>
|
||||
|
||||
<Label Text="Commentaire:"
|
||||
SemanticProperties.HeadingLevel="Level2"/>
|
||||
<Editor x:Name="CommentaireEditor"
|
||||
Placeholder="Ajouter un commentaire"
|
||||
HeightRequest="100"/>
|
||||
|
||||
<Button x:Name="SaveButton"
|
||||
Text="Enregistrer"
|
||||
SemanticProperties.Hint="Enregistre le mouvement de stock"
|
||||
Clicked="OnSaveClicked"
|
||||
HorizontalOptions="Center" />
|
||||
|
||||
<Button x:Name="CancelButton"
|
||||
Text="Annuler"
|
||||
SemanticProperties.Hint="Annule l'opération"
|
||||
Clicked="OnCancelClicked"
|
||||
HorizontalOptions="Center" />
|
||||
</VerticalStackLayout>
|
||||
</ScrollView>
|
||||
</ContentPage>
|
@ -1,101 +0,0 @@
|
||||
using MauiAppStock.Models;
|
||||
using MauiAppStock.Data;
|
||||
|
||||
namespace MauiAppStock.Views;
|
||||
|
||||
public partial class MouvementStockPage : ContentPage
|
||||
{
|
||||
private List<Piece> pieces;
|
||||
private Piece selectedPiece;
|
||||
|
||||
public MouvementStockPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
LoadData();
|
||||
}
|
||||
|
||||
private async void LoadData()
|
||||
{
|
||||
try
|
||||
{
|
||||
pieces = await Database.GetPiecesAsync();
|
||||
PiecePicker.ItemsSource = pieces;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await DisplayAlert("Erreur", "Impossible de charger les données: " + ex.Message, "OK");
|
||||
}
|
||||
}
|
||||
|
||||
private void OnPieceSelected(object sender, EventArgs e)
|
||||
{
|
||||
if (PiecePicker.SelectedItem != null)
|
||||
{
|
||||
selectedPiece = (Piece)PiecePicker.SelectedItem;
|
||||
}
|
||||
}
|
||||
|
||||
private async void OnViewHistoryClicked(object sender, EventArgs e)
|
||||
{
|
||||
await Navigation.PushAsync(new MouvementStockHistoryPage());
|
||||
}
|
||||
|
||||
private async void OnSaveClicked(object sender, EventArgs e)
|
||||
{
|
||||
if (selectedPiece == null)
|
||||
{
|
||||
await DisplayAlert("Erreur", "Veuillez sélectionner une pièce", "OK");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!int.TryParse(QuantiteEntry.Text, out int quantite) || quantite <= 0)
|
||||
{
|
||||
await DisplayAlert("Erreur", "Veuillez entrer une quantité valide", "OK");
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// Create new stock movement
|
||||
var mouvement = new MouvementStock
|
||||
{
|
||||
PieceId = selectedPiece.Id,
|
||||
DateMouvement = DateTime.Now,
|
||||
Type = TypeMouvementPicker.SelectedIndex == 0 ? TypeMouvement.EntreeStock : TypeMouvement.SortieReparation,
|
||||
Quantite = quantite,
|
||||
Commentaire = CommentaireEditor.Text
|
||||
};
|
||||
|
||||
// Update piece stock
|
||||
if (TypeMouvementPicker.SelectedIndex == 0)
|
||||
{
|
||||
selectedPiece.Stock += quantite;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (selectedPiece.Stock < quantite)
|
||||
{
|
||||
await DisplayAlert("Erreur", "Stock insuffisant", "OK");
|
||||
return;
|
||||
}
|
||||
selectedPiece.Stock -= quantite;
|
||||
}
|
||||
|
||||
// Save changes using Database class
|
||||
await Database.AddMouvementStockAsync(mouvement);
|
||||
await Database.UpdatePieceAsync(selectedPiece);
|
||||
|
||||
await DisplayAlert("Succès", "Mouvement de stock enregistré", "OK");
|
||||
await Navigation.PopAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await DisplayAlert("Erreur", "Impossible d'enregistrer le mouvement: " + ex.Message, "OK");
|
||||
}
|
||||
}
|
||||
|
||||
private async void OnCancelClicked(object sender, EventArgs e)
|
||||
{
|
||||
await Navigation.PopAsync();
|
||||
}
|
||||
}
|
@ -1,5 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage x:Class="MauiAppStock.Views.PiecesPage"
|
||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
@ -8,17 +7,17 @@
|
||||
<vm:PiecesViewModel />
|
||||
</ContentPage.BindingContext>
|
||||
<ContentPage.ToolbarItems>
|
||||
<ToolbarItem Text="+" Clicked="OnAddPieceClicked" />
|
||||
<ToolbarItem Text="+" Clicked="OnAddPieceClicked"/>
|
||||
</ContentPage.ToolbarItems>
|
||||
<StackLayout Padding="10">
|
||||
<Label Text="Liste des Pièces" FontSize="24" HorizontalOptions="Center" />
|
||||
<Label Text="Liste des Pièces" FontSize="24" HorizontalOptions="Center"/>
|
||||
<ListView x:Name="PiecesListView" ItemsSource="{Binding Pieces}"
|
||||
IsPullToRefreshEnabled="True"
|
||||
RefreshCommand="{Binding LoadPiecesCommand}"
|
||||
ItemTapped="OnPieceTapped">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextCell Text="{Binding Nom}" Detail="{Binding DetailView}" />
|
||||
<TextCell Text="{Binding Nom}" Detail="{Binding Description}"/>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
|
@ -3,7 +3,6 @@
|
||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
|
||||
<StackLayout Padding="10">
|
||||
|
||||
<Label Text="Sélectionnez un Appareil" FontSize="24" HorizontalOptions="Center" />
|
||||
<ListView x:Name="AppareilsListView" ItemTapped="OnAppareilTapped">
|
||||
<ListView.ItemTemplate>
|
||||
|
@ -10,11 +10,7 @@ namespace MauiAppStock.Views
|
||||
InitializeComponent();
|
||||
LoadAppareils();
|
||||
}
|
||||
protected override void OnAppearing()
|
||||
{
|
||||
base.OnAppearing();
|
||||
LoadAppareils(); // Rafraîchit la liste à chaque affichage
|
||||
}
|
||||
|
||||
private async void LoadAppareils()
|
||||
{
|
||||
var appareils = await Database.GetAppareilsAsync();
|
||||
@ -29,7 +25,5 @@ namespace MauiAppStock.Views
|
||||
await Navigation.PushAsync(new AppareilPiecesPage(selectedAppareil));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
99
README.md
99
README.md
@ -1,99 +0,0 @@
|
||||
# 📱 AppSAV – Application de Gestion de Stock SAV
|
||||
|
||||
AppSAV est une application mobile destinée à la gestion du stock de pièces détachées pour une entreprise spécialisée dans la réparation d’appareils. Elle permet à l’utilisateur de gérer efficacement les matériels, les pièces associées, ainsi que le suivi des mouvements de stock.
|
||||
|
||||
---
|
||||
|
||||
## ✨ Fonctionnalités principales
|
||||
|
||||
- 🔧 **Gestion des appareils**
|
||||
- Ajout, modification et suppression d'appareils.
|
||||
- Affectation d’un identifiant unique, d’un nom et d’un état à chaque appareil.
|
||||
|
||||
- 🔗 **Association des pièces détachées aux appareils**
|
||||
- Attribution de pièces à un appareil.
|
||||
- Indication des pièces recommandées.
|
||||
|
||||
- 🔍 **Recherche par appareil**
|
||||
- Trouver rapidement les pièces associées à un appareil.
|
||||
|
||||
- 📄 **Informations détaillées**
|
||||
- Détails sur les appareils (historique d’utilisation des pièces, etc.).
|
||||
- Détails sur les pièces (prix, stock, fournisseur…).
|
||||
|
||||
- 📦 **Gestion des pièces détachées**
|
||||
- Ajout, modification, suppression.
|
||||
- Gestion du stock.
|
||||
|
||||
- 📊 **Suivi des entrées/sorties**
|
||||
- Mouvements de stock avec commentaires (entrée, sortie, quantité, etc.).
|
||||
|
||||
- 🏭 **Gestion des fournisseurs**
|
||||
- Ajout, modification, suppression des fournisseurs.
|
||||
- Coordonnées de contact.
|
||||
|
||||
---
|
||||
|
||||
## 🛠️ Technologies utilisées
|
||||
|
||||
- 🧩 **.NET MAUI (.NET 8.0)**
|
||||
- 🗄️ **SQLite** (base de données locale)
|
||||
- 🖥️ **IDE** : Rider / Visual Studio
|
||||
- 🧪 Méthode agile : **Scrum**
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Installation
|
||||
|
||||
### Prérequis
|
||||
|
||||
- [.NET MAUI SDK](https://learn.microsoft.com/en-us/dotnet/maui/overview/) (version 8.0)
|
||||
- Android Emulator ou appareil physique
|
||||
- IDE compatible : JetBrains Rider ou Visual Studio 2022+
|
||||
- Git
|
||||
|
||||
### Instructions
|
||||
|
||||
```bash
|
||||
# Cloner le projet
|
||||
git clone https://gitea.btssio-poitiers.fr/brunetg/AppSAV.git
|
||||
cd AppSAV
|
||||
|
||||
# Restaurer les dépendances
|
||||
dotnet restore
|
||||
|
||||
# Lancer l’application
|
||||
dotnet build
|
||||
dotnet maui run --framework net8.0-android
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📁 Structure de projet
|
||||
|
||||
```
|
||||
/AppSAV
|
||||
├── Data/ # Contient les fichiers relatifs à la base de données
|
||||
├── Helpers/ # Contient une commande asynchrone qui contourne l'installation de CommunityToolKit
|
||||
├── Models/ # Contient les entités de l'application
|
||||
├── ViewModels/ # Contient la gestion de données de l'interface utilisateur
|
||||
└── Views/ # Contient les pages et le Code-Behind associé
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📄 Licence
|
||||
|
||||
Projet pédagogique réalisé dans le cadre de l'AP du S4 de BTS - SIO : SLAM (Lycée Aliénor d'Aquitaine) Session 2025.
|
||||
|
||||
---
|
||||
|
||||
## 👥 Auteurs
|
||||
|
||||
- **Axel BESBOT**
|
||||
- **Yann ASTIER**
|
||||
- **Giovanny BRUNET**
|
||||
- **Kylian BAYARD**
|
||||
- **Lucas RAGUENEAU**
|
||||
|
||||
Encadré par : *Louis BOUSSARIE* – *Romaric THIBAULT FERRAND*
|
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user