Ejemplo n.º 1
0
 public ActionResult Delete(long id)
 {
     try
     {  // TODO: Add delete logic here
         CompetitorDao bdDao = new CompetitorDao();
         ProjectDao    prDao = new ProjectDao();
         if (prDao.FindByCompetitor(id).Count > 0)
         {
             SetAlert("Đang sử dụng không được phép xóa", Common.CommonConstant.ALERT_DANGER);
             return(RedirectToAction("Index"));
         }
         bdDao.Delete(id);
         // SetAlert("Xóa thành công", "success");
         return(RedirectToAction("Index"));
     }
     catch
     {
         // SetAlert("Không xóa được", "danger");
         return(View());
     }
 }