Compare commits

..

188 Commits
API ... master

Author SHA1 Message Date
Nicolas MAYE 87f00a822b modification sur ecran de connexion
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET 1abb8c9ada Merge branch 'Binding'
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET 341bb8f5e6 ReadOnly buggé :(
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET a392a21fc5 Patch Heure dans les vues
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET 59fbd7c2d6 Réparation des tags de moyens de payement
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET 9ce0a4af12 Push gestion Banques Desktop
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET 6db964aafb Merge branch 'Binding' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco into Binding
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET eeb10e8926 Bind Mobile
2 years ago
Hugo LIVET 12f7ebad49 Binding Mobile
2 years ago
Nicolas MAYE 3c93c66374 Modification majeur interface utilisateur (modification style global + navigation + binding statistique...)
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE fe1f1f8ff9 implémentation des fonctionnalités enregistrer et supprimer echeance + retirer et supprimer operation
2 years ago
Nicolas MAYE 4f0099fcef methode debit et crédit implémentés
2 years ago
Hugo LIVET c031ce2137 gestion combo box
continuous-integration/drone/push Build was killed Details
2 years ago
Hugo LIVET fd34a64857 Merge branch 'Binding' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco into Binding
continuous-integration/drone/push Build was killed Details
2 years ago
Hugo LIVET 2a0172ca8d add image
2 years ago
Nicolas MAYE bf2838b4c1 fusion
continuous-integration/drone/push Build was killed Details
2 years ago
Nicolas MAYE 43af56ca06 modification temporaire
2 years ago
Hugo LIVET ae06599285 Changement d'icones
continuous-integration/drone/push Build was killed Details
2 years ago
Hugo LIVET 529f4fd8b4 Bind mieux que nico psk il sait pas écrire
continuous-integration/drone/push Build was killed Details
2 years ago
Hugo LIVET 62c668c011 Patch bug LoadCompte, en cas de pluseurs appels de la méthode
continuous-integration/drone/push Build was killed Details
2 years ago
Nicolas MAYE c82de40d19 binding partie échéancier
continuous-integration/drone/push Build was killed Details
2 years ago
Nicolas MAYE ec757cad9f binding partie operation
continuous-integration/drone/push Build was killed Details
2 years ago
Nicolas MAYE d2cc90c555 Merge branch 'Binding' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco into Binding
continuous-integration/drone/push Build was killed Details
2 years ago
Nicolas MAYE 85ad54c95f modification mineur sur les vues
2 years ago
Hugo LIVET 517db9a0fe Bind nom planification
continuous-integration/drone/push Build was killed Details
2 years ago
Hugo LIVET 79964920a9 Bind Plannification ok
continuous-integration/drone/push Build was killed Details
2 years ago
Hugo LIVET b7c339d999 Fussion
2 years ago
Hugo LIVET 72156049aa Binding Plannification OK
2 years ago
Nicolas MAYE 75be7dd588 modification des vue concernant les fonctions
continuous-integration/drone/push Build was killed Details
2 years ago
Nicolas MAYE f3cf398e73 modification du dashboard pour le responsive
continuous-integration/drone/push Build was killed Details
2 years ago
Nicolas MAYE a7b8445c65 Amélioration UX (uniformisation de l'aspect visuel + ajout de bordure) + Binding du user dans "mon compte"
continuous-integration/drone/push Build was killed Details
2 years ago
Nicolas MAYE 3f341cebba modification vue login
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE 5e393fc899 modification mineur
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE 8346bdc69f Merge branch 'Binding' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco into Binding
2 years ago
Nicolas MAYE b6a61795e8 ajout de loadBanque, loadInscrit et loadBanqueDisponible + binding
2 years ago
Hugo LIVET f307902c6e System de connexion Desktop
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET 325ca468f1 Push a reprendre
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE eba13a0488 Transférer les fichiers vers 'Documentation'
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE cf61f1c62a Supprimer 'Documentation/diagramme d'utilisation cons'eco.mdj'
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE bb85c270f1 Supprimer 'Documentation/Diagramme de cas dutilisation.pdf'
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE 84810a8966 Supprimer 'Documentation/Diagramme de cas d'utilisation.pdf'
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE c77146cd4e Transférer les fichiers vers 'Documentation'
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE 0a4b1727d8 modification et binding de compte
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE 1ca736aa2f implémentation des vues dans la partie statistique + ajout des comboBox
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE 582df8f9d8 Début de la modification, du manager et persistance
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET a0ff37248a Correction Fusion UI_Windows
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET 739fa77493 Fusion UI_Windows
2 years ago
Hugo LIVET 12651ea426 Merge pull request 'ManagerRefactoring' (#139) from ManagerRefactoring into master
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET 16e266e8e6 Push bind banques
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET 1499d68d98 OK
continuous-integration/drone/push Build is failing Details
2 years ago
Vincent ASTOLFI ceff9e0ed7 réparation de la connexion et protection des mots de passe
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET 0d9a5188f5 Modif vues
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET 0f00183fdc Réparation de PersAPI
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET f2ae2d41cc Probleme
continuous-integration/drone/push Build is failing Details
2 years ago
Vincent ASTOLFI 6b06e3f909 Refactoring de toute les methodes des pages lies a la conenction afin de les rendres toute fonctionnelle avec l'API
continuous-integration/drone/push Build is failing Details
2 years ago
Vincent ASTOLFI c7bee1a4d6 refactoring du manager pour la page MainWindow
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET 782d82eb74 Remise en état avec le nouvel IPersistanceManager
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE b4fd6dbd4e ajout de CV home, log, enregistrer/supprimer echeance + amelioration graphique
continuous-integration/drone/push Build is passing Details
2 years ago
Hugo LIVET faca3741a1 Netoyage
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET 8abc26d7c8 Merge pull request 'ClientAPI' (#138) from ClientAPI into master
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET bc7c834b5a Modif Fusion
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET d4cd93bc97 Fusion
2 years ago
Hugo LIVET 0a6ea075b9 Modification API
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE fe81d4592c binding avec fake data fini sur planification, echeance et operation
continuous-integration/drone/push Build is passing Details
2 years ago
Hugo LIVET 82f94f9027 Implémentation de l'API finie !!
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE 67d9773fb8 maj operation
continuous-integration/drone/push Build is passing Details
2 years ago
Nicolas MAYE 63ce16c531 ajout classe MethodePayement
2 years ago
Nicolas MAYE 9542f60dc0 maj operation
2 years ago
Nicolas MAYE 94dce05f39 maj planification
2 years ago
Nicolas MAYE 6833a53ed1 ajout classe TagOpération
2 years ago
Nicolas MAYE 640fadb27d maj echeance
2 years ago
Nicolas MAYE 7e84a403a0 maj echeancier
2 years ago
Hugo LIVET 9f434806f1 Modification classe
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET 014fa79013 Ajout de la Planification API
continuous-integration/drone/push Build is failing Details
2 years ago
Lucas EVARD 294bf73d9e Test unitaire Compte
continuous-integration/drone/push Build is failing Details
2 years ago
Lucas EVARD ab33f28138 Merge branch 'master' of https://codefirst.iut.uca.fr/git/hugo.livet/ConsEco
continuous-integration/drone/push Build is failing Details
2 years ago
Lucas EVARD b85bc56b26 Patch probleme tests unitaire Compte/Inscrit
2 years ago
Hugo LIVET 34ca7ca60f Implémentation de l'api dans la stratégie de persistance
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET 0f3872e8f2 Ajout routes Opération
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE 90340af065 finalisation du binding de le vue opération
continuous-integration/drone/push Build is passing Details
2 years ago
Vincent ASTOLFI 2f4a85f154 Merge pull request 'modification du Stub désormais fonctionnelle' (#137) from modifStub into master
continuous-integration/drone/push Build is failing Details
2 years ago
Vincent ASTOLFI b581424a58 ajout de toute les méthodes dans le stub
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE f5f2686c91 modification du style + amélioration des vue echeancier, operation compte et planification
continuous-integration/drone/push Build is passing Details
2 years ago
Vincent ASTOLFI 247f1fe2ce Merge branch 'master' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco
continuous-integration/drone/push Build is failing Details
2 years ago
Vincent ASTOLFI 83d045b280 correction unitTest
2 years ago
Hugo LIVET 4e150819bc API Compte OK
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE a00febc8b4 modifications mineurs des vues
continuous-integration/drone/push Build is passing Details
2 years ago
Hugo LIVET 74d30d2522 Ajout des routes des banques
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE 32d656188d Merge branch 'UI_Windows' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco into UI_Windows
continuous-integration/drone/push Build is passing Details
2 years ago
Nicolas MAYE 51e8b4651b avancement et uniformisation des vues desktop
2 years ago
Hugo LIVET add061d7b4 Patch API
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET c05615cf79 modif testFonctionnel
continuous-integration/drone/push Build is failing Details
2 years ago
Vincent ASTOLFI a834bba09b ajout de méthode dans le stub
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET 5099cf76a0 Ajout des routes des banques mais bug sur l'api
2 years ago
Raphael LACOTE 61802355ff Ajout de commentaire pour les exceptions.
continuous-integration/drone/push Build is passing Details
2 years ago
Raphael LACOTE 34a203cee9 Ajout de nouveaux commentaires.
continuous-integration/drone/push Build is passing Details
2 years ago
Raphael LACOTE f48f3d580a Merge branch 'UI_Windows' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco into UI_Windows
continuous-integration/drone/push Build is passing Details
2 years ago
Raphael LACOTE a80283ff39 Ajout de nouveaux commentaires
2 years ago
Hugo LIVET 12fefde1d7 Ajout de Route
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE e6c47dd57c Merge branch 'UI_Windows' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco into UI_Windows
continuous-integration/drone/push Build is passing Details
2 years ago
Nicolas MAYE 1797a2b0ee avancement sur la vue planification
2 years ago
Raphael LACOTE c4dd19e329 Ajout de commentaires
continuous-integration/drone/push Build is passing Details
2 years ago
Raphael LACOTE e8776b9750 Rectification d'un bug de couleurs
continuous-integration/drone/push Build is passing Details
2 years ago
Raphael LACOTE 41b71baf3e Rectification d'un bug avec les couleurs
2 years ago
Nicolas MAYE 6d8e798211 modification vue windows
continuous-integration/drone/push Build is passing Details
2 years ago
Nicolas MAYE 4f180027f3 modification vue window
2 years ago
Hugo LIVET 3963d6dbd8 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET 8889b164f8 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET b6c86028ee Merge branch 'ClientAPI' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco into ClientAPI
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET acb675e96a Nouvelle IDataPersistance pas finie psk malade :(
2 years ago
Hugo LIVET 69ea3a08c7 💚 correction des dépendances de la CI
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET d3d1b57838 💚 MaJ CI
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET 995a4b10ee Client API
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE f3c8100119 modification contenView DeletePlanification + implémentation listView dans CV_Planification
continuous-integration/drone/push Build is passing Details
2 years ago
Hugo LIVET 77e5c5787c Mise à jour de 'README.md'
continuous-integration/drone/push Build is failing Details
2 years ago
Vincent ASTOLFI 6db599b5f9 tw
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE a6a3133b11 ajout de la content View de delete planification
continuous-integration/drone/push Build is passing Details
2 years ago
Hugo LIVET 4fcaa57528 fusion
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET 0d24d0b43a fusion
2 years ago
Lucas Evard 1a99d87d1a Modification vues pour fonctionner sur IOS
continuous-integration/drone/push Build is failing Details
2 years ago
Raphael LACOTE 1b2d3ba39f Merge branch 'UI_Windows' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco into UI_Windows
continuous-integration/drone/push Build is failing Details
2 years ago
Raphael LACOTE 9952b4d1c7 Création de CV_Statistiques
2 years ago
Hugo LIVET ff4e55615f Mise à jour de 'Sources/Data/tables.sql'
continuous-integration/drone/push Build is failing Details
2 years ago
Raphael LACOTE e1d13eb40f Merge branch 'UI_Windows' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco into UI_Windows
continuous-integration/drone/push Build is failing Details
2 years ago
Raphael LACOTE 79a93486ac Légère modification dans les vues windows
2 years ago
Vincent ASTOLFI 1565ff6d0e modif stub. Ajout de la possibilité de créer des comptes et de changer le mot de passe depuis le stub
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE 651014a924 Merge branch 'UI_Windows' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco into UI_Windows
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE 4deabc07b6 update csproj de la fusion
2 years ago
Nicolas MAYE a7b03eb446 Merge branch 'master' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE 1e43a67e68 fusion de UI_Windows dans master
2 years ago
Hugo LIVET 9526b62b69 Merge branch 'GestionBanques' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco into GestionBanques
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET 085561db1e ajout visu ( a reprendre fait a la va vite)
2 years ago
Vincent ASTOLFI 1add12c047 Merge branch 'API'
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE 65c8e7eafc implémentation du contentView d'ajout d'une planification
continuous-integration/drone/push Build is failing Details
2 years ago
Raphael LACOTE da63a21499 Rectification d'un bug
continuous-integration/drone/push Build is failing Details
2 years ago
Raphael LACOTE 69f61a6a9d Rectification d'un problème d'affichage
2 years ago
Hugo LIVET 21bcd58154 Supprimer 'Sources/TestFonctionnel/CAcomplet.ofx'
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET 6a363d2516 banque avec le manager a jour
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET 3f6f1c4905 rebase
2 years ago
Raphael LACOTE 9c106a06de Transformation de content page en content view
continuous-integration/drone/push Build is failing Details
2 years ago
Raphael LACOTE 8799539316 Merge branch 'UI_Windows' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco into UI_Windows
continuous-integration/drone/push Build is failing Details
2 years ago
Raphael LACOTE 87df36b72e Ajout de style et légère modif de vues
2 years ago
Raphael LACOTE b866c9a81a Modification des vues windows
continuous-integration/drone/push Build is failing Details
2 years ago
Raphael LACOTE 264eaf4d30 Travail sur les vues windows planification,échéancier, compte et opérations
2 years ago
Nicolas MAYE 4f942c6862 Merge branch 'UI_Windows' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco into UI_Windows
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE a829113cfd ajustement content view Planification
2 years ago
Nicolas MAYE daba159235 Merge branch 'UI_Windows' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco into UI_Windows
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE 4086ffd80a implémentation des contentView dans le dashboard
2 years ago
Raphael LACOTE da7fac375f Modification pour les vues windows et ajout de styles
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE 20601db044 indexation planification
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE 92390d408c mise en place des content view de planification et préparation du dashboard
2 years ago
Raphael LACOTE 8e616abb3a Merge branch 'UI_Windows' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco into UI_Windows
continuous-integration/drone/push Build is failing Details
2 years ago
Raphael LACOTE 0f0877191f Modification de la vue pour le compte
2 years ago
Hugo LIVET a43483a37c Merge branch 'GestionBanques' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco into GestionBanques
continuous-integration/drone/push Build is failing Details
2 years ago
Nicolas MAYE 4fddd4f802 modification planification
2 years ago
Lucas EVARD 8b4528c733 Push de la page Dashboard(début)
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo LIVET 82d0dae292 Gestion Banques presque oke
2 years ago
Hugo LIVET 0ecb82b5ce Gestion de l'erreur de connexion a la BDD, ajout de composants + ajouts de vues
2 years ago
Hugo LIVET b66525131f Merge branch 'GestionBanques' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco into GestionBanques
continuous-integration/drone/push Build is passing Details
2 years ago
Hugo LIVET b8f18fdee5 Gestion Banques presque oke
2 years ago
Hugo LIVET 77a0f3c7c0 Gestion de l'erreur de connexion a la BDD, ajout de composants + ajouts de vues
2 years ago
Hugo LIVET 55d1fd1b28 Gestion Banques presque oke
continuous-integration/drone/push Build is passing Details
2 years ago
Raphael LACOTE 61b29d5a36 Légère modification de la page Comptepour les vues Windows
continuous-integration/drone/push Build is passing Details
2 years ago
Raphael LACOTE fef9f3f8f1 Lot de vues
continuous-integration/drone/push Build is passing Details
2 years ago
Raphael LACOTE 4a473fdf43 Lot de vues windows
2 years ago
Hugo LIVET 45b220c477 Merge pull request 'API' (#130) from API into master
continuous-integration/drone/push Build is passing Details
2 years ago
Nicolas MAYE e104f4a49a Merge branch 'UI_Windows' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco into UI_Windows
continuous-integration/drone/push Build is passing Details
2 years ago
Nicolas MAYE ba96c3b9d4 modification vue planification
2 years ago
Nicolas MAYE 2cc56e591b ajout des vue compte et echeancier
continuous-integration/drone/push Build is passing Details
2 years ago
Hugo LIVET 5c5ac6637d Gestion de l'erreur de connexion a la BDD, ajout de composants + ajouts de vues
continuous-integration/drone/push Build is passing Details
2 years ago
Raphael LACOTE 401521723b Merge branch 'UI_Windows' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco into UI_Windows
continuous-integration/drone/push Build is passing Details
2 years ago
Raphael LACOTE 823bdf20b6 Ajout des styles ( En espérant que ca marche cet fois ci)
2 years ago
Nicolas MAYE 1da869673f ajout couleur texte
continuous-integration/drone/push Build is passing Details
2 years ago
Nicolas MAYE fb72e6fe51 Merge branch 'UI_Windows' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco into UI_Windows
2 years ago
Nicolas MAYE 0eaba5c069 ajout élément sur la vue planification
2 years ago
Raphael LACOTE 8f38c138d4 Ajout de la vue forgetPassword pour les vues windows
continuous-integration/drone/push Build is passing Details
2 years ago
Nicolas MAYE 00be26cd44 Merge branch 'UI_Windows' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco into UI_Windows
continuous-integration/drone/push Build is passing Details
2 years ago
Nicolas MAYE 869ead0667 Ajout d'éléments dans la vue dashboard
2 years ago
Nicolas MAYE a8d240dc6e creation des vues windows inscription , dashboard, opération et planification + navigation
continuous-integration/drone/push Build is passing Details
2 years ago
Lucas EVARD ca995af681 Ajout SQL dans le dossier Data
2 years ago
Lucas EVARD 6513dd0ad4 Fusion et gestion des conflits
continuous-integration/drone/push Build is passing Details
2 years ago
Lucas EVARD 845c42ebfc Selection banque
2 years ago
Vincent ASTOLFI d4de3b9a20 premier ajout de la page opérations
continuous-integration/drone/push Build is passing Details
2 years ago
Lucas EVARD 708400876c Modification tests unitaires
continuous-integration/drone/push Build is passing Details
2 years ago
Lucas EVARD 502335e9a8 modification classe pour accueillir le format OFX
continuous-integration/drone/push Build is failing Details
2 years ago
Lucas EVARD eeb0e5b4e2 push de branche et ajout bouton selection de banque
continuous-integration/drone/push Build is passing Details
2 years ago
Lucas EVARD 5ddc3b66f5 Merge branch 'master' of https://codefirst.iut.uca.fr/git/hugo.livet/ConsEco
2 years ago
Lucas EVARD 0c0ef2118b Bug retour lors de la déconnexion résolu
2 years ago

@ -10,6 +10,7 @@ steps:
- name: build
image: mcr.microsoft.com/dotnet/sdk:6.0
commands:
- dotnet add package Newtonsoft.Json
- cd Sources
- dotnet workload restore
- dotnet restore CI_MAUI.sln
@ -27,6 +28,7 @@ steps:
- name: code-analysis
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dronesonarplugin-dotnet6
commands:
- dotnet add package Newtonsoft.Json
- cd Sources/
- dotnet workload restore
- dotnet restore CI_MAUI.sln

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

@ -1,7 +1,7 @@
# Cons'Eco
[![Build Status](https://codefirst.iut.uca.fr/api/badges/hugo.livet/ConsEco/status.svg)](https://codefirst.iut.uca.fr/hugo.livet/ConsEco)
[![Build Status](https://codefirst.iut.uca.fr/api/badges/ConsEcoTeam/ConsEco/status.svg)](https://codefirst.iut.uca.fr/hugo.livet/ConsEco)
[![Csharp](https://img.shields.io/badge/-CSharp-50C878?style=for-the-badge&logo=csharp)](https://learn.microsoft.com/fr-fr/dotnet/csharp/) [![Xaml](https://img.shields.io/badge/-XAML-6495ED?style=for-the-badge&logo=xaml)](https://learn.microsoft.com/fr-fr/dotnet/desktop/wpf/xaml/?view=netdesktop-6.0) [![.NET/MAUI](https://img.shields.io/badge/-.NET/WPF-B87333?style=for-the-badge&logo=dotnet)](https://learn.microsoft.com/fr-fr/dotnet/maui/what-is-maui?view=net-maui-7.0)
[![Csharp](https://img.shields.io/badge/-CSharp-50C878?style=for-the-badge&logo=csharp)](https://learn.microsoft.com/fr-fr/dotnet/csharp/) [![Xaml](https://img.shields.io/badge/-XAML-6495ED?style=for-the-badge&logo=xaml)](https://learn.microsoft.com/fr-fr/dotnet/desktop/wpf/xaml/?view=netdesktop-6.0) [![.NET/WPF](https://img.shields.io/badge/-.NET/MAUI-B87333?style=for-the-badge&logo=dotnet)](https://learn.microsoft.com/fr-fr/dotnet/maui/what-is-maui?view=net-maui-6.0)
<br />
<div align="center">

@ -15,6 +15,11 @@ $app->get('/', function (Request $request, Response $response, $args) {
});
require __DIR__.'/../routes/Inscrit.php';
require __DIR__.'/../routes/Banque.php';
require __DIR__.'/../routes/Compte.php';
require __DIR__.'/../routes/Operation.php';
require __DIR__.'/../routes/Planification.php';
require __DIR__.'/../routes/Echeance.php';
$app->run();
?>

@ -0,0 +1,140 @@
<?php
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Factory\AppFactory;
use OpenApi\Annotations as OA;
/**
* @OA\Info(title="My First API", version="0.1")
*/
$app->addBodyParsingMiddleware();
$app->addRoutingMiddleware();
$app->addErrorMiddleware(true, true, true);
/**
* @OA\Get(path="/api/Banque",
* @OA\Response(response="200", description="Succes")
* @OA\Response(response="500", description="Bdd Error")
* )
*/
$app->get('/Banque/', function(Request $request, Response $response){
$query = "SELECT * FROM Banque";
try{
$db = new Database();
$conn = $db->connect();
$stmt = $conn->query($query);
$inscrits = $stmt->fetchAll(PDO::FETCH_OBJ);
$db = null;
$response->getBody()->write(json_encode($inscrits));
return $response
->withHeader('content-type', 'application/json')
->withStatus(200);
} catch(PDOException $e){
$error = array("message" => $e->getMessage());
$response->getBody()->write(json_encode($error));
return $response
->withHeader('content-type', 'application/json')
->withStatus(500);
}
});
$app->post('/Banque/FromId/', function(Request $request, Response $response,array $args){
$id = $request->getParsedBody()["id"];
$query = 'SELECT id, nomBanque FROM InscrBanque WHERE idInscrit=:id';
try{
$db = new Database();
$conn = $db->connect();
$stmt = $conn->prepare($query);
$stmt->bindValue(':id', $id, PDO::PARAM_STR);
$stmt->execute();
$inscrit = $stmt->fetchAll(PDO::FETCH_OBJ);
$db = null;
$response->getBody()->write(json_encode($inscrit));
return $response
->withHeader('content-type', 'application/json')
->withStatus(200);
} catch(PDOException $e){
$error = array("message" => $e->getMessage());
$response->getBody()->write(json_encode($error));
return $response
->withHeader('content-type', 'application/json')
->withStatus(500);
}
});
$app->post('/Banque/add/', function(Request $request, Response $response, array $args){
$nom = $request->getParsedBody()["nom"];
$idInscrit = $request->getParsedBody()["idInscrit"];
$query = "INSERT INTO InscrBanque (nomBanque, idInscrit) VALUES (:nom, :idI)";
try{
$db = new Database();
$conn = $db->connect();
$stmt = $conn->prepare($query);
$stmt->bindValue(':nom', $nom, PDO::PARAM_STR);
$stmt->bindValue(':idI', $idInscrit, PDO::PARAM_STR);
$result = $stmt->execute();
$db = null;
$response->getBody()->write(json_encode($result));
return $response
->withHeader('content-type', 'application/json')
->withStatus(200);
} catch(PDOException $e){
$error = array("message" => $e->getMessage());
$response->getBody()->write(json_encode($error));
return $response
->withHeader('content-type', 'application/json')
->withStatus(500);
}
});
$app->delete('/Banque/delete/', function (Request $request, Response $response, array $args) {
$nom = $request->getParsedBody()["nom"];
$idInscrit = $request->getParsedBody()["idInscrit"];
$query = "DELETE FROM InscrBanque WHERE nomBanque=:nom AND idInscrit=:idI";
try{
$db = new Database();
$conn = $db->connect();
$stmt = $conn->prepare($query);
$stmt->bindValue(':nom', $nom, PDO::PARAM_STR);
$stmt->bindValue(':idI', $idInscrit, PDO::PARAM_STR);
$result = $stmt->execute();
$db = null;
$response->getBody()->write(json_encode($result));
return $response
->withHeader('content-type', 'application/json')
->withStatus(200);
} catch(PDOException $e){
$error = array("message" => $e->getMessage());
$response->getBody()->write(json_encode($error));
return $response
->withHeader('content-type', 'application/json')
->withStatus(500);
}
});
?>

@ -0,0 +1,116 @@
<?php
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Factory\AppFactory;
use OpenApi\Annotations as OA;
/**
* @OA\Info(title="My First API", version="0.1")
*/
$app->addBodyParsingMiddleware();
$app->addRoutingMiddleware();
$app->addErrorMiddleware(true, true, true);
/**
* @OA\Get(path="/api/Compte",
* @OA\Response(response="200", description="Succes")
* @OA\Response(response="500", description="Bdd Error")
* )
*/
$app->post('/Compte/FromIdInscrit/', function(Request $request, Response $response,array $args){
$idInscrit = $request->getParsedBody()["id"];
$query = 'SELECT * FROM Compte WHERE idInscritBanque=:id';
try{
$db = new Database();
$conn = $db->connect();
$stmt = $conn->prepare($query);
$stmt->bindValue(':id', $idInscrit, PDO::PARAM_STR);
$stmt->execute();
$compte = $stmt->fetchAll(PDO::FETCH_OBJ);
$db = null;
$response->getBody()->write(json_encode($compte));
return $response
->withHeader('content-type', 'application/json')
->withStatus(200);
} catch(PDOException $e){
$error = array("message" => $e->getMessage());
$response->getBody()->write(json_encode($error));
return $response
->withHeader('content-type', 'application/json')
->withStatus(500);
}
});
$app->post('/Compte/add/', function(Request $request, Response $response, array $args){
$nom = $request->getParsedBody()["nom"];
$idInscrit = $request->getParsedBody()["idInscrit"];
$query = "INSERT INTO Compte (nom, idInscritBanque) VALUES (:nom, :idI)";
try{
$db = new Database();
$conn = $db->connect();
$stmt = $conn->prepare($query);
$stmt->bindValue(':nom', $nom, PDO::PARAM_STR);
$stmt->bindValue(':idI', $idInscrit, PDO::PARAM_STR);
$result = $stmt->execute();
$db = null;
$response->getBody()->write(json_encode($result));
return $response
->withHeader('content-type', 'application/json')
->withStatus(200);
} catch(PDOException $e){
$error = array("message" => $e->getMessage());
$response->getBody()->write(json_encode($error));
return $response
->withHeader('content-type', 'application/json')
->withStatus(500);
}
});
$app->delete('/Compte/delete/', function (Request $request, Response $response, array $args) {
$nom = $request->getParsedBody()["nom"];
$idInscrit = $request->getParsedBody()["idInscrit"];
$query = "DELETE FROM Compte WHERE nom=:nom AND idInscritBanque=:idI";
try{
$db = new Database();
$conn = $db->connect();
$stmt = $conn->prepare($query);
$stmt->bindValue(':nom', $nom, PDO::PARAM_STR);
$stmt->bindValue(':idI', $idInscrit, PDO::PARAM_STR);
$result = $stmt->execute();
$db = null;
$response->getBody()->write(json_encode($result));
return $response
->withHeader('content-type', 'application/json')
->withStatus(200);
} catch(PDOException $e){
$error = array("message" => $e->getMessage());
$response->getBody()->write(json_encode($error));
return $response
->withHeader('content-type', 'application/json')
->withStatus(500);
}
});
?>

@ -0,0 +1,125 @@
<?php
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Factory\AppFactory;
use OpenApi\Annotations as OA;
/**
* @OA\Info(title="My First API", version="0.1")
*/
$app->addBodyParsingMiddleware();
$app->addRoutingMiddleware();
$app->addErrorMiddleware(true, true, true);
/**
* @OA\Get(path="/api/Echeance",
* @OA\Response(response="200", description="Succes")
* @OA\Response(response="500", description="Bdd Error")
* )
*/
$app->post('/Echeance/FromIdCompte/', function(Request $request, Response $response,array $args){
$idCompte = $request->getParsedBody()["id"];
$query = 'SELECT * FROM Echeancier WHERE compte=:id';
try{
$db = new Database();
$conn = $db->connect();
$stmt = $conn->prepare($query);
$stmt->bindValue(':id', $idCompte, PDO::PARAM_STR);
$stmt->execute();
$ope = $stmt->fetchAll(PDO::FETCH_OBJ);
$db = null;
$response->getBody()->write(json_encode($ope));
return $response
->withHeader('content-type', 'application/json')
->withStatus(200);
} catch(PDOException $e){
$error = array("message" => $e->getMessage());
$response->getBody()->write(json_encode($error));
return $response
->withHeader('content-type', 'application/json')
->withStatus(500);
}
});
$app->post('/Echeance/add/', function(Request $request, Response $response, array $args){
$compte = $request->getParsedBody()["compte"];
$nom = $request->getParsedBody()["nom"];
$montant = $request->getParsedBody()["montant"];
$dateO = $request->getParsedBody()["dateO"];
$methodePayement = $request->getParsedBody()["methodePayement"];
$isDebit = $request->getParsedBody()["isDebit"];
$tag = $request->getParsedBody()["tag"];
$query = "INSERT INTO Echeancier (compte, nom, montant, dateO, methodePayement, isDebit, tag) SELECT :compte,:nom,:montant, STR_TO_DATE(:dateO, '%d/%m/%Y %H:%i:%s' ), :methodePayement, :isD ,:tag;";
try{
$db = new Database();
$conn = $db->connect();
$stmt = $conn->prepare($query);
$stmt->bindValue(':compte', $compte, PDO::PARAM_STR);
$stmt->bindValue(':nom', $nom, PDO::PARAM_STR);
$stmt->bindValue(':montant', $montant, PDO::PARAM_STR);
$stmt->bindValue(':dateO', $dateO, PDO::PARAM_STR);
$stmt->bindValue(':methodePayement', $methodePayement, PDO::PARAM_STR);
$stmt->bindValue(':isD', $isDebit, PDO::PARAM_BOOL);
$stmt->bindValue(':tag', $tag, PDO::PARAM_STR);
$result = $stmt->execute();
$db = null;
$response->getBody()->write(json_encode($result));
return $response
->withHeader('content-type', 'application/json')
->withStatus(200);
} catch(PDOException $e){
$error = array("message" => $e->getMessage());
$response->getBody()->write(json_encode($error));
return $response
->withHeader('content-type', 'application/json')
->withStatus(500);
}
});
$app->delete('/Echeance/delete/', function (Request $request, Response $response, array $args) {
$compte = $request->getParsedBody()["compte"];
$nom = $request->getParsedBody()["nom"];
$query = "DELETE FROM Echeancier WHERE compte=:compte AND nom=:nom";
try{
$db = new Database();
$conn = $db->connect();
$stmt = $conn->prepare($query);
$stmt->bindValue(':compte', $compte, PDO::PARAM_STR);
$stmt->bindValue(':nom', $nom, PDO::PARAM_STR);
$result = $stmt->execute();
$db = null;
$response->getBody()->write(json_encode($result));
return $response
->withHeader('content-type', 'application/json')
->withStatus(200);
} catch(PDOException $e){
$error = array("message" => $e->getMessage());
$response->getBody()->write(json_encode($error));
return $response
->withHeader('content-type', 'application/json')
->withStatus(500);
}
});
?>

@ -8,8 +8,6 @@ use OpenApi\Annotations as OA;
* @OA\Info(title="My First API", version="0.1")
*/
$app = AppFactory::create();
$app->addBodyParsingMiddleware();
$app->addRoutingMiddleware();
$app->addErrorMiddleware(true, true, true);
@ -138,4 +136,37 @@ $app->post('/Inscrit/add/', function(Request $request, Response $response, array
->withStatus(500);
}
});
$app->delete('/Inscrit/delete/', function (Request $request, Response $response, array $args) {
$email = $request->getParsedBody()["email"];
$query = "DELETE FROM Inscrit WHERE mail=:mail";
try{
$db = new Database();
$conn = $db->connect();
$stmt = $conn->prepare($query);
$stmt->bindValue(':mail', $email, PDO::PARAM_STR);
$result = $stmt->execute();
$db = null;
$response->getBody()->write(json_encode($result));
return $response
->withHeader('content-type', 'application/json')
->withStatus(200);
} catch(PDOException $e){
$error = array("message" => $e->getMessage());
$response->getBody()->write(json_encode($error));
return $response
->withHeader('content-type', 'application/json')
->withStatus(500);
}
});
?>

@ -0,0 +1,127 @@
<?php
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Factory\AppFactory;
use OpenApi\Annotations as OA;
/**
* @OA\Info(title="My First API", version="0.1")
*/
$app->addBodyParsingMiddleware();
$app->addRoutingMiddleware();
$app->addErrorMiddleware(true, true, true);
/**
* @OA\Get(path="/api/Operation",
* @OA\Response(response="200", description="Succes")
* @OA\Response(response="500", description="Bdd Error")
* )
*/
$app->post('/Operation/FromIdCompte/', function(Request $request, Response $response,array $args){
$idCompte = $request->getParsedBody()["id"];
$query = 'SELECT * FROM Operation WHERE compte=:id';
try{
$db = new Database();
$conn = $db->connect();
$stmt = $conn->prepare($query);
$stmt->bindValue(':id', $idCompte, PDO::PARAM_STR);
$stmt->execute();
$ope = $stmt->fetchAll(PDO::FETCH_OBJ);
$db = null;
$response->getBody()->write(json_encode($ope));
return $response
->withHeader('content-type', 'application/json')
->withStatus(200);
} catch(PDOException $e){
$error = array("message" => $e->getMessage());
$response->getBody()->write(json_encode($error));
return $response
->withHeader('content-type', 'application/json')
->withStatus(500);
}
});
$app->post('/Operation/add/', function(Request $request, Response $response, array $args){
$compte = $request->getParsedBody()["compte"];
$nom = $request->getParsedBody()["nom"];
$montant = $request->getParsedBody()["montant"];
$dateO = $request->getParsedBody()["dateO"];
$methodePayement = $request->getParsedBody()["methodePayement"];
$isDebit = $request->getParsedBody()["isDebit"];
$tag = $request->getParsedBody()["tag"];
$fromBanque = $request->getParsedBody()["fromBanque"];
$query = "INSERT INTO Operation (compte, nom, montant, dateO, methodePayement, isDebit, fromBanque, tag) SELECT :compte,:nom,:montant, STR_TO_DATE(:dateO, '%d/%m/%Y %H:%i:%s' ), :methodePayement, :isD, :fromBanque, :tag;";
try{
$db = new Database();
$conn = $db->connect();
$stmt = $conn->prepare($query);
$stmt->bindValue(':compte', $compte, PDO::PARAM_STR);
$stmt->bindValue(':nom', $nom, PDO::PARAM_STR);
$stmt->bindValue(':montant', $montant, PDO::PARAM_STR);
$stmt->bindValue(':dateO', $dateO, PDO::PARAM_STR);
$stmt->bindValue(':methodePayement', $methodePayement, PDO::PARAM_STR);
$stmt->bindValue(':isD', $isDebit, PDO::PARAM_BOOL);
$stmt->bindValue(':tag', $tag, PDO::PARAM_STR);
$stmt->bindValue(':fromBanque', $fromBanque, PDO::PARAM_BOOL);
$result = $stmt->execute();
$db = null;
$response->getBody()->write(json_encode($result));
return $response
->withHeader('content-type', 'application/json')
->withStatus(200);
} catch(PDOException $e){
$error = array("message" => $e->getMessage());
$response->getBody()->write(json_encode($error));
return $response
->withHeader('content-type', 'application/json')
->withStatus(500);
}
});
$app->delete('/Operation/delete/', function (Request $request, Response $response, array $args) {
$compte = $request->getParsedBody()["compte"];
$nom = $request->getParsedBody()["nom"];
$query = "DELETE FROM Operation WHERE compte=:compte AND nom=:nom";
try{
$db = new Database();
$conn = $db->connect();
$stmt = $conn->prepare($query);
$stmt->bindValue(':compte', $compte, PDO::PARAM_STR);
$stmt->bindValue(':nom', $nom, PDO::PARAM_STR);
$result = $stmt->execute();
$db = null;
$response->getBody()->write(json_encode($result));
return $response
->withHeader('content-type', 'application/json')
->withStatus(200);
} catch(PDOException $e){
$error = array("message" => $e->getMessage());
$response->getBody()->write(json_encode($error));
return $response
->withHeader('content-type', 'application/json')
->withStatus(500);
}
});
?>

@ -0,0 +1,125 @@
<?php
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Factory\AppFactory;
use OpenApi\Annotations as OA;
/**
* @OA\Info(title="My First API", version="0.1")
*/
$app->addBodyParsingMiddleware();
$app->addRoutingMiddleware();
$app->addErrorMiddleware(true, true, true);
/**
* @OA\Get(path="/api/Planification",
* @OA\Response(response="200", description="Succes")
* @OA\Response(response="500", description="Bdd Error")
* )
*/
$app->post('/Planification/FromIdCompte/', function(Request $request, Response $response,array $args){
$idCompte = $request->getParsedBody()["id"];
$query = 'SELECT * FROM Planification WHERE compte=:id';
try{
$db = new Database();
$conn = $db->connect();
$stmt = $conn->prepare($query);
$stmt->bindValue(':id', $idCompte, PDO::PARAM_STR);
$stmt->execute();
$ope = $stmt->fetchAll(PDO::FETCH_OBJ);
$db = null;
$response->getBody()->write(json_encode($ope));
return $response
->withHeader('content-type', 'application/json')
->withStatus(200);
} catch(PDOException $e){
$error = array("message" => $e->getMessage());
$response->getBody()->write(json_encode($error));
return $response
->withHeader('content-type', 'application/json')
->withStatus(500);
}
});
$app->post('/Planification/add/', function(Request $request, Response $response, array $args){
$compte = $request->getParsedBody()["compte"];
$nom = $request->getParsedBody()["nom"];
$montant = $request->getParsedBody()["montant"];
$dateO = $request->getParsedBody()["dateO"];
$methodePayement = $request->getParsedBody()["methodePayement"];
$isDebit = $request->getParsedBody()["isDebit"];
$tag = $request->getParsedBody()["tag"];
$query = "INSERT INTO Planification (compte, nom, montant, dateO, methodePayement, isDebit, tag) SELECT :compte,:nom,:montant, STR_TO_DATE(:dateO, '%d/%m/%Y %H:%i:%s' ), :methodePayement, :isD ,:tag;";
try{
$db = new Database();
$conn = $db->connect();
$stmt = $conn->prepare($query);
$stmt->bindValue(':compte', $compte, PDO::PARAM_STR);
$stmt->bindValue(':nom', $nom, PDO::PARAM_STR);
$stmt->bindValue(':montant', $montant, PDO::PARAM_STR);
$stmt->bindValue(':dateO', $dateO, PDO::PARAM_STR);
$stmt->bindValue(':methodePayement', $methodePayement, PDO::PARAM_STR);
$stmt->bindValue(':isD', $isDebit, PDO::PARAM_BOOL);
$stmt->bindValue(':tag', $tag, PDO::PARAM_STR);
$result = $stmt->execute();
$db = null;
$response->getBody()->write(json_encode($result));
return $response
->withHeader('content-type', 'application/json')
->withStatus(200);
} catch(PDOException $e){
$error = array("message" => $e->getMessage());
$response->getBody()->write(json_encode($error));
return $response
->withHeader('content-type', 'application/json')
->withStatus(500);
}
});
$app->delete('/Planification/delete/', function (Request $request, Response $response, array $args) {
$compte = $request->getParsedBody()["compte"];
$nom = $request->getParsedBody()["nom"];
$query = "DELETE FROM Planification WHERE compte=:compte AND nom=:nom";
try{
$db = new Database();
$conn = $db->connect();
$stmt = $conn->prepare($query);
$stmt->bindValue(':compte', $compte, PDO::PARAM_STR);
$stmt->bindValue(':nom', $nom, PDO::PARAM_STR);
$result = $stmt->execute();
$db = null;
$response->getBody()->write(json_encode($result));
return $response
->withHeader('content-type', 'application/json')
->withStatus(200);
} catch(PDOException $e){
$error = array("message" => $e->getMessage());
$response->getBody()->write(json_encode($error));
return $response
->withHeader('content-type', 'application/json')
->withStatus(500);
}
});
?>

@ -0,0 +1,483 @@
using Model;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Net.Http.Json;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
namespace Data
{
public static class ClientAPI
{
private const string ROOT_URL = "http://82.64.164.20:8888/";
//routes inscrit
private const string GET_INSCRITS_DATA_URL = ROOT_URL+"Inscrit/";
private const string POST_EMAIL_INSCRIT_DATA_URL = ROOT_URL+"Inscrit/FromMail/";
private const string PUT_PASSWORD_INSCRIT_DATA_URL = ROOT_URL+"Inscrit/UpdatePassword/";
private const string POST_ADD_INSCRIT_DATA_URL = ROOT_URL + "Inscrit/add/";
private const string DELETE_INSCRIT_DATA_URL = ROOT_URL + "Inscrit/delete/";
//routes banque
private const string GET_BANQUES_DATA_URL = ROOT_URL + "Banque/";
private const string POST_BANQUES_INSCRIT_DATA_URL = ROOT_URL + "Banque/FromId/";
private const string POST_ADD_BANQUE_INSCRIT_DATA_URL = ROOT_URL + "Banque/add/";
private const string DELETE_BANQUE_INSCRIT_DATA_URL = ROOT_URL + "Banque/delete/";
//routes compte
private const string POST_COMPTE_INSCRIT_DATA_URL = ROOT_URL + "Compte/FromIdInscrit/";
private const string POST_ADD_COMPTE_INSCRIT_DATA_URL = ROOT_URL + "Compte/add/";
private const string DELETE_COMPTE_INSCRIT_DATA_URL = ROOT_URL + "Compte/delete/";
//routes operation
private const string POST_OPERATION_COMPTE_DATA_URL = ROOT_URL + "Operation/FromIdCompte/";
private const string POST_ADD_OPERATION_COMPTE_DATA_URL = ROOT_URL + "Operation/add/";
private const string DELETE_OPERATION_COMPTE_DATA_URL = ROOT_URL + "Operation/delete/";
//routes planification
private const string POST_PLANIFICATION_COMPTE_DATA_URL = ROOT_URL + "Planification/FromIdCompte/";
private const string POST_ADD_PLANIFICATION_COMPTE_DATA_URL = ROOT_URL + "Planification/add/";
private const string DELETE_PLANIFICATION_COMPTE_DATA_URL = ROOT_URL + "Planification/delete/";
//routes echeance
private const string POST_ECHEANCE_COMPTE_DATA_URL = ROOT_URL + "Echeance/FromIdCompte/";
private const string POST_ADD_ECHEANCE_COMPTE_DATA_URL = ROOT_URL + "Echeance/add/";
private const string DELETE_ECHEANCE_COMPTE_DATA_URL = ROOT_URL + "Echeance/delete/";
//routes utilitaire
private const string TEST_API_STATEMENT = ROOT_URL;
private static HttpClient cli = new HttpClient();
//Inscrit
public static async Task<List<Inscrit>> GetInscritsAsync()
{
HttpResponseMessage reponse = await cli.GetAsync(GET_INSCRITS_DATA_URL);
if(reponse.IsSuccessStatusCode)
{
return JsonConvert.DeserializeObject<List<Inscrit>>(await reponse.Content.ReadAsStringAsync());
}
else
{
throw new HttpRequestException(reponse.StatusCode.ToString());
}
}
public static async Task<List<Inscrit>> GetInscritAsync(string email)
{
var dataBody = new Dictionary<string, string> { { "email", email } };
HttpResponseMessage reponse = await cli.PostAsJsonAsync(POST_EMAIL_INSCRIT_DATA_URL, dataBody);
if (reponse.IsSuccessStatusCode)
{
return JsonConvert.DeserializeObject<List<Inscrit>>(await reponse.Content.ReadAsStringAsync());
}
else
{
throw new HttpRequestException(reponse.StatusCode.ToString());
}
}
public static async Task<bool> PutPasswordInscritAsync(string email, string password)
{
var dataBody = new Dictionary<string, string> { { "email", email }, { "password", password } };
HttpResponseMessage reponse = await cli.PutAsJsonAsync(PUT_PASSWORD_INSCRIT_DATA_URL, dataBody);
if (reponse.IsSuccessStatusCode)
{
return true;
}
else
{
throw new HttpRequestException(reponse.StatusCode.ToString());
}
}
public static async Task<bool> PostAddInscritAsync(string nom, string prenom, string email, string password)
{
var dataBody = new Dictionary<string, string> { { "nom", nom }, { "prenom", prenom }, { "email", email }, { "password", password } };
HttpResponseMessage reponse = await cli.PostAsJsonAsync(POST_ADD_INSCRIT_DATA_URL, dataBody);
if (reponse.IsSuccessStatusCode)
{
return true;
}
else
{
throw new HttpRequestException(reponse.StatusCode.ToString());
}
}
public static async Task<bool> DeleteInscritAsync(string email)
{
var dataBody = new Dictionary<string, string> { { "email", email } };
var reponse =
cli.SendAsync(
new HttpRequestMessage(HttpMethod.Delete, DELETE_INSCRIT_DATA_URL)
{
Content = new FormUrlEncodedContent(dataBody)
})
.Result;
if (reponse.IsSuccessStatusCode)
{
return true;
}
else
{
throw new HttpRequestException(reponse.StatusCode.ToString());
}
}
//Banque
public static async Task<List<Banque>> GetBanquesAsync()
{
HttpResponseMessage reponse = await cli.GetAsync(GET_BANQUES_DATA_URL);
if (reponse.IsSuccessStatusCode)
{
return JsonConvert.DeserializeObject<List<Banque>>(await reponse.Content.ReadAsStringAsync());
}
else
{
throw new HttpRequestException(reponse.StatusCode.ToString());
}
}
public static async Task<List<BanqueInscrit>> GetBanqueAsync(string id)
{
var dataBody = new Dictionary<string, string> { { "id", id } };
HttpResponseMessage reponse = await cli.PostAsJsonAsync(POST_BANQUES_INSCRIT_DATA_URL, dataBody);
if (reponse.IsSuccessStatusCode)
{
return JsonConvert.DeserializeObject<List<BanqueInscrit>>(await reponse.Content.ReadAsStringAsync());
}
else
{
throw new HttpRequestException(reponse.StatusCode.ToString());
}
}
public static async Task<bool> PostAddBanqueInscritAsync(string nomBanque, string idInscrit)
{
var dataBody = new Dictionary<string, string> { { "nom", nomBanque }, { "idInscrit", idInscrit } };
HttpResponseMessage reponse = await cli.PostAsJsonAsync(POST_ADD_BANQUE_INSCRIT_DATA_URL, dataBody);
if (reponse.IsSuccessStatusCode)
{
return true;
}
else
{
throw new HttpRequestException(reponse.StatusCode.ToString());
}
}
public static async Task<bool> DeleteBanqueInscritAsync(string nomBanque, string idInscrit)
{
var dataBody = new Dictionary<string, string> { { "nom", nomBanque }, { "idInscrit", idInscrit } };
var reponse =
cli.SendAsync(
new HttpRequestMessage(HttpMethod.Delete, DELETE_BANQUE_INSCRIT_DATA_URL)
{
Content = new FormUrlEncodedContent(dataBody)
})
.Result;
if (reponse.IsSuccessStatusCode)
{
return true;
}
else
{
throw new HttpRequestException(reponse.StatusCode.ToString());
}
}
//Comptes
public static async Task<List<Compte>> GetCompteAsync(string id)
{
var dataBody = new Dictionary<string, string> { { "id", id } };
HttpResponseMessage reponse = await cli.PostAsJsonAsync(POST_COMPTE_INSCRIT_DATA_URL, dataBody);
if (reponse.IsSuccessStatusCode)
{
return JsonConvert.DeserializeObject<List<Compte>>(await reponse.Content.ReadAsStringAsync());
}
else
{
throw new HttpRequestException(reponse.StatusCode.ToString());
}
}
public static async Task<bool> PostAddCompteInscritAsync(string nomCompte, string idInscrit)
{
var dataBody = new Dictionary<string, string> { { "nom", nomCompte }, { "idInscrit", idInscrit } };
HttpResponseMessage reponse = await cli.PostAsJsonAsync(POST_ADD_COMPTE_INSCRIT_DATA_URL, dataBody);
if (reponse.IsSuccessStatusCode)
{
return true;
}
else
{
throw new HttpRequestException(reponse.StatusCode.ToString());
}
}
public static async Task<bool> DeleteCompteInscritAsync(string nomCompte, string idInscrit)
{
var dataBody = new Dictionary<string, string> { { "nom", nomCompte }, { "idInscrit", idInscrit } };
var reponse =
cli.SendAsync(
new HttpRequestMessage(HttpMethod.Delete, DELETE_COMPTE_INSCRIT_DATA_URL)
{
Content = new FormUrlEncodedContent(dataBody)
})
.Result;
if (reponse.IsSuccessStatusCode)
{
return true;
}
else
{
throw new HttpRequestException(reponse.StatusCode.ToString());
}
}
//Operations
public static async Task<List<Operation>> GetOperationAsync(string id)
{
var dataBody = new Dictionary<string, string> { { "id", id } };
HttpResponseMessage reponse = await cli.PostAsJsonAsync(POST_OPERATION_COMPTE_DATA_URL, dataBody);
if (reponse.IsSuccessStatusCode)
{
return JsonConvert.DeserializeObject<List<Operation>>(await reponse.Content.ReadAsStringAsync());
}
else
{
throw new HttpRequestException(reponse.StatusCode.ToString());
}
}
public static async Task<bool> PostAddOperationInscritAsync(Compte compte, Operation operation)
{
var dataBody = new Dictionary<string, string>
{
{ "compte", compte.Identifiant },
{ "nom", operation.Nom },
{ "montant", operation.Montant.ToString() },
{ "dateO", operation.DateOperation.ToString() },
{ "methodePayement", operation.ModePayement.ToString() },
{ "isDebit", operation.IsDebit.ToString() },
{ "tag", operation.Tag.ToString() },
{ "fromBanque", operation.FromBanque.ToString() }
};
HttpResponseMessage reponse = await cli.PostAsJsonAsync(POST_ADD_OPERATION_COMPTE_DATA_URL, dataBody);
if (reponse.IsSuccessStatusCode)
{
return true;
}
else
{
throw new HttpRequestException(reponse.StatusCode.ToString());
}
}
public static async Task<bool> DeleteOperationInscritAsync(string idCompte, string nomOpe)
{
var dataBody = new Dictionary<string, string> { { "compte", idCompte }, { "nom", nomOpe } };
var reponse =
cli.SendAsync(
new HttpRequestMessage(HttpMethod.Delete, DELETE_OPERATION_COMPTE_DATA_URL)
{
Content = new FormUrlEncodedContent(dataBody)
})
.Result;
if (reponse.IsSuccessStatusCode)
{
return true;
}
else
{
throw new HttpRequestException(reponse.StatusCode.ToString());
}
}
//Planifications
public static async Task<List<Planification>> GetPlanificationAsync(string id)
{
var dataBody = new Dictionary<string, string> { { "id", id } };
HttpResponseMessage reponse = await cli.PostAsJsonAsync(POST_PLANIFICATION_COMPTE_DATA_URL, dataBody);
if (reponse.IsSuccessStatusCode)
{
return JsonConvert.DeserializeObject<List<Planification>>(await reponse.Content.ReadAsStringAsync());
}
else
{
throw new HttpRequestException(reponse.StatusCode.ToString());
}
}
public static async Task<bool> PostAddPlanificationInscritAsync(Compte compte, Planification planification)
{
var dataBody = new Dictionary<string, string>
{
{ "compte", compte.Identifiant },
{ "nom", planification.Nom },
{ "montant", planification.Montant.ToString() },
{ "dateO", planification.DateOperation.ToString() },
{ "methodePayement", planification.ModePayement.ToString() },
{ "isDebit", planification.IsDebit.ToString() },
{ "tag", planification.Tag.ToString() }
};
HttpResponseMessage reponse = await cli.PostAsJsonAsync(POST_ADD_PLANIFICATION_COMPTE_DATA_URL, dataBody);
if (reponse.IsSuccessStatusCode)
{
return true;
}
else
{
throw new HttpRequestException(reponse.StatusCode.ToString());
}
}
public static async Task<bool> DeletePlanificationInscritAsync(string idCompte, string nomOpe)
{
var dataBody = new Dictionary<string, string> { { "compte", idCompte }, { "nom", nomOpe } };
var reponse =
cli.SendAsync(
new HttpRequestMessage(HttpMethod.Delete, DELETE_PLANIFICATION_COMPTE_DATA_URL)
{
Content = new FormUrlEncodedContent(dataBody)
})
.Result;
if (reponse.IsSuccessStatusCode)
{
return true;
}
else
{
throw new HttpRequestException(reponse.StatusCode.ToString());
}
}
//Echeances
public static async Task<List<Echeance>> GetEcheanceAsync(string id)
{
var dataBody = new Dictionary<string, string> { { "id", id } };
HttpResponseMessage reponse = await cli.PostAsJsonAsync(POST_ECHEANCE_COMPTE_DATA_URL, dataBody);
if (reponse.IsSuccessStatusCode)
{
return JsonConvert.DeserializeObject<List<Echeance>>(await reponse.Content.ReadAsStringAsync());
}
else
{
throw new HttpRequestException(reponse.StatusCode.ToString());
}
}
public static async Task<bool> PostAddEcheanceInscritAsync(Compte compte, Echeance echeance)
{
var dataBody = new Dictionary<string, string>
{
{ "compte", compte.Identifiant },
{ "nom", echeance.Nom },
{ "montant", echeance.Montant.ToString() },
{ "dateO", echeance.DateOperation.ToString() },
{ "methodePayement", echeance.ModePayement.ToString() },
{ "isDebit", echeance.IsDebit.ToString() },
{ "tag", echeance.Tag.ToString() }
};
HttpResponseMessage reponse = await cli.PostAsJsonAsync(POST_ADD_ECHEANCE_COMPTE_DATA_URL, dataBody);
if (reponse.IsSuccessStatusCode)
{
return true;
}
else
{
throw new HttpRequestException(reponse.StatusCode.ToString());
}
}
public static async Task<bool> DeleteEcheanceInscritAsync(string idCompte, string nomOpe)
{
var dataBody = new Dictionary<string, string> { { "compte", idCompte }, { "nom", nomOpe } };
var reponse =
cli.SendAsync(
new HttpRequestMessage(HttpMethod.Delete, DELETE_ECHEANCE_COMPTE_DATA_URL)
{
Content = new FormUrlEncodedContent(dataBody)
})
.Result;
if (reponse.IsSuccessStatusCode)
{
return true;
}
else
{
throw new HttpRequestException(reponse.StatusCode.ToString());
}
}
//Utilitaires
public static async Task<bool> GetStateApi()
{
HttpResponseMessage reponse = await cli.GetAsync(TEST_API_STATEMENT);
if (reponse.IsSuccessStatusCode)
{
return true;
}
else
{
return false;
}
}
}
}

@ -18,7 +18,11 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<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>

@ -13,6 +13,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="Npgsql" Version="6.0.7" />
</ItemGroup>

@ -12,12 +12,13 @@ using static System.Net.Mime.MediaTypeNames;
namespace Data
{
public class LoadOperation
public static class LoadOperation
{
public static IList<Operation> LoadOperationsFromOFX(string csv)
public static IList<Compte> LoadOperationsFromOFX(string ofx)
{
//liste des opérations d'un compte
IList<Operation> lesOpe = new List<Operation>();
IList<Compte> lesComptes = new List<Compte>();
Compte compteEnCoursDeSaisie = null;
//détail d'une Operation
string intituleOperation;
@ -28,26 +29,31 @@ namespace Data
//info compte
string identifiantCompte="";
double solde=0;
using (StreamReader reader = new StreamReader(csv))
using (StreamReader reader = new StreamReader(ofx))
{
if (reader != null)
{
string row;
while ((row = reader.ReadLine()) != null)
{
if (row.Contains("<CURDEF>"))
if (row.Contains("<STMTTRNRS>"))
{
row = "";
compteEnCoursDeSaisie = new Compte(identifiantCompte, identifiantCompte, 0);
}
else if (row.Contains("<ACCTID>"))
else if (row.Contains("</STMTTRNRS>")){
lesComptes.Add(compteEnCoursDeSaisie);
}
else if (row.Contains("<ACCTID>") || row.Contains("<CURDEF>"))
{
identifiantCompte = CutRow(row).Last();
compteEnCoursDeSaisie.Identifiant = CutRow(row).Last();
compteEnCoursDeSaisie.Nom = CutRow(row).Last();
}
else if (row.Contains("<BALAMT>"))
{
solde = Convert.ToDouble(GetValueInRow(row, 4));
compteEnCoursDeSaisie.Solde = double.Parse(CutRow(row).Last(), CultureInfo.InvariantCulture);
}
else if (row.Contains("<STMTTRN>"))
{
@ -80,7 +86,7 @@ namespace Data
{
if (row.Contains("PAIEMENT"))
{
modePayement = MethodePayement.Cb;
modePayement = MethodePayement.CB;
}
else
{
@ -93,7 +99,7 @@ namespace Data
row = "";
}
}
lesOpe.Add(new Operation(intituleOperation, identifiantCompte, montant, dateOperation, modePayement, isDebit));
compteEnCoursDeSaisie.ajouterOperation(new Operation(intituleOperation, montant, dateOperation, modePayement, TagOperation.None, isDebit));
}
else
{
@ -102,11 +108,11 @@ namespace Data
}
}
}
return lesOpe;
return lesComptes;
}
public static string[] CutRow(string row)
private static string[] CutRow(string row)
{
string[] cutRow;
if (row == null) throw new ArgumentNullException();
@ -114,19 +120,5 @@ namespace Data
return cutRow;
}
public static string GetValueInRow(string row, int position)
{
string value;
string[] cutedRow = CutRow(row);
if (cutedRow != null)
{
if(cutedRow.Count() > position || position < 0) throw new IndexOutOfRangeException();
value = cutedRow[position];
return value;
}
throw new ArgumentNullException();
}
}
}

@ -0,0 +1,139 @@
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Data
{
public class PersAPI : IPersistanceManager
{
// /!\ Toutes les méthodes ici permettent d'uniquement manipuler une stratégie de persistance
// /!\ et ne doit en aucun cas manipuler la mémoire !
//actions sur les inscrits
public async Task<bool> AjouterInscrit(Inscrit inscrit)
{
return await ClientAPI.PostAddInscritAsync(inscrit.Nom, inscrit.Prenom, inscrit.Mail, inscrit.Mdp);
}
public async Task<bool> SupprimerInscrit(Inscrit inscrit)
{
return await ClientAPI.DeleteInscritAsync(inscrit.Mail);
}
public async Task<bool> ModifierMdpInscrit(string mail, string nouveauMdp)
{
return await ClientAPI.PutPasswordInscritAsync(mail, nouveauMdp);
}
public async Task<Inscrit> RecupererInscrit(string mail)
{
List<Inscrit> inscrits = await ClientAPI.GetInscritAsync(mail);
if (inscrits.Count == 1)
{
return inscrits.First();
}
throw new ArgumentException("Cet email a un problème");
}
public async Task<bool> EmailDisponible(string mail)
{
List<Inscrit> inscrits = await ClientAPI.GetInscritAsync(mail);
if (inscrits.Count >= 1)
{
return true;
}
return false;
}
//actions sur les banques
public async Task<bool> AjouterBanque(Banque banque, Inscrit inscrit)
{
return await ClientAPI.PostAddBanqueInscritAsync(banque.Nom, inscrit.Id.ToString());
}
public async Task<bool> SupprimerBanque(Banque banque, Inscrit inscrit)
{
return await ClientAPI.DeleteBanqueInscritAsync(banque.Nom, inscrit.Id.ToString());
}
public async Task<IList<BanqueInscrit>> RecupererBanques(Inscrit inscrit)
{
return await ClientAPI.GetBanqueAsync(inscrit.Id.ToString());
}
public async Task<IList<Banque>> RecupererBanquesDisponible()
{
return await ClientAPI.GetBanquesAsync();
}
//actions sur les comptes
public async Task<bool> AjouterCompte(Compte compte, Inscrit inscrit)
{
return await ClientAPI.PostAddCompteInscritAsync(compte.Nom, inscrit.Id.ToString());
}
public async Task<bool> SupprimerCompte(Compte compte, Inscrit inscrit)
{
return await ClientAPI.DeleteCompteInscritAsync(compte.Nom, inscrit.Id.ToString());
}
public async Task<IList<Compte>> RecupererCompte(BanqueInscrit banque)
{
return await ClientAPI.GetCompteAsync(banque.Id.ToString());
}
//actions sur les Opérations
public async Task<bool> AjouterOperation(Compte compte, Operation operation)
{
return await ClientAPI.PostAddOperationInscritAsync(compte, operation);
}
public async Task<bool> SupprimerOperation(Compte compte, Operation operation)
{
return await ClientAPI.DeleteOperationInscritAsync(compte.Identifiant, operation.Nom);
}
public async Task<IList<Operation>> RecupererOperation(Compte compte)
{
return await ClientAPI.GetOperationAsync(compte.Identifiant);
}
//actions sur les Planifications
public async Task<bool> AjouterPlanification(Compte compte, Planification planification)
{
return await ClientAPI.PostAddPlanificationInscritAsync(compte, planification);
}
public async Task<bool> SupprimerPlanification(Compte compte, Planification planification)
{
return await ClientAPI.DeletePlanificationInscritAsync(compte.Identifiant, planification.Nom);
}
public async Task<IList<Planification>> RecupererPlanification(Compte compte)
{
return await ClientAPI.GetPlanificationAsync(compte.Identifiant);
}
//actions sur les Echéances
public async Task<bool> AjouterEcheance(Compte compte, Echeance echeance)
{
return await ClientAPI.PostAddEcheanceInscritAsync(compte, echeance);
}
public async Task<bool> SupprimerEcheance(Compte compte, Echeance echeance)
{
return await ClientAPI.DeleteEcheanceInscritAsync(compte.Identifiant, echeance.Nom);
}
public async Task<IList<Echeance>> RecupererEcheance(Compte compte)
{
return await ClientAPI.GetEcheanceAsync(compte.Identifiant);
}
//actions utilitaire
public async Task<bool> TestConnexion()
{
return await ClientAPI.GetStateApi();
}
public IList<Compte> GetDataFromOFX(string path)
{
return LoadOperation.LoadOperationsFromOFX(path);
}
}
}

@ -13,57 +13,74 @@ using System.Threading;
using Model;
using System.Runtime.CompilerServices;
using System.Data.Common;
using System.Reflection.PortableExecutable;
namespace LinqToPgSQL
{
public class PersLinqToPgSQL : IPersistanceManager
public class PersLinqToPgSQL /*: IPersistanceManager*/
{
private Hash hash = new Hash();
string connexionBDD = String.Format("Server=90.114.135.116; Username=postgres; Database=conseco; Port=5432; Password=lulu; SSLMode=Prefer");
private static string connexionBDD = String.Format("Server=2.3.8.130; Username=postgres; Database=conseco; Port=5432; Password=lulu; SSLMode=Prefer");
public string LoadInscrit(string id, string mdp)
private static NpgsqlConnection dbAccess = new NpgsqlConnection(connexionBDD);
public bool TestConnexionAsDatabase()
{
bool isOk = true;
try
{
int resultat=0;
dbAccess.Open();
}
catch(NpgsqlException ex)
{
isOk = false;
Debug.WriteLine("Problème de connection à la base de données. - " + ex.Message);
}
finally
{
dbAccess.Close();
}
return isOk;
}
public string GetId(string mail)
{
int resultat;
var conn = new NpgsqlConnection(connexionBDD);
Console.Out.WriteLine("Ouverture de la connection");
conn.Open();
NpgsqlParameter p1 = new NpgsqlParameter { ParameterName = "p", Value = id };
NpgsqlParameter p2 = new NpgsqlParameter { ParameterName = "p2", Value = mdp };
NpgsqlCommand cmd = new NpgsqlCommand($"SELECT id FROM INSCRIT WHERE (nom=(@p) OR mail=(@p)) AND mdp=@p2", conn);
NpgsqlParameter p1 = new NpgsqlParameter { ParameterName = "p", Value = mail };
NpgsqlCommand cmd = new NpgsqlCommand($"SELECT id FROM INSCRIT WHERE mail=(@p)", conn);
cmd.Parameters.Add(p1);
cmd.Parameters.Add(p2);
NpgsqlDataReader dr = cmd.ExecuteReader();
try
{
dr.Read();
resultat = dr.GetInt32(0);
dr.Close();
conn.Close();
return resultat.ToString();
}
catch (Exception ex)
public string LoadInscrit(string id, string mdp)
{
Debug.WriteLine(ex+"Utilisateur inconnu");
int resultat;
var conn = new NpgsqlConnection(connexionBDD);
conn.Open();
NpgsqlParameter p1 = new NpgsqlParameter { ParameterName = "p", Value = id };
NpgsqlCommand cmd = new NpgsqlCommand($"SELECT id FROM INSCRIT WHERE mail=(@p)", conn);
cmd.Parameters.Add(p1);
NpgsqlDataReader dr = cmd.ExecuteReader();
dr.Read();
resultat = dr.GetInt32(0);
dr.Close();
return "null";//a changer doit retester
}
conn.Close();
return resultat.ToString();
}
public bool ExistEmail(string mail)
{
var conn = new NpgsqlConnection(connexionBDD);
Console.Out.WriteLine("Ouverture de la connection");
try
{
conn.Open();
}
catch
{
conn.Close();
Debug.WriteLine("Problème de connection à la base de données. Aprés fermeture, l'application se fermera automatiquement.");
Environment.Exit(-1);
}
NpgsqlDataReader dbReader = new NpgsqlCommand("SELECT mail FROM Inscrit", conn).ExecuteReader();
while (dbReader.Read())
@ -76,13 +93,13 @@ namespace LinqToPgSQL
}
dbReader.Close();
conn.Close();
return false;
}
public async void ChangePasswordBdd(string mail, string newMdp)
{
Hash hash = new Hash();
string hashedMdp = hash.CreateHashCode(newMdp);
string hashedMdp = Hash.CreateHashCode(newMdp);
var conn = new NpgsqlConnection(connexionBDD);
Console.Out.WriteLine("Ouverture de la connection");
try
@ -132,7 +149,7 @@ namespace LinqToPgSQL
public async void CreateInscrit(Inscrit inscrit)
{
string mdpHash = hash.CreateHashCode(inscrit.Mdp);
string mdpHash = Hash.CreateHashCode(inscrit.Mdp);
Console.WriteLine("AAAAAA"+mdpHash.Length);
var conn = new NpgsqlConnection(connexionBDD);
conn.Open();
@ -149,6 +166,35 @@ namespace LinqToPgSQL
await cmd.ExecuteNonQueryAsync();
}
public int CalculTotalSoldeComtpe(Inscrit user)
{
var conn = new NpgsqlConnection(connexionBDD);
Console.Out.WriteLine("Ouverture de la connection");
try
{
conn.Open();
}
catch
{
conn.Close();
Debug.WriteLine("Problème de connection à la base de données. Aprés fermeture, l'application se fermera automatiquement.");
Environment.Exit(-1);
}
NpgsqlCommand cmd = new NpgsqlCommand($"SELECT sum(c.solde) FROM Compte c, Inscrit i, InscrBanque ib WHERE i.mail = (@mailUser) AND i.id = ib.idinscrit AND c.idinscritbanque = ib.id", conn)
{
Parameters =
{
new NpgsqlParameter("mailuser", user.Mail),
}
};
NpgsqlDataReader dataReader = cmd.ExecuteReader();
if (dataReader.Read())
{
return dataReader.GetInt32(0);
}
return -1;
}
public string RecupMdpBdd(string mail)
{
var conn = new NpgsqlConnection(connexionBDD);
@ -237,7 +283,6 @@ namespace LinqToPgSQL
using (var command1 = new NpgsqlCommand(requete, conn))
{
command1.Parameters.AddWithValue("p", i.Id);
/*await command1.ExecuteNonQueryAsync();*/
}
@ -249,6 +294,35 @@ namespace LinqToPgSQL
return ListeCompte;
}
public List<Banque> LoadBanqueId(int id)
{
;
List<Banque> ListeBanque = new List<Banque>();
Debug.WriteLine(id);
var conn = new NpgsqlConnection(connexionBDD);
Console.Out.WriteLine("Ouverture de la connection");
try
{
conn.Open();
}
catch
{
conn.Close();
Debug.WriteLine("Problème de connection à la base de données. Aprés fermeture, l'application se fermera automatiquement.");
Environment.Exit(-1);
}
NpgsqlCommand cmd = new NpgsqlCommand("select b.nom,b.urlsite,b.urllogo from banque b, inscrbanque ib, Inscrit i where ib.idinscrit =(@p) AND ib.nombanque = b.nom AND ib.idinscrit = i.id;", conn);
cmd.Parameters.AddWithValue("p", id);
NpgsqlDataReader dataReader = cmd.ExecuteReader();
while (dataReader.Read())
{
Debug.WriteLine(dataReader.GetString(0), dataReader.GetString(1), dataReader.GetString(2));
ListeBanque.Add(new Banque(dataReader.GetString(0), dataReader.GetString(1), dataReader.GetString(2)));
}
dataReader.Close();
return ListeBanque;
}
/*Suppression d'un inscrit dans la base de données*/
public async void SupprimerInscritBdd(Inscrit i)
{
@ -335,5 +409,30 @@ namespace LinqToPgSQL
// attente des autres supression
}
public List<Banque> ImportBanques()
{
List<Banque> bquesDispo = new List<Banque>();
dbAccess.Open();
NpgsqlCommand cmd = new NpgsqlCommand($"SELECT * FROM Banque", dbAccess);
NpgsqlDataReader dbReader = cmd.ExecuteReader();
while (dbReader.Read())
{
bquesDispo.Add(new Banque(dbReader.GetString(0), dbReader.GetString(1), dbReader.GetString(2)));
}
dbAccess.Close();
return bquesDispo;
}
public Inscrit GetInscrit(string mail)
{
throw new NotImplementedException();
}
public IList<Compte> GetCompteFromOFX(string ofx)
{
throw new NotImplementedException();
}
}
}

@ -0,0 +1,276 @@
using Model;
namespace Data
{
public class PersStub : IPersistanceManager
{
/*private List<Inscrit> lesInscrits = new List<Inscrit>();
public PersStub()
{
lesInscrits.Add(new Inscrit(
1,
"LIVET",
"livet.hugo2003@gmail.com",
"Hugo",
"Bonjour63."
));
}
public int GetId(string mail)
{
foreach(Inscrit i in lesInscrits)
{
if(i.Mail == mail)
{
return i.Id;
}
}
return -1;
}
public void SupprimerInscritBdd(Inscrit inscrit)
{
throw new NotImplementedException();
}
public void SupprimerBanqueBdd(Inscrit inscrit, Banque banque)
{
foreach(Inscrit i in lesInscrits)
{
if (i == inscrit)
{
foreach(Banque b in i.LesBanques)
{
if(b == banque)
{
i.SupprimerBanque(b);
}
}
}
}
}
public void SupprimerToutesBanquesBdd(Inscrit inscrit)
{
foreach(Inscrit i in lesInscrits)
{
if(i == inscrit)
{
foreach(Banque b in i.LesBanques)
{
i.SupprimerBanque(b);
}
}
}
}
public void CreateInscrit(Inscrit inscrit){
lesInscrits.Add(inscrit);
}
public bool ExistEmail(string mail)
{
foreach(Inscrit i in lesInscrits)
{
if(i.Mail == mail)
{
return true;
}
}
return false;
}
public void ChangePasswordBdd(string mail, string newMdp)
{
foreach(Inscrit i in lesInscrits)
{
if(i.Mail == mail)
{
i.Mdp = newMdp;
}
}
}
public string RecupMdpBdd(string mail)
{
foreach(Inscrit i in lesInscrits)
{
if(i.Mail == mail)
{
return Hash.CreateHashCode(i.Mdp);
}
}
return "inexistant";
}
public int CalculTotalSoldeComtpe(Inscrit inscrit)
{
int totalSoldeComtpe = 0;
foreach(Inscrit i in lesInscrits)
{
if(i == inscrit)
{
foreach(Banque b in i.LesBanques)
{
totalSoldeComtpe = b.ListeDesComptes.Sum(x => Convert.ToInt32(x));
}
}
}
return totalSoldeComtpe;
}
public List<Banque> LoadBanqueId(string id)
{
List<Banque> lesBanques = new List<Banque>();
lesBanques.Add(new Banque("Credit Agricole","azerty.com","aaacom"));
lesBanques.Add(new Banque("Credit Mutuel", "azerty.com", "aaacom"));
return lesBanques;
}
public bool TestConnexionAsDatabase()
{
return true;
}
public List<Banque> ImportBanques()
{
List<Banque> lesBanques = new List<Banque>();
lesBanques.Add(new Banque("Credit Agricole", "azerty.com", "aaacom"));
lesBanques.Add(new Banque("Credit Mutuel", "azerty.com", "aaacom"));
lesBanques.Add(new Banque("CIC", "azerty.com", "aaacom"));
lesBanques.Add(new Banque("BNP", "azerty.com", "aaacom"));
lesBanques.Add(new Banque("OrangeBank", "azerty.com", "aaacom"));
return lesBanques;
}
public Inscrit GetInscrit(string mail)
{
foreach(Inscrit i in lesInscrits)
{
if(i.Mail == mail)
{
return i;
}
}
return null;
}
public IList<Compte> GetCompteFromOFX(string ofx)
{
return LoadOperation.LoadOperationsFromOFX(ofx);
}
public List<Banque> LoadBanqueId(int id)
{
throw new NotImplementedException();
}*/
public Task<bool> AjouterBanque(Banque banque, Inscrit inscrit)
{
throw new NotImplementedException();
}
public Task<bool> AjouterCompte(Compte compte, Inscrit inscrit)
{
throw new NotImplementedException();
}
public Task<bool> AjouterEcheance(Compte compte, Echeance echeance)
{
throw new NotImplementedException();
}
public Task<bool> AjouterInscrit(Inscrit inscrit)
{
throw new NotImplementedException();
}
public Task<bool> AjouterOperation(Compte compte, Operation operation)
{
throw new NotImplementedException();
}
public Task<bool> AjouterPlanification(Compte compte, Planification planification)
{
throw new NotImplementedException();
}
public Task<bool> EmailDisponible(string mail)
{
throw new NotImplementedException();
}
public IList<Compte> GetDataFromOFX(string path)
{
throw new NotImplementedException();
}
public Task<bool> ModifierMdpInscrit(string mail, string nouveauMdp)
{
throw new NotImplementedException();
}
public Task<IList<BanqueInscrit>> RecupererBanques(Inscrit inscrit)
{
throw new NotImplementedException();
}
public Task<IList<Banque>> RecupererBanquesDisponible()
{
throw new NotImplementedException();
}
public Task<IList<Compte>> RecupererCompte(BanqueInscrit banque)
{
throw new NotImplementedException();
}
public Task<IList<Echeance>> RecupererEcheance(Compte compte)
{
throw new NotImplementedException();
}
public Task<Inscrit> RecupererInscrit(string mail)
{
throw new NotImplementedException();
}
public Task<IList<Operation>> RecupererOperation(Compte compte)
{
throw new NotImplementedException();
}
public Task<IList<Planification>> RecupererPlanification(Compte compte)
{
throw new NotImplementedException();
}
public Task<bool> SupprimerBanque(Banque banque, Inscrit inscrit)
{
throw new NotImplementedException();
}
public Task<bool> SupprimerCompte(Compte compte, Inscrit inscrit)
{
throw new NotImplementedException();
}
public Task<bool> SupprimerEcheance(Compte compte, Echeance echeance)
{
throw new NotImplementedException();
}
public Task<bool> SupprimerInscrit(Inscrit inscrit)
{
throw new NotImplementedException();
}
public Task<bool> SupprimerOperation(Compte compte, Operation operation)
{
throw new NotImplementedException();
}
public Task<bool> SupprimerPlanification(Compte compte, Planification planification)
{
throw new NotImplementedException();
}
public Task<bool> TestConnexion()
{
throw new NotImplementedException();
}
}
}

@ -0,0 +1,42 @@
INSERT INTO Devise VALUES('EUR','EURO');
INSERT INTO Devise VALUES('USD','DOLLAR');
INSERT INTO Devise VALUES('GBP','Livre Sterling');
INSERT INTO Devise VALUES('JPY','YEN');
INSERT INTO Devise VALUES('AUD','DOLLAR AUSTRALIEN');
INSERT INTO Devise VALUES('NZD','DOLLAR NEO-ZELANDAIS');
INSERT INTO Devise VALUES('ZAR','RANd');
INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES('EVARD','LUCAS','lucasevard@gmail.com','Azerty12345678!');
INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES('MONCUL','STEPHANE','stef@gmail.com','Azerty12345678!');
INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES('MENFOUMETTOITOUTNU','RENAUD','renaudtoutnu@gmail.com','Azerty12345678!');
INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES('YOUVOI','BENJAMIN','BENJAMIN@gmail.com','Azerty12345678!');
INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES('TUBEAU','RAOUL','raoullacouille@gmail.com','Azerty12345678!');
INSERT INTO DeviseInscrit VALUES('EUR','1');
INSERT INTO DeviseInscrit VALUES('JPY','2');
INSERT INTO DeviseInscrit VALUES('USD','3');
INSERT INTO DeviseInscrit VALUES('NZD','4');
INSERT INtO Banque(nom,urlsite,urllogo) VALUES('BNP PARIBAS','mabanque','imagesitebnb.fr');
INSERT INtO Banque(nom,urlsite,urllogo) VALUES('CREDIT AGRICOLE','credit-agricole.fr','imageca');
INSERT INtO Banque(nom,urlsite,urllogo) VALUES('BANQUE POSTALE','labanquepostale.fr','imgbp');
INSERT INtO Banque(nom,urlsite,urllogo) VALUES('CAISSE D EPARGNE','caisse-epargne.fr','imgcaissedepargne');
INSERT INtO Banque(nom,urlsite,urllogo) VALUES('ORANGE BANK','orange.fr','cpt');
INSERT INTO InscrBanque (nomBanque,idInscrit)VALUES('BNP PARIBAS','1');
INSERT INTO InscrBanque (nomBanque,idInscrit)VALUES('CREDIT AGRICOLE','2');
INSERT INTO InscrBanque (nomBanque,idInscrit)VALUES('BANQUE POSTALE','3');
INSERT INTO InscrBanque (nomBanque,idInscrit)VALUES('CAISSE D EPARGNE','4');
INSERT INTO Compte (nom,idInscritBanque)VALUES('LIVRET A','1');
INSERT INTO Compte (nom,idInscritBanque)VALUES('LIVRET A','2');
INSERT INTO Compte (nom,idInscritBanque)VALUES('LIVRET A','3');
INSERT INTO Compte (nom,idInscritBanque)VALUES('LIVRET A','4');
INSERT INTO `Operation` (`id`, `compte`, `nom`, `montant`, `dateO`, `methodePayement`, `isDebit`, `fromBanque`, `tag`) VALUES (NULL, '1', 'JSP MAIS JAI PAYER', '500', '2023-01-02', 'Vir', '1', '1', 'Divers')
INSERT INTO `Planification` (`id`, `compte`, `nom`, `montant`, `dateO`, `methodePayement`, `isDebit`, `tag`) VALUES (NULL, '1', 'FAUT QUE JE PAYE', '100', '2023-01-30', 'Vir', '1', 'Energie');
INSERT INTO `Echeancier` (`id`, `compte`, `nom`, `montant`, `dateO`, `methodePayement`, `isDebit`, `tag`) VALUES (NULL, '1', 'FAUT PAYER VITEEEE', '50', '2023-01-06', 'Vir', '1', 'Divers');

@ -0,0 +1,106 @@
DROP TABLE if exists Planification;
DROP TABLE if exists Operation;
DROP TABLE if exists Echeancier;
DROP TABLE if exists Compte;
DROP TABLE if exists InscrBanque;
DROP TABLE if exists Banque;
DROP TABLE if exists DeviseInscrit;
DROP TABLE if exists Inscrit;
DROP TABLE if exists Devise;
CREATE TABLE Devise
(
id char(3) PRIMARY KEY,
nom varchar(20)
);
CREATE TABLE Inscrit
(
id MEDIUMINT PRIMARY KEY AUTO_INCREMENT,
nom varchar(40),
prenom varchar(40),
mail varchar(40) UNIQUE,
mdp varchar(200)
);
CREATE TABLE DeviseInscrit
(
devise char(3),
idInscrit MEDIUMINT UNIQUE,
PRIMARY KEY(devise,idInscrit),
FOREIGN KEY (devise) REFERENCES Devise(id),
FOREIGN KEY (idInscrit) REFERENCES Inscrit(id)
);
CREATE TABLE Banque
(
nom varchar(40) PRIMARY KEY,
urlsite varchar(60),
urllogo longblob
);
CREATE TABLE InscrBanque
(
id MEDIUMINT PRIMARY KEY AUTO_INCREMENT,
nomBanque varchar(40),
idInscrit MEDIUMINT,
UNIQUE(nomBanque,idInscrit),
FOREIGN KEY (nomBanque) REFERENCES Banque(nom),
FOREIGN KEY (idInscrit) REFERENCES Inscrit(id)
);
CREATE TABLE Compte
(
id MEDIUMINT PRIMARY KEY AUTO_INCREMENT,
nom varchar(40),
idInscritBanque MEDIUMINT,
FOREIGN KEY (idInscritBanque) REFERENCES InscrBanque(id),
UNIQUE(idInscritBanque,nom)
);
CREATE TABLE Echeancier
(
id MEDIUMINT PRIMARY KEY AUTO_INCREMENT,
compte MEDIUMINT,
nom varchar(40),
montant numeric,
dateO date,
methodePayement varchar(20),
isDebit boolean,
tag varchar(30),
CONSTRAINT ck_methEch CHECK (methodePayement IN ('None','CB','Espece','Cheque','Virement', 'Prevelement')),
CONSTRAINT ck_tagEch CHECK (tag IN ('Alimentaire','Carburant','Habitation','Energie','Telephonie','Loisir','Restauration','Divers','Transport','Transaction','Santé')),
FOREIGN KEY(compte) REFERENCES Compte(id)
);
CREATE TABLE Operation
(
id MEDIUMINT PRIMARY KEY AUTO_INCREMENT,
compte MEDIUMINT,
nom varchar(40),
montant numeric,
dateO date,
methodePayement varchar(20),
isDebit boolean,
fromBanque boolean,
tag varchar(30),
CONSTRAINT ck_methOpe CHECK (methodePayement IN ('None','CB','Espece','Cheque','Virement', 'Prevelement')),
CONSTRAINT ck_tagOpe CHECK (tag IN ('Alimentaire','Carburant','Habitation','Energie','Telephonie','Loisir','Restauration','Divers','Transport','Transaction','Santé')),
FOREIGN KEY(compte) REFERENCES Compte(id)
);
CREATE TABLE Planification
(
id MEDIUMINT PRIMARY KEY AUTO_INCREMENT,
compte MEDIUMINT,
nom varchar(40),
montant numeric,
dateO date,
methodePayement varchar(20),
isDebit boolean,
tag varchar(30),
CONSTRAINT ck_methPla CHECK (methodePayement IN ('None','CB','Espece','Cheque','Virement', 'Prevelement')),
CONSTRAINT ck_tagPla CHECK (tag IN ('Alimentaire','Carburant','Habitation','Energie','Telephonie','Loisir','Restauration','Divers','Transport','Transaction','Santé')),
FOREIGN KEY(compte) REFERENCES Compte(id)
);

@ -1,11 +1,12 @@
using LinqToPgSQL;
using Data;
using LinqToPgSQL;
using Model;
namespace IHM
{
public partial class App : Application
{
public Manager Manager { get; set; } = new Manager(new PersLinqToPgSQL());
public Manager Manager { get; set; } = new Manager(new PersAPI());
public App()
{
InitializeComponent();

@ -7,11 +7,6 @@
Shell.FlyoutBehavior="Disabled"
Shell.NavBarIsVisible="False">
<!--<ShellContent
ContentTemplate="{DataTemplate local:Dashboard}"
Route="MainPage" />-->
<TabBar>
<ShellContent Title="Tableau de Bord"
Icon="home_black.png"
@ -19,7 +14,7 @@
<ShellContent Title="Opérations"
Icon="dollar_black.png"
ContentTemplate="{DataTemplate local:Operations}" />
<ShellContent Title="Planification"
<ShellContent Title="Echeance"
Icon="planification_black.png"
ContentTemplate="{DataTemplate local:Planification}" />
<ShellContent Title="Paramètres"
@ -41,4 +36,16 @@
ContentTemplate="{DataTemplate local:ChangePassword}"
Route="ChangePassword"/>
<ShellContent
ContentTemplate="{DataTemplate local:GestionBanques}"
Route="GestionBanques"/>
<ShellContent
ContentTemplate="{DataTemplate local:AjoutBanques}"
Route="AjoutBanques"/>
<ShellContent
ContentTemplate="{DataTemplate local:ErrorPage}"
Route="ErrorPage"/>
</Shell>

@ -14,6 +14,10 @@ namespace IHM
Routing.RegisterRoute("Inscription", typeof(Inscription));
Routing.RegisterRoute("ForgetPassword", typeof(ForgetPassword));
Routing.RegisterRoute("ChangePassword", typeof(ChangePassword));
Routing.RegisterRoute("GestionBanques", typeof(GestionBanques));
Routing.RegisterRoute("AjoutBanques", typeof(AjoutBanques));
Routing.RegisterRoute("ErrorPage", typeof(ErrorPage));
}

@ -1,19 +1,27 @@
using IHM.Desktop;
using IHM.Mobile;
using Model;
using ChangePassword = IHM.Desktop.ChangePassword;
using Compte = IHM.Desktop.Compte;
using ForgetPassword = IHM.Desktop.ForgetPassword;
namespace IHM
{
public partial class AppShellDesktop : Shell
{
public Manager Mgr => (App.Current as App).Manager;
public Manager Mgr2 => (App.Current as App).Manager;
public AppShellDesktop()
{
InitializeComponent();
}
Routing.RegisterRoute("ForgetPassword", typeof(ForgetPassword));
Routing.RegisterRoute("ChangePassword", typeof(ChangePassword));
Routing.RegisterRoute("Compte", typeof(Compte));
}
}
}

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<ViewCell xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Composant.BanqueDispo">
<Border StrokeShape="RoundRectangle 20" BackgroundColor="{StaticResource Tertiary}" Padding="20">
<VerticalStackLayout>
<Image Source="{Binding ImageBanque}"/>
<Button Text="CHOISIR" Clicked="Banque_Clicked"/>
</VerticalStackLayout>
</Border>
</ViewCell>

@ -0,0 +1,23 @@
namespace IHM.Composant;
public partial class BanqueDispo : ViewCell
{
public BanqueDispo()
{
InitializeComponent();
}
public static readonly BindableProperty ImageBanqueProperty =
BindableProperty.Create("ImageBanque", typeof(string), typeof(BanqueDispo), "");
public string ImageBanque
{
get { return (string)GetValue(ImageBanqueProperty); }
set { SetValue(ImageBanqueProperty, value); }
}
private void Banque_Clicked(object sender, EventArgs e)
{
}
}

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<ViewCell xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Composant.BanqueVC"
x:Name="root">
<FlexLayout Direction="Row" AlignItems="Center" JustifyContent="SpaceAround">
<Label Text="{Binding NomBanque}" FontAttributes="Bold" FontSize="Body"/>
<Label Text="{Binding DateLastReload}" FontAttributes="Italic" FontSize="Body"/>
<ImageButton Source="reload_banks.png"
Padding="10" Margin="10"
CornerRadius="10" HeightRequest="65"
BackgroundColor="{StaticResource Primary}"
Clicked="MaBanque_Clicked"/>
</FlexLayout>
</ViewCell>

@ -0,0 +1,32 @@
namespace IHM.Composant;
public partial class BanqueVC : ViewCell
{
public BanqueVC()
{
InitializeComponent();
}
public static readonly BindableProperty NomBanqueProperty =
BindableProperty.Create("NomBanque", typeof(string), typeof(BanqueVC), "");
public string NomBanque
{
get { return (string)GetValue(NomBanqueProperty); }
set { SetValue(NomBanqueProperty, value); }
}
public static readonly BindableProperty DateLastReloadProperty =
BindableProperty.Create("DateLastReload", typeof(string), typeof(BanqueVC), "");
public string DateLastReload
{
get { return (string)GetValue(DateLastReloadProperty); }
set { SetValue(DateLastReloadProperty, value); }
}
private void MaBanque_Clicked(object sender, EventArgs e)
{
}
}

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8" ?>
<ViewCell xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Composant.VC_Operation_Dashboard">
<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>
</ViewCell>

@ -0,0 +1,9 @@
namespace IHM.Composant;
public partial class VC_Operation_Dashboard : ViewCell
{
public VC_Operation_Dashboard()
{
InitializeComponent();
}
}

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Desktop.CV_AddPlanification">
<Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<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="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="Tag" 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"/>
<Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="7" Style="{StaticResource WindowsButton2}"/>
<Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="7" Style="{StaticResource WindowsButton}"/>
</Grid>
</ContentView>

@ -0,0 +1,58 @@
using Model;
namespace IHM.Desktop;
public partial class CV_AddPlanification : ContentView
{
public Manager Mgr => (App.Current as App).Manager;
public CV_AddPlanification()
{
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)))
{
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());
}
}

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
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">
<Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</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"/>
<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}"/>
</Grid>
</ContentView>

@ -0,0 +1,29 @@
using Model;
namespace IHM.Desktop;
public partial class CV_DeletePlanification : ContentView
{
public Manager Mgr => (App.Current as App).Manager;
public CV_DeletePlanification()
{
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)
{
var s = recup.SelectedItem;
Model.Planification planification = (Model.Planification)s;
Mgr.supprimerPlanification(Mgr.SelectedCompte, planification);
Navigation.PushAsync(new Dashboard());
}
}

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
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">
<Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</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"/>
<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}"/>
</Grid>
</ContentView>

@ -0,0 +1,35 @@
using Model;
namespace IHM.Desktop;
public partial class CV_EnregistrerEcheance : ContentView
{
public Manager Mgr => (App.Current as App).Manager;
public CV_EnregistrerEcheance()
{
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)
{
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());
}
}

@ -0,0 +1,153 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
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.RowDefinitions>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.1*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
Text="BANQUE"
VerticalOptions="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>
</Border>
</ContentView>

@ -0,0 +1,30 @@
using Model;
namespace IHM.Desktop;
public partial class CV_HomePage : ContentView
{
public Manager Mgr => (App.Current as App).Manager;
public CV_HomePage()
{
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)
{
}
}

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Desktop.CV_Log">
<Border Stroke="{StaticResource Gray100}" StrokeThickness="4" Margin="10" StrokeShape="RoundRectangle 45,5,5,45">
<Grid BackgroundColor="{StaticResource Yellow100Accent}">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label
Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="4"
VerticalOptions="Center"
Style="{StaticResource TitreWindows}"
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>
</Border>
</ContentView>

@ -0,0 +1,21 @@
using Model;
namespace IHM.Desktop;
public partial class CV_Log : ContentView
{
public Manager Mgr => (App.Current as App).Manager;
public CV_Log()
{
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);
}
}

@ -0,0 +1,153 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Desktop.CV_Planification">
<Border Stroke="{StaticResource Yellow100Accent}" StrokeThickness="4" Margin="10" StrokeShape="RoundRectangle 45,5,5,45">
<Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.75*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="5*"/>
<RowDefinition Height="0.7*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label
Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
Style="{StaticResource TitreWindows}"
Text="PLANIFICATION"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Button
Clicked="Button_Clicked"
Grid.Column="0" Grid.Row="1"
x:Name="AddCredit"
Text="Planifier une échéance"
Style="{StaticResource WindowsButton}"/>
<Button
Clicked="Button_Clicked_1"
Grid.Column="1" Grid.Row="1"
x:Name="RetireOperation"
Text="Supprimer une planification"
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">
<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.LesPla }" Grid.Row="3" Grid.ColumnSpan="4" Grid.RowSpan="2">
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Text="{Binding Nom}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="1" Text="{Binding DateOperation, StringFormat='{0:d}'}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="2" Text="{Binding ModePayement}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="3" Text="{Binding Tag}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="4" Text="{Binding Montant}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</ContentView>
<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>
</Border>
</ContentView>

@ -0,0 +1,34 @@
using Microsoft.Maui.Controls.Internals;
using Model;
namespace IHM.Desktop;
public partial class CV_Planification : ContentView
{
public Manager Mgr => (App.Current as App).Manager;
public CV_Planification()
{
InitializeComponent();
Mgr.LoadBanque();
Mgr.LoadCompte();
BindingContext = Mgr;
}
private void Button_Clicked(object sender, EventArgs e)
{
windowAjout.Content = new CV_AddPlanification();
}
private void Button_Clicked_1(object sender, EventArgs e)
{
windowAjout.Content = new CV_DeletePlanification();
}
}

@ -0,0 +1,150 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
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">
<Border Stroke="{StaticResource Yellow100Accent}" StrokeThickness="4" Margin="10" StrokeShape="RoundRectangle 45,5,5,45">
<Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.75*"/>
<RowDefinition Height="5*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label
Grid.Row="0" Grid.ColumnSpan="2"
Style="{StaticResource TitreWindows}"
Text="STATISTIQUES"
VerticalOptions="Center"
HorizontalOptions="Center"/>
<ContentView Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Grid.RowSpan="3" Margin="15" x:Name="windowAjout">
<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</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>
</Grid>
</ContentView>
</Grid>
</Border>
</ContentView>

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

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
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">
<Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</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"/>
<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}"/>
</Grid>
</ContentView>

@ -0,0 +1,34 @@
using Model;
namespace IHM.Desktop;
public partial class CV_SupprimerEcheance : ContentView
{
public Manager Mgr => (App.Current as App).Manager;
public CV_SupprimerEcheance()
{
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)
{
var s = recup.SelectedItem;
Echeance echeance = (Echeance)s;
Mgr.supprimerEcheance(Mgr.SelectedCompte, echeance);
Navigation.PushAsync(new Dashboard());
}
}

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Desktop.CV_credit">
<Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label Text="Effectuer un crédit" VerticalOptions="Center" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="5" 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="Tag" 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"/>
<Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="7" Style="{StaticResource WindowsButton2}"/>
<Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="7" Style="{StaticResource WindowsButton}"/>
</Grid>
</ContentView>

@ -0,0 +1,64 @@
using Model;
namespace IHM.Desktop;
public partial class CV_credit : ContentView
{
public Manager Mgr => (App.Current as App).Manager;
public CV_credit()
{
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)))
{
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());
}
}

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Desktop.CV_debit">
<Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label Text="Effectuer un débit" Grid.Column="0" 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="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="Tag" 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"/>
<Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="7" Style="{StaticResource WindowsButton2}"/>
<Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="7" Style="{StaticResource WindowsButton}"/>
</Grid>
</ContentView>

@ -0,0 +1,56 @@
using Model;
namespace IHM.Desktop;
public partial class CV_debit : ContentView
{
public Manager Mgr => (App.Current as App).Manager;
public CV_debit()
{
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)))
{
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());
}
}

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Desktop.CV_modificationSolde">
<Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label Text="Modification du solde" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
<Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" 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="VALIDER" Clicked="Button_Clicked_1" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
</Grid>
</ContentView>

@ -0,0 +1,19 @@
namespace IHM.Desktop;
public partial class CV_modificationSolde : ContentView
{
public CV_modificationSolde()
{
InitializeComponent();
}
private void Button_Clicked(object sender, EventArgs e)
{
Navigation.PushAsync(new Dashboard());
}
private void Button_Clicked_1(object sender, EventArgs e)
{
Navigation.PushAsync(new Dashboard());
}
}

@ -0,0 +1,15 @@
namespace IHM.Desktop;
public class CV_retirer : ContentView
{
public CV_retirer()
{
Content = new VerticalStackLayout
{
Children = {
new Label { HorizontalOptions = LayoutOptions.Center, VerticalOptions = LayoutOptions.Center, Text = "Welcome to .NET MAUI!"
}
}
};
}
}

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
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">
<Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label Text="Retirer 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"/>
<inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding SelectedCompte.LesOpe}" 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}"/>
</Grid>
</ContentView>

@ -0,0 +1,30 @@
using Model;
namespace IHM.Desktop;
public partial class CV_retirer : ContentView
{
public Manager Mgr => (App.Current as App).Manager;
public CV_retirer()
{
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)
{
var s = recup.SelectedItem;
Operation operation = (Operation)s;
Mgr.supprimerOperation(Mgr.SelectedCompte, operation);
Navigation.PushAsync(new Dashboard());
}
}

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
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">
<Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</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"/>
<inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding SelectedCompte.LesOpe}" 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}"/>
</Grid>
</ContentView>

@ -0,0 +1,29 @@
using Model;
namespace IHM.Desktop;
public partial class CV_supprimerOp : ContentView
{
public Manager Mgr => (App.Current as App).Manager;
public CV_supprimerOp()
{
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)
{
var s = recup.SelectedItem;
Operation operation = (Operation)s;
Mgr.supprimerOperation(Mgr.SelectedCompte,operation);
Navigation.PushAsync(new Dashboard());
}
}

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Desktop.ChangePassword"
Title="ChangePassword"
BackgroundColor="{StaticResource Primary}">
<VerticalStackLayout VerticalOptions="CenterAndExpand">
<Label
Text="Changer votre mot de passe"
VerticalOptions="Fill"
HorizontalOptions="Center"
FontSize="20"
Margin="20"/>
<Border Style="{StaticResource bordureBlanche}" Padding="7" Margin="40">
<Entry Style="{StaticResource zoneDeTexte}"
Placeholder="Nouveau mot de passe"
x:Name="EntryNewMdp"
IsPassword="True"/>
</Border>
<Border Style="{StaticResource bordureBlanche}" Padding="7" Margin="40,0,40,40">
<Entry Style="{StaticResource zoneDeTexte}"
Placeholder="Confirmer mot de passe"
x:Name="EntryNewMdpConfirmation"
IsPassword="True"/>
</Border>
<Button VerticalOptions="End"
x:Name="ValidationButton"
Text="valider"
Clicked="ValidationButton_Clicked"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ContentPage>

@ -0,0 +1,45 @@
using Model;
namespace IHM.Desktop;
public partial class ChangePassword : ContentPage
{
public Manager Mgr => (App.Current as App).Manager;
private string MailUser;
public ChangePassword(string mailUser)
{
InitializeComponent();
MailUser = mailUser;
}
private void ValidationButton_Clicked(object sender, EventArgs e)
{
if (EntryNewMdp.Text == null || EntryNewMdpConfirmation.Text == null)
{
AffichError("Champ non valide", "Veuillez remplir tout les champs", "OK");
}
else
{
if (!EntryNewMdp.Text.Equals(EntryNewMdpConfirmation.Text))
{
AffichError("mot de passe non identique", "veuillez entrer des mots de passe identique", "OK");
}
else
{
//Mgr.changePasswordBdd(MailUser, EntryNewMdp.Text);
AffichError("mdp changé", "mot de passe bien changé", "ok");
NavigateTo("../..");
}
}
}
private async void NavigateTo(string path)
{
await Shell.Current.GoToAsync(path);
}
private async void AffichError(string s, string s1, string s2)
{
await DisplayAlert(s, s1, s2);
}
}

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Desktop.Compte">
<Border Stroke="{StaticResource Yellow100Accent}" StrokeThickness="4" Margin="10" StrokeShape="RoundRectangle 45,5,5,45">
<Grid BackgroundColor="{StaticResource Tertiary}" >
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.75*"/>
<RowDefinition Height="5*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label
Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
VerticalOptions="Center"
Style="{StaticResource TitreWindows}"
Text="COMPTE"
HorizontalOptions="Center"/>
<Button
Clicked="AddCredit_Clicked"
Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1"
x:Name="AddCredit"
Text="Modifier le solde"
Style="{StaticResource WindowsButton}"/>
<ContentView Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Grid.RowSpan="2" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Text="{Binding SelectedCompte.Nom}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Large"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="1" Text="{Binding SelectedCompte.Solde}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Large"
HorizontalOptions="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>
</ContentView>
<ContentView Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Grid.RowSpan="4" x:Name="windowAjout">
</ContentView>
</Grid>
</Border>
</ContentView>

@ -0,0 +1,27 @@
using Model;
namespace IHM.Desktop;
public partial class Compte : ContentView
{
public Manager Mgr => (App.Current as App).Manager;
public Compte()
{
InitializeComponent();
Mgr.LoadBanque();
Mgr.LoadCompte();
BindingContext = Mgr;
}
private void AddCredit_Clicked(object sender, EventArgs e)
{
windowAjout.Content = new CV_modificationSolde();
}
}

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Desktop.Dashboard"
Title="Dashboard">
<Grid BackgroundColor="{StaticResource Secondary}">
<Grid.RowDefinitions>
<RowDefinition Height="1.3*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Source="logo_sans_fond.png" HeightRequest="80" HorizontalOptions="Center" Margin="0,30,0,0" Grid.Column="0" Grid.Row="0"/>
<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">
<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>
</Grid>
</ContentPage>

@ -0,0 +1,88 @@
using Microsoft.Maui.Graphics.Text;
using Model;
namespace IHM.Desktop;
public partial class Dashboard
{
public Manager Mgr => (App.Current as App).Manager;
public Dashboard()
{
InitializeComponent();
BindingContext = Mgr.User;
}
private void RetourFormeBase()
{
ButPla.BackgroundColor = Color.FromArgb("E1E1E1"); ButPla.TextColor = Colors.Black;
ButEch.BackgroundColor = Color.FromArgb("E1E1E1"); ButEch.TextColor = Colors.Black;
ButOpe.BackgroundColor = Color.FromArgb("E1E1E1"); ButOpe.TextColor = Colors.Black;
ButCom.BackgroundColor = Color.FromArgb("E1E1E1"); ButCom.TextColor = Colors.Black;
ButAcc.BackgroundColor = Color.FromArgb("E1E1E1"); ButAcc.TextColor = Colors.Black;
ButSta.BackgroundColor = Color.FromArgb("E1E1E1"); ButSta.TextColor = Colors.Black;
}
private void Button_planification(object sender, EventArgs e)
{
RetourFormeBase();
ButPla.TextColor = Colors.White;
ButPla.BackgroundColor = Color.FromArgb("7FB196");
mainCV.Content= new CV_Planification();
}
private void Button_echeancier(object sender, EventArgs e)
{
RetourFormeBase();
ButEch.TextColor = Colors.White;
ButEch.BackgroundColor = Color.FromArgb("7FB196");
mainCV.Content = new Echeancier();
}
private void Button_operation(object sender, EventArgs e)
{
RetourFormeBase();
ButOpe.TextColor = Colors.White;
ButOpe.BackgroundColor = Color.FromArgb("7FB196");
mainCV.Content = new Operations();
}
private void Button_compte(object sender, EventArgs e)
{
RetourFormeBase();
ButCom.TextColor = Colors.White;
ButCom.BackgroundColor = Color.FromArgb("7FB196");
mainCV.Content = new Compte();
}
private void Button_statistiques(object sender, EventArgs e)
{
RetourFormeBase();
ButSta.TextColor = Colors.White;
ButSta.BackgroundColor = Color.FromArgb("7FB196");
mainCV.Content = new CV_Statistiques();
}
private void ButAcc_Clicked(object sender, EventArgs e)
{
RetourFormeBase();
ButAcc.TextColor = Colors.White;
ButAcc.BackgroundColor = Color.FromArgb("7FB196");
mainCV.Content = new CV_HomePage();
}
private void ButLog_Clicked(object sender, EventArgs e)
{
RetourFormeBase();
ButLog.TextColor = Colors.White;
ButLog.BackgroundColor = Color.FromArgb("7FB196");
mainCV.Content = new CV_Log();
}
}

@ -0,0 +1,197 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Desktop.Echeancier"
>
<Border Stroke="{StaticResource Yellow100Accent}" StrokeThickness="4" Margin="10" StrokeShape="RoundRectangle 45,5,5,45">
<Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.75*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="5*"/>
<RowDefinition Height="0.7*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label
Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
Style="{StaticResource TitreWindows}"
Text="ECHEANCIER"
VerticalOptions="Center"
HorizontalOptions="Center"/>
<Button
Clicked="SaveEcheance_Clicked"
Grid.Column="0" Grid.Row="1"
x:Name="SaveEcheance"
Text="Enregistrer une échéance"
Style="{StaticResource WindowsButton}"/>
<Button
Clicked="DelEcheance_Clicked"
Grid.Column="1" Grid.Row="1"
x:Name="DelEcheance"
Text="Supprimer une échéance"
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" >
<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.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Text="{Binding Nom}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="1" Text="{Binding DateOperation, StringFormat='{0:d}'}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="2" Text="{Binding ModePayement}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="3" Text="{Binding Tag}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="4" Text="{Binding Montant}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</ContentView>
<CollectionView Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" ItemsSource="{Binding LesOpe}">
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid Padding="10">
<Grid.RowDefinitions>
<RowDefinition/>
<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="1"
Text="{Binding NomOpe}"
FontAttributes="Bold" />
<Label Grid.Row="1" Grid.Column="1"
Text="{Binding DetailTypeOpe}"
FontAttributes="Italic"/>
<Label Grid.Row="0" Grid.Column="2"
Text="{Binding DateOpe}"/>
<Label Grid.Row="0" Grid.Column="3" Grid.ColumnSpan="2"
Text="{Binding MontantOpe}"
FontAttributes="Bold"/>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</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>
</Border>
</ContentView>

@ -0,0 +1,28 @@
using Model;
namespace IHM.Desktop;
public partial class Echeancier : ContentView
{
public Manager Mgr => (App.Current as App).Manager;
public Echeancier()
{
InitializeComponent();
Mgr.LoadBanque();
Mgr.LoadCompte();
BindingContext = Mgr;
}
private void SaveEcheance_Clicked(object sender, EventArgs e)
{
windowAjout.Content = new CV_EnregistrerEcheance();
}
private void DelEcheance_Clicked(object sender, EventArgs e)
{
windowAjout.Content = new CV_SupprimerEcheance();
}
}

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Desktop.ForgetPassword"
Title="ForgetPassword"
BackgroundColor="{StaticResource Primary}">
<VerticalStackLayout Margin="20" Padding="30" VerticalOptions="CenterAndExpand">
<Label
Text="Rentrez votre adresse email :"
HorizontalOptions="Center" />
<Border Style="{StaticResource bordureBlanche}">
<Entry Style="{StaticResource zoneDeTexte}"
Placeholder="Email"
x:Name="EntryMail"/>
</Border>
<Button
x:Name="ConnexionButton"
Text="valider Email"
Clicked="SearchEmail"
HorizontalOptions="Center" />
<VerticalStackLayout x:Name="ValidateReceptCode" IsVisible="false" Margin="20" VerticalOptions="End">
<Label Text="Veuillez rentrer le code à 6 chiffres reçus par mail"
HorizontalOptions="Center"/>
<Border Style="{StaticResource bordureBlanche}" Padding="7" Margin="40" >
<Entry Style="{StaticResource zoneDeTexte}"
Placeholder="6 Chiffres"
Keyboard="Numeric"
x:Name="EntryCodeRecept"/>
</Border>
<Button
x:Name="ValidationButton"
Text="valider"
Clicked="ValideCode"
HorizontalOptions="Center" />
</VerticalStackLayout>
</VerticalStackLayout>
</ContentPage>

@ -0,0 +1,68 @@
using Model;
using Email = Model.Email;
namespace IHM.Desktop;
public partial class ForgetPassword : ContentPage
{
public Manager Mgr => (App.Current as App).Manager;
private string code;
//private DateTime _startTime;
//private CancellationTokenSource _cancellationTokenSource;
public ForgetPassword()
{
InitializeComponent();
}
public void SearchEmail(object sender, EventArgs e)
{
if (EntryMail.Text == null)
{
AffichError("Email inconnue", "Aucun compte existant portant cette adresse mail", "OK");
}
/*if (Mgr.existEmail(EntryMail.Text))
{
Random generator = new Random();
code = generator.Next(0, 1000000).ToString("D6");
Email.CreateMail(EntryMail.Text, code);
ValidateReceptCode.IsVisible = true;
ConnexionButton.IsEnabled = false;
UpdateArc();
}*/
}
private async void AffichError(string s, string s1, string s2)
{
await DisplayAlert(s, s1, s2);
}
private async void UpdateArc()
{
int timeRemaining = 60;
while (timeRemaining != 0)
{
ConnexionButton.Text = $"{timeRemaining}";
timeRemaining--;
await Task.Delay(1000);
}
ConnexionButton.Text = "valider Email";
ConnexionButton.IsEnabled = true;
}
private void ValideCode(object sender, EventArgs e)
{
if (EntryCodeRecept.Text == code)
{
NavigateTo();
}
else
{
AffichError("Code non identique", "Veuillez entrer le même code que celui reçu par mail", "OK");
}
}
public async void NavigateTo()
{
await Navigation.PushModalAsync(new ChangePassword(EntryMail.Text));
}
}

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Desktop.Inscription"
Title="Inscription">
<VerticalStackLayout>
<Label
Text="Welcome to .NET MAUI!"
VerticalOptions="Center"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ContentPage>

@ -0,0 +1,9 @@
namespace IHM.Desktop;
public partial class Inscription : ContentPage
{
public Inscription()
{
InitializeComponent();
}
}

@ -2,20 +2,16 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Desktop.MainPage"
Title="MainPage_Windows">
Title="MainPage_Windows"
>
<StackLayout BackgroundColor="{StaticResource Secondary}">
<StackLayout
Spacing="25"
Padding="30,0"
VerticalOptions="Start"
>
VerticalOptions="Start">
<Label
Margin="0,20,0,30"
@ -27,20 +23,14 @@
<Image Source="logo_sans_fond.png" HorizontalOptions="Center" HeightRequest="200" />
<Border StrokeShape="RoundRectangle 20" BackgroundColor="White" Padding="7">
<Entry BackgroundColor="{StaticResource White}"
TextColor="{StaticResource Black}"
VerticalTextAlignment="Center"
FontSize="15"
Placeholder="Addresse mail"
<Border Style="{StaticResource bordureBlanche}" Padding="7">
<Entry Style="{StaticResource zoneDeTexte}"
Placeholder="Adresse mail"
x:Name="EntryMail"/>
</Border>
<Border StrokeShape="RoundRectangle 20" BackgroundColor="White" Padding="7">
<Entry BackgroundColor="{StaticResource White}"
TextColor="{StaticResource Black}"
VerticalTextAlignment="Center"
FontSize="15"
<Border Style="{StaticResource bordureBlanche}" Padding="7">
<Entry Style="{StaticResource zoneDeTexte}"
Placeholder="Mot de passe"
IsPassword="True"
x:Name="EntryPassworld"/>
@ -71,16 +61,17 @@
Text="Pas de compte ?"
/>
<Label
<Button
Text="S'inscrire"
TextColor="{StaticResource Yellow100Accent}"
Margin="5,0,0,0"
TextDecorations="Underline">
Clicked="Button_Clicked">
<!--
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding TapCommand}"
CommandParameter="Inscription"/>
</Label.GestureRecognizers>
</Label>
</Label.GestureRecognizers> -->
</Button>
</HorizontalStackLayout>

@ -12,7 +12,7 @@ public partial class MainPage : ContentPage
BindingContext = this;
}
public void ConnectionOnClicked(object sender, EventArgs e)
public async void ConnectionOnClicked(object sender, EventArgs e)
{
if (EntryMail.Text == null || EntryPassworld.Text == null)
{
@ -20,12 +20,14 @@ public partial class MainPage : ContentPage
}
else
{
if (Mgr.existEmail(EntryMail.Text))
if (await Mgr.Pers.EmailDisponible(EntryMail.Text))
{
if (Mgr.isEqualHash(Mgr.recupMdpBdd(EntryMail.Text), EntryPassworld.Text))
if (Mgr.CompareHash(await Mgr.getPassword(EntryMail.Text), EntryPassworld.Text))
{
Mgr.LoadInscrit(EntryMail.Text, EntryPassworld.Text);
ConnexionValide();
Mgr.createUser(EntryMail.Text);
await Navigation.PushAsync(new Dashboard());
//Mgr.LoadAll();
}
else
{
@ -39,10 +41,7 @@ public partial class MainPage : ContentPage
}
}
private async void ConnexionValide()
{
await Navigation.PopModalAsync();
}
private async void AffichError(string s, string s1, string s2)
{
@ -56,4 +55,9 @@ public partial class MainPage : ContentPage
//Exception à gérer pour cette version desktop
public ICommand TapCommand => new Command<string>(async (page) => await Shell.Current.GoToAsync(page));
private void Button_Clicked(object sender, EventArgs e)
{
Navigation.PushAsync(new Dashboard());
}
}

@ -0,0 +1,165 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Desktop.Operations">
<Border Stroke="{StaticResource Yellow100Accent}" StrokeThickness="4" Margin="10" StrokeShape="RoundRectangle 45,5,5,45">
<Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.75*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="5*"/>
<RowDefinition Height="0.7*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label
Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="4"
Style="{StaticResource TitreWindows}"
Text="OPERATIONS"
VerticalOptions="Center"
HorizontalOptions="Center"/>
<Button
Clicked="AddCredit_Clicked"
Grid.Column="0" Grid.Row="1"
x:Name="AddCredit"
Text="Effectuer un crédit"
Style="{StaticResource WindowsButton}"/>
<Button
Clicked="RetireOperation_Clicked"
Grid.Column="1" Grid.Row="1"
x:Name="RetireOperation"
Text="Retirer une opération"
Style="{StaticResource WindowsButton}"/>
<Button
Clicked="AddDebit_Clicked"
Grid.Column="2" Grid.Row="1"
x:Name="AddDebit"
Text="Effectuer un débit"
Style="{StaticResource WindowsButton}"/>
<Button
Clicked="DelOperation_Clicked"
Grid.Column="3" Grid.Row="1"
x:Name="DelOperation"
Text="Supprimer une opération"
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">
<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="1" Margin="10,0,10,0" >
<CollectionView ItemsSource="{Binding SelectedCompte.LesOpe}" Grid.Row="3" Grid.ColumnSpan="4" Grid.RowSpan="2">
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Text="{Binding Nom}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="1" Text="{Binding DateOperation, StringFormat='{0:d}'}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="2" Text="{Binding ModePayement}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="3" Text="{Binding Tag}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="4" Text="{Binding Montant}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</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>
</Border>
</ContentView>

@ -0,0 +1,40 @@
using Model;
namespace IHM.Desktop;
public partial class Operations : ContentView
{
public Manager Mgr => (App.Current as App).Manager;
public Operations()
{
InitializeComponent();
Mgr.LoadBanque();
Mgr.LoadCompte();
BindingContext = Mgr;
}
private void AddCredit_Clicked(object sender, EventArgs e)
{
windowAjout.Content = new CV_credit();
}
private void RetireOperation_Clicked(object sender, EventArgs e)
{
windowAjout.Content = new CV_retirer();
}
private void AddDebit_Clicked(object sender, EventArgs e)
{
windowAjout.Content = new CV_debit();
}
private void DelOperation_Clicked(object sender, EventArgs e)
{
windowAjout.Content = new CV_supprimerOp();
}
}

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Desktop.Planification"
Title="Planification">
<StackLayout BackgroundColor="{StaticResource Yellow300Accent}" >
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<StackLayout BackgroundColor="{StaticResource Secondary}" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4">
</StackLayout>
<Image Source="logo_sans_fond.png" HeightRequest="100" Margin="50,10,0,0" Grid.Column="0" Grid.Row="0"/>
<Button Text="Mon compte" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Grid.Column="4" Grid.Row="0" MaximumWidthRequest="200" MaximumHeightRequest="50" ></Button>
<StackLayout BackgroundColor="{StaticResource Secondary}" Grid.Row="1" Grid.Column="0" Grid.RowSpan="6">
<Button Text="ACCUEIL" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="1" ></Button>
<Button Text="COMPTE" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="2"></Button>
<Button Text="OPERATION" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="3"></Button>
<Button Text="ECHEANCIER" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="4"></Button>
<Button Text="PLANIFICATION" BackgroundColor="{StaticResource Tertiary}" TextColor="{StaticResource White}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="5"></Button>
<Button Text="STATISTIQUES" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="6"></Button>
</StackLayout>
</Grid>
</StackLayout>
</ContentPage>

@ -0,0 +1,15 @@
using Model;
namespace IHM.Desktop;
public partial class Planification : ContentPage
{
public Manager Mgr => (App.Current as App).Manager;
public Planification()
{
InitializeComponent();
}
}

@ -32,11 +32,40 @@
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\logo.svg" ForegroundFile="Resources\AppIcon\logo.svg" Color="#512BD4" BaseSize="100,100">
<MauiIcon Include="Resources\AppIcon\logo.svg" ForegroundFile="Resources\AppIcon\logo.svg" Color="#512BD4" BaseSize="100,100" />
<MauiImage Include="Resources\Images\AjoutBanques\add_new_banks.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</MauiIcon>
<MauiImage Include="Resources\Images\NavBar\dollar_black.png" />
<MauiImage Include="Resources\Images\NavBar\settings_black.png" />
</MauiImage>
<MauiImage Include="Resources\Images\AjoutBanques\import_from_file.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</MauiImage>
<MauiImage Include="Resources\Images\DashBoard\account_banks.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</MauiImage>
<MauiImage Include="Resources\Images\GestionBanques\add_banks.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</MauiImage>
<MauiImage Include="Resources\Images\GestionBanques\reload_banks.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</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">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</MauiImage>
<MauiImage Include="Resources\Images\NavBar\settings_black.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</MauiImage>
<MauiImage Include="Resources\Images\NavBar\stats_black.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</MauiImage>
<Resource Include="Resources\Images\NavBar\home_black.png" />
<!-- Splash Screen -->
@ -44,6 +73,15 @@
<!-- 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\logo_sans_fond.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
@ -51,6 +89,9 @@
<MauiImage Update="Resources\Images\logo_sans_fond_black.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</MauiImage>
<MauiImage Update="Resources\Images\refresh.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</MauiImage>
<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />
@ -60,43 +101,123 @@
</ItemGroup>
<ItemGroup>
<Compile Remove="Desktop\CV_retirer.cs" />
<Compile Remove="Desktop\Planification.xaml.cs" />
<None Remove="Resources\Images\AjoutBanques\add_new_banks.png" />
<None Remove="Resources\Images\AjoutBanques\import_from_file.png" />
<None Remove="Resources\Images\DashBoard\account_banks.png" />
<None Remove="Resources\Images\GestionBanques\add_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" />
</ItemGroup>
<ItemGroup>
<MauiImage Include="Resources\Images\NavBar\planification_black.png" />
<MauiImage Include="Resources\Images\NavBar\planification_black.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</MauiImage>
</ItemGroup>
<ItemGroup>
<MauiImage Include="Resources\Images\NavBar\home_black.png">
<CopyToOutputDirectory></CopyToOutputDirectory>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</MauiImage>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Data\Data.csproj" />
<ProjectReference Include="..\Modele\Model.csproj" />
<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>
<Compile Update="AppShellDesktop.xaml.cs">
<DependentUpon>AppShellDesktop.xaml</DependentUpon>
</Compile>
<Compile Update="Desktop\MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
<ProjectReference Include="..\Data\Data.csproj" />
<ProjectReference Include="..\Modele\Model.csproj" />
</ItemGroup>
<ItemGroup>
<MauiXaml Update="AppShellDesktop.xaml">
<MauiXaml Update="ChangePassword.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="ChangePassword.xaml">
<MauiXaml Update="Composant\VC_Operation_Dashboard.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="DashBoard.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Desktop\ChangePassword.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Desktop\CV_AddPlanification.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Desktop\CV_credit.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Desktop\CV_debit.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Desktop\CV_DeletePlanification.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Desktop\CV_EnregistrerEcheance.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Desktop\CV_HomePage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Desktop\CV_Log.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Desktop\CV_modificationSolde.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Desktop\CV_Planification.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Desktop\CV_retirer.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Desktop\CV_Statistiques.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Desktop\CV_SupprimerEcheance.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Desktop\CV_supprimerOp.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Desktop\DashBoard.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Desktop\Echeancier.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Desktop\ForgetPassword.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Desktop\Inscription.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Desktop\Compte.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Desktop\Operations.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="ForgetPassword.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="GestionBanque.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="NewPage1.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Operations.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
@ -109,9 +230,8 @@
<MauiXaml Update="Inscription.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Desktop\MainPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup>
<ProjectExtensions><VisualStudio><UserProperties XamarinHotReloadDebuggerTimeoutExceptionIHMHideInfoBar="True" /></VisualStudio></ProjectExtensions>
</Project>

@ -1,4 +1,16 @@
namespace IHM
using Syncfusion.Maui.Core.Hosting;
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
{
@ -7,6 +19,8 @@
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureSyncfusionCore()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:composant="clr-namespace:IHM.Composant"
x:Class="IHM.Mobile.AjoutBanques"
Title="AjoutBanques">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.10*"/>
<RowDefinition Height="0.05*"/>
<RowDefinition Height="0.15*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.95*"/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<HorizontalStackLayout Grid.Row="0" Grid.Column="0" VerticalOptions="Center">
<Image Source="Resources/Images/logo_sans_fond.png" HeightRequest="50" Margin="20"/>
<Label Text="Cons'Eco" FontSize="20" VerticalOptions="Center" FontAttributes="Bold"/>
<Button x:Name="boutonRetour" Text="retour" HeightRequest="50" Clicked="returnbutton" IsVisible="False" HorizontalOptions="End"/>
</HorizontalStackLayout>
<Label Grid.Row="1" Grid.ColumnSpan="3" Text="Liste des banques disponible : " FontAttributes="Bold" FontSize="Body" Padding="20,10,0,0"/>
<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 Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="3" 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"/>
<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>
</Grid>
</ContentPage>

@ -0,0 +1,78 @@
using Model;
using System.Diagnostics;
using System.Numerics;
namespace IHM.Mobile;
public partial class AjoutBanques : ContentPage
{
public Manager Mgr => (App.Current as App).Manager;
public AjoutBanques()
{
InitializeComponent();
BindingContext = Mgr;
Mgr.LoadBanqueDispo();
if (OperatingSystem.IsIOS())
{
boutonRetour.IsVisible = true;
}
}
private async void ImportOFX_Clicked(object sender, EventArgs e)
{
PickOptions options = new PickOptions();
options.PickerTitle = "Choisir un fichier OFX";
try{
var result = await FilePicker.Default.PickAsync(options);
if (result != null)
{
if (result.FileName.EndsWith("ofx", StringComparison.OrdinalIgnoreCase))
{
IList<Compte> lesComptes = Mgr.Pers.GetDataFromOFX(result.FullPath);
Debug.WriteLine(lesComptes.Count);
foreach(Compte compte in lesComptes)
{
if(Mgr.User.LesBanques.Count != 0)
{
Mgr.User.LesBanques.First().AjouterCompte(compte);
}
}
}
}
else
{
throw new FileLoadException("Imposible de charger le fichier");
}
}
catch(Exception ex)
{
Debug.WriteLine(ex.Message);
}
}
private async void returnbutton(object sender, EventArgs e)
{
await Navigation.PopModalAsync();
}
private async void AddBanque_Clicked(object sender, EventArgs e)
{
ImageButton imageButton = (ImageButton)sender;
Grid grid = (Grid)imageButton.Parent;
foreach(IView iw in grid.Children)
{
if (iw.GetType() == typeof(Label))
{
await Mgr.Pers.AjouterBanque((Banque)(iw as Label).BindingContext, Mgr.User);
}
}
//Mgr.User.LesBanques = await Mgr.Pers.RecupererBanques(Mgr.User);
await Navigation.PopModalAsync();
}
}

@ -25,7 +25,7 @@ public partial class ChangePassword : ContentPage
}
else
{
Mgr.changePasswordBdd(MailUser, EntryNewMdp.Text);
Mgr.Pers.ModifierMdpInscrit(MailUser, EntryNewMdp.Text);
AffichError("mdp changé", "mot de passe bien changé", "ok");
NavigateTo("../..");
}

@ -1,12 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Mobile.DashBoard">
<ScrollView>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.15*"/>
<RowDefinition Height="1.40*"/>
<RowDefinition Height="0.15*"/>
<RowDefinition Height="1.30*"/>
<RowDefinition Height="0.15*"/>
<RowDefinition/>
</Grid.RowDefinitions>
@ -15,87 +17,119 @@
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<HorizontalStackLayout Grid.Row="0" Grid.Column="0" VerticalOptions="Center">
<Image Source="Resources/Images/logo_sans_fond.png" HeightRequest="50" Margin="20"/>
<Label Text="Cons'Eco" FontSize="20" VerticalOptions="Center" FontAttributes="Bold"/>
</HorizontalStackLayout>
<ImageButton Grid.Row="0" Grid.Column="1" Source="Resources/Images/Dashboard/account_banks.png"
<StackLayout Orientation="Horizontal">
<Label
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>
<ImageButton Grid.Row="0" Grid.Column="1" Source="account_banks.png"
HorizontalOptions="End" Padding="10" Margin="10"
CornerRadius="10" HeightRequest="65"
BackgroundColor="{StaticResource Primary}"/>
BackgroundColor="{StaticResource Primary}"
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="1" Grid.ColumnSpan="2" Text="Liste des Dernières Opérations : " FontAttributes="Bold" FontSize="Body" Padding="20,5,0,0"/>
<Label Grid.Row="2" 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 ItemsSource="{Binding SelectedCompte.LesOpe}" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2">
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid Padding="10">
<Grid Margin="0,7,0,7" >
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<!--<ColumnDefinition/>-->
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</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}"
CornerRadius="10"/>
<Label Grid.Row="0" Grid.Column="1"
Text="{Binding NomOpe}"
FontAttributes="Bold" />
<Label Grid.Row="1" Grid.Column="1"
Text="{Binding DetailTypeOpe}"
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}"
Margin="50,0,0,0"
FontAttributes="Italic"/>
<Label Grid.Row="0" Grid.Column="2"
Text="{Binding DateOpe}"/>
<Label Grid.Row="0" Grid.Column="3" Grid.ColumnSpan="2"
Text="{Binding MontantOpe}"
FontAttributes="Bold"/>
Text="{Binding DateOperation, StringFormat='{0:d}'}"/>
<Label Grid.Row="1" Grid.Column="2"
Text="{Binding Montant}"
FontAttributes="Bold"
TextColor="OrangeRed"/>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</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>
<DataTemplate>
<Grid Padding="10">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="1.75*"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
Text="{Binding Banque}"
FontAttributes="Bold"/>
<Label Grid.Row="0" Grid.Column="1"
Text="{Binding Type}"
FontAttributes="Italic"/>
<Label Grid.Row="1" Grid.Column="1"
Text="{Binding Solde}"
FontAttributes="Bold"/>
<Label Grid.Row="0" Grid.Column="2"
Text="{Binding DateMaJ}"/>
<Label Grid.Column="0" Text="{Binding Name}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<ImageButton Grid.Column="2" Source="reload_banks.png"
Padding="10" Margin="5"
CornerRadius="10" HeightRequest="65"
BackgroundColor="{StaticResource Primary}"/>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</Grid>
</ScrollView>
</ContentPage>

@ -1,27 +1,46 @@
using Model;
using System.Diagnostics;
namespace IHM.Mobile;
public partial class DashBoard : ContentPage
{
public Manager Mgr => (App.Current as App).Manager;
public DashBoard()
{
InitializeComponent();
//Routing.RegisterRoute(nameof(DashBoard), typeof(DashBoard));
Mgr.LoadBanque();
BindingContext = Mgr;
if (Mgr.SelectedInscrit == null)
if (Mgr.User == null)
{
loadInscription();
loadPage(new MainPage());
}
/*if (!Mgr.Pers.TestConnexion())
{
loadPage(new ErrorPage());
Debug.WriteLine("cc");
}*/
}
public async void loadInscription()
public async void loadPage(Page p)
{
await Navigation.PushModalAsync(new MainPage());
await Navigation.PushModalAsync(p);
}
private void Banques_Clicked(object sender, EventArgs e)
{
loadPage(new GestionBanques());
}
}

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Mobile.ErrorPage"
Title="Error">
<FlexLayout Direction="Column" JustifyContent="Center" AlignItems="Center">
<Image Source="{AppThemeBinding Light=logo_sans_fond_black.png, Dark=logo_sans_fond.png}"
HorizontalOptions="Center" HeightRequest="200"/>
<ActivityIndicator IsRunning="true" Margin="0,120,0,0" />
<Label Text="Tentative de connexion" Margin="0,20,0,0" FontSize="Body" FontAttributes="Bold"/>
</FlexLayout>
</ContentPage>

@ -0,0 +1,46 @@
using Model;
using System.Diagnostics;
namespace IHM.Mobile;
public partial class ErrorPage : ContentPage
{
public Manager Mgr => (App.Current as App).Manager;
public const int TIME_TEST_DB = 15000;
public ErrorPage()
{
InitializeComponent();
startTestConnexion();
}
protected override bool OnBackButtonPressed()
{
return true;
}
public async void conIsActive()
{
while (!await Mgr.Pers.TestConnexion())
{
Thread.Sleep(TIME_TEST_DB);
}
ConnexionValide();
return;
}
public void startTestConnexion()
{
Task testConnexion = new Task(() => conIsActive());
testConnexion.Start();
}
private async void ConnexionValide()
{
await Navigation.PopModalAsync();
}
}

@ -14,13 +14,14 @@ public partial class ForgetPassword : ContentPage
{
InitializeComponent();
}
public void SearchEmail(object sender, EventArgs e)
public async void SearchEmail(object sender, EventArgs e)
{
if (EntryMail.Text == null)
{
AffichError("Email inconnue", "Aucun compte existant portant cette adresse mail", "OK");
}
if (Mgr.existEmail(EntryMail.Text)){
if (await Mgr.Pers.EmailDisponible(EntryMail.Text))
{
Random generator = new Random();
code = generator.Next(0, 1000000).ToString("D6");
Email.CreateMail(EntryMail.Text, code);
@ -28,6 +29,10 @@ public partial class ForgetPassword : ContentPage
ConnexionButton.IsEnabled = false;
UpdateArc();
}
else
{
AffichError("Mail inexistant", "Aucun compte possédant cette adresse email trouvé", "OK");
}
}
private async void AffichError(string s, string s1, string s2)
{

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:composant="clr-namespace:IHM.Composant"
x:Class="IHM.Mobile.GestionBanques"
Title="GestionBanques">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.10*"/>
<RowDefinition Height="0.05*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.95*"/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<HorizontalStackLayout Grid.Row="0" Grid.Column="0" VerticalOptions="Center">
<Image Source="Resources/Images/logo_sans_fond.png" HeightRequest="50" Margin="20"/>
<Label Text="Cons'Eco" FontSize="20" VerticalOptions="Center" FontAttributes="Bold"/>
<Button x:Name="boutonRetour" Text="retour" HeightRequest="50" Clicked="returnbutton" IsVisible="False" HorizontalOptions="End"/>
</HorizontalStackLayout>
<ImageButton Grid.Row="0" Grid.Column="2" Source="add_banks.png"
HorizontalOptions="End" Padding="10" Margin="10"
CornerRadius="10" HeightRequest="65"
BackgroundColor="{StaticResource Primary}"
Clicked="AddBanque_Clicked"/>
<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.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.75*"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Text="{Binding Name}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<ImageButton Grid.Column="2" Source="reload_banks.png"
Padding="10" Margin="5"
CornerRadius="10" HeightRequest="65"
BackgroundColor="{StaticResource Primary}"/>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</Grid>
</ContentPage>

@ -0,0 +1,35 @@
using Model;
using System.Collections.ObjectModel;
namespace IHM.Mobile;
public partial class GestionBanques : ContentPage
{
public Manager Mgr => (App.Current as App).Manager;
public GestionBanques()
{
InitializeComponent();
BindingContext= Mgr;
Mgr.LoadBanque();
if (OperatingSystem.IsIOS())
{
boutonRetour.IsVisible = true;
}
}
public async void loadPage(Page p)
{
await Navigation.PushModalAsync(p);
}
private void AddBanque_Clicked(object sender, EventArgs e)
{
loadPage(new AjoutBanques());
}
private async void returnbutton(object sender, EventArgs e)
{
await Navigation.PopModalAsync();
}
}

@ -11,7 +11,7 @@ public partial class Inscription : ContentPage
{
InitializeComponent();
}
public void InscriptionOnClicked(object sender, EventArgs e)
public async void InscriptionOnClicked(object sender, EventArgs e)
{
if (EntryNewName.Text == null || EntryNewMail.Text == null || EntryConfirmationPassword.Text == null || EntryNewPassword.Text == null ||
EntryNewSurname.Text == null)
@ -21,7 +21,7 @@ public partial class Inscription : ContentPage
else
{
if(EntryNewPassword.Text.Equals(EntryConfirmationPassword.Text)) {
if (Mgr.existEmail(EntryNewMail.Text))
if (await Mgr.Pers.EmailDisponible(EntryNewMail.Text))
{
AffichError("Mail existant", "un compte porte déjà cette adresse mail, veuillez en changer", "OK");
}
@ -50,8 +50,9 @@ public partial class Inscription : ContentPage
{
if (EntryCodeRecept.Text == code)
{
Inscrit inscrit = new Inscrit(Mgr.lastInscrit() + 1, EntryNewName.Text, EntryNewMail.Text, EntryNewSurname.Text, EntryNewPassword.Text);
Mgr.createInscrit(inscrit);
string hashedPassword = Hash.CreateHashCode(EntryNewPassword.Text);
Inscrit inscrit = new Inscrit(1, EntryNewName.Text, EntryNewMail.Text, EntryNewSurname.Text, hashedPassword);
Mgr.Pers.AjouterInscrit(inscrit);
AffichError("compte créé", "Compte bien créé", "OK");
NavigateTo("..");
}

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

@ -12,19 +12,24 @@ namespace IHM.Mobile
BindingContext = this;
}
public void ConnectionOnClicked(object sender, EventArgs e)
public async void ConnectionOnClicked(object sender, EventArgs e)
{
if (EntryMail.Text == null || EntryPassworld.Text == null)
{
AffichError("Champ invalide", "Veuillez compléter tout les champs", "OK");
}
else {
if (Mgr.existEmail(EntryMail.Text))
if (await Mgr.Pers.EmailDisponible(EntryMail.Text))
{
if (Mgr.isEqualHash(Mgr.recupMdpBdd(EntryMail.Text), EntryPassworld.Text))
if (Mgr.CompareHash(await Mgr.getPassword(EntryMail.Text), EntryPassworld.Text))
{
Mgr.LoadInscrit(EntryMail.Text, EntryPassworld.Text);
ConnexionValide();
Mgr.createUser(EntryMail.Text);
await Navigation.PopModalAsync();
Mgr.LoadAll();
}
else
{
@ -38,11 +43,6 @@ namespace IHM.Mobile
}
}
private async void ConnexionValide()
{
await Navigation.PopModalAsync();
}
private async void AffichError(string s, string s1, string s2)
{
await DisplayAlert(s, s1, s2);
@ -54,5 +54,6 @@ namespace IHM.Mobile
}
public ICommand TapCommand => new Command<string>(async (page) => await Shell.Current.GoToAsync(page));
}
}

@ -1,101 +1,48 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Mobile.Operations">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.15*"/>
<RowDefinition Height="1.40*"/>
<RowDefinition Height="0.15*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<HorizontalStackLayout Grid.Row="0" Grid.Column="0" VerticalOptions="Center">
<Image Source="Resources/Images/logo_sans_fond.png" HeightRequest="50" Margin="20"/>
<Label Text="Cons'Eco" FontSize="20" VerticalOptions="Center" FontAttributes="Bold"/>
</HorizontalStackLayout>
<ImageButton Grid.Row="0" Grid.Column="1" Source="Resources/Images/Dashboard/account_banks.png"
HorizontalOptions="End" Padding="10" Margin="10"
CornerRadius="10" HeightRequest="65"
BackgroundColor="{StaticResource Primary}"/>
<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}">
<ScrollView>
<VerticalStackLayout>
<Label Text="Mes Opérations :" FontAttributes="Bold" Margin="10,10,0,20" FontSize="20"/>
<CollectionView Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" ItemsSource="{Binding SelectedCompte.LesOpe}">
<!--User.LesBanques[0].ListeDesComptes[0].LesOpe}-->
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid Padding="10">
<Grid Margin="0,7,0,7">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<!--<ColumnDefinition/>-->
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</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}"
CornerRadius="10"/>
<Label Grid.Row="0" Grid.Column="1"
Text="{Binding NomOpe}"
FontAttributes="Bold" />
<Label Grid.Row="1" Grid.Column="1"
Text="{Binding DetailTypeOpe}"
FontAttributes="Italic"/>
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 DateOpe}"/>
<Label Grid.Row="0" Grid.Column="3" Grid.ColumnSpan="2"
Text="{Binding MontantOpe}"
FontAttributes="Bold"/>
Text="{Binding DateOperation, StringFormat='{0:d}'}"/>
<Label Grid.Row="1" Grid.Column="2"
Text="{Binding Montant}"
FontAttributes="Bold"
TextColor="OrangeRed"/>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</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">
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid Padding="10">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
Text="{Binding Banque}"
FontAttributes="Bold"/>
<Label Grid.Row="0" Grid.Column="1"
Text="{Binding Type}"
FontAttributes="Italic"/>
<Label Grid.Row="1" Grid.Column="1"
Text="{Binding Solde}"
FontAttributes="Bold"/>
<Label Grid.Row="0" Grid.Column="2"
Text="{Binding DateMaJ}"/>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</Grid>
</VerticalStackLayout>
</ScrollView>
</ContentPage>

@ -1,9 +1,17 @@
using System.Diagnostics;
using Model;
namespace IHM.Mobile;
public partial class Operations : ContentPage
{
public Manager Mgr => (App.Current as App).Manager;
public Operations()
{
InitializeComponent();
BindingContext = Mgr;
Mgr.LoadCompte();
}
}

@ -1,11 +1,49 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:IHM.Composant"
x:Class="IHM.Mobile.Planification">
<ScrollView>
<VerticalStackLayout>
<Label
Text="Planification"
VerticalOptions="Center"
HorizontalOptions="Center" />
<Label Text="Mes Echeances du mois :" FontAttributes="Bold" Margin="10,10,0,20" FontSize="20"/>
<CollectionView ItemsSource="{Binding SelectedCompte.LesEch}">
<!--User.LesBanques[0].ListeDesComptes[0].LesOpe}-->
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid Margin="0,7,0,7">
<Grid.RowDefinitions>
<RowDefinition/>
<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>
</CollectionView.ItemTemplate>
</CollectionView>
</VerticalStackLayout>
</ScrollView>
</ContentPage>

@ -1,9 +1,17 @@
using Model;
namespace IHM.Mobile;
public partial class Planification : ContentPage
{
public Manager Mgr => (App.Current as App).Manager;
public Planification()
{
InitializeComponent();
BindingContext = Mgr;
Mgr.LoadCompte();
}
}

@ -3,14 +3,59 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IHM.Mobile.Settings">
<VerticalStackLayout>
<Grid BackgroundColor="{AppThemeBinding Light={StaticResource Gray600}, Dark={StaticResource Gray100}}">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Label
Text="Paramètre"
VerticalOptions="Center"
HorizontalOptions="Center" />
<Button
Text="Déconnexion"
VerticalOptions="End"
HorizontalOptions="End"
Margin="10"
TextColor="{AppThemeBinding Light={StaticResource Gray100}, Dark={StaticResource Gray600}}"
FontSize="20"
FontAttributes="Bold"
/>
<ImageButton
Grid.Column="1"
Source="Resources/Image/refresh.png"
Clicked="deconnexionOnClicked"
WidthRequest="35"
HeightRequest="35"
HorizontalOptions="End"
CornerRadius="10"
Margin="0,10,40,10"
x:Name="ActualisationButton"
BackgroundColor="{StaticResource Primary}"
/>
</Grid>
<Label
Text="Solde Total"
HorizontalOptions="Center"
FontSize="20"
Margin="10"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource Gray600}, Dark={StaticResource Gray100}}"/>
<ProgressBar
x:Name="ProgressBarSolde"
WidthRequest="250"
ScaleY="3"
ProgressColor="{StaticResource Cyan200Accent}" />
<HorizontalStackLayout>
<Label
Text="0"
HorizontalOptions="Start"/>
<Label
Text="2000"
HorizontalOptions="End"/>
</HorizontalStackLayout>
<Label
Text="{Binding Solde}"
HorizontalOptions="Center"/>
</VerticalStackLayout>
</ContentPage>

@ -1,5 +1,7 @@
namespace IHM.Mobile;
using Model;
using System.Diagnostics;
public partial class Settings : ContentPage
{
public Manager Mgr => (App.Current as App).Manager;
@ -9,11 +11,12 @@ public partial class Settings : ContentPage
}
public void deconnexionOnClicked(object sender, EventArgs e)
{
Mgr.SelectedInscrit = null;
Mgr.deconnexion();
NavigateTo();
}
private async void NavigateTo()
{
await Navigation.PushModalAsync(new MainPage());
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save