Exemplo n.º 1
0
 //Update the book list
 private void UpdateBooks()
 {
     //Update the list
     _books = _searced ? LibraryDataProvider.SearchByStringData <Book>(LibraryDataProvider.bookUrl + "/searchByCode/", CodeTextBox.Text) : LibraryDataProvider.GetAllData <Book>(LibraryDataProvider.bookUrl);
     BooksDataGrid.ItemsSource = _books;
     //No chosen item
     BooksDataGrid.UnselectAll();
     _selectedBook = null;
     SetBorrowerVisibility(false);
 }
        //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;
        }