//Update the book list
        private void UpdateBooks()
        {
            //Update the list
            _books = BookDataProvider.SearchBooksByBorrower(_borrower.Id);
            BooksDataGrid.ItemsSource = _books;

            //No chosen item
            BooksDataGrid.UnselectAll();
            _selectedBook = null;

            //Set all View to empty//Update the book's data
            BorrowDateTextBox.Text      = string.Empty;
            ReturnDateTextBox.Text      = string.Empty;
            NumberOfExtendsTextBox.Text = string.Empty;
            ReturnableLabel.Content     = string.Empty;
        }
示例#2
0
 //Show only the books borrowed by user
 private void ShowBorrowedButton_Click(object sender, RoutedEventArgs e)
 {
     _books = BookDataProvider.SearchBooksByBorrower(_selectedPerson.Id);
     BooksDataGrid.ItemsSource = _books;
 }