private void mbtnSil_Click(object sender, EventArgs e) { bool kontrol = Kontrol(); if (MessageBox.Show("KARTI SİLMEK İSTEDİĞİNİZE EMİN MİSİNİZ", "UYARI", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) { if (!kontrol) { _kartService.Delete(new Kart { KartId = Convert.ToInt32(mgrdGuncelle.CurrentRow.Cells[0].Value) }); _yapilacakServis.Delete("Delete From Yapilacaklar where KartId = '" + mgrdGuncelle.CurrentRow.Cells[3].Value + "'"); _yapilanServis.Delete("Delete From Yapilanlar where KartId = '" + mgrdGuncelle.CurrentRow.Cells[3].Value + "'"); _yapilmisServis.Delete("Delete From Yapilmislar where KartId = '" + mgrdGuncelle.CurrentRow.Cells[3].Value + "'"); mgrdGuncelle.DataSource = _kartService.GetAll(); Temizle(); pnlGuncelle.Enabled = false; } } else { MessageBox.Show("Kart Silinemedi"); Temizle(); pnlGuncelle.Enabled = false; } }
public ActionResult <KartViewModel> Delete(int id) { var result = _kartService.Delete(id); if (result == null) { return(NotFound()); } return(result); }
public ActionResult <string> Delete(int id) { _KartService.Delete(id); return("Shopping kart with id " + id + " has been deleted."); }
public IActionResult Delete(string vin) { _kartService.Delete(vin); return(base.Ok(new NoContentResponse("Ok", "deleted kart"))); }