protected void bindBookGridViewByAuthor(string AuthorName) { BookManager manager = new BookManager(); List <Book> allBooks = manager.getlistofAllBooksInDB((ConfigurationManager.ConnectionStrings["GeekTextConnection"].ConnectionString)); allBooks.RemoveAll(o => o.bookAuthor.authorName != AuthorName); BookDetailsGridView.DataSource = allBooks; BookDetailsGridView.DataBind(); }
protected void ShowResult() { if (allBooks.Count == 0) { Label16.Visible = true; } else { Label16.Visible = false; } List <Book> currentBooksToShow = new List <Book>(); for (int i = currentSection; (i <= allBooks.Count) && (i < currentSection + range); i++) { currentBooksToShow.Add(allBooks[i - 1]); } BookDetailsGridView.DataSource = currentBooksToShow; BookDetailsGridView.DataBind(); }