public ActionResult DeleteGift(int id) { if (Request.IsAjaxRequest()) { var giftName = _giftService.Get(id).Name; _giftService.Delete(id); return(PartialView("_DeleteGiftSuccessPartial", giftName)); } return(View()); }
public ActionResult Delete(int id) { try { _giftService.Delete(_giftService.GetById(id)); SuccessNotification("Kayıt Silindi"); return(RedirectToAction("GiftIndex")); } catch { return(View()); } }