Compare commits

..

No commits in common. 'master' and 'PatchDeserialisation' have entirely different histories.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -45,7 +45,7 @@ $app->get('/Banque/', function(Request $request, Response $response){
$app->post('/Banque/FromId/', function(Request $request, Response $response,array $args){ $app->post('/Banque/FromId/', function(Request $request, Response $response,array $args){
$id = $request->getParsedBody()["id"]; $id = $request->getParsedBody()["id"];
$query = 'SELECT id, nomBanque FROM InscrBanque WHERE idInscrit=:id'; $query = 'SELECT * FROM Banque WHERE nom IN (SELECT nomBanque FROM InscrBanque WHERE idInscrit=:id)';
try{ try{
$db = new Database(); $db = new Database();

@ -155,14 +155,14 @@ namespace Data
} }
} }
public static async Task<List<BanqueInscrit>> GetBanqueAsync(string id) public static async Task<List<Banque>> GetBanqueAsync(string id)
{ {
var dataBody = new Dictionary<string, string> { { "id", id } }; var dataBody = new Dictionary<string, string> { { "id", id } };
HttpResponseMessage reponse = await cli.PostAsJsonAsync(POST_BANQUES_INSCRIT_DATA_URL, dataBody); HttpResponseMessage reponse = await cli.PostAsJsonAsync(POST_BANQUES_INSCRIT_DATA_URL, dataBody);
if (reponse.IsSuccessStatusCode) if (reponse.IsSuccessStatusCode)
{ {
return JsonConvert.DeserializeObject<List<BanqueInscrit>>(await reponse.Content.ReadAsStringAsync()); return JsonConvert.DeserializeObject<List<Banque>>(await reponse.Content.ReadAsStringAsync());
} }
else else
{ {
@ -290,7 +290,7 @@ namespace Data
var dataBody = new Dictionary<string, string> var dataBody = new Dictionary<string, string>
{ {
{ "compte", compte.Identifiant }, { "compte", compte.Identifiant },
{ "nom", operation.Nom }, { "nom", operation.IntituleOperation },
{ "montant", operation.Montant.ToString() }, { "montant", operation.Montant.ToString() },
{ "dateO", operation.DateOperation.ToString() }, { "dateO", operation.DateOperation.ToString() },
{ "methodePayement", operation.ModePayement.ToString() }, { "methodePayement", operation.ModePayement.ToString() },
@ -357,7 +357,7 @@ namespace Data
var dataBody = new Dictionary<string, string> var dataBody = new Dictionary<string, string>
{ {
{ "compte", compte.Identifiant }, { "compte", compte.Identifiant },
{ "nom", planification.Nom }, { "nom", planification.IntituleOperation },
{ "montant", planification.Montant.ToString() }, { "montant", planification.Montant.ToString() },
{ "dateO", planification.DateOperation.ToString() }, { "dateO", planification.DateOperation.ToString() },
{ "methodePayement", planification.ModePayement.ToString() }, { "methodePayement", planification.ModePayement.ToString() },
@ -423,7 +423,7 @@ namespace Data
var dataBody = new Dictionary<string, string> var dataBody = new Dictionary<string, string>
{ {
{ "compte", compte.Identifiant }, { "compte", compte.Identifiant },
{ "nom", echeance.Nom }, { "nom", echeance.IntituleOperation },
{ "montant", echeance.Montant.ToString() }, { "montant", echeance.Montant.ToString() },
{ "dateO", echeance.DateOperation.ToString() }, { "dateO", echeance.DateOperation.ToString() },
{ "methodePayement", echeance.ModePayement.ToString() }, { "methodePayement", echeance.ModePayement.ToString() },

@ -20,9 +20,6 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="Npgsql" Version="6.0.7" /> <PackageReference Include="Npgsql" Version="6.0.7" />
<PackageReference Include="Syncfusion.Maui.Charts" Version="20.4.43" />
<PackageReference Include="Syncfusion.Maui.Inputs" Version="20.4.43" />
<PackageReference Include="Syncfusion.Maui.ListView" Version="20.4.43" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

@ -56,7 +56,7 @@ namespace Data
{ {
return await ClientAPI.DeleteBanqueInscritAsync(banque.Nom, inscrit.Id.ToString()); return await ClientAPI.DeleteBanqueInscritAsync(banque.Nom, inscrit.Id.ToString());
} }
public async Task<IList<BanqueInscrit>> RecupererBanques(Inscrit inscrit) public async Task<IList<Banque>> RecupererBanques(Inscrit inscrit)
{ {
return await ClientAPI.GetBanqueAsync(inscrit.Id.ToString()); return await ClientAPI.GetBanqueAsync(inscrit.Id.ToString());
} }
@ -75,9 +75,9 @@ namespace Data
{ {
return await ClientAPI.DeleteCompteInscritAsync(compte.Nom, inscrit.Id.ToString()); return await ClientAPI.DeleteCompteInscritAsync(compte.Nom, inscrit.Id.ToString());
} }
public async Task<IList<Compte>> RecupererCompte(BanqueInscrit banque) public async Task<IList<Compte>> RecupererCompte(Banque banque, Inscrit inscrit)
{ {
return await ClientAPI.GetCompteAsync(banque.Id.ToString()); return await ClientAPI.GetCompteAsync(inscrit.Id.ToString());
} }
@ -88,7 +88,7 @@ namespace Data
} }
public async Task<bool> SupprimerOperation(Compte compte, Operation operation) public async Task<bool> SupprimerOperation(Compte compte, Operation operation)
{ {
return await ClientAPI.DeleteOperationInscritAsync(compte.Identifiant, operation.Nom); return await ClientAPI.DeleteOperationInscritAsync(compte.Identifiant, operation.IntituleOperation);
} }
public async Task<IList<Operation>> RecupererOperation(Compte compte) public async Task<IList<Operation>> RecupererOperation(Compte compte)
{ {
@ -103,7 +103,7 @@ namespace Data
} }
public async Task<bool> SupprimerPlanification(Compte compte, Planification planification) public async Task<bool> SupprimerPlanification(Compte compte, Planification planification)
{ {
return await ClientAPI.DeletePlanificationInscritAsync(compte.Identifiant, planification.Nom); return await ClientAPI.DeletePlanificationInscritAsync(compte.Identifiant, planification.IntituleOperation);
} }
public async Task<IList<Planification>> RecupererPlanification(Compte compte) public async Task<IList<Planification>> RecupererPlanification(Compte compte)
{ {
@ -117,7 +117,7 @@ namespace Data
} }
public async Task<bool> SupprimerEcheance(Compte compte, Echeance echeance) public async Task<bool> SupprimerEcheance(Compte compte, Echeance echeance)
{ {
return await ClientAPI.DeleteEcheanceInscritAsync(compte.Identifiant, echeance.Nom); return await ClientAPI.DeleteEcheanceInscritAsync(compte.Identifiant, echeance.IntituleOperation);
} }
public async Task<IList<Echeance>> RecupererEcheance(Compte compte) public async Task<IList<Echeance>> RecupererEcheance(Compte compte)
{ {

@ -201,7 +201,7 @@ namespace Data
throw new NotImplementedException(); throw new NotImplementedException();
} }
public Task<IList<BanqueInscrit>> RecupererBanques(Inscrit inscrit) public Task<IList<Banque>> RecupererBanques(Inscrit inscrit)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
@ -211,7 +211,7 @@ namespace Data
throw new NotImplementedException(); throw new NotImplementedException();
} }
public Task<IList<Compte>> RecupererCompte(BanqueInscrit banque) public Task<IList<Compte>> RecupererCompte(Banque banque, Inscrit inscrit)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

@ -69,7 +69,7 @@ CREATE TABLE Echeancier
methodePayement varchar(20), methodePayement varchar(20),
isDebit boolean, isDebit boolean,
tag varchar(30), tag varchar(30),
CONSTRAINT ck_methEch CHECK (methodePayement IN ('None','CB','Espece','Cheque','Virement', 'Prevelement')), CONSTRAINT ck_methEch CHECK (methodePayement IN ('Cb','Esp','Chq','Vir','Pre', 'None')),
CONSTRAINT ck_tagEch CHECK (tag IN ('Alimentaire','Carburant','Habitation','Energie','Telephonie','Loisir','Restauration','Divers','Transport','Transaction','Santé')), CONSTRAINT ck_tagEch CHECK (tag IN ('Alimentaire','Carburant','Habitation','Energie','Telephonie','Loisir','Restauration','Divers','Transport','Transaction','Santé')),
FOREIGN KEY(compte) REFERENCES Compte(id) FOREIGN KEY(compte) REFERENCES Compte(id)
); );
@ -85,7 +85,7 @@ CREATE TABLE Operation
isDebit boolean, isDebit boolean,
fromBanque boolean, fromBanque boolean,
tag varchar(30), tag varchar(30),
CONSTRAINT ck_methOpe CHECK (methodePayement IN ('None','CB','Espece','Cheque','Virement', 'Prevelement')), CONSTRAINT ck_methOpe CHECK (methodePayement IN ('Cb','Esp','Chq','Vir','Pre', 'None')),
CONSTRAINT ck_tagOpe CHECK (tag IN ('Alimentaire','Carburant','Habitation','Energie','Telephonie','Loisir','Restauration','Divers','Transport','Transaction','Santé')), CONSTRAINT ck_tagOpe CHECK (tag IN ('Alimentaire','Carburant','Habitation','Energie','Telephonie','Loisir','Restauration','Divers','Transport','Transaction','Santé')),
FOREIGN KEY(compte) REFERENCES Compte(id) FOREIGN KEY(compte) REFERENCES Compte(id)
); );
@ -100,7 +100,7 @@ CREATE TABLE Planification
methodePayement varchar(20), methodePayement varchar(20),
isDebit boolean, isDebit boolean,
tag varchar(30), tag varchar(30),
CONSTRAINT ck_methPla CHECK (methodePayement IN ('None','CB','Espece','Cheque','Virement', 'Prevelement')), CONSTRAINT ck_methPla CHECK (methodePayement IN ('Cb','Esp','Chq','Vir','Pre', 'None')),
CONSTRAINT ck_tagPla CHECK (tag IN ('Alimentaire','Carburant','Habitation','Energie','Telephonie','Loisir','Restauration','Divers','Transport','Transaction','Santé')), CONSTRAINT ck_tagPla CHECK (tag IN ('Alimentaire','Carburant','Habitation','Energie','Telephonie','Loisir','Restauration','Divers','Transport','Transaction','Santé')),
FOREIGN KEY(compte) REFERENCES Compte(id) FOREIGN KEY(compte) REFERENCES Compte(id)
); );

@ -14,7 +14,7 @@
<ShellContent Title="Opérations" <ShellContent Title="Opérations"
Icon="dollar_black.png" Icon="dollar_black.png"
ContentTemplate="{DataTemplate local:Operations}" /> ContentTemplate="{DataTemplate local:Operations}" />
<ShellContent Title="Echeance" <ShellContent Title="Planification"
Icon="planification_black.png" Icon="planification_black.png"
ContentTemplate="{DataTemplate local:Planification}" /> ContentTemplate="{DataTemplate local:Planification}" />
<ShellContent Title="Paramètres" <ShellContent Title="Paramètres"

@ -4,7 +4,7 @@
x:Class="IHM.Desktop.CV_AddPlanification"> x:Class="IHM.Desktop.CV_AddPlanification">
<Grid BackgroundColor="{StaticResource Tertiary}"> <Grid BackgroundColor="{StaticResource Secondary}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
@ -13,8 +13,6 @@
<RowDefinition Height="2*"/> <RowDefinition Height="2*"/>
<RowDefinition Height="2*"/> <RowDefinition Height="2*"/>
<RowDefinition Height="2*"/> <RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@ -25,26 +23,20 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Planification d'une échéance" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}"/>
<Label Text="Planification d'une échéance" Grid.Column="0" HorizontalOptions="Center" Grid.Row="0" Grid.ColumnSpan="5" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
<Label Text="Nom" Grid.Column="1" Grid.Row="2" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Nom" Grid.Column="1" Grid.Row="2" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Type" Grid.Column="1" Grid.Row="4" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Type" Grid.Column="1" Grid.Row="4" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Tag" Grid.Column="1" Grid.Row="5" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Date" Grid.Column="1" Grid.Row="5" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Date" Grid.Column="1" Grid.Row="6" Style="{StaticResource TitreWindows}" Margin="20"/>
<Entry Placeholder="Entrez un nom" Grid.Column="3" Grid.Row="2" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="name" IsTextPredictionEnabled="True"/>
<Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="montant"/>
<Entry Placeholder="Entrez un moyen de paiement" Grid.Column="3" Grid.Row="4" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="type"/>
<Entry Placeholder="Entrez une catégorie" Grid.Column="3" Grid.Row="5" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="tag"/>
<DatePicker Grid.Column="3" Grid.Row="6" BackgroundColor="{StaticResource Secondary}" Margin="20" x:Name="date"/>
<Entry Placeholder="Entrez un nom" Grid.Column="3" Grid.Row="2" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Entry Placeholder="Entrez un type de transaction" Grid.Column="3" Grid.Row="4" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<DatePicker Grid.Column="3" Grid.Row="5" BackgroundColor="{StaticResource Secondary}" Margin="20"/>
<Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="7" Style="{StaticResource WindowsButton2}"/> <Button Text="ANNULER" Clicked="annuler_button" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
<Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="7" Style="{StaticResource WindowsButton}"/> <Button Text="VALIDER" Clicked="annuler_button" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
</Grid> </Grid>

@ -1,58 +1,17 @@
using Model;
namespace IHM.Desktop; namespace IHM.Desktop;
public partial class CV_AddPlanification : ContentView public partial class CV_AddPlanification : ContentView
{ {
public Manager Mgr => (App.Current as App).Manager;
public CV_AddPlanification() public CV_AddPlanification()
{ {
InitializeComponent(); InitializeComponent();
Mgr.LoadBanque();
Mgr.LoadCompte();
BindingContext = Mgr;
}
private void Button_Annuler(object sender, EventArgs e)
{
Navigation.PushAsync(new Dashboard());
}
private void Button_Valider(object sender, EventArgs e)
{
string nom = name.Text;
double Montant = Double.Parse(montant.Text);
string Type = type.Text;
string Tag = tag.Text;
DateTime Date = date.Date;
TagOperation to2 = new TagOperation();
MethodePayement mp2 = new MethodePayement();
foreach (string mp in Enum.GetNames(typeof(MethodePayement)))
{
if (Equals(Type, mp))
{
mp2 = (MethodePayement)Enum.Parse(typeof(MethodePayement), Type);
}
} }
foreach (string to in Enum.GetNames(typeof(TagOperation))) private void annuler_button(object sender, EventArgs e)
{
if (Equals(Tag, to))
{ {
to2 = (TagOperation)Enum.Parse(typeof(TagOperation), Tag);
}
}
Model.Planification planification = new(nom, Montant, Date, mp2, to2,false);
Mgr.ajouterPlanification(Mgr.SelectedCompte, planification);
Navigation.PushAsync(new Dashboard());
} }
} }

@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:inputs="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs"
x:Class="IHM.Desktop.CV_DeletePlanification"> x:Class="IHM.Desktop.CV_DeletePlanification">
<Grid BackgroundColor="{StaticResource Secondary}">
<Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
@ -24,20 +21,17 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Supprimer une planification" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
<Label Text="Selectionner la planification" Grid.ColumnSpan="3" Grid.Column="0" Grid.Row="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
<Label Text="Supprimer une planification" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}"/>
<Label Text="Nom" Grid.Column="1" Grid.Row="2" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Type" Grid.Column="1" Grid.Row="4" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Date" Grid.Column="1" Grid.Row="5" Style="{StaticResource TitreWindows}" Margin="20"/>
<inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding SelectedCompte.LesPla}" Grid.Column="3" Grid.Row="3" x:Name="recup"/>
<Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="5" Style="{StaticResource WindowsButton2}"/>
<Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="5" Style="{StaticResource WindowsButton}"/>
<Button Text="ANNULER" Clicked="Button_Clicked" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
<Button Text="VALIDER" Clicked="Button_Clicked_1" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
</Grid> </Grid>
</ContentView> </ContentView>

@ -1,29 +1,19 @@
using Model;
namespace IHM.Desktop; namespace IHM.Desktop;
public partial class CV_DeletePlanification : ContentView public partial class CV_DeletePlanification : ContentView
{ {
public Manager Mgr => (App.Current as App).Manager;
public CV_DeletePlanification() public CV_DeletePlanification()
{ {
InitializeComponent(); InitializeComponent();
Mgr.LoadBanque();
Mgr.LoadCompte();
BindingContext = Mgr;
} }
private void Button_Annuler(object sender, EventArgs e) private void Button_Clicked(object sender, EventArgs e)
{ {
Navigation.PushAsync(new Dashboard());
} }
private void Button_Valider(object sender, EventArgs e) private void Button_Clicked_1(object sender, EventArgs e)
{ {
var s = recup.SelectedItem;
Model.Planification planification = (Model.Planification)s;
Mgr.supprimerPlanification(Mgr.SelectedCompte, planification);
Navigation.PushAsync(new Dashboard());
} }
} }

@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:inputs="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs"
x:Class="IHM.Desktop.CV_EnregistrerEcheance"> x:Class="IHM.Desktop.CV_EnregistrerEcheance">
<Grid BackgroundColor="{StaticResource Secondary}">
<Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
@ -24,19 +21,22 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Enregistrer une échéance" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
<Label Text="Selectionner l'échéance" Grid.ColumnSpan="3" Grid.Column="0" Grid.Row="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
<Label Text="Enregistrer une échéance" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}"/>
<Label Text="Nom" Grid.Column="1" Grid.Row="2" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Type" Grid.Column="1" Grid.Row="4" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Date" Grid.Column="1" Grid.Row="5" Style="{StaticResource TitreWindows}" Margin="20"/>
<inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding SelectedCompte.LesEch}" Grid.Column="3" Grid.Row="3" x:Name="recup"/>
<Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="5" Style="{StaticResource WindowsButton2}"/>
<Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="5" Style="{StaticResource WindowsButton}"/>
<Entry Placeholder="Entrez un nom" Grid.Column="3" Grid.Row="2" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Entry Placeholder="Entrez un type de transaction" Grid.Column="3" Grid.Row="4" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<DatePicker Grid.Column="3" Grid.Row="5" BackgroundColor="{StaticResource Secondary}" Margin="20"/>
<Button Text="ANNULER" Clicked="Button_Clicked" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
<Button Text="VALIDER" Clicked="Button_Clicked_1" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
</Grid> </Grid>
</ContentView> </ContentView>

@ -1,35 +1,19 @@
using Model;
namespace IHM.Desktop; namespace IHM.Desktop;
public partial class CV_EnregistrerEcheance : ContentView public partial class CV_EnregistrerEcheance : ContentView
{ {
public Manager Mgr => (App.Current as App).Manager;
public CV_EnregistrerEcheance() public CV_EnregistrerEcheance()
{ {
InitializeComponent(); InitializeComponent();
Mgr.LoadBanque();
Mgr.LoadCompte();
BindingContext = Mgr;
} }
private void Button_Annuler(object sender, EventArgs e) private void Button_Clicked(object sender, EventArgs e)
{ {
Navigation.PushAsync(new Dashboard());
} }
private void Button_Valider(object sender, EventArgs e) private void Button_Clicked_1(object sender, EventArgs e)
{ {
var s = recup.SelectedItem;
Echeance ech = (Echeance)s;
Operation operation = new Operation(ech.Nom, ech.Montant, ech.DateOperation, ech.ModePayement,ech.Tag,ech.IsDebit);
Mgr.effectuerOperation(Mgr.SelectedCompte, operation);
Mgr.supprimerEcheance(Mgr.SelectedCompte, ech);
Navigation.PushAsync(new Dashboard());
} }
} }

@ -2,152 +2,22 @@
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Desktop.CV_HomePage"> x:Class="IHM.Desktop.CV_HomePage">
<Border Stroke="{StaticResource Yellow100Accent}" StrokeThickness="4" Margin="10" StrokeShape="RoundRectangle 45,5,5,45">
<Grid BackgroundColor="{StaticResource Tertiary}"> <Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.1*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Label Grid.Row="1"
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> Text="Bienvenue sur CONS'ECO"
FontSize="Large"
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontAttributes="Bold"
Text="BANQUE"
VerticalOptions="Center" VerticalOptions="Center"
HorizontalOptions="Center" HorizontalOptions="Center"
Style="{StaticResource TitreWindows}"
/> />
<HorizontalStackLayout Grid.Row="1" Grid.ColumnSpan="2" HorizontalOptions="Center" >
<Picker Title="Choisir une Banque"
TitleColor="Black"
TextColor="Black"
ItemsSource="{Binding ListeDesBanques}"
ItemDisplayBinding="{Binding Name}"
SelectedItem="{Binding SelectedBanque}"
Margin="0,0,30,0"/>
<Picker Title="Choisir un Compte"
ItemsSource="{Binding ListeDesComptes}"
ItemDisplayBinding="{Binding Nom}"
SelectedItem="{Binding SelectedCompte}"
Margin="30,0,0,0"/>
</HorizontalStackLayout>
<Label Grid.Row="2" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2"
HorizontalOptions="Center"
Text="Réactualiser mes banques :"
FontSize="20"
TextColor="Black"/>
<ContentView Grid.Row="3" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2" >
<CollectionView Grid.Row="2" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2" ItemsSource="{Binding ListeDesBanques}" >
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.75*"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1.5*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Text="{Binding Name}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"
TextColor="Black"/>
<ImageButton Grid.Column="2" Source="reload_banks.png"
Padding="10" Margin="5"
CornerRadius="10" HeightRequest="45"
BackgroundColor="{StaticResource Primary}"/>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</ContentView>
<Label Grid.Row="4" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2"
HorizontalOptions="Center"
Text="Ajouter une banque :"
FontSize="20"
TextColor="Black"/>
<ScrollView Grid.Row="5" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2" Scale="0.8">
<VerticalStackLayout>
<Border Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3"
BackgroundColor="{StaticResource Tertiary}"
StrokeShape="RoundRectangle 20" Margin="10">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.75*"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Text="Importer depuis un fichier" TextColor="Black"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<ImageButton Grid.Column="2" Source="import_from_file.png"
Padding="10" Margin="5"
CornerRadius="10" HeightRequest="65"
BackgroundColor="{StaticResource Primary}"
Clicked="ImportOFX_Clicked"/>
</Grid>
</Border>
<CollectionView ItemsSource="{Binding BanquesDisponibleInApp}">
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.75*"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Text="{Binding Nom}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"
TextColor="Black"/>
<ImageButton Grid.Column="2" Source="add_new_banks.png"
Padding="10" Margin="5"
CornerRadius="10" HeightRequest="65"
BackgroundColor="{StaticResource Primary}"
Clicked="AddBanque_Clicked"/>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</VerticalStackLayout>
</ScrollView>
</Grid> </Grid>
</Border>
</ContentView> </ContentView>

@ -1,30 +1,9 @@
using Model;
namespace IHM.Desktop; namespace IHM.Desktop;
public partial class CV_HomePage : ContentView public partial class CV_HomePage : ContentView
{ {
public Manager Mgr => (App.Current as App).Manager;
public CV_HomePage() public CV_HomePage()
{ {
InitializeComponent(); InitializeComponent();
Mgr.LoadBanque();
Mgr.LoadCompte();
Mgr.LoadBanqueDispo();
BindingContext = Mgr;
}
private void ImportOFX_Clicked(object sender, EventArgs e)
{
}
private void AddBanque_Clicked(object sender, EventArgs e)
{
} }
} }

@ -3,51 +3,21 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Desktop.CV_Log"> x:Class="IHM.Desktop.CV_Log">
<Border Stroke="{StaticResource Gray100}" StrokeThickness="4" Margin="10" StrokeShape="RoundRectangle 45,5,5,45"> <Grid BackgroundColor="{StaticResource Yellow200Accent}">
<Grid BackgroundColor="{StaticResource Yellow100Accent}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Label Grid.Row="0"
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
Text="Compte utilisateur"
FontSize="Large"
<Label FontAttributes="Bold"
Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="4"
VerticalOptions="Center" VerticalOptions="Center"
Style="{StaticResource TitreWindows}" HorizontalOptions="Center"
Text="GESTION DU COMPTE" />
HorizontalOptions="Center"/>
<Label Text="Nom" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Style="{StaticResource TitreWindows}"/>
<Label Grid.ColumnSpan="2" Grid.Column="2" Grid.Row="2" Style="{StaticResource TitreWindows}" Text="{Binding Nom}"/>
<Label Text="Prenom" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Style="{StaticResource TitreWindows}"/>
<Label Grid.ColumnSpan="2" Grid.Column="2" Grid.Row="3" Style="{StaticResource TitreWindows}" Text="{Binding Prenom}"/>
<Label Text="Email" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="2" Style="{StaticResource TitreWindows}"/>
<Label Grid.ColumnSpan="2" Grid.Column="2" Grid.Row="4" Style="{StaticResource TitreWindows}" Text="{Binding Mail}"/>
<Button Text="QUITTER" Clicked="Button_Quitter" Grid.Column="6" Grid.Row="0" Margin="25" Style="{StaticResource WindowsButton2}"/>
</Grid> </Grid>
</Border>
</ContentView> </ContentView>

@ -1,21 +1,9 @@
using Model;
namespace IHM.Desktop; namespace IHM.Desktop;
public partial class CV_Log : ContentView public partial class CV_Log : ContentView
{ {
public Manager Mgr => (App.Current as App).Manager;
public CV_Log() public CV_Log()
{ {
InitializeComponent(); InitializeComponent();
BindingContext = Mgr.User;
}
private void Button_Quitter(object sender, EventArgs e)
{
Microsoft.Maui.Controls.Application.Current?.CloseWindow(Microsoft.Maui.Controls.Application.Current.MainPage.Window);
} }
} }

@ -3,15 +3,12 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Desktop.CV_Planification"> x:Class="IHM.Desktop.CV_Planification">
<Border Stroke="{StaticResource Yellow100Accent}" StrokeThickness="4" Margin="10" StrokeShape="RoundRectangle 45,5,5,45"> <Grid>
<Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="0.5*"/> <RowDefinition Height="0.5*"/>
<RowDefinition Height="0.75*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="5*"/>
<RowDefinition Height="0.7*"/> <RowDefinition Height="0.7*"/>
<RowDefinition Height="5*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@ -19,14 +16,12 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackLayout Grid.Row="0" Grid.ColumnSpan="2">
<Label <Label
Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
Style="{StaticResource TitreWindows}" Style="{StaticResource TitreWindows}"
Text="PLANIFICATION" Text="PLANIFICATION"
HorizontalOptions="Center" HorizontalOptions="Center"/>
VerticalOptions="Center"/> </StackLayout>
<Button <Button
Clicked="Button_Clicked" Clicked="Button_Clicked"
@ -43,32 +38,10 @@
Style="{StaticResource WindowsButton}"/> Style="{StaticResource WindowsButton}"/>
<Border Stroke="{StaticResource Secondary}" Margin="10,0,10,0" Padding="3" StrokeThickness="4" StrokeShape="RoundRectangle 45,5,5,45" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4">
<Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4"> <ContentView BackgroundColor="{StaticResource Yellow300Accent}" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="4" Grid.RowSpan="2" x:Name="windowAjout">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> <CollectionView ItemsSource="{Binding}" Grid.Row="2" Grid.ColumnSpan="4" Grid.RowSpan="2">
<Label Text="Nom" Grid.Column="0" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="Date" Grid.Column="1" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="Moyen de Paiement" Grid.Column="2" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="Tag" Grid.Column="3" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="Montant" Grid.Column="4" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
</Grid>
</Border>
<ContentView Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="4" Grid.RowSpan="2" Margin="10,0,10,0">
<CollectionView ItemsSource="{Binding SelectedCompte.LesPla }" Grid.Row="3" Grid.ColumnSpan="4" Grid.RowSpan="2">
<CollectionView.ItemTemplate> <CollectionView.ItemTemplate>
@ -85,13 +58,13 @@
<Label Grid.Column="0" Text="{Binding Nom}" <Label Grid.Column="0" Text="{Binding IntituleOperation}"
TextColor="{StaticResource Secondary}" TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body" FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center" HorizontalOptions="Center"
VerticalOptions="Center"/> VerticalOptions="Center"/>
<Label Grid.Column="1" Text="{Binding DateOperation, StringFormat='{0:d}'}" <Label Grid.Column="1" Text="{Binding DateOperation}"
TextColor="{StaticResource Secondary}" TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body" FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center" HorizontalOptions="Center"
@ -126,28 +99,12 @@
<ContentView Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="5" x:Name="windowAjout" Margin="10,0,10,0">
</ContentView>
<Border Stroke="{StaticResource Secondary}" BackgroundColor="{StaticResource Yellow100Accent}" Margin="10,10,10,10" Padding="3" StrokeThickness="4" StrokeShape="RoundRectangle 45,5,5,45" Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="4">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="6*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label Text="TOTAL" Grid.Column="0" Grid.ColumnSpan="2" HorizontalOptions="Center" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="{Binding SelectedCompte.Solde}" Grid.Column="1" Grid.ColumnSpan="2" HorizontalOptions="Center" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="€" Grid.Column="1" Grid.ColumnSpan="2" HorizontalOptions="End" Margin="0,0,50,0" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
</Grid>
</Border>
</Grid> </Grid>
</Border>
</ContentView> </ContentView>

@ -10,14 +10,36 @@ public partial class CV_Planification : ContentView
public Manager Mgr => (App.Current as App).Manager; public Manager Mgr => (App.Current as App).Manager;
List<Planification> planification;
public CV_Planification() public CV_Planification()
{ {
InitializeComponent(); InitializeComponent();
Mgr.LoadBanque(); planification = new List<Planification>();
Mgr.LoadCompte();
/*planification.Add(new("Eau", 55, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
BindingContext = Mgr; planification.Add(new("Amazon", 103.30, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
planification.Add(new("Mutuelle", 38.50, DateTime.Now, MethodePayement.Prevelement, TagOperation.Santé, true));
planification.Add(new("Loyer", 500, DateTime.Now, MethodePayement.Virement, TagOperation.Habitation, true));
planification.Add(new("Eau", 55, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
planification.Add(new("Amazon", 103.30, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
planification.Add(new("Mutuelle", 38.50, DateTime.Now, MethodePayement.Prevelement, TagOperation.Santé, true));
planification.Add(new("Loyer", 500, DateTime.Now, MethodePayement.Virement, TagOperation.Habitation, true));
planification.Add(new("Eau", 55, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
planification.Add(new("Amazon", 103.30, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
planification.Add(new("Mutuelle", 38.50, DateTime.Now, MethodePayement.Prevelement, TagOperation.Santé, true));
planification.Add(new("Loyer", 500, DateTime.Now, MethodePayement.Virement, TagOperation.Habitation, true));
planification.Add(new("Eau", 55, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
planification.Add(new("Amazon", 103.30, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
planification.Add(new("Mutuelle", 38.50, DateTime.Now, MethodePayement.Prevelement, TagOperation.Santé, true));
planification.Add(new("Loyer", 500, DateTime.Now, MethodePayement.Virement, TagOperation.Habitation, true));
planification.Add(new("Eau", 55, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
planification.Add(new("Amazon", 103.30, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
planification.Add(new("Mutuelle", 38.50, DateTime.Now, MethodePayement.Prevelement, TagOperation.Santé, true));
planification.Add(new("Loyer", 500, DateTime.Now, MethodePayement.Virement, TagOperation.Habitation, true));
*/
BindingContext = planification;
} }

@ -1,19 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:chart="clr-namespace:Syncfusion.Maui.Charts;assembly=Syncfusion.Maui.Charts"
xmlns:model="clr-namespace:IHM.Desktop"
x:Class="IHM.Desktop.CV_Statistiques"> x:Class="IHM.Desktop.CV_Statistiques">
<Border Stroke="{StaticResource Yellow100Accent}" StrokeThickness="4" Margin="10" StrokeShape="RoundRectangle 45,5,5,45"> <Grid>
<Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="0.5*"/> <RowDefinition Height="0.5*"/>
<RowDefinition Height="0.75*"/> <RowDefinition Height="0.7*"/>
<RowDefinition Height="5*"/> <RowDefinition Height="5*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
@ -23,19 +17,18 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackLayout Grid.Row="0" Grid.ColumnSpan="2">
<Label <Label
Grid.Row="0" Grid.ColumnSpan="2"
Style="{StaticResource TitreWindows}" Style="{StaticResource TitreWindows}"
Text="STATISTIQUES" Text="STATISTIQUES"
VerticalOptions="Center"
HorizontalOptions="Center"/> HorizontalOptions="Center"/>
</StackLayout>
<ContentView Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Grid.RowSpan="3" Margin="15" x:Name="windowAjout"> <ContentView Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Grid.RowSpan="3" Margin="15" x:Name="windowAjout">
<Grid > <Grid BackgroundColor="{StaticResource Yellow300Accent}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
@ -53,80 +46,8 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- <Switch IsToggled="true" Grid.Column="1" OnColor="{StaticResource Primary}" ThumbColor="{StaticResource Secondary}" Scale="1.5" /> -->
<chart:SfCartesianChart Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Grid.RowSpan="5" Margin="50,0,0,0">
<chart:ColumnSeries
Label="Dépense en €"
ItemsSource="{Binding SelectedCompte.LesEch} "
XBindingPath="Tag"
YBindingPath="Montant"
ShowDataLabels="True"
>
<chart:ColumnSeries.DataLabelSettings>
<chart:CartesianDataLabelSettings LabelPlacement="Inner"/>
</chart:ColumnSeries.DataLabelSettings>
</chart:ColumnSeries>
<chart:SfCartesianChart.Title Grid.Column="4">
<Label Text="Consommation par type" TextColor="{StaticResource Secondary}" FontSize="Large" FontAttributes="Bold"/>
</chart:SfCartesianChart.Title>
<chart:SfCartesianChart.Legend>
<chart:ChartLegend/>
</chart:SfCartesianChart.Legend>
<chart:SfCartesianChart.XAxes>
<chart:CategoryAxis>
<chart:CategoryAxis.Title>
<chart:ChartAxisTitle Text="Tag"/>
</chart:CategoryAxis.Title>
</chart:CategoryAxis>
</chart:SfCartesianChart.XAxes>
<chart:SfCartesianChart.YAxes>
<chart:NumericalAxis>
<chart:NumericalAxis.Title>
<chart:ChartAxisTitle Text="Montant"/>
</chart:NumericalAxis.Title>
</chart:NumericalAxis>
</chart:SfCartesianChart.YAxes>
</chart:SfCartesianChart>
<chart:SfCircularChart Grid.Column="3" Grid.Row="1" Grid.ColumnSpan="2" Grid.RowSpan="5">
<chart:SfCircularChart.Title>
<Label Text="Nombre d'achat par type" TextColor="{StaticResource Secondary}" Grid.Column="4" FontSize="Large" FontAttributes="Bold"/>
</chart:SfCircularChart.Title>
<chart:PieSeries ItemsSource="{Binding SelectedCompte.LesOpe}"
XBindingPath="Montant"
YBindingPath="Tag"
Radius = "1"
ShowDataLabels="True"
/>
<chart:SfCircularChart.Legend>
<chart:ChartLegend/>
</chart:SfCircularChart.Legend>
</chart:SfCircularChart>
@ -145,6 +66,5 @@
</Grid> </Grid>
</Border>
</ContentView> </ContentView>

@ -1,16 +1,9 @@
namespace IHM.Desktop; namespace IHM.Desktop;
using Model;
public partial class CV_Statistiques : ContentView public partial class CV_Statistiques : ContentView
{ {
public Manager Mgr => (App.Current as App).Manager;
public CV_Statistiques() public CV_Statistiques()
{ {
InitializeComponent(); InitializeComponent();
Mgr.LoadBanque();
Mgr.LoadCompte();
BindingContext = Mgr;
} }
} }

@ -1,13 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:inputs="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs"
x:Class="IHM.Desktop.CV_SupprimerEcheance"> x:Class="IHM.Desktop.CV_SupprimerEcheance">
<Grid BackgroundColor="{StaticResource Secondary}">
<Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
@ -25,22 +21,22 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Supprimer une échéance" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
<Label Text="Selectionner l'échéance" Grid.ColumnSpan="3" Grid.Column="0" Grid.Row="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
<Label Text="Supprimer une échéance" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}"/>
<Label Text="Nom" Grid.Column="1" Grid.Row="2" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Type" Grid.Column="1" Grid.Row="4" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Date" Grid.Column="1" Grid.Row="5" Style="{StaticResource TitreWindows}" Margin="20"/>
<inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding SelectedCompte.LesEch}" Grid.Column="3" Grid.Row="3" x:Name="recup"/> <Entry Placeholder="Entrez un nom" Grid.Column="3" Grid.Row="2" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Entry Placeholder="Entrez un type de transaction" Grid.Column="3" Grid.Row="4" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<DatePicker Grid.Column="3" Grid.Row="5" BackgroundColor="{StaticResource Secondary}" Margin="20"/>
<Button Text="ANNULER" Clicked="Button_Clicked" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
<Button Text="VALIDER" Clicked="Button_Clicked_1" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
<Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="5" Style="{StaticResource WindowsButton2}"/>
<Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="5" Style="{StaticResource WindowsButton}"/>
</Grid> </Grid>
</ContentView> </ContentView>

@ -1,34 +1,19 @@
using Model;
namespace IHM.Desktop; namespace IHM.Desktop;
public partial class CV_SupprimerEcheance : ContentView public partial class CV_SupprimerEcheance : ContentView
{ {
public Manager Mgr => (App.Current as App).Manager;
public CV_SupprimerEcheance() public CV_SupprimerEcheance()
{ {
InitializeComponent(); InitializeComponent();
Mgr.LoadBanque();
Mgr.LoadCompte();
BindingContext = Mgr;
} }
private void Button_Annuler(object sender, EventArgs e) private void Button_Clicked(object sender, EventArgs e)
{ {
Navigation.PushAsync(new Dashboard());
} }
private void Button_Valider(object sender, EventArgs e) private void Button_Clicked_1(object sender, EventArgs e)
{ {
var s = recup.SelectedItem;
Echeance echeance = (Echeance)s;
Mgr.supprimerEcheance(Mgr.SelectedCompte, echeance);
Navigation.PushAsync(new Dashboard());
} }
} }

@ -3,8 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Desktop.CV_credit"> x:Class="IHM.Desktop.CV_credit">
<Grid BackgroundColor="{StaticResource Secondary}">
<Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
@ -13,8 +12,6 @@
<RowDefinition Height="2*"/> <RowDefinition Height="2*"/>
<RowDefinition Height="2*"/> <RowDefinition Height="2*"/>
<RowDefinition Height="2*"/> <RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@ -25,22 +22,20 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Effectuer un crédit" VerticalOptions="Center" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="5" Style="{StaticResource TitreWindows}"/> <Label Text="Effectuer un crédit" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}"/>
<Label Text="Nom" Grid.Column="1" Grid.Row="2" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Nom" Grid.Column="1" Grid.Row="2" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Type" Grid.Column="1" Grid.Row="4" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Type" Grid.Column="1" Grid.Row="4" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Tag" Grid.Column="1" Grid.Row="5" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Date" Grid.Column="1" Grid.Row="5" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Date" Grid.Column="1" Grid.Row="6" Style="{StaticResource TitreWindows}" Margin="20"/>
<Entry Placeholder="Entrez un nom" Grid.Column="3" Grid.Row="2" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="name" IsTextPredictionEnabled="True"/> <Entry Placeholder="Entrez un nom" Grid.Column="3" Grid.Row="2" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="montant"/> <Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Entry Placeholder="Entrez un moyen de paiement" Grid.Column="3" Grid.Row="4" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="type"/> <Entry Placeholder="Entrez un type de transaction" Grid.Column="3" Grid.Row="4" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Entry Placeholder="Entrez une catégorie" Grid.Column="3" Grid.Row="5" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="tag"/> <DatePicker Grid.Column="3" Grid.Row="5" BackgroundColor="{StaticResource Secondary}" Margin="20"/>
<DatePicker Grid.Column="3" Grid.Row="6" BackgroundColor="{StaticResource Secondary}" Margin="20" x:Name="date"/>
<Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="7" Style="{StaticResource WindowsButton2}"/> <Button Text="ANNULER" Clicked="Button_Clicked" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
<Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="7" Style="{StaticResource WindowsButton}"/> <Button Text="VALIDER" Clicked="Button_Clicked_1" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
</Grid> </Grid>

@ -1,64 +1,19 @@
using Model;
namespace IHM.Desktop; namespace IHM.Desktop;
public partial class CV_credit : ContentView public partial class CV_credit : ContentView
{ {
public Manager Mgr => (App.Current as App).Manager;
public CV_credit() public CV_credit()
{ {
InitializeComponent(); InitializeComponent();
Mgr.LoadBanque();
Mgr.LoadCompte();
BindingContext = Mgr;
} }
private void Button_Annuler(object sender, EventArgs e) private void Button_Clicked(object sender, EventArgs e)
{ {
Navigation.PushAsync(new Dashboard());
} }
private void Button_Valider(object sender, EventArgs e) private void Button_Clicked_1(object sender, EventArgs e)
{
string nom = name.Text;
double Montant = Double.Parse(montant.Text);
string Type = type.Text;
string Tag = tag.Text;
DateTime Date = date.Date;
TagOperation to2 = new TagOperation();
MethodePayement mp2 = new MethodePayement();
foreach (string mp in Enum.GetNames(typeof(MethodePayement)))
{ {
if (Equals(Type, mp))
{
mp2 = (MethodePayement) Enum.Parse(typeof(MethodePayement), Type);
} }
}
foreach (string to in Enum.GetNames(typeof(TagOperation)))
{
if (Equals(Tag, to))
{
to2 = (TagOperation)Enum.Parse(typeof(TagOperation), Tag);
}
}
Operation operation = new Operation(nom, Montant, Date, mp2, to2, false, false) ;
Mgr.effectuerOperation(Mgr.SelectedCompte, operation);
Navigation.PushAsync(new Dashboard());
}
} }

@ -3,8 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Desktop.CV_debit"> x:Class="IHM.Desktop.CV_debit">
<Grid BackgroundColor="{StaticResource Secondary}">
<Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
@ -13,8 +12,6 @@
<RowDefinition Height="2*"/> <RowDefinition Height="2*"/>
<RowDefinition Height="2*"/> <RowDefinition Height="2*"/>
<RowDefinition Height="2*"/> <RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@ -25,24 +22,21 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Effectuer un débit" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="5" Style="{StaticResource TitreWindows}" VerticalOptions="Center" /> <Label Text="Effectuer un débit" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}"/>
<Label Text="Nom" Grid.Column="1" Grid.Row="2" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Nom" Grid.Column="1" Grid.Row="2" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Type" Grid.Column="1" Grid.Row="4" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Type" Grid.Column="1" Grid.Row="4" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Tag" Grid.Column="1" Grid.Row="5" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Date" Grid.Column="1" Grid.Row="5" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Date" Grid.Column="1" Grid.Row="6" Style="{StaticResource TitreWindows}" Margin="20"/>
<Entry Placeholder="Entrez un nom" Grid.Column="3" Grid.Row="2" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="name" IsTextPredictionEnabled="True"/> <Entry Placeholder="Entrez un nom" Grid.Column="3" Grid.Row="2" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="montant"/> <Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Entry Placeholder="Entrez un moyen de paiement" Grid.Column="3" Grid.Row="4" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="type"/> <Entry Placeholder="Entrez un type de transaction" Grid.Column="3" Grid.Row="4" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Entry Placeholder="Entrez une catégorie" Grid.Column="3" Grid.Row="5" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="tag"/> <DatePicker Grid.Column="3" Grid.Row="5" BackgroundColor="{StaticResource Secondary}" Margin="20"/>
<DatePicker Grid.Column="3" Grid.Row="6" BackgroundColor="{StaticResource Secondary}" Margin="20" x:Name="date"/>
<Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="7" Style="{StaticResource WindowsButton2}"/> <Button Text="ANNULER" Clicked="Button_Clicked" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
<Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="7" Style="{StaticResource WindowsButton}"/> <Button Text="VALIDER" Clicked="Button_Clicked_1" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
</Grid> </Grid>
</ContentView> </ContentView>

@ -1,56 +1,19 @@
using Model;
namespace IHM.Desktop; namespace IHM.Desktop;
public partial class CV_debit : ContentView public partial class CV_debit : ContentView
{ {
public Manager Mgr => (App.Current as App).Manager;
public CV_debit() public CV_debit()
{ {
InitializeComponent(); InitializeComponent();
Mgr.LoadBanque();
Mgr.LoadCompte();
BindingContext = Mgr;
}
private void Button_Annuler(object sender, EventArgs e)
{
Navigation.PushAsync(new Dashboard());
} }
private void Button_Valider(object sender, EventArgs e) private void Button_Clicked(object sender, EventArgs e)
{ {
string nom = name.Text;
double Montant = Double.Parse(montant.Text);
string Type = type.Text;
string Tag = tag.Text;
DateTime Date = date.Date;
TagOperation to2 = new TagOperation();
MethodePayement mp2 = new MethodePayement();
foreach (string mp in Enum.GetNames(typeof(MethodePayement)))
{
if (Equals(Type, mp))
{
mp2 = (MethodePayement)Enum.Parse(typeof(MethodePayement), Type);
}
} }
foreach (string to in Enum.GetNames(typeof(TagOperation))) private void Button_Clicked_1(object sender, EventArgs e)
{ {
if (Equals(Tag, to))
{
to2 = (TagOperation)Enum.Parse(typeof(TagOperation), Tag);
}
}
Operation operation = new Operation(nom, Montant, Date, mp2, to2, false, true);
Mgr.effectuerOperation(Mgr.SelectedCompte, operation);
Navigation.PushAsync(new Dashboard());
} }
} }

@ -4,7 +4,7 @@
x:Class="IHM.Desktop.CV_modificationSolde"> x:Class="IHM.Desktop.CV_modificationSolde">
<Grid BackgroundColor="{StaticResource Tertiary}"> <Grid BackgroundColor="{StaticResource Secondary}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
@ -23,7 +23,7 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Modification du solde" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/> <Label Text="Modification du solde" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}"/>
<Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/>
@ -33,9 +33,8 @@
<Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20"/> <Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Button Text="ANNULER" Clicked="Button_Clicked" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton2}"/> <Button Text="ANNULER" Clicked="Button_Clicked" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
<Button Text="VALIDER" Clicked="Button_Clicked_1" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/> <Button Text="VALIDER" Clicked="Button_Clicked_1" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
</Grid> </Grid>
</ContentView> </ContentView>

@ -9,11 +9,11 @@ public partial class CV_modificationSolde : ContentView
private void Button_Clicked(object sender, EventArgs e) private void Button_Clicked(object sender, EventArgs e)
{ {
Navigation.PushAsync(new Dashboard());
} }
private void Button_Clicked_1(object sender, EventArgs e) private void Button_Clicked_1(object sender, EventArgs e)
{ {
Navigation.PushAsync(new Dashboard());
} }
} }

@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:inputs="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs"
x:Class="IHM.Desktop.CV_retirer"> x:Class="IHM.Desktop.CV_retirer">
<Grid BackgroundColor="{StaticResource Secondary}">
<Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
@ -25,16 +22,20 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Retirer une opération" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/> <Label Text="Retirer une opération" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}"/>
<Label Text="Nom" Grid.Column="1" Grid.Row="2" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Type" Grid.Column="1" Grid.Row="4" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Date" Grid.Column="1" Grid.Row="5" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Selectionner l'opération" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
<inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding SelectedCompte.LesOpe}" Grid.Column="3" Grid.Row="3" x:Name="recup"/> <Entry Placeholder="Entrez un nom" Grid.Column="3" Grid.Row="2" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Entry Placeholder="Entrez un type de transaction" Grid.Column="3" Grid.Row="4" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<DatePicker Grid.Column="3" Grid.Row="5" BackgroundColor="{StaticResource Secondary}" Margin="20"/>
<Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="5" Style="{StaticResource WindowsButton2}"/> <Button Text="ANNULER" Clicked="Button_Clicked" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
<Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="5" Style="{StaticResource WindowsButton}"/> <Button Text="VALIDER" Clicked="Button_Clicked_1" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
</Grid> </Grid>

@ -1,30 +1,19 @@
using Model;
namespace IHM.Desktop; namespace IHM.Desktop;
public partial class CV_retirer : ContentView public partial class CV_retirer : ContentView
{ {
public Manager Mgr => (App.Current as App).Manager;
public CV_retirer() public CV_retirer()
{ {
InitializeComponent(); InitializeComponent();
Mgr.LoadBanque();
Mgr.LoadCompte();
BindingContext = Mgr;
} }
private void Button_Annuler(object sender, EventArgs e) private void Button_Clicked(object sender, EventArgs e)
{ {
Navigation.PushAsync(new Dashboard());
} }
private void Button_Valider(object sender, EventArgs e) private void Button_Clicked_1(object sender, EventArgs e)
{ {
var s = recup.SelectedItem;
Operation operation = (Operation)s;
Mgr.supprimerOperation(Mgr.SelectedCompte, operation);
Navigation.PushAsync(new Dashboard());
} }
} }

@ -1,11 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:inputs="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs"
x:Class="IHM.Desktop.CV_supprimerOp"> x:Class="IHM.Desktop.CV_supprimerOp">
<Grid BackgroundColor="{StaticResource Secondary}">
<Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
@ -23,17 +21,21 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Supprimer une opération" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
<Label Text="Selectionner l'opération" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
<Label Text="Supprimer une opération" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}"/>
<Label Text="Nom" Grid.Column="1" Grid.Row="2" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Type" Grid.Column="1" Grid.Row="4" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Date" Grid.Column="1" Grid.Row="5" Style="{StaticResource TitreWindows}" Margin="20"/>
<inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding SelectedCompte.LesOpe}" Grid.Column="3" Grid.Row="3" x:Name="recup"/>
<Entry Placeholder="Entrez un nom" Grid.Column="3" Grid.Row="2" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Entry Placeholder="Entrez un type de transaction" Grid.Column="3" Grid.Row="4" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<DatePicker Grid.Column="3" Grid.Row="5" BackgroundColor="{StaticResource Secondary}" Margin="20"/>
<Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="5" Style="{StaticResource WindowsButton2}"/> <Button Text="ANNULER" Clicked="Button_Clicked" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
<Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="5" Style="{StaticResource WindowsButton}"/> <Button Text="VALIDER" Clicked="Button_Clicked_1" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
</Grid> </Grid>
</ContentView> </ContentView>

@ -1,29 +1,19 @@
using Model;
namespace IHM.Desktop; namespace IHM.Desktop;
public partial class CV_supprimerOp : ContentView public partial class CV_supprimerOp : ContentView
{ {
public Manager Mgr => (App.Current as App).Manager;
public CV_supprimerOp() public CV_supprimerOp()
{ {
InitializeComponent(); InitializeComponent();
Mgr.LoadBanque();
Mgr.LoadCompte();
BindingContext = Mgr;
} }
private void Button_Annuler(object sender, EventArgs e) private void Button_Clicked(object sender, EventArgs e)
{ {
Navigation.PushAsync(new Dashboard());
} }
private void Button_Valider(object sender, EventArgs e) private void Button_Clicked_1(object sender, EventArgs e)
{ {
var s = recup.SelectedItem;
Operation operation = (Operation)s;
Mgr.supprimerOperation(Mgr.SelectedCompte,operation);
Navigation.PushAsync(new Dashboard());
} }
} }

@ -3,12 +3,12 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Desktop.Compte"> x:Class="IHM.Desktop.Compte">
<Border Stroke="{StaticResource Yellow100Accent}" StrokeThickness="4" Margin="10" StrokeShape="RoundRectangle 45,5,5,45">
<Grid BackgroundColor="{StaticResource Tertiary}" >
<Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="0.5*"/> <RowDefinition Height="0.5*"/>
<RowDefinition Height="0.75*"/> <RowDefinition Height="0.7*"/>
<RowDefinition Height="5*"/> <RowDefinition Height="5*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
@ -18,14 +18,12 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackLayout Grid.Row="0" Grid.ColumnSpan="2">
<Label <Label
Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
VerticalOptions="Center"
Style="{StaticResource TitreWindows}" Style="{StaticResource TitreWindows}"
Text="COMPTE" Text="COMPTE"
HorizontalOptions="Center"/> HorizontalOptions="Center"/>
</StackLayout>
<Button <Button
Clicked="AddCredit_Clicked" Clicked="AddCredit_Clicked"
@ -34,13 +32,19 @@
Text="Modifier le solde" Text="Modifier le solde"
Style="{StaticResource WindowsButton}"/> Style="{StaticResource WindowsButton}"/>
<ListView ItemsSource="{Binding }">
</ListView>
<ContentView BackgroundColor="{StaticResource Yellow300Accent}" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Grid.RowSpan="2" x:Name="windowAjout">
<ContentView Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Grid.RowSpan="2" > <CollectionView ItemsSource="{Binding}" Grid.Row="2" Grid.ColumnSpan="4" Grid.RowSpan="2">
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@ -50,41 +54,33 @@
<Label Grid.Column="0" Text="{Binding SelectedCompte.Nom}" <Label Grid.Column="0" Text="{Binding Nom}"
TextColor="{StaticResource Secondary}" TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Large" FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center" HorizontalOptions="Center"
VerticalOptions="Center"/> VerticalOptions="Center"/>
<Label Grid.Column="1" Text="{Binding SelectedCompte.Solde}" <Label Grid.Column="1" Text="{Binding Solde}"
TextColor="{StaticResource Secondary}" TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Large" FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center" HorizontalOptions="Center"
VerticalOptions="Center"/> VerticalOptions="Center"/>
<Label Grid.Column="1" Text="€"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Large"
HorizontalOptions="Center"
VerticalOptions="Center"
Margin="120,0,0,0"/>
</Grid> </Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</ContentView> </ContentView>
<ContentView Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Grid.RowSpan="4" x:Name="windowAjout">
</ContentView>
</Grid> </Grid>
</Border>
</ContentView> </ContentView>

@ -4,17 +4,14 @@ namespace IHM.Desktop;
public partial class Compte : ContentView public partial class Compte : ContentView
{ {
public Manager Mgr => (App.Current as App).Manager;
public Compte() public Compte()
{ {
InitializeComponent(); InitializeComponent();
Model.Compte compte = new Model.Compte("", "compte courant", 2000);
BindingContext = compte;
Mgr.LoadBanque();
Mgr.LoadCompte();
BindingContext = Mgr;
} }

@ -4,10 +4,10 @@
x:Class="IHM.Desktop.Dashboard" x:Class="IHM.Desktop.Dashboard"
Title="Dashboard"> Title="Dashboard">
<StackLayout BackgroundColor="{StaticResource Secondary}">
<Grid BackgroundColor="{StaticResource Secondary}"> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1.3*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="2*"/> <RowDefinition Height="2*"/>
<RowDefinition Height="2*"/> <RowDefinition Height="2*"/>
<RowDefinition Height="2*"/> <RowDefinition Height="2*"/>
@ -23,30 +23,42 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackLayout BackgroundColor="{StaticResource Secondary}" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4">
</StackLayout>
<Image Source="logo_sans_fond.png" HeightRequest="80" HorizontalOptions="Center" Margin="0,30,0,0" Grid.Column="0" Grid.Row="0"/> <Image Source="logo_sans_fond.png" HeightRequest="100" Margin="50,10,0,0" Grid.Column="0" Grid.Row="0"/>
<Button Text="Mon compte" ImageSource="logo_sans_fond.png" x:Name="ButLog" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Grid.Column="4" Grid.Row="0" MaximumWidthRequest="200" MaximumHeightRequest="50" Clicked="ButLog_Clicked"></Button>
<StackLayout BackgroundColor="{StaticResource Secondary}" Grid.Row="1" Grid.Column="0" Grid.RowSpan="6">
<Button Text="ACCUEIL" ImageSource="home_black.png" MaximumWidthRequest="200" MaximumHeightRequest="60" x:Name="ButAcc" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="1" Clicked="ButAcc_Clicked" ></Button>
<Button Text="COMPTE" x:Name="ButCom" ImageSource="dollar_black.png" MaximumWidthRequest="200" MaximumHeightRequest="60" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="2" Clicked="Button_compte"></Button>
<Button Text="OPERATION" x:Name="ButOpe" ImageSource="home_black.png" MaximumWidthRequest="200" MaximumHeightRequest="60" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="3" Clicked="Button_operation"></Button>
<Button Text="ECHEANCIER" x:Name="ButEch" ImageSource="home_black.png" MaximumWidthRequest="200" MaximumHeightRequest="60" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="4" Clicked="Button_echeancier"></Button>
<Button Text="PLANIFICATION" x:Name="ButPla" ImageSource="planification_black.png" MaximumWidthRequest="200" MaximumHeightRequest="60" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="5" Clicked="Button_planification"></Button>
<Button Text="STATISTIQUES" x:Name="ButSta" ImageSource="home_black.png" MaximumWidthRequest="200" MaximumHeightRequest="60" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="6" Clicked="Button_statistiques"></Button>
</StackLayout>
<Button Text="Mon Compte" ImageSource="logo_sans_fond.png" x:Name="ButLog" TextColor="{StaticResource Secondary}" Grid.Column="4" Grid.Row="0" MaximumWidthRequest="200" MaximumHeightRequest="50" Clicked="ButLog_Clicked" Style="{StaticResource WindowsButton}"/>
<Button Text="BANQUE" ImageSource="banque_black.png" MaximumWidthRequest="200" MaximumHeightRequest="62" x:Name="ButAcc" BackgroundColor="{StaticResource Gray100}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21,30,21,0" Grid.Column="0" Grid.Row="1" Clicked="ButAcc_Clicked" ></Button>
<Button Text="COMPTE" x:Name="ButCom" ImageSource="cb_black.png" MaximumWidthRequest="200" MaximumHeightRequest="62" BackgroundColor="{StaticResource Gray100}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21,30,21,0" Grid.Column="0" Grid.Row="2" Clicked="Button_compte"></Button>
<Button Text="OPERATION" x:Name="ButOpe" ImageSource="dollar_black.png" MaximumWidthRequest="200" MaximumHeightRequest="62" BackgroundColor="{StaticResource Gray100}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21,30,21,0" Grid.Column="0" Grid.Row="3" Clicked="Button_operation"></Button>
<Button Text="ECHEANCIER" x:Name="ButEch" ImageSource="date_black.png" MaximumWidthRequest="200" MaximumHeightRequest="62" BackgroundColor="{StaticResource Gray100}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21,30,21,0" Grid.Column="0" Grid.Row="4" Clicked="Button_echeancier"></Button>
<Button Text="PLANIFICATION" x:Name="ButPla" ImageSource="planification_black.png" MaximumWidthRequest="200" MaximumHeightRequest="62" BackgroundColor="{StaticResource Gray100}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21,30,21,0" Grid.Column="0" Grid.Row="5" Clicked="Button_planification"></Button>
<Button Text="STATISTIQUES" x:Name="ButSta" ImageSource="stats_black.png" MaximumWidthRequest="200" MaximumHeightRequest="62" BackgroundColor="{StaticResource Gray100}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21,30,21,0" Grid.Column="0" Grid.Row="6" Clicked="Button_statistiques"></Button>
<ContentView Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3" Grid.RowSpan="6" x:Name="mainCV"> <ContentView Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3" Grid.RowSpan="6" x:Name="mainCV">
<Border Stroke="{StaticResource Yellow100Accent}" StrokeThickness="4" Margin="10,0,10,10" StrokeShape="RoundRectangle 5,5,5,5">
<Image Source="background3.png" Aspect="Fill"/>
</Border>
</ContentView> </ContentView>
</Grid> </Grid>
</StackLayout>
</ContentPage> </ContentPage>

@ -1,38 +1,31 @@
using Microsoft.Maui.Graphics.Text; using Microsoft.Maui.Graphics.Text;
using Model;
namespace IHM.Desktop; namespace IHM.Desktop;
public partial class Dashboard public partial class Dashboard
{ {
public Manager Mgr => (App.Current as App).Manager;
public Dashboard() public Dashboard()
{ {
InitializeComponent(); InitializeComponent();
BindingContext = Mgr.User;
} }
private void RetourFormeBase() private void RetourFormeBase()
{ {
ButPla.BackgroundColor = Color.FromArgb("E1E1E1"); ButPla.TextColor = Colors.Black; ButPla.BackgroundColor = Color.FromArgb("F7B548"); ButPla.TextColor = Colors.Black;
ButEch.BackgroundColor = Color.FromArgb("E1E1E1"); ButEch.TextColor = Colors.Black; ButEch.BackgroundColor = Color.FromArgb("F7B548"); ButEch.TextColor = Colors.Black;
ButOpe.BackgroundColor = Color.FromArgb("E1E1E1"); ButOpe.TextColor = Colors.Black; ButOpe.BackgroundColor = Color.FromArgb("F7B548"); ButOpe.TextColor = Colors.Black;
ButCom.BackgroundColor = Color.FromArgb("E1E1E1"); ButCom.TextColor = Colors.Black; ButCom.BackgroundColor = Color.FromArgb("F7B548"); ButCom.TextColor = Colors.Black;
ButAcc.BackgroundColor = Color.FromArgb("E1E1E1"); ButAcc.TextColor = Colors.Black; ButAcc.BackgroundColor = Color.FromArgb("F7B548"); ButAcc.TextColor = Colors.Black;
ButSta.BackgroundColor = Color.FromArgb("E1E1E1"); ButSta.TextColor = Colors.Black; ButSta.BackgroundColor = Color.FromArgb("F7B548"); ButSta.TextColor = Colors.Black;
} }
private void Button_planification(object sender, EventArgs e) private void Button_planification(object sender, EventArgs e)
{ {
RetourFormeBase(); RetourFormeBase();
ButPla.TextColor = Colors.White; ButPla.TextColor = Colors.White;
ButPla.BackgroundColor = Color.FromArgb("7FB196"); ButPla.BackgroundColor = Color.FromArgb("DF775C");
mainCV.Content= new CV_Planification(); mainCV.Content= new CV_Planification();
} }
@ -40,7 +33,7 @@ public partial class Dashboard
{ {
RetourFormeBase(); RetourFormeBase();
ButEch.TextColor = Colors.White; ButEch.TextColor = Colors.White;
ButEch.BackgroundColor = Color.FromArgb("7FB196"); ButEch.BackgroundColor = Color.FromArgb("DF775C");
mainCV.Content = new Echeancier(); mainCV.Content = new Echeancier();
} }
@ -48,7 +41,7 @@ public partial class Dashboard
{ {
RetourFormeBase(); RetourFormeBase();
ButOpe.TextColor = Colors.White; ButOpe.TextColor = Colors.White;
ButOpe.BackgroundColor = Color.FromArgb("7FB196"); ButOpe.BackgroundColor = Color.FromArgb("DF775C");
mainCV.Content = new Operations(); mainCV.Content = new Operations();
} }
@ -56,7 +49,7 @@ public partial class Dashboard
{ {
RetourFormeBase(); RetourFormeBase();
ButCom.TextColor = Colors.White; ButCom.TextColor = Colors.White;
ButCom.BackgroundColor = Color.FromArgb("7FB196"); ButCom.BackgroundColor = Color.FromArgb("DF775C");
mainCV.Content = new Compte(); mainCV.Content = new Compte();
} }
@ -64,7 +57,7 @@ public partial class Dashboard
{ {
RetourFormeBase(); RetourFormeBase();
ButSta.TextColor = Colors.White; ButSta.TextColor = Colors.White;
ButSta.BackgroundColor = Color.FromArgb("7FB196"); ButSta.BackgroundColor = Color.FromArgb("DF775C");
mainCV.Content = new CV_Statistiques(); mainCV.Content = new CV_Statistiques();
} }
@ -72,7 +65,7 @@ public partial class Dashboard
{ {
RetourFormeBase(); RetourFormeBase();
ButAcc.TextColor = Colors.White; ButAcc.TextColor = Colors.White;
ButAcc.BackgroundColor = Color.FromArgb("7FB196"); ButAcc.BackgroundColor = Color.FromArgb("DF775C");
mainCV.Content = new CV_HomePage(); mainCV.Content = new CV_HomePage();
} }
@ -80,9 +73,8 @@ public partial class Dashboard
{ {
RetourFormeBase(); RetourFormeBase();
ButLog.TextColor = Colors.White; ButLog.TextColor = Colors.White;
ButLog.BackgroundColor = Color.FromArgb("7FB196"); ButLog.BackgroundColor = Color.FromArgb("DF775C");
mainCV.Content = new CV_Log(); mainCV.Content = new CV_Log();
} }
} }

@ -4,15 +4,12 @@
x:Class="IHM.Desktop.Echeancier" x:Class="IHM.Desktop.Echeancier"
> >
<Border Stroke="{StaticResource Yellow100Accent}" StrokeThickness="4" Margin="10" StrokeShape="RoundRectangle 45,5,5,45"> <Grid>
<Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="0.5*"/> <RowDefinition Height="0.5*"/>
<RowDefinition Height="0.75*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="5*"/>
<RowDefinition Height="0.7*"/> <RowDefinition Height="0.7*"/>
<RowDefinition Height="5*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
@ -22,14 +19,12 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackLayout Grid.Row="0" Grid.ColumnSpan="2">
<Label <Label
Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
Style="{StaticResource TitreWindows}" Style="{StaticResource TitreWindows}"
Text="ECHEANCIER" Text="ECHEANCIER"
VerticalOptions="Center"
HorizontalOptions="Center"/> HorizontalOptions="Center"/>
</StackLayout>
<Button <Button
@ -47,31 +42,9 @@
Style="{StaticResource WindowsButton}"/> Style="{StaticResource WindowsButton}"/>
<Border Stroke="{StaticResource Secondary}" Margin="10,0,10,0" Padding="5" StrokeThickness="4" StrokeShape="RoundRectangle 45,5,5,45" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4" > <ContentView BackgroundColor="{StaticResource Yellow300Accent}" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="4" Grid.RowSpan="2" x:Name="windowAjout">
<Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label Text="Nom" Grid.Column="0" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="Date" Grid.Column="1" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="Moyen de Paiement" Grid.Column="2" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="Tag" Grid.Column="3" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="Montant" Grid.Column="4" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
</Grid>
</Border>
<ContentView Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="4" Grid.RowSpan="2" Margin="10,0,10,0">
<CollectionView ItemsSource="{Binding SelectedCompte.LesEch}" Grid.Row="3" Grid.ColumnSpan="4" Grid.RowSpan="2"> <CollectionView ItemsSource="{Binding}" Grid.Row="2" Grid.ColumnSpan="4" Grid.RowSpan="2">
<CollectionView.ItemTemplate> <CollectionView.ItemTemplate>
@ -88,13 +61,13 @@
<Label Grid.Column="0" Text="{Binding Nom}" <Label Grid.Column="0" Text="{Binding IntituleOperation}"
TextColor="{StaticResource Secondary}" TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body" FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center" HorizontalOptions="Center"
VerticalOptions="Center"/> VerticalOptions="Center"/>
<Label Grid.Column="1" Text="{Binding DateOperation, StringFormat='{0:d}'}" <Label Grid.Column="1" Text="{Binding DateOperation}"
TextColor="{StaticResource Secondary}" TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body" FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center" HorizontalOptions="Center"
@ -171,27 +144,10 @@
</CollectionView> </CollectionView>
<ContentView Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Grid.RowSpan="5" x:Name="windowAjout">
</ContentView>
<Border Stroke="{StaticResource Secondary}" BackgroundColor="{StaticResource Yellow100Accent}" Margin="10,10,10,10" Padding="3" StrokeThickness="4" StrokeShape="RoundRectangle 45,5,5,45" Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="4">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="6*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label Text="TOTAL" Grid.Column="0" Grid.ColumnSpan="2" HorizontalOptions="Center" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="{Binding SelectedCompte.Solde}" Grid.Column="1" Grid.ColumnSpan="2" HorizontalOptions="Center" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="€" Grid.Column="1" Grid.ColumnSpan="2" HorizontalOptions="End" Margin="0,0,50,0" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
</Grid>
</Border>
</Grid> </Grid>
</Border>
</ContentView> </ContentView>

@ -4,15 +4,27 @@ namespace IHM.Desktop;
public partial class Echeancier : ContentView public partial class Echeancier : ContentView
{ {
public Manager Mgr => (App.Current as App).Manager; List<Echeance> echeancier;
public Echeancier() public Echeancier()
{ {
InitializeComponent(); InitializeComponent();
Mgr.LoadBanque(); echeancier = new List<Echeance>();
Mgr.LoadCompte();
BindingContext = Mgr; echeancier.Add(new("Eau", 55, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
echeancier.Add(new("Amazon", 103.30, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
echeancier.Add(new("Mutuelle", 38.50, DateTime.Now, MethodePayement.Prevelement, TagOperation.Santé, true));
echeancier.Add(new("Loyer", 500, DateTime.Now, MethodePayement.Virement, TagOperation.Habitation, true));
echeancier.Add(new("Eau", 55, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
echeancier.Add(new("Amazon", 103.30, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
echeancier.Add(new("Mutuelle", 38.50, DateTime.Now, MethodePayement.Prevelement, TagOperation.Santé, true));
echeancier.Add(new("Loyer", 500, DateTime.Now, MethodePayement.Virement, TagOperation.Habitation, true));
echeancier.Add(new("Eau", 55, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
echeancier.Add(new("Amazon", 103.30, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
echeancier.Add(new("Mutuelle", 38.50, DateTime.Now, MethodePayement.Prevelement, TagOperation.Santé, true));
echeancier.Add(new("Loyer", 500, DateTime.Now, MethodePayement.Virement, TagOperation.Habitation, true));
BindingContext = echeancier;
} }

@ -2,8 +2,7 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Desktop.MainPage" x:Class="IHM.Desktop.MainPage"
Title="MainPage_Windows" Title="MainPage_Windows">
>
<StackLayout BackgroundColor="{StaticResource Secondary}"> <StackLayout BackgroundColor="{StaticResource Secondary}">
@ -25,7 +24,7 @@
<Border Style="{StaticResource bordureBlanche}" Padding="7"> <Border Style="{StaticResource bordureBlanche}" Padding="7">
<Entry Style="{StaticResource zoneDeTexte}" <Entry Style="{StaticResource zoneDeTexte}"
Placeholder="Adresse mail" Placeholder="Addresse mail"
x:Name="EntryMail"/> x:Name="EntryMail"/>
</Border> </Border>

@ -12,7 +12,7 @@ public partial class MainPage : ContentPage
BindingContext = this; BindingContext = this;
} }
public async void ConnectionOnClicked(object sender, EventArgs e) public void ConnectionOnClicked(object sender, EventArgs e)
{ {
if (EntryMail.Text == null || EntryPassworld.Text == null) if (EntryMail.Text == null || EntryPassworld.Text == null)
{ {
@ -20,14 +20,12 @@ public partial class MainPage : ContentPage
} }
else else
{ {
if (await Mgr.Pers.EmailDisponible(EntryMail.Text)) /*if (Mgr.existEmail(EntryMail.Text))
{ {
if (Mgr.CompareHash(await Mgr.getPassword(EntryMail.Text), EntryPassworld.Text)) if (Mgr.isEqualHash(Mgr.recupMdpBdd(EntryMail.Text), EntryPassworld.Text))
{ {
Mgr.createUser(EntryMail.Text); Mgr.createUser(EntryMail.Text);
ConnexionValide();
await Navigation.PushAsync(new Dashboard());
//Mgr.LoadAll();
} }
else else
{ {
@ -37,11 +35,15 @@ public partial class MainPage : ContentPage
else else
{ {
AffichError("Compte inexistant", "Email ou mot de passe invalide", "OK"); AffichError("Compte inexistant", "Email ou mot de passe invalide", "OK");
}*/
} }
} }
}
private async void ConnexionValide()
{
Navigation.PushAsync(new Dashboard());
//await Navigation.PopModalAsync();
}
private async void AffichError(string s, string s1, string s2) private async void AffichError(string s, string s1, string s2)
{ {

@ -4,15 +4,12 @@
x:Class="IHM.Desktop.Operations"> x:Class="IHM.Desktop.Operations">
<Border Stroke="{StaticResource Yellow100Accent}" StrokeThickness="4" Margin="10" StrokeShape="RoundRectangle 45,5,5,45"> <Grid>
<Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="0.5*"/> <RowDefinition Height="0.5*"/>
<RowDefinition Height="0.75*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="5*"/>
<RowDefinition Height="0.7*"/> <RowDefinition Height="0.7*"/>
<RowDefinition Height="5*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@ -22,13 +19,12 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackLayout Grid.Row="0" Grid.ColumnSpan="4">
<Label <Label
Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="4"
Style="{StaticResource TitreWindows}" Style="{StaticResource TitreWindows}"
Text="OPERATIONS" Text="OPERATIONS"
VerticalOptions="Center"
HorizontalOptions="Center"/> HorizontalOptions="Center"/>
</StackLayout>
@ -63,29 +59,9 @@
<Border Stroke="{StaticResource Secondary}" Margin="10,0,10,0" Padding="3" StrokeThickness="4" StrokeShape="RoundRectangle 45,5,5,45" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4"> <ContentView BackgroundColor="{StaticResource Yellow300Accent}" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="4" Grid.RowSpan="2" x:Name="windowAjout">
<Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> <CollectionView ItemsSource="{Binding}" Grid.Row="2" Grid.ColumnSpan="4" Grid.RowSpan="2">
<Label Text="Nom" Grid.Column="0" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="Date" Grid.Column="1" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="Moyen de Paiement" Grid.Column="2" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="Tag" Grid.Column="3" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="Montant" Grid.Column="4" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
</Grid>
</Border>
<ContentView Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="4" Grid.RowSpan="1" Margin="10,0,10,0" >
<CollectionView ItemsSource="{Binding SelectedCompte.LesOpe}" Grid.Row="3" Grid.ColumnSpan="4" Grid.RowSpan="2">
<CollectionView.ItemTemplate> <CollectionView.ItemTemplate>
@ -102,13 +78,13 @@
<Label Grid.Column="0" Text="{Binding Nom}" <Label Grid.Column="0" Text="{Binding IntituleOperation}"
TextColor="{StaticResource Secondary}" TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body" FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center" HorizontalOptions="Center"
VerticalOptions="Center"/> VerticalOptions="Center"/>
<Label Grid.Column="1" Text="{Binding DateOperation, StringFormat='{0:d}'}" <Label Grid.Column="1" Text="{Binding DateOperation}"
TextColor="{StaticResource Secondary}" TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body" FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center" HorizontalOptions="Center"
@ -141,25 +117,8 @@
</ContentView> </ContentView>
<ContentView Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4" Grid.RowSpan="5" x:Name="windowAjout">
</ContentView>
<Border Stroke="{StaticResource Secondary}" BackgroundColor="{StaticResource Yellow100Accent}" Margin="10,10,10,10" Padding="3" StrokeThickness="4" StrokeShape="RoundRectangle 45,5,5,45" Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="4">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="6*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label Text="TOTAL" Grid.Column="0" Grid.ColumnSpan="2" HorizontalOptions="Center" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="{Binding SelectedCompte.Solde}" Grid.Column="1" Grid.ColumnSpan="2" HorizontalOptions="Center" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="€" Grid.Column="1" Grid.ColumnSpan="2" HorizontalOptions="End" Margin="0,0,50,0" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
</Grid>
</Border>
</Grid> </Grid>
</Border>
</ContentView> </ContentView>

@ -5,15 +5,38 @@ namespace IHM.Desktop;
public partial class Operations : ContentView public partial class Operations : ContentView
{ {
public Manager Mgr => (App.Current as App).Manager;
List<Operation> operations;
public Operations() public Operations()
{ {
InitializeComponent(); InitializeComponent();
Mgr.LoadBanque(); // Temporaire pour établir le binding de la vue
Mgr.LoadCompte(); operations = new List<Operation>();
operations.Add(new("op", 33.44, DateTime.Now, MethodePayement.CB, TagOperation.Divers, false));
BindingContext = Mgr; operations.Add(new("course", 45.20, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("Orange", 50, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("EDF", 55.80, DateTime.Now, MethodePayement.Virement, TagOperation.Energie, true));
operations.Add(new("op", 33.44, DateTime.Now, MethodePayement.CB, TagOperation.Divers, false));
operations.Add(new("course", 45.20, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("Orange", 50, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("EDF", 55.80, DateTime.Now, MethodePayement.Virement, TagOperation.Energie, true));
operations.Add(new("op", 33.44, DateTime.Now, MethodePayement.CB, TagOperation.Divers, false));
operations.Add(new("course", 45.20, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("Orange", 50, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("EDF", 55.80, DateTime.Now, MethodePayement.Virement, TagOperation.Energie, true));
operations.Add(new("op", 33.44, DateTime.Now, MethodePayement.CB, TagOperation.Divers, false));
operations.Add(new("course", 45.20, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("Orange", 50, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("EDF", 55.80, DateTime.Now, MethodePayement.Virement, TagOperation.Energie, true));
operations.Add(new("op", 33.44, DateTime.Now, MethodePayement.CB, TagOperation.Divers, false));
operations.Add(new("course", 45.20, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("Orange", 50, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("EDF", 55.80, DateTime.Now, MethodePayement.Virement, TagOperation.Energie, true));
BindingContext = operations;
} }
private void AddCredit_Clicked(object sender, EventArgs e) private void AddCredit_Clicked(object sender, EventArgs e)

@ -48,24 +48,12 @@
<MauiImage Include="Resources\Images\GestionBanques\reload_banks.png"> <MauiImage Include="Resources\Images\GestionBanques\reload_banks.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</MauiImage> </MauiImage>
<MauiImage Include="Resources\Images\NavBar\banque_black.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</MauiImage>
<MauiImage Include="Resources\Images\NavBar\cb_black.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</MauiImage>
<MauiImage Include="Resources\Images\NavBar\date_black.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</MauiImage>
<MauiImage Include="Resources\Images\NavBar\dollar_black.png"> <MauiImage Include="Resources\Images\NavBar\dollar_black.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</MauiImage> </MauiImage>
<MauiImage Include="Resources\Images\NavBar\settings_black.png"> <MauiImage Include="Resources\Images\NavBar\settings_black.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</MauiImage> </MauiImage>
<MauiImage Include="Resources\Images\NavBar\stats_black.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</MauiImage>
<Resource Include="Resources\Images\NavBar\home_black.png" /> <Resource Include="Resources\Images\NavBar\home_black.png" />
<!-- Splash Screen --> <!-- Splash Screen -->
@ -73,15 +61,6 @@
<!-- Images --> <!-- Images -->
<MauiImage Include="Resources\Images\*" /> <MauiImage Include="Resources\Images\*" />
<MauiImage Update="Resources\Images\background1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</MauiImage>
<MauiImage Update="Resources\Images\background2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</MauiImage>
<MauiImage Update="Resources\Images\background3.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</MauiImage>
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" /> <MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />
<MauiImage Update="Resources\Images\logo_sans_fond.png"> <MauiImage Update="Resources\Images\logo_sans_fond.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
@ -108,10 +87,6 @@
<None Remove="Resources\Images\DashBoard\account_banks.png" /> <None Remove="Resources\Images\DashBoard\account_banks.png" />
<None Remove="Resources\Images\GestionBanques\add_banks.png" /> <None Remove="Resources\Images\GestionBanques\add_banks.png" />
<None Remove="Resources\Images\GestionBanques\reload_banks.png" /> <None Remove="Resources\Images\GestionBanques\reload_banks.png" />
<None Remove="Resources\Images\NavBar\banque_black.png" />
<None Remove="Resources\Images\NavBar\cb_black.png" />
<None Remove="Resources\Images\NavBar\date_black.png" />
<None Remove="Resources\Images\NavBar\stats_black.png" />
<None Remove="Resources\Images\refresh.png" /> <None Remove="Resources\Images\refresh.png" />
</ItemGroup> </ItemGroup>
@ -129,9 +104,6 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="Syncfusion.Maui.Charts" Version="20.4.43" />
<PackageReference Include="Syncfusion.Maui.Inputs" Version="20.4.43" />
<PackageReference Include="Syncfusion.Maui.ListView" Version="20.4.43" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

@ -1,16 +1,4 @@
using Syncfusion.Maui.Core.Hosting; namespace IHM
using Microsoft.Maui;
using Microsoft.Maui.Hosting;
using Microsoft.Maui.Controls.Compatibility;
using Microsoft.Maui.Controls.Hosting;
using Microsoft.Maui.Controls.Xaml;
using Syncfusion.Maui.Core.Hosting;
namespace IHM
{ {
public static class MauiProgram public static class MauiProgram
{ {
@ -19,8 +7,6 @@ namespace IHM
var builder = MauiApp.CreateBuilder(); var builder = MauiApp.CreateBuilder();
builder builder
.UseMauiApp<App>() .UseMauiApp<App>()
.ConfigureSyncfusionCore()
.ConfigureFonts(fonts => .ConfigureFonts(fonts =>
{ {
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");

@ -11,7 +11,7 @@ public partial class AjoutBanques : ContentPage
{ {
InitializeComponent(); InitializeComponent();
BindingContext = Mgr; BindingContext = Mgr;
Mgr.LoadBanqueDispo(); Mgr.LoadBanques();
if (OperatingSystem.IsIOS()) if (OperatingSystem.IsIOS())
{ {
boutonRetour.IsVisible = true; boutonRetour.IsVisible = true;
@ -71,7 +71,7 @@ public partial class AjoutBanques : ContentPage
} }
} }
//Mgr.User.LesBanques = await Mgr.Pers.RecupererBanques(Mgr.User); Mgr.User.LesBanques = await Mgr.Pers.RecupererBanques(Mgr.User);
await Navigation.PopModalAsync(); await Navigation.PopModalAsync();
} }
} }

@ -7,8 +7,7 @@
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="0.25*"/> <RowDefinition Height="0.25*"/>
<RowDefinition Height="0.15*"/> <RowDefinition Height="0.15*"/>
<RowDefinition Height="0.15*"/> <RowDefinition Height="1.40*"/>
<RowDefinition Height="1.30*"/>
<RowDefinition Height="0.15*"/> <RowDefinition Height="0.15*"/>
<RowDefinition/> <RowDefinition/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
@ -39,97 +38,86 @@
Clicked="Banques_Clicked"/> Clicked="Banques_Clicked"/>
<HorizontalStackLayout Grid.Row="1" Grid.ColumnSpan="2" HorizontalOptions="Center" >
<Picker Title="Choisir une Banque"
ItemsSource="{Binding ListeDesBanques}"
ItemDisplayBinding="{Binding Name}"
SelectedItem="{Binding SelectedBanque}"
Margin="0,0,30,0"/>
<Picker Title="Choisir un Compte"
ItemsSource="{Binding ListeDesComptes}"
ItemDisplayBinding="{Binding Nom}"
SelectedItem="{Binding SelectedCompte}"
Margin="30,0,0,0"/>
</HorizontalStackLayout>
<Label Grid.Row="2" Grid.ColumnSpan="2" Text="Liste des Dernières Opérations : " FontAttributes="Bold" FontSize="Body" Padding="20,5,0,0"/>
<CollectionView ItemsSource="{Binding SelectedCompte.LesOpe}" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2"> <Label Grid.Row="1" Grid.ColumnSpan="2" Text="Liste des Dernières Opérations : " FontAttributes="Bold" FontSize="Body" Padding="20,5,0,0"/>
<CollectionView Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" ItemsSource="{Binding LesOpe}">
<CollectionView.ItemTemplate> <CollectionView.ItemTemplate>
<DataTemplate> <DataTemplate>
<Grid Margin="0,7,0,7" > <Grid Padding="10">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition/> <RowDefinition/>
<RowDefinition/> <RowDefinition/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<!--<ColumnDefinition/>--> <ColumnDefinition/>
<ColumnDefinition/> <ColumnDefinition/>
<ColumnDefinition/> <ColumnDefinition/>
<ColumnDefinition/> <ColumnDefinition/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!--<ImageButton Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" <ImageButton Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
Source="{Binding ImageSrc}" Source="{Binding ImageSrc}"
CornerRadius="10"/>--> CornerRadius="10"/>
<Label Grid.Row="0" Grid.Column="0" <Label Grid.Row="0" Grid.Column="1"
Text="{Binding Nom}" Text="{Binding NomOpe}"
FontAttributes="Bold" FontAttributes="Bold" />
FontSize="Body" <Label Grid.Row="1" Grid.Column="1"
Margin="50,0,0,0"/> Text="{Binding DetailTypeOpe}"
<Label Grid.Row="1" Grid.Column="0"
Text="{Binding Tag}"
Margin="50,0,0,0"
FontAttributes="Italic"/> FontAttributes="Italic"/>
<Label Grid.Row="0" Grid.Column="2" <Label Grid.Row="0" Grid.Column="2"
Text="{Binding DateOperation, StringFormat='{0:d}'}"/> Text="{Binding DateOpe}"/>
<Label Grid.Row="1" Grid.Column="2" <Label Grid.Row="0" Grid.Column="3" Grid.ColumnSpan="2"
Text="{Binding Montant}" Text="{Binding MontantOpe}"
FontAttributes="Bold" FontAttributes="Bold"/>
TextColor="OrangeRed"/>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
</CollectionView.ItemTemplate> </CollectionView.ItemTemplate>
</CollectionView> </CollectionView>
<Label Grid.Row="3" Grid.ColumnSpan="2" Text="Liste des Comptes favoris :" FontAttributes="Bold" FontSize="Body" Padding="20,0,0,0"/>
<CollectionView Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" ItemsSource="{Binding ComptesFav}" ItemsLayout="HorizontalList">
<Label Grid.Row="4" Grid.ColumnSpan="2" Text="Liste des Banques favoris :" FontAttributes="Bold" FontSize="Body" Padding="20,0,0,0"/>
<CollectionView Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" ItemsSource="{Binding ListeDesBanques}">
<CollectionView.ItemTemplate> <CollectionView.ItemTemplate>
<DataTemplate> <DataTemplate>
<Grid> <Grid Padding="10">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1.75*"/> <ColumnDefinition/>
<ColumnDefinition/> <ColumnDefinition/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Grid.Column="0" Text="{Binding Name}" <Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
FontAttributes="Bold" FontSize="Body" Text="{Binding Banque}"
HorizontalOptions="Center" FontAttributes="Bold"/>
VerticalOptions="Center"/> <Label Grid.Row="0" Grid.Column="1"
<ImageButton Grid.Column="2" Source="reload_banks.png" Text="{Binding Type}"
Padding="10" Margin="5" FontAttributes="Italic"/>
CornerRadius="10" HeightRequest="65" <Label Grid.Row="1" Grid.Column="1"
BackgroundColor="{StaticResource Primary}"/> Text="{Binding Solde}"
FontAttributes="Bold"/>
<Label Grid.Row="0" Grid.Column="2"
Text="{Binding DateMaJ}"/>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
</CollectionView.ItemTemplate> </CollectionView.ItemTemplate>
</CollectionView> </CollectionView>
</Grid> </Grid>
</ScrollView> </ScrollView>
</ContentPage> </ContentPage>

@ -6,13 +6,10 @@ namespace IHM.Mobile;
public partial class DashBoard : ContentPage public partial class DashBoard : ContentPage
{ {
public Manager Mgr => (App.Current as App).Manager; public Manager Mgr => (App.Current as App).Manager;
public DashBoard() public DashBoard()
{ {
InitializeComponent(); InitializeComponent();
Mgr.LoadBanque(); //Routing.RegisterRoute(nameof(DashBoard), typeof(DashBoard));
BindingContext = Mgr; BindingContext = Mgr;
if (Mgr.User == null) if (Mgr.User == null)
@ -21,15 +18,12 @@ public partial class DashBoard : ContentPage
} }
/*if (!Mgr.Pers.TestConnexion()) /*if (!Mgr.Pers.TestConnexion())
{ {
loadPage(new ErrorPage()); loadPage(new ErrorPage());
Debug.WriteLine("cc"); Debug.WriteLine("cc");
}*/ }*/
} }
public async void loadPage(Page p) public async void loadPage(Page p)

@ -32,7 +32,7 @@
<Label Grid.Row="1" Grid.ColumnSpan="3" Text="Liste de vos banques : " FontAttributes="Bold" FontSize="Body" Padding="20,10,0,0"/> <Label Grid.Row="1" Grid.ColumnSpan="3" Text="Liste de vos banques : " FontAttributes="Bold" FontSize="Body" Padding="20,10,0,0"/>
<CollectionView Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3" ItemsSource="{Binding ListeDesBanques}"> <CollectionView Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3" ItemsSource="{Binding User.LesBanques}">
<CollectionView.ItemTemplate> <CollectionView.ItemTemplate>
<DataTemplate> <DataTemplate>
<Grid> <Grid>
@ -41,7 +41,7 @@
<ColumnDefinition/> <ColumnDefinition/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Grid.Column="0" Text="{Binding Name}" <Label Grid.Column="0" Text="{Binding Nom}"
FontAttributes="Bold" FontSize="Body" FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center" HorizontalOptions="Center"
VerticalOptions="Center"/> VerticalOptions="Center"/>
@ -59,5 +59,6 @@
</CollectionView> </CollectionView>
</Grid> </Grid>
</ContentPage> </ContentPage>

@ -11,7 +11,7 @@ public partial class GestionBanques : ContentPage
{ {
InitializeComponent(); InitializeComponent();
BindingContext= Mgr; BindingContext= Mgr;
Mgr.LoadBanque(); Mgr.LoadBanques();
if (OperatingSystem.IsIOS()) if (OperatingSystem.IsIOS())
{ {
boutonRetour.IsVisible = true; boutonRetour.IsVisible = true;

@ -24,7 +24,7 @@
TextColor="{StaticResource Black}" TextColor="{StaticResource Black}"
VerticalTextAlignment="Center" VerticalTextAlignment="Center"
FontSize="15" FontSize="15"
Placeholder="Adresse mail" Placeholder="Addresse mail"
x:Name="EntryMail"/> x:Name="EntryMail"/>
</Border> </Border>

@ -26,10 +26,7 @@ namespace IHM.Mobile
if (Mgr.CompareHash(await Mgr.getPassword(EntryMail.Text), EntryPassworld.Text)) if (Mgr.CompareHash(await Mgr.getPassword(EntryMail.Text), EntryPassworld.Text))
{ {
Mgr.createUser(EntryMail.Text); Mgr.createUser(EntryMail.Text);
await Navigation.PopModalAsync(); await Navigation.PopModalAsync();
Mgr.LoadAll();
} }
else else
{ {

@ -2,14 +2,11 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Mobile.Operations"> x:Class="IHM.Mobile.Operations">
<ScrollView>
<VerticalStackLayout> <VerticalStackLayout>
<Label Text="Mes Opérations :" FontAttributes="Bold" Margin="10,10,0,20" FontSize="20"/> <ListView Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" ItemsSource="{Binding User.LesBanques[0].ListeDesComptes[0].LesOpe}">
<CollectionView Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" ItemsSource="{Binding SelectedCompte.LesOpe}"> <ListView.ItemTemplate>
<!--User.LesBanques[0].ListeDesComptes[0].LesOpe}-->
<CollectionView.ItemTemplate>
<DataTemplate> <DataTemplate>
<Grid Margin="0,7,0,7"> <Grid Padding="10" >
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition/> <RowDefinition/>
<RowDefinition/> <RowDefinition/>
@ -24,25 +21,20 @@
<!--<ImageButton Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" <!--<ImageButton Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
Source="{Binding ImageSrc}" Source="{Binding ImageSrc}"
CornerRadius="10"/>--> CornerRadius="10"/>-->
<Label Grid.Row="0" Grid.Column="0" <Label Grid.Row="0" Grid.Column="1"
Text="{Binding Nom}" Text="{Binding IntituleOperation}"
FontAttributes="Bold" FontAttributes="Bold" TextColor="Brown" />
FontSize="Body" <Label Grid.Row="1" Grid.Column="1"
Margin="50,0,0,0"/> Text="{Binding DetailTypeOpe}"
<Label Grid.Row="1" Grid.Column="0" FontAttributes="Italic"/>
Text="{Binding Tag}"
FontAttributes="Italic"
Margin="50,0,0,0"/>
<Label Grid.Row="0" Grid.Column="2" <Label Grid.Row="0" Grid.Column="2"
Text="{Binding DateOperation, StringFormat='{0:d}'}"/> Text="{Binding DateOperation}"/>
<Label Grid.Row="1" Grid.Column="2" <Label Grid.Row="0" Grid.Column="3" Grid.ColumnSpan="2"
Text="{Binding Montant}" Text="{Binding Montant}"
FontAttributes="Bold" FontAttributes="Bold"/>
TextColor="OrangeRed"/>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
</CollectionView.ItemTemplate> </ListView.ItemTemplate>
</CollectionView> </ListView>
</VerticalStackLayout> </VerticalStackLayout>
</ScrollView>
</ContentPage> </ContentPage>

@ -6,12 +6,9 @@ namespace IHM.Mobile;
public partial class Operations : ContentPage public partial class Operations : ContentPage
{ {
public Manager Mgr => (App.Current as App).Manager; public Manager Mgr => (App.Current as App).Manager;
public Operations() public Operations()
{ {
InitializeComponent(); InitializeComponent();
BindingContext = Mgr; BindingContext = Mgr;
Mgr.LoadCompte();
} }
} }

@ -2,48 +2,134 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:IHM.Composant" xmlns:local="clr-namespace:IHM.Composant"
x:Class="IHM.Mobile.Planification"> x:Class="IHM.Mobile.Planification"
<ScrollView> BackgroundColor="#A00EE8">
<ScrollView VerticalOptions="FillAndExpand">
<VerticalStackLayout> <VerticalStackLayout>
<Label Text="Mes Echeances du mois :" FontAttributes="Bold" Margin="10,10,0,20" FontSize="20"/> <StackLayout Orientation="Horizontal">
<CollectionView ItemsSource="{Binding SelectedCompte.LesEch}"> <Label
<!--User.LesBanques[0].ListeDesComptes[0].LesOpe}--> Text="Bienvenue"
VerticalOptions="Center"
HorizontalOptions="Start"
Margin="10,10,10,20"
FontSize="25"
/>
<Label
FontAttributes="Bold"
Margin="0,10,0,0"
Text="{Binding User.Prenom}"
FontSize="25"
/>
</StackLayout>
<Button
BackgroundColor="Red"
x:Name="Bouton"
WidthRequest="50"
HeightRequest="50"
HorizontalOptions="End"
Margin="0,0,40,0"
Clicked="OnClickedGestionBanque"
/>
<Button
IsVisible="False"
IsEnabled="False"
WidthRequest="175"
HeightRequest="50"
Margin="0,-50,0,0"
x:Name="ImgBanqueActuelle"
BackgroundColor="AliceBlue"
Text="{Binding selectedBanque}"
/>
<Button
IsVisible="false"
BackgroundColor="Black"
x:Name="BoutonRetour"
WidthRequest="50"
HeightRequest="50"
HorizontalOptions="End"
Margin="0,-50,40,0"
Clicked="OnClickedRetour"
/>
<StackLayout IsVisible="false" x:Name="stackpannel">
<CollectionView x:Name="listeBanque" ItemsSource="{Binding User.LesBanques}" ItemsUpdatingScrollMode="KeepScrollOffset" Margin="22,0,22,0" ItemsLayout="HorizontalList">
<CollectionView.ItemTemplate> <CollectionView.ItemTemplate>
<DataTemplate> <DataTemplate>
<Grid Margin="0,7,0,7"> <StackLayout Margin="0,35,0,0">
<Grid.RowDefinitions> <Button Clicked="OnClickedBanque" Text="{Binding Nom}"/>
<RowDefinition/> </StackLayout>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<!--<ColumnDefinition/>-->
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<!--<ImageButton Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
Source="{Binding ImageSrc}"
CornerRadius="10"/>-->
<Label Grid.Row="0" Grid.Column="0"
Text="{Binding Nom}"
FontAttributes="Bold"
FontSize="Body"
Margin="50,0,0,0"/>
<Label Grid.Row="1" Grid.Column="0"
Text="{Binding Tag}"
FontAttributes="Italic"
Margin="50,0,0,0"/>
<Label Grid.Row="0" Grid.Column="2"
Text="{Binding DateOperation, StringFormat='{0:d}'}"/>
<Label Grid.Row="1" Grid.Column="2"
Text="{Binding Montant}"
FontAttributes="Bold"
TextColor="OrangeRed"/>
</Grid>
</DataTemplate> </DataTemplate>
</CollectionView.ItemTemplate> </CollectionView.ItemTemplate>
</CollectionView> </CollectionView>
</StackLayout>
<StackLayout Margin="0,20,0,0" Orientation="Horizontal">
<Label Margin="20,0,0,0" FontSize="25">Solde total :</Label>
<Label FontSize="25" Margin="8,0,0,0" x:Name="soldetotal">0</Label>
</StackLayout>
<Border Stroke="Black" StrokeThickness="5" Margin="0,70,0,0">
<StackLayout BackgroundColor="Cyan" Padding="0,0,0,20">
<Label HorizontalTextAlignment="Center" FontSize="20">Listes des dernières opérations</Label>
<StackLayout Orientation="Vertical">
<StackLayout Orientation="Horizontal">
<Label>Nom de l'opération</Label>
<Label>Date de l'opération</Label>
<Label>Type d'opération</Label>
</StackLayout>
<StackLayout Orientation="Horizontal">
<Label>Nom de l'opération</Label>
<Label>Date de l'opération</Label>
<Label>Type d'opération</Label>
</StackLayout>
<StackLayout Orientation="Horizontal">
<Label>Nom de l'opération</Label>
<Label>Date de l'opération</Label>
<Label>Type d'opération</Label>
</StackLayout>
<StackLayout Orientation="Horizontal">
<Label>Nom de l'opération</Label>
<Label>Date de l'opération</Label>
<Label>Type d'opération</Label>
</StackLayout>
<StackLayout Orientation="Horizontal">
<Label>Nom de l'opération</Label>
<Label>Date de l'opération</Label>
<Label>Type d'opération</Label>
</StackLayout>
<StackLayout Orientation="Horizontal">
<Label>Nom de l'opération</Label>
<Label>Date de l'opération</Label>
<Label>Type d'opération</Label>
</StackLayout>
<StackLayout Orientation="Horizontal">
<Label>Nom de l'opération</Label>
<Label>Date de l'opération</Label>
<Label>Type d'opération</Label>
</StackLayout>
<StackLayout Orientation="Horizontal">
<Label>Nom de l'opération</Label>
<Label>Date de l'opération</Label>
<Label>Type d'opération</Label>
</StackLayout>
<StackLayout Orientation="Horizontal">
<Label>Nom de l'opération</Label>
<Label>Date de l'opération</Label>
<Label>Type d'opération</Label>
</StackLayout>
<StackLayout Orientation="Horizontal">
<Label>Nom de l'opération</Label>
<Label>Date de l'opération</Label>
<Label>Type d'opération</Label>
</StackLayout>
</StackLayout>
</StackLayout>
</Border>
<Border Stroke="Black" StrokeThickness="5" Margin="0,70,0,30">
<StackLayout Margin="0,10,0,0">
<Label HorizontalTextAlignment="Center" FontSize="20">Pour vous</Label>
<StackLayout BackgroundColor="RosyBrown" Margin="0,0,0,20" HeightRequest="200" WidthRequest="310">
<Label HorizontalOptions="Center" FontSize="20">Aide à la gestion personnalisée</Label>
</StackLayout>
</StackLayout>
</Border>
</VerticalStackLayout> </VerticalStackLayout>
</ScrollView> </ScrollView>
</ContentPage> </ContentPage>

@ -9,9 +9,43 @@ public partial class Planification : ContentPage
{ {
InitializeComponent(); InitializeComponent();
BindingContext = Mgr; BindingContext = Mgr;
Mgr.LoadCompte(); //Routing.RegisterRoute(nameof(DashBoard), typeof(DashBoard));
} }
void OnClickedBanque(object sender, EventArgs args)
{
Button btn = (Button)sender;
ImgBanqueActuelle.Text = btn.Text;
}
async void OnClickedGestionBanque(object sender, EventArgs args)
{
Bouton.BackgroundColor = Color.FromRgb(192, 192, 192);
await Bouton.TranslateTo(-130, 35, 50);
await Bouton.ScaleXTo(7.5, 50);
await Bouton.ScaleYTo(3, 50);
stackpannel.IsVisible = true;
BoutonRetour.IsVisible = true;
ImgBanqueActuelle.IsVisible = true;
//await Navigation.PushModalAsync(new GestionBanque());
}
async void OnClickedRetour(object sender, EventArgs args)
{
await Bouton.ScaleXTo(1, 50);
await Bouton.ScaleYTo(1, 50);
ImgBanqueActuelle.IsVisible = false;
stackpannel.IsVisible = false;
await Bouton.TranslateTo(0, 0, 50);
BoutonRetour.IsVisible = false;
}
public async void loadInscription()
{
await Navigation.PushModalAsync(new MainPage());
BindingContext = Mgr;
}
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 548 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 668 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 511 B

After

Width:  |  Height:  |  Size: 963 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 744 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 KiB

@ -4,7 +4,6 @@
xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
<Color x:Key="Corail">#DF775C</Color>
<Color x:Key="Primary">#7FB196</Color> <Color x:Key="Primary">#7FB196</Color>
<Color x:Key="Secondary">#3C425A</Color> <Color x:Key="Secondary">#3C425A</Color>
<Color x:Key="Tertiary">#F3EFDB</Color> <Color x:Key="Tertiary">#F3EFDB</Color>
@ -43,11 +42,9 @@
<Color x:Key="Blue300Accent">#A7CBF6</Color> <Color x:Key="Blue300Accent">#A7CBF6</Color>
<LinearGradientBrush x:Key="TestColor" StartPoint="0,0" EndPoint="1,1"> <LinearGradientBrush x:Key="TestColor" StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="{StaticResource Gray600}" Offset="0" /> <GradientStop Color="RosyBrown" Offset="0" />
<GradientStop Color="{StaticResource Tertiary}" Offset="0.5" /> <GradientStop Color="{StaticResource Tertiary}" Offset="0.5" />
<GradientStop Color="{StaticResource Gray600}" Offset="1" /> <GradientStop Color="RosyBrown" Offset="1" />
</LinearGradientBrush> </LinearGradientBrush>
</ResourceDictionary> </ResourceDictionary>

@ -403,7 +403,7 @@
<Setter Property="FontFamily" Value="Comic sans MS"/> <Setter Property="FontFamily" Value="Comic sans MS"/>
<Setter Property="FontSize" Value="30"/> <Setter Property="FontSize" Value="30"/>
<Setter Property="HorizontalOptions" Value="Center"/> <Setter Property="HorizontalOptions" Value="Center"/>
<Setter Property="TextColor" Value="{StaticResource Secondary}"/> <Setter Property="TextColor" Value="{StaticResource Yellow300Accent}"/>
</Style> </Style>
<Style TargetType="Button" x:Key="WindowsButton"> <Style TargetType="Button" x:Key="WindowsButton">
@ -413,17 +413,7 @@
<Setter Property="BorderWidth" Value="1"/> <Setter Property="BorderWidth" Value="1"/>
<Setter Property="BorderColor" Value="Black"/> <Setter Property="BorderColor" Value="Black"/>
<Setter Property="FontFamily" Value="Comic sans MS"/> <Setter Property="FontFamily" Value="Comic sans MS"/>
<Setter Property="Background" Value="{StaticResource Primary}"/> <Setter Property="Background" Value="{StaticResource TestColor}"/>
</Style>
<Style TargetType="Button" x:Key="WindowsButton2">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="Margin" Value="10"/>
<Setter Property="CornerRadius" Value="20"/>
<Setter Property="BorderWidth" Value="1"/>
<Setter Property="BorderColor" Value="Black"/>
<Setter Property="FontFamily" Value="Comic sans MS"/>
<Setter Property="Background" Value="{StaticResource Corail}"/>
</Style> </Style>
<Style TargetType="Border" x:Key="TotalButton"> <Style TargetType="Border" x:Key="TotalButton">

@ -11,7 +11,6 @@ namespace Model
public class Banque : INotifyPropertyChanged public class Banque : INotifyPropertyChanged
{ {
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler PropertyChanged;
public string Nom { get; private set; } public string Nom { get; private set; }
/// <summary> /// <summary>
@ -50,10 +49,6 @@ namespace Model
ListeDesComptes = lescomptes; ListeDesComptes = lescomptes;
} }
/* public Banque()
{
}
*/
void OnPropertyChanged(string propertyName) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); void OnPropertyChanged(string propertyName) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
public void AjouterCompte(Compte compte) public void AjouterCompte(Compte compte)
{ {

@ -1,32 +0,0 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
public class BanqueInscrit : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
public string Name { get; set; }
public int Id { get; set; }
[JsonConstructor]
public BanqueInscrit(int id, string nomBanque)
{
Id = id;
Name = nomBanque;
}
void OnPropertyChanged(string propertyName) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
public override string ToString()
{
return Name + " " + Id;
}
}
}

@ -10,7 +10,7 @@ namespace Model
public string Nom { get; set; } public string Nom { get; set; }
public double Solde { get; set; } public double Solde { get; set; }
public DateTime DerniereModification { get; set; } public DateTime DerniereModification { get; set; }
public IList<Operation> LesOpe public List<Operation> LesOpe
{ {
get => lesOpe; get => lesOpe;
set set
@ -22,23 +22,9 @@ namespace Model
} }
} }
} }
private IList<Operation> lesOpe = new List<Operation>(); private List<Operation> lesOpe = new List<Operation>();
public IList<Planification> LesPla { get; set; } = new List<Planification>(); public List<Planification> LesPla { get; set; } = new List<Planification>();
public List<Echeance> LesEch { get; set; } = new List<Echeance>();
public IList<Echeance> LesEch
{
get => lesEch;
set
{
if (lesEch != value)
{
lesEch = value;
OnPropertyChanged(nameof(LesEch));
}
}
}
private IList<Echeance> lesEch = new List<Echeance>();
//public IList<Echeance> LesEch { get; set; } = new List<Echeance>();
[JsonConstructor] [JsonConstructor]
public Compte(string id, string nom) public Compte(string id, string nom)
@ -50,9 +36,7 @@ namespace Model
} }
public Compte(string id,string nom, double solde) : base() public Compte(string id,string nom, double solde) : base()
{ {
Nom = nom;
Solde = solde; Solde = solde;
} }
public Compte(string id, string nom, double solde, List<Operation> lesOpe) public Compte(string id, string nom, double solde, List<Operation> lesOpe)
{ {

@ -11,7 +11,7 @@ namespace Model
public class Echeance public class Echeance
{ {
public string Nom { get; private set; } public string IntituleOperation { get; private set; }
public double Montant { get; private set; } public double Montant { get; private set; }
@ -23,19 +23,19 @@ namespace Model
public TagOperation Tag { get; private set; } public TagOperation Tag { get; private set; }
[JsonConstructor] [JsonConstructor]
public Echeance(string nom, double montant, DateTime dateO, MethodePayement methodePayement, TagOperation tag, bool isDebit = true) public Echeance(string intituleOperation, double montant, DateTime dateOperation, MethodePayement modePayement, TagOperation tag, bool isDebit = true)
{ {
Nom = nom; IntituleOperation = intituleOperation;
Montant = montant; Montant = montant;
DateOperation = dateO; DateOperation = dateOperation;
ModePayement = methodePayement; ModePayement = modePayement;
IsDebit = isDebit; IsDebit = isDebit;
Tag = tag; Tag = tag;
} }
public override string ToString() public override string ToString()
{ {
return Nom + " - " + DateOperation.ToShortDateString() + " - " + Montant + " €"; return IntituleOperation + " " + DateOperation + " " + Montant + " " + ModePayement + " " + IsDebit + " " + Tag;
} }
} }

@ -22,14 +22,14 @@ namespace Model
//actions sur les banques //actions sur les banques
Task<bool> AjouterBanque(Banque banque, Inscrit inscrit); Task<bool> AjouterBanque(Banque banque, Inscrit inscrit);
Task<bool> SupprimerBanque(Banque banque, Inscrit inscrit); Task<bool> SupprimerBanque(Banque banque, Inscrit inscrit);
Task<IList<BanqueInscrit>> RecupererBanques(Inscrit inscrit); Task<IList<Banque>> RecupererBanques(Inscrit inscrit);
Task<IList<Banque>> RecupererBanquesDisponible(); Task<IList<Banque>> RecupererBanquesDisponible();
//actions sur les comptes //actions sur les comptes
Task<bool> AjouterCompte(Compte compte, Inscrit inscrit); Task<bool> AjouterCompte(Compte compte, Inscrit inscrit);
Task<bool> SupprimerCompte(Compte compte, Inscrit inscrit); Task<bool> SupprimerCompte(Compte compte, Inscrit inscrit);
Task<IList<Compte>> RecupererCompte(BanqueInscrit banque); Task<IList<Compte>> RecupererCompte(Banque banque, Inscrit inscrit);
//actions sur les Opérations //actions sur les Opérations

@ -13,7 +13,7 @@ namespace Model
public IPersistanceManager Pers { get; private set; } public IPersistanceManager Pers { get; private set; }
private Inscrit user;
public Inscrit User public Inscrit User
{ {
get get
@ -26,14 +26,11 @@ namespace Model
{ {
user = value; user = value;
OnPropertyChanged(nameof(User)); OnPropertyChanged(nameof(User));
//LoadBanque();
LoadAll();
} }
} }
} }
private Inscrit user;
public BanqueInscrit SelectedBanque public Banque SelectedBanque
{ {
get => selectedBanque; get => selectedBanque;
set set
@ -42,11 +39,10 @@ namespace Model
{ {
selectedBanque = value; selectedBanque = value;
OnPropertyChanged(nameof(SelectedBanque)); OnPropertyChanged(nameof(SelectedBanque));
//LoadCompte();
} }
} }
} }
private BanqueInscrit selectedBanque; private Banque selectedBanque;
public IList<Banque> BanquesDisponibleInApp public IList<Banque> BanquesDisponibleInApp
{ {
get => banquesDisponibleInApp; get => banquesDisponibleInApp;
@ -61,155 +57,11 @@ namespace Model
} }
private IList<Banque> banquesDisponibleInApp; private IList<Banque> banquesDisponibleInApp;
public Compte SelectedCompte
{
get => selectedCompte;
set
{
if(selectedCompte != value)
{
selectedCompte = value;
OnPropertyChanged(nameof(SelectedCompte));
}
}
}
private Compte selectedCompte;
public IList<BanqueInscrit> ListeDesBanques
{
get => listeDesBanques;
set
{
if (listeDesBanques != value)
{
listeDesBanques = value;
OnPropertyChanged(nameof(ListeDesBanques));
}
}
}
private IList<BanqueInscrit> listeDesBanques = new List<BanqueInscrit>();
//private IList<BanqueInscrit> listeDesBanques = new List<BanqueInscrit>();
public ReadOnlyCollection<BanqueInscrit> AllBanque { get; private set; }
public List<Compte> ListeDesComptes
{
get => listeDesComptes;
set
{
if (listeDesComptes != value)
{
listeDesComptes = value;
OnPropertyChanged(nameof(ListeDesComptes));
}
}
}
private List<Compte> listeDesComptes = new List<Compte>();
public ReadOnlyCollection<Compte> AllCompte { get; private set; }
public Manager(IPersistanceManager persistance) public Manager(IPersistanceManager persistance)
{ {
AllBanque = new ReadOnlyCollection<BanqueInscrit>(ListeDesBanques);
AllCompte = new ReadOnlyCollection<Compte>(ListeDesComptes);
Pers = persistance; Pers = persistance;
} }
public async void LoadCompte()
{
ListeDesComptes.Clear();
if(SelectedBanque == null)
{
throw new ArgumentNullException("Vous n'avez pas de banque disponible");
}
try
{
IList<Compte> comptes = await Pers.RecupererCompte(SelectedBanque);
ListeDesComptes.AddRange(comptes);
foreach (Compte compte in ListeDesComptes)
{
compte.LesPla = await Pers.RecupererPlanification(compte);
compte.LesOpe = await Pers.RecupererOperation(compte);
compte.LesEch = await Pers.RecupererEcheance(compte);
}
SelectedCompte = ListeDesComptes.FirstOrDefault();
}
catch(Exception exception)
{
Debug.WriteLine(exception.Message);
}
}
public async void LoadBanque()
{
try
{
ListeDesBanques = await Pers.RecupererBanques(User);
SelectedBanque = ListeDesBanques.FirstOrDefault();
}
catch (Exception exception)
{
Debug.WriteLine(exception.Message);
}
}
public async void LoadAll()
{
try
{
ListeDesBanques = await Pers.RecupererBanques(User);
ListeDesComptes.AddRange(await Pers.RecupererCompte(ListeDesBanques.FirstOrDefault()));
foreach (Compte compte in ListeDesComptes)
{
compte.LesPla = await Pers.RecupererPlanification(compte);
compte.LesOpe = await Pers.RecupererOperation(compte);
compte.LesEch = await Pers.RecupererEcheance(compte);
}
SelectedBanque = ListeDesBanques.FirstOrDefault();
SelectedCompte = ListeDesComptes.FirstOrDefault();
}
catch (Exception exception)
{
Debug.WriteLine(exception.Message);
}
}
public async void LoadBanqueDispo()
{
try
{
BanquesDisponibleInApp = await Pers.RecupererBanquesDisponible();
}catch(Exception exception)
{
Debug.WriteLine(exception.Message);
}
}
void OnPropertyChanged(string propertyName) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); void OnPropertyChanged(string propertyName) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
@ -223,11 +75,11 @@ namespace Model
User = null; User = null;
} }
/*public async void LoadBanques() public async void LoadBanques()
{ {
User.LesBanques = await Pers.RecupererBanques(User); User.LesBanques = await Pers.RecupererBanques(User);
BanquesDisponibleInApp = await Pers.RecupererBanquesDisponible(); BanquesDisponibleInApp = await Pers.RecupererBanquesDisponible();
}*/ }
public async Task<string> getPassword(string email) public async Task<string> getPassword(string email)
{ {
@ -239,46 +91,6 @@ namespace Model
{ {
User = await Pers.RecupererInscrit(mail); User = await Pers.RecupererInscrit(mail);
} }
// Intégralité des méthodes (Débit, Crédit, planification echeance)
//Operation
public void effectuerOperation(Compte compte, Operation operation)
{
Pers.AjouterOperation(compte, operation);
}
public void supprimerOperation(Compte compte, Operation operation)
{
Pers.SupprimerOperation(compte, operation);
}
//Echeance
public void supprimerEcheance(Compte compte, Echeance echeance)
{
Pers.SupprimerEcheance(compte, echeance);
}
public void ajouterEcheance(Compte compte, Echeance echeance)
{
Pers.AjouterEcheance(compte, echeance);
}
// Planification
public void ajouterPlanification(Compte compte, Planification planification)
{
Pers.AjouterPlanification(compte, planification);
}
public void supprimerPlanification(Compte compte, Planification planification)
{
Pers.SupprimerPlanification(compte, planification);
}
} }
} }

@ -19,9 +19,6 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="Syncfusion.Maui.Charts" Version="20.4.43" />
<PackageReference Include="Syncfusion.Maui.Inputs" Version="20.4.43" />
<PackageReference Include="Syncfusion.Maui.ListView" Version="20.4.43" />
</ItemGroup> </ItemGroup>
</Project> </Project>

@ -11,19 +11,19 @@ namespace Model
public class Operation : INotifyPropertyChanged public class Operation : INotifyPropertyChanged
{ {
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler PropertyChanged;
public string Nom public string IntituleOperation
{ {
get => nom; get => intituleOperation;
set set
{ {
if (nom != value) if (intituleOperation != value)
{ {
nom = value; intituleOperation = value;
OnPropertyChanged(nameof(Nom)); OnPropertyChanged(nameof(IntituleOperation));
} }
} }
} }
private string nom; private string intituleOperation;
public double Montant { get; private set; } public double Montant { get; private set; }
@ -38,12 +38,12 @@ namespace Model
public bool FromBanque { get; private set; } public bool FromBanque { get; private set; }
[JsonConstructor] [JsonConstructor]
public Operation(string nom, double montant, DateTime dateO, MethodePayement methodePayement, TagOperation tag, bool fromBanque, bool isDebit=true) public Operation(string intituleOperation, double montant, DateTime dateOperation, MethodePayement modePayement, TagOperation tag, bool fromBanque, bool isDebit=true)
{ {
Nom = nom; IntituleOperation = intituleOperation;
Montant = montant; Montant = montant;
DateOperation = dateO; DateOperation = dateOperation;
ModePayement = methodePayement; ModePayement = modePayement;
IsDebit = isDebit; IsDebit = isDebit;
Tag = tag; Tag = tag;
FromBanque = fromBanque; FromBanque = fromBanque;
@ -53,11 +53,7 @@ namespace Model
public override string ToString() public override string ToString()
{ {
return Nom + " " + DateOperation + " " + Montant + " " + ModePayement + " " + IsDebit + " " + FromBanque + " " + Tag; return IntituleOperation + " " + DateOperation + " " + Montant + " " + ModePayement + " " + IsDebit + " " + FromBanque + " " + Tag;
} }
} }
} }

@ -12,7 +12,7 @@ namespace Model
public class Planification public class Planification
{ {
public string Nom { get; private set; } public string IntituleOperation { get; private set; }
public double Montant { get; private set; } public double Montant { get; private set; }
@ -24,19 +24,19 @@ namespace Model
public TagOperation Tag { get; private set; } public TagOperation Tag { get; private set; }
[JsonConstructor] [JsonConstructor]
public Planification(string nom, double montant, DateTime dateO, MethodePayement methodePayement, TagOperation tag, bool isDebit = true) public Planification(string intituleOperation, double montant, DateTime dateOperation, MethodePayement modePayement, TagOperation tag, bool isDebit = true)
{ {
Nom = nom; IntituleOperation = intituleOperation;
Montant = montant; Montant = montant;
DateOperation = dateO; DateOperation = dateOperation;
ModePayement = methodePayement; ModePayement = modePayement;
IsDebit = isDebit; IsDebit = isDebit;
Tag = tag; Tag = tag;
} }
public override string ToString() public override string ToString()
{ {
return Nom + " " + DateOperation + " " + Montant + " " + ModePayement + " " + IsDebit + " " + Tag; return IntituleOperation + " " + DateOperation + " " + Montant + " " + ModePayement + " " + IsDebit + " " + Tag;
} }
} }
} }

@ -21,6 +21,4 @@ namespace Model
Transaction, Transaction,
Santé Santé
} }
} }

@ -2,7 +2,6 @@
using Model; using Model;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using Syncfusion.Maui.DataSource.Extensions;
using System.Net.Http.Headers; using System.Net.Http.Headers;
using System.Security.Principal; using System.Security.Principal;
using System.Xml.Linq; using System.Xml.Linq;
@ -88,8 +87,8 @@ foreach (Banque b in banques)
Console.WriteLine("\n--------\n"); Console.WriteLine("\n--------\n");
IList<BanqueInscrit> banquesId1 = ClientAPI.GetBanqueAsync("1").GetAwaiter().GetResult(); IList<Banque> banquesId1 = ClientAPI.GetBanqueAsync("1").GetAwaiter().GetResult();
foreach (BanqueInscrit b in banquesId1) foreach (Banque b in banquesId1)
{ {
Console.WriteLine(b); Console.WriteLine(b);
} }
@ -102,7 +101,7 @@ Console.WriteLine("Add banque for user : " + rrrr + "\n");
Console.WriteLine("\n----Verif----\n"); Console.WriteLine("\n----Verif----\n");
banquesId1 = ClientAPI.GetBanqueAsync("1").GetAwaiter().GetResult(); banquesId1 = ClientAPI.GetBanqueAsync("1").GetAwaiter().GetResult();
foreach (BanqueInscrit b in banquesId1) foreach (Banque b in banquesId1)
{ {
Console.WriteLine(b); Console.WriteLine(b);
} }
@ -115,7 +114,7 @@ Console.WriteLine("Del banque for user : " + rrrrrr + "\n");
Console.WriteLine("\n----Verif----\n"); Console.WriteLine("\n----Verif----\n");
banquesId1 = ClientAPI.GetBanqueAsync("1").GetAwaiter().GetResult(); banquesId1 = ClientAPI.GetBanqueAsync("1").GetAwaiter().GetResult();
foreach (BanqueInscrit b in banquesId1) foreach (Banque b in banquesId1)
{ {
Console.WriteLine(b); Console.WriteLine(b);
} }
@ -247,14 +246,3 @@ foreach (Echeance e in echeances)
{ {
Console.WriteLine(e); Console.WriteLine(e);
} }
Console.WriteLine("errr");
// test pers API
IPersistanceManager Pers = new PersAPI();
IList<Compte> bla = Pers.RecupererCompte(new BanqueInscrit(34,"BANQUE POSTALE")).GetAwaiter().GetResult();
bla.ForEach(c=> Console.WriteLine(c));

@ -9,9 +9,6 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="Syncfusion.Maui.Charts" Version="20.4.43" />
<PackageReference Include="Syncfusion.Maui.Inputs" Version="20.4.43" />
<PackageReference Include="Syncfusion.Maui.ListView" Version="20.4.43" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

@ -11,9 +11,6 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="Syncfusion.Maui.Charts" Version="20.4.43" />
<PackageReference Include="Syncfusion.Maui.Inputs" Version="20.4.43" />
<PackageReference Include="Syncfusion.Maui.ListView" Version="20.4.43" />
<PackageReference Include="xunit" Version="2.4.1" /> <PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3"> <PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

Loading…
Cancel
Save