예제 #1
0
        private void SearchByGenre_Load(object sender, EventArgs e)
        {
            MyLibraryDAO <Genre> dao = new GenreDAOImpl();

            genres = dao.searchAll();

            foreach (Genre g in genres)
            {
                genre = new Genre();
                genre.setGenreID(g.getGenreID());
                genre.setGenre(g.getGenre());

                cbGenre.Items.Add(genre.getGenre());
            }
        }
예제 #2
0
        private void loadGenre()
        {
            MyLibraryDAO <Genre> dao = new GenreDAOImpl();

            genres = dao.searchAll();
            Genre genre;

            foreach (Genre g in genres)
            {
                genre = new Genre();
                genre.setGenreID(g.getGenreID());
                genre.setGenre(g.getGenre());

                cbGenre.Items.Add(genre.getGenre());
            }
        }