|
|
@ -26,13 +26,13 @@ namespace Model
|
|
|
|
{
|
|
|
|
{
|
|
|
|
user = value;
|
|
|
|
user = value;
|
|
|
|
OnPropertyChanged(nameof(User));
|
|
|
|
OnPropertyChanged(nameof(User));
|
|
|
|
|
|
|
|
LoadBanque();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
private Inscrit user;
|
|
|
|
private Inscrit user;
|
|
|
|
|
|
|
|
|
|
|
|
public Banque SelectedBanque
|
|
|
|
public BanqueInscrit SelectedBanque
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get => selectedBanque;
|
|
|
|
get => selectedBanque;
|
|
|
|
set
|
|
|
|
set
|
|
|
@ -44,8 +44,7 @@ namespace Model
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
private Banque selectedBanque;
|
|
|
|
private BanqueInscrit selectedBanque;
|
|
|
|
|
|
|
|
|
|
|
|
public IList<Banque> BanquesDisponibleInApp
|
|
|
|
public IList<Banque> BanquesDisponibleInApp
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get => banquesDisponibleInApp;
|
|
|
|
get => banquesDisponibleInApp;
|
|
|
@ -77,8 +76,8 @@ namespace Model
|
|
|
|
private Compte selectedCompte;
|
|
|
|
private Compte selectedCompte;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private IList<Banque> listeDesBanques = new List<Banque>();
|
|
|
|
private IList<BanqueInscrit> listeDesBanques = new List<BanqueInscrit>();
|
|
|
|
public ReadOnlyCollection<Banque> AllBanque { get; private set; }
|
|
|
|
public ReadOnlyCollection<BanqueInscrit> AllBanque { get; private set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private List<Compte> listeDesComptes = new List<Compte>();
|
|
|
|
private List<Compte> listeDesComptes = new List<Compte>();
|
|
|
@ -88,7 +87,7 @@ namespace Model
|
|
|
|
|
|
|
|
|
|
|
|
public Manager(IPersistanceManager persistance)
|
|
|
|
public Manager(IPersistanceManager persistance)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AllBanque = new ReadOnlyCollection<Banque>(listeDesBanques);
|
|
|
|
AllBanque = new ReadOnlyCollection<BanqueInscrit>(listeDesBanques);
|
|
|
|
AllCompte = new ReadOnlyCollection<Compte>(listeDesComptes);
|
|
|
|
AllCompte = new ReadOnlyCollection<Compte>(listeDesComptes);
|
|
|
|
Pers = persistance;
|
|
|
|
Pers = persistance;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -99,6 +98,7 @@ namespace Model
|
|
|
|
|
|
|
|
|
|
|
|
public async void LoadCompte()
|
|
|
|
public async void LoadCompte()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
listeDesComptes.Clear();
|
|
|
|
listeDesComptes.Clear();
|
|
|
|
|
|
|
|
|
|
|
|
if(SelectedBanque == null)
|
|
|
|
if(SelectedBanque == null)
|
|
|
@ -108,7 +108,7 @@ namespace Model
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
IList<Compte> comptes = await Pers.RecupererCompte(SelectedBanque, User);
|
|
|
|
IList<Compte> comptes = await Pers.RecupererCompte(SelectedBanque);
|
|
|
|
listeDesComptes.AddRange(comptes);
|
|
|
|
listeDesComptes.AddRange(comptes);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch(Exception exception)
|
|
|
|
catch(Exception exception)
|
|
|
@ -139,7 +139,7 @@ namespace Model
|
|
|
|
selectedCompte = listeDesComptes.First();
|
|
|
|
selectedCompte = listeDesComptes.First();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SelectedCompte = listeDesComptes.FirstOrDefault();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -148,16 +148,14 @@ namespace Model
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
listeDesBanques = await Pers.RecupererBanques(User);
|
|
|
|
listeDesBanques = await Pers.RecupererBanques(User);
|
|
|
|
}catch(Exception exception)
|
|
|
|
SelectedBanque = listeDesBanques.FirstOrDefault();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (Exception exception)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Debug.WriteLine(exception.Message);
|
|
|
|
Debug.WriteLine(exception.Message);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(listeDesBanques.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
SelectedBanque = listeDesBanques.First();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public async void LoadBanqueDispo()
|
|
|
|
public async void LoadBanqueDispo()
|
|
|
@ -187,11 +185,11 @@ namespace Model
|
|
|
|
User = null;
|
|
|
|
User = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public async void LoadBanques()
|
|
|
|
/*public async void LoadBanques()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
User.LesBanques = await Pers.RecupererBanques(User);
|
|
|
|
User.LesBanques = await Pers.RecupererBanques(User);
|
|
|
|
BanquesDisponibleInApp = await Pers.RecupererBanquesDisponible();
|
|
|
|
BanquesDisponibleInApp = await Pers.RecupererBanquesDisponible();
|
|
|
|
}
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
|
|
public async Task<string> getPassword(string email)
|
|
|
|
public async Task<string> getPassword(string email)
|
|
|
|
{
|
|
|
|
{
|
|
|
|