|
|
@ -79,91 +79,21 @@ namespace Model
|
|
|
|
Pers = persistance;
|
|
|
|
Pers = persistance;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void SupprimerInscritBdd(Inscrit i)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Pers.SupprimerInscritBdd(i);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public string GetId(string mail)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return Pers.GetId(mail);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void LoadBanques()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
User.LesBanques = Pers.LoadBanqueId(User.Id);
|
|
|
|
|
|
|
|
if (User.LesBanques.Count() > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
SelectedBanque = User.LesBanques[0];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void supprimerToutesBanquesBdd(Inscrit inscrit)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Pers.SupprimerToutesBanquesBdd(inscrit);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void createInscrit(Inscrit inscrit)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Pers.CreateInscrit(inscrit);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public string lastInscrit()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return Pers.LastInscrit();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public bool existEmail(string mail)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return Pers.ExistEmail(mail);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void changePasswordBdd(string mail, string newMdp)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Pers.ChangePasswordBdd(mail, newMdp);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public string recupMdpBdd(string mail)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return Pers.RecupMdpBdd(mail);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public bool isEqualHash(string mdpBdd, string mdpSent)
|
|
|
|
public bool isEqualHash(string mdpBdd, string mdpSent)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return hash.IsEqualHash(mdpBdd, mdpSent);
|
|
|
|
return hash.IsEqualHash(mdpBdd, mdpSent);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void createUser(string mail)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//User = new Inscrit(mail, GetId(mail));
|
|
|
|
|
|
|
|
User = Pers.GetInscrit(mail);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int recupTotalSolde()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Solde = Pers.CalculTotalSoldeComtpe(User);
|
|
|
|
|
|
|
|
return Solde;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void deconnexion()
|
|
|
|
public void deconnexion()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
User = null;
|
|
|
|
User = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public bool testConnexionAsDatabase()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return Pers.TestConnexionAsDatabase();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void importBanques()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
BanquesDisponibleInApp = Pers.ImportBanques();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public IList<Compte> getCompteFromOFX(string ofx)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return Pers.GetCompteFromOFX(ofx);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|