Exemple #1
0
        private void btnSearchGenre_Click(object sender, EventArgs e)
        {
            GenreForm searchGenre = new GenreForm(dbContext, true);

            searchGenre.genreSaved += new EventHandler <List <Genre> >(genreSaved);
            searchGenre.ShowDialog();
        }
Exemple #2
0
        //Genres

        private void btnAddGenre_Click(object sender, EventArgs e)
        {
            GenreForm addGenre = new GenreForm(dbContext);

            addGenre.genreSaved += new EventHandler <List <Genre> >(genreSaved);
            addGenre.ShowDialog();
        }
Exemple #3
0
        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");
            }
        }