Ajout du stub et ajout de constructeur dans banque et inscrit
continuous-integration/drone/push Build is passing Details

Code
Lucas EVARD 2 years ago
parent 4361847010
commit dc5993dbb0

@ -20,6 +20,14 @@ namespace Model
UrlLogo = urlLogo; UrlLogo = urlLogo;
} }
public Banque(string nom, string urlSite, string urlLogo, List<Compte>lescomptes)
{
Nom = nom;
UrlSite = urlSite;
UrlLogo = urlLogo;
ListeDesComptes = lescomptes;
}
private void AjouterCompte(Compte compte) private void AjouterCompte(Compte compte)
{ {
ListeDesComptes.Add(compte); ListeDesComptes.Add(compte);

@ -17,7 +17,16 @@ namespace Model
Prenom = prenom; Prenom = prenom;
Mdp = mdp; Mdp = mdp;
SoldeTotal = soldeTotal; SoldeTotal = soldeTotal;
//TouteLesBanques = new List<Banque>(); }
public Inscrit(string id, string nom, string mail, string prenom, string mdp, double soldeTotal,List<Banque>lesbanques)
{
Id = id;
Nom = nom;
Mail = mail;
Prenom = prenom;
Mdp = mdp;
SoldeTotal = soldeTotal;
LesBanques = lesbanques;
} }
public string Id { get; private set; } public string Id { get; private set; }
public string Nom { get; private set; } public string Nom { get; private set; }
@ -26,7 +35,7 @@ namespace Model
public string Mdp { get; private set; } public string Mdp { get; private set; }
public double SoldeTotal { get; private set; } public double SoldeTotal { get; private set; }
public Devises Dev { get; private set; } public Devises Dev { get; private set; }
//private List<Banque> TouteLesBanques { get; private set; } private List<Banque> LesBanques { get; set; }
/*public void ajouterBanque(Banque b) /*public void ajouterBanque(Banque b)
{ {

@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
public class Stub
{
public List<Banque> Banques = new();
public List<Inscrit> Inscrits = new();
public List<Compte> Comptes = new();
public List<Inscrit> LoadInscrit()
{
Inscrits.Add(new("00001", "Evard", "lucasevard@gmail.com","Lucas","test",10,LoadBanques()));
Inscrits.Add(new("00002", "Livet", "hugolivet@gmail.com", "Hugo", "test", 110,LoadBanques()));
return Inscrits;
}
public List<Banque> LoadBanques()
{
Banques.Add(new("BNP Paribas", "https://mabanque.bnpparibas/", "https://logos-marques.com/wp-content/uploads/2020/12/BNP-Paribas-logo.png",LoadCompte()));
Banques.Add(new("Crédit Agricole", "https://www.credit-agricole.fr", "https://yt3.ggpht.com/a/AGF-l7_mEfX2eQaGm8GefLOg5ZMRciNw-pESE3gUWg=s900-c-k-c0xffffffff-no-rj-mo",LoadCompte()));
return Banques;
}
public List<Compte> LoadCompte()
{
Comptes.Add(new("Livret A", 2));
Comptes.Add(new("Compte Cheque", 2000));
return Comptes;
}
}
}
Loading…
Cancel
Save