diff --git a/LivreLand/View/ContactsView.xaml b/LivreLand/View/ContactsView.xaml
index 446acd5..d782771 100644
--- a/LivreLand/View/ContactsView.xaml
+++ b/LivreLand/View/ContactsView.xaml
@@ -25,13 +25,15 @@
-
-
-
+
+
+
+
+ Grid.Row="0"
+ Grid.ColumnSpan="2">
@@ -44,9 +46,10 @@
Grid.Column="1"/>
+ Grid.Row="1"
+ Grid.Column="0">
-
+
@@ -62,8 +65,14 @@
Text="{Binding ContactsVM.Manager.GivenLastName}"/>
+ Command="{Binding ContactsVM.Manager.AddContactCommand}">
+
+
+
+
+
+
+
@@ -74,7 +83,8 @@
SelectionChangedCommand="{Binding ContactsVM.BookLendedCommand}"
SelectionChangedCommandParameter="{Binding ContactsVM.Manager.SelectedContact}"
SelectionMode="Single"
- Grid.Row="4">
+ Grid.Row="1"
+ Grid.Column="1">
diff --git a/LivreLand/View/DetailsLivreView.xaml b/LivreLand/View/DetailsLivreView.xaml
index c773df1..8d5d128 100644
--- a/LivreLand/View/DetailsLivreView.xaml
+++ b/LivreLand/View/DetailsLivreView.xaml
@@ -300,7 +300,21 @@
-
+
+
+
+
+
+
+
+
@@ -344,19 +358,6 @@
-
-
-
-
-
-
diff --git a/LivreLand/View/EmpruntsPretsView.xaml b/LivreLand/View/EmpruntsPretsView.xaml
index 60ea73a..d1685d1 100644
--- a/LivreLand/View/EmpruntsPretsView.xaml
+++ b/LivreLand/View/EmpruntsPretsView.xaml
@@ -36,7 +36,7 @@
SelectedItem="{Binding EmpruntsPretsVM.Manager.SelectedLoan}"
SelectionMode="Single"
SelectionChangedCommand="{Binding EmpruntsPretsVM.OnSelectionLoanChangedCommand}"
- SelectionChangedCommandParameter="{Binding EmpruntsPretsVM.Manager.SelectedBook}"
+ SelectionChangedCommandParameter="{Binding EmpruntsPretsVM.Manager.SelectedLoan}"
IsVisible="{Binding EmpruntsPretsVM.PretCollectionIsVisible}"
IsGrouped="True">
diff --git a/LivreLand/ViewModel/EmpruntsPretsVM.cs b/LivreLand/ViewModel/EmpruntsPretsVM.cs
index d1248f8..ea60370 100644
--- a/LivreLand/ViewModel/EmpruntsPretsVM.cs
+++ b/LivreLand/ViewModel/EmpruntsPretsVM.cs
@@ -136,7 +136,7 @@ namespace LivreLand.ViewModel
private void OnSelectionLoanChanged(LoanVM loanVM)
{
- if (loanVM == null)
+ if (loanVM != null)
{
foreach (var b in Manager.AllCurrentLoans)
{
diff --git a/ViewModels/ManagerVM.cs b/ViewModels/ManagerVM.cs
index e4cbda3..621bd5d 100644
--- a/ViewModels/ManagerVM.cs
+++ b/ViewModels/ManagerVM.cs
@@ -472,6 +472,7 @@ namespace ViewModels
{
await Model.AddBookToCollection(result.Id);
}
+ GetBooksFromCollectionCommand.Execute(null);
}
private async Task UpdateBook(BookVM bookVM)