public ActionResult DeleteConfirmed(int id) { Alim Alim = _alimService.GetById(id); _alimService.Delete(id); TempData["MessageSuccess"] = "Gönderim başarıyla silinmiştir"; return(RedirectToAction("Index")); }
public ActionResult Delete(int?Id) { int id = Convert.ToInt32(Id); // int id = AlimId; Alim Alim = _alimService.GetById(id); try { TempData["MessageSuccess"] = "Teklif başarıyla silinmiştir"; _alimService.Delete(id); return(RedirectToAction("Index")); } catch (Exception ex) { TempData["Message"] = "ERROR:" + ex.InnerException.InnerException.Message.ToString(); } return(View(Alim)); }
public ActionResult DeleteConfirmed(int id) { Alim Alim = _alimService.GetById(id); try { _alimService.Delete(id); return(RedirectToAction("Index")); } catch (Exception ex) { TempData["Message"] = "ERROR:" + ex.Message.ToString(); } return(View(Alim)); }