public ActionResult Delete(int id) { try { var receive = _receiveService.GetReceiveById(id); if (receive == null) { return(RedirectToAction("List")); } _receiveService.DeleteReceive(id); SuccessNotification("Delete receive successfully."); return(RedirectToAction("List")); } catch (Exception e) { ErrorNotification("Delete receive failed."); return(RedirectToAction("List")); } }
public ActionResult Delete(int id) { try { var receive = _receiveService.GetReceiveById(id); if (receive == null) { return(RedirectToAction("List")); } _receiveService.DeleteReceive(id); SuccessNotification("Xóa phiếu nhập thành công"); return(RedirectToAction("List")); } catch (Exception e) { ErrorNotification("Xóa phiếu nhập thất bại"); return(RedirectToAction("List")); } }