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 })); }
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)); }