Example #1
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 #2
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());
            }
        }