private void btnCreateWriter_Click(object sender, EventArgs e) { if (!TextFieldsAreValid()) { MessageBox.Show(this, "Alanları boş bırakmayınız", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } bool CreationSuccessful = DbWriter.CreateWriter(new Writer() { FullName = txtFullName.Text, BirthDate = txtBirthDate.Text, Country = txtCountry.Text, Genre = cmbWriterGenre.SelectedItem.ToString(), }); if (CreationSuccessful) { MessageBox.Show(this, "Yazar eklendi", "Başarılı", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show(this, "Yazar eklenirken bir hata oldu", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error); } }