private void BtnYeni_Click(object sender, EventArgs e) { try { if (Kontrol()) { Veritabani.HastaGuncelle(BilgiDoldur(), "Ekle", ""); MessageBox.Show("Kaydetme işlemi başarıyla gerçekleşti.", "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Information); Temizle(); } else { MessageBox.Show("Lütfen boş alan bırakmayınız.", "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Error); } this.Close(); } catch (Exception a) { MessageBox.Show("Bir hata oluştu:" + a.Message, "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }