public JsonResult DeleteSubject(Subject subject)
        {
            if (subject == null)
            {
                return(Json(new { Message = "Erro", HasError = true }, JsonRequestBehavior.AllowGet));
            }

            var dao     = new SubjectDAO();
            var message = dao.deleteSubject(subject);

            return(Json(new { Message = message }, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 2
0
 public static void  Delete(int id)
 {
     DAO.deleteSubject(id);
 }