diff --git a/Sources/IHM/Desktop/CV_Log.xaml b/Sources/IHM/Desktop/CV_Log.xaml
index 71efb29..3bfdfe6 100644
--- a/Sources/IHM/Desktop/CV_Log.xaml
+++ b/Sources/IHM/Desktop/CV_Log.xaml
@@ -19,5 +19,13 @@
VerticalOptions="Center"
HorizontalOptions="Center"
/>
+
+
+
+
+
+
+
+
diff --git a/Sources/IHM/Desktop/CV_Log.xaml.cs b/Sources/IHM/Desktop/CV_Log.xaml.cs
index 82ec39c..64c89a9 100644
--- a/Sources/IHM/Desktop/CV_Log.xaml.cs
+++ b/Sources/IHM/Desktop/CV_Log.xaml.cs
@@ -1,9 +1,16 @@
+using Model;
+
namespace IHM.Desktop;
public partial class CV_Log : ContentView
{
- public CV_Log()
+ public Manager Mgr => (App.Current as App).Manager;
+ public CV_Log()
{
InitializeComponent();
- }
+
+
+
+ BindingContext = Mgr.User;
+ }
}
\ No newline at end of file
diff --git a/Sources/Modele/Manager.cs b/Sources/Modele/Manager.cs
index 0a5b934..9866500 100644
--- a/Sources/Modele/Manager.cs
+++ b/Sources/Modele/Manager.cs
@@ -44,6 +44,7 @@ namespace Model
}
}
private Banque selectedBanque;
+
public IList BanquesDisponibleInApp
{
get => banquesDisponibleInApp;
@@ -99,7 +100,7 @@ namespace Model
{
listeDesComptes.Clear();
- if(SelectedBanque == null || SelectedCompte == null)
+ if(SelectedBanque == null)
{
throw new ArgumentNullException("Vous n'avez pas de banque disponible");
}
@@ -115,7 +116,7 @@ namespace Model
}
- foreach (var compte in listeDesComptes)
+ foreach (Compte compte in listeDesComptes)
{
try
{
@@ -130,6 +131,14 @@ namespace Model
}
+
+
+ if (listeDesComptes.Count > 0)
+ {
+ selectedCompte = listeDesComptes.First();
+ }
+
+
}
@@ -143,7 +152,11 @@ namespace Model
Debug.WriteLine(exception.Message);
}
- SelectedBanque = listeDesBanques.First();
+ if(listeDesBanques.Count > 0)
+ {
+ SelectedBanque = listeDesBanques.First();
+ }
+
}
public async void LoadBanqueDispo()