Ejemplo n.º 1
0
        public JsonResult GetStudentMarking(int?year, int?faculty, int?semester, int?section)
        {
            //int totalPass = 0;
            //int totalMerit = 0;
            //int totalDistinction = 0;
            //int totalFail = 0;

            int totalPass        = Convert.ToInt32(tc.GetTotalPassStudent(year, faculty, semester, section));
            int totalMerit       = Convert.ToInt32(tc.GetTotalMeritStudent(year, faculty, semester, section));
            int totalDistinction = Convert.ToInt32(tc.GetTotalDistictionStudent(year, faculty, semester, section));
            int totalFail        = Convert.ToInt32(tc.GetTotalFailStudent(year, faculty, semester, section));

            return(new JsonResult
            {
                Data = new { totalPass = totalPass, totalMerit = totalMerit, totalDistinction = totalDistinction, totalFail = totalFail },
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }