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()); } }
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()); } }