private void btnSearchGenre_Click(object sender, EventArgs e) { GenreForm searchGenre = new GenreForm(dbContext, true); searchGenre.genreSaved += new EventHandler <List <Genre> >(genreSaved); searchGenre.ShowDialog(); }
//Genres private void btnAddGenre_Click(object sender, EventArgs e) { GenreForm addGenre = new GenreForm(dbContext); addGenre.genreSaved += new EventHandler <List <Genre> >(genreSaved); addGenre.ShowDialog(); }
private void btnEditGenre_Click(object sender, EventArgs e) { Genre genre = (Genre)GuiUtils.GetSelected <Genre>(lstViewGenres, genreTagSet); if (genre != null) { GenreForm editGenre = new GenreForm(dbContext, genre); editGenre.genreSaved += new EventHandler <List <Genre> >(genreSaved); editGenre.ShowDialog(); } else { MessageBox.Show("Nie wybrano rodzaju!", "Błąd"); } }