private void btnKaydet_Click(object sender, EventArgs e) { if (caridal.AddorUpdate(context, _entity)) { caridal.Save(context); saved = true; this.Close(); } }
private void btnSil_Click(object sender, EventArgs e) { if (MessageBox.Show("Seçili olan veriyi silmek istediğinize emin misiniz?", "UYARI", MessageBoxButtons.YesNo) == DialogResult.Yes) { string secilen = gridView1.GetFocusedRowCellValue(colCariKodu).ToString(); cariDal.Delete(context, c => c.CariKodu == secilen); cariDal.Save(context); GetAll(); } }