private void ToBookButton_Click(object sender, RoutedEventArgs e)
 {
     if (BooksDataGrid.SelectedItems.Count > 0)
     {
         Book          book          = (Book)BooksDataGrid.SelectedItems[0];
         BookingWindow bookingWindow = new BookingWindow();
         bookingWindow.SetData(book.BookId, _readerId);
         bookingWindow.Show();
     }
 }
 private void ToBookButton_Click(object sender, RoutedEventArgs e)
 {
     if (BooksDataGrid.SelectedItems.Count > 0)
     {
         Book          book          = (Book)BooksDataGrid.SelectedItems[0];
         BookingWindow bookingWindow = new BookingWindow();
         bookingWindow.SetData(book.BookId, eLibraryDBEntities.Readers.FirstOrDefault(re => re.UserId == _userId).ReaderId);
         bookingWindow.Show();
     }
 }