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