From 078a38a3849a92096d741ad15d6f6c3bd6394a9a Mon Sep 17 00:00:00 2001 From: nimaye Date: Tue, 11 Oct 2022 09:30:45 +0200 Subject: [PATCH 1/3] =?UTF-8?q?classe=20Banque=20cr=C3=A9er?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Code/Model/Banque.cs | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Code/Model/Banque.cs diff --git a/Code/Model/Banque.cs b/Code/Model/Banque.cs new file mode 100644 index 0000000..d3d4421 --- /dev/null +++ b/Code/Model/Banque.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model +{ + public class Banque + { + public string Nom { get; private set; } + public string UrlSite { get; private set; } + public string UrlLogo { get; private set; } + public List ListeDesComptes { get; private set; } + + public Banque(string nom, string urlSite, string urlLogo) + { + Nom = nom; + UrlSite = urlSite; + UrlLogo = urlLogo; + } + + private AjouterCompte(Compte compte) + { + ListeDesComptes.Add(compte); + } + + private SupprimerCompte(Compte compte) + { + foreach Compte in ListeDesComptes + { + if (compte.nom == ListeDesComptes.Compte.nom) + ListeDesComptes.Compte.Remove(ListeDesComptes); + } + + } + } +} From 8aef4dfebfc925801094deb91c8df450fd1692a1 Mon Sep 17 00:00:00 2001 From: nimaye Date: Tue, 11 Oct 2022 09:33:14 +0200 Subject: [PATCH 2/3] modification classe Banque --- Code/Model/Banque.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Code/Model/Banque.cs b/Code/Model/Banque.cs index d3d4421..6375d31 100644 --- a/Code/Model/Banque.cs +++ b/Code/Model/Banque.cs @@ -27,12 +27,7 @@ namespace Model private SupprimerCompte(Compte compte) { - foreach Compte in ListeDesComptes - { - if (compte.nom == ListeDesComptes.Compte.nom) - ListeDesComptes.Compte.Remove(ListeDesComptes); - } - + ListeDesComptes.Remove(compte); } } } From 5a052eaeb6a118afd961c254140fbdaa8d4d4f83 Mon Sep 17 00:00:00 2001 From: Raphael LACOTE Date: Tue, 11 Oct 2022 09:43:42 +0200 Subject: [PATCH 3/3] Ajout de devises et inscrit --- Code/Model/Devises.cs | 17 ++++++++++++++++ Code/Model/Inscrit.cs | 45 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 Code/Model/Devises.cs create mode 100644 Code/Model/Inscrit.cs diff --git a/Code/Model/Devises.cs b/Code/Model/Devises.cs new file mode 100644 index 0000000..537e910 --- /dev/null +++ b/Code/Model/Devises.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model +{ + internal enum Devises + { + Livre_sterling, + Rouble, + Euro, + Yen, + Dollars + } +} diff --git a/Code/Model/Inscrit.cs b/Code/Model/Inscrit.cs new file mode 100644 index 0000000..740344b --- /dev/null +++ b/Code/Model/Inscrit.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +//using Banque; + +namespace Model +{ + internal class Inscrit + { + public Inscrit(string id, string nom, string mail, string prenom, string mdp, double soldeTotal) + { + Id = id; + Nom = nom; + Mail = mail; + Prenom = prenom; + Mdp = mdp; + SoldeTotal = soldeTotal; + //TouteLesBanques = new List(); + } + public string Id { get; private set; } + public string Nom { get; private set; } + public string Mail { get; private set; } + public string Prenom { get; private set; } + public string Mdp { get; private set; } + public double SoldeTotal { get; private set; } + public Devises Dev { get; private set; } + //private List TouteLesBanques { get; private set; } + + /*public void ajouterBanque(Banque b) + { + TouteLesBanques.Add(b); + } + public void ajouterBanque(Banque b) + { + TouteLesBanques.Remove(b); + }*/ + public void ChoisirDevise(Devises devise) + { + Dev = devise; + } + + } +}