private void addTextButton_Click(object sender, EventArgs e) { var name = genreNameTextBox.Text; var description = genresDescriptionTextBox.Text; if (string.IsNullOrWhiteSpace(name) || string.IsNullOrWhiteSpace(description)) { MessageBox.Show("Name and Description cannot be empty."); return; } var genre = new Genre { Name = name, Description = description }; program.GenreDao.Create(genre); MessageBox.Show($"Successfully created genre {name}"); var genresForm = new GenresForm(program); Visible = false; genresForm.ShowDialog(); this.Close(); }
private void homeGenresPictureBox_Click(object sender, System.EventArgs e) { var genresForm = new GenresForm(program); Visible = false; genresForm.ShowDialog(); this.Close(); }
private void cancelButton_Click(object sender, EventArgs e) { var genresForm = new GenresForm(program); Visible = false; genresForm.ShowDialog(); this.Close(); }