From 62c668c0117abe7a3f4d9418fe3e03fad6a40dc3 Mon Sep 17 00:00:00 2001 From: hulivet1 Date: Wed, 18 Jan 2023 16:40:33 +0100 Subject: [PATCH] =?UTF-8?q?Patch=20bug=20LoadCompte,=20en=20cas=20de=20plu?= =?UTF-8?q?seurs=20appels=20de=20la=20m=C3=A9thode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/Modele/Manager.cs | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/Sources/Modele/Manager.cs b/Sources/Modele/Manager.cs index edee931..60b9ceb 100644 --- a/Sources/Modele/Manager.cs +++ b/Sources/Modele/Manager.cs @@ -110,37 +110,27 @@ namespace Model { IList comptes = await Pers.RecupererCompte(SelectedBanque); listeDesComptes.AddRange(comptes); - } - catch(Exception exception) - { - Debug.WriteLine(exception.Message); - } - - - foreach (Compte compte in listeDesComptes) - { - try + foreach (Compte compte in listeDesComptes) { + compte.LesPla = await Pers.RecupererPlanification(compte); compte.LesOpe = await Pers.RecupererOperation(compte); compte.LesEch = await Pers.RecupererEcheance(compte); + } - catch(Exception exception) + + if (listeDesComptes.Count > 0) { - Debug.WriteLine(exception.Message); + selectedCompte = listeDesComptes.First(); } - + SelectedCompte = listeDesComptes.FirstOrDefault(); } - - - if (listeDesComptes.Count > 0) + catch(Exception exception) { - selectedCompte = listeDesComptes.First(); + Debug.WriteLine(exception.Message); } - - SelectedCompte = listeDesComptes.FirstOrDefault(); - + } public async void LoadBanque()