private void button5_Click(object sender, EventArgs e) { if (!KontrolEt()) { return; } Kayit k = new Kayit() { ID = lbl_id.Text.Length <= 0 ? 0 : Convert.ToInt32(lbl_id.Text), Arac = comboBox_Arac.SelectedItem.ToString(), TahsilTuru = comboBox_Tahsilturu.SelectedItem.ToString(), TahsilTarihi = dateTimePicker_TahsilTarihi.Value, Tutar = Convert.ToDouble(txt_tutar.Text), Aciklama = txt_aciklama.Text, Muhatap = txt_muhatap.Text, Durum = true, SilMi = false }; if (temp == null) { Kayit.Ekle(k); MessageBox.Show("Eklendi !!"); } else { Kayit.Guncelle(k); MessageBox.Show("Güncellendi !!"); } this.Close(); }