public ActionResult DeleteConfirmed(int id) { Urun urun = UrunManager.GetById(id); UrunManager.Delete(urun); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { Urun urun = urunManager.Find(x => x.ID == id); urunManager.Delete(urun); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { Urun urun = manager.Get(id); manager.Delete(urun.Id); return(RedirectToAction("Index")); }
private void btnSil_Click(object sender, EventArgs e) { try { if (UrunId > 0) { var islemSonucu = urunManager.Delete(UrunId); if (islemSonucu > 0) { DatalariYukle(); MessageBox.Show("Kayıt Silindi!"); } } } catch { MessageBox.Show("Hata Oluştu!"); } }
private void btnDelete_Click(object sender, EventArgs e) { Utilities.ErrorHandle._try(() => { if (_urun != null) { int result = _bll.Delete(_urun); if (result == 1) { txtUpdateProductName.Text = ""; GetAllList(); Utilities.Mesaj.MessageBoxInformation("İşleminiz başarı ile gerçekleşti."); _urun = null; } } else { Utilities.Mesaj.MessageBoxWarning("Listeden ürün seçiniz."); } }); }