コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Urun urun = UrunManager.GetById(id);

            UrunManager.Delete(urun);
            return(RedirectToAction("Index"));
        }
コード例 #2
0
        public ActionResult DeleteConfirmed(int id)
        {
            Urun urun = urunManager.Find(x => x.ID == id);

            urunManager.Delete(urun);
            return(RedirectToAction("Index"));
        }
コード例 #3
0
        public ActionResult DeleteConfirmed(int id)
        {
            Urun urun = manager.Get(id);

            manager.Delete(urun.Id);
            return(RedirectToAction("Index"));
        }
コード例 #4
0
ファイル: UrunYonetimi.cs プロジェクト: mesutilica/StokTakip
 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!");
     }
 }
コード例 #5
0
ファイル: UrunForm.cs プロジェクト: caglary/Demo
 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.");
         }
     });
 }