예제 #1
0
 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"));
     }
 }
예제 #2
0
 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"));
     }
 }