コード例 #1
0
        public JsonResult DeleteStudant(StudantGrade studantGrade)
        {
            if (studantGrade == null)
            {
                return(Json(new { Message = "Erro", HasError = true }));
            }

            var dao     = new StudantGradeDAO();
            var message = dao.deleteStudantGrade(studantGrade);

            return(Json(new { Message = message }));
        }
コード例 #2
0
        public JsonResult ListStudantGrade(StudantGrade studantGrade)
        {
            if (studantGrade == null)
            {
                return(Json(new { Message = "Error", HasError = true }));
            }

            var dao  = new StudantGradeDAO();
            var List = dao.ListStudantGrade();

            if (!List.Any())
            {
                return(Json(new { Message = "No entry found" }));
            }

            return(Json(List, JsonRequestBehavior.AllowGet));
        }