private void btnKaydet_Click(object sender, EventArgs e) { Caridal.AddOrUpdate(context, _entity); Caridal.save(context); this.Close(); }
private void btnCariSil_Click(object sender, EventArgs e) { if (MessageBox.Show("Seçili olan kaydı 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(); } }
private void Form1_Load(object sender, EventArgs e) { MGsTOKContex contex = new MGsTOKContex(); CariDal cd = new CariDal(); Cari entity = new Cari() { CariKodu = "123456", CariAdi = "Deneme", YetkiliKisi = "Erhan", FaturaUnvani = "deneem" }; cd.AddOrUpdate(contex, entity); cd.save(contex); }