void rfrSil() { if (MessageBox.Show("Seçili Ögeyi Silmek İstiyor Musunuz ?", "Dikkat", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { try { sID = dtgvRef.CurrentRow.Cells["ID"].Value.ToString(); sAd = dtgvRef.CurrentRow.Cells["Isim"].Value.ToString(); db.rfrSil(sID); btnRfrYenile.PerformClick(); } catch (Exception hata) { MessageBox.Show(hata.Message); } AnaForm ana = new AnaForm(); string islem = "Referans Silme, " + sAd + "-" + sID; ana.LogKayit(islem); } }