public ActionResult Delete(long id) { try { // TODO: Add delete logic here ContratorDao bdDao = new ContratorDao(); ProjectDao prDao = new ProjectDao(); if (prDao.FindByContrator(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 { return(View()); } }