Example #1
0
 private void searchByAuthor_click(object sender, MouseEventArgs e)
 {
     foreach (Author author in authors)
     {
         if (cbAuthor.SelectedItem.Equals(author.getAuthorName() + " " + author.getAuthorFamily()))
         {
             BookDAO     bookDao = new BookDAOImpl();
             List <Book> books   = bookDao.searchByAuthorID(author.getAuthorID());
             this.Hide();
             SearchResult result = new SearchResult(books);
             result.Show();
         }
     }
 }
Example #2
0
        private void loadAuthor()
        {
            MyLibraryDAO <Author> dao = new AuthorDAOImpl();

            authors = dao.searchAll();

            foreach (Author a in authors)
            {
                author = new Author();
                author.setAuthorID(a.getAuthorID());
                author.setAuthorName(a.getAuthorName());
                author.setAuthorFamily(a.getAuthorFamily());

                cbBookAuthor.Items.Add(author.getAuthorName() + " " + author.getAuthorFamily());
            }
        }
Example #3
0
        private void SearchByAuthor_Load(object sender, EventArgs e)
        {
            MyLibraryDAO <Author> dao = new AuthorDAOImpl();

            authors = dao.searchAll();

            foreach (Author a in authors)
            {
                author = new Author();
                author.setAuthorID(a.getAuthorID());
                author.setAuthorName(a.getAuthorName());
                author.setAuthorFamily(a.getAuthorFamily());

                cbAuthor.Items.Add(author.getAuthorName() + " " + author.getAuthorFamily());
            }
        }