Example #1
0
        public JsonResult GetStudentByRegNo(string RegNo)
        {
            StudentDepartmentManager aStudentDepartmentManager = new StudentDepartmentManager();
            var students = aStudentDepartmentManager.GetStudentInfoWithDepartmentName();
            var student  = students.FirstOrDefault(a => a.RegistrationNo == RegNo);

            return(Json(student, JsonRequestBehavior.AllowGet));
        }
        public JsonResult GetStudentInfoByRegNo(string RegNo)
        {
            StudentDepartmentManager aStudentDepartmentManager = new StudentDepartmentManager();
            var studentdepartment = aStudentDepartmentManager.GetStudentInfoWithDepartmentName();
            var enrollcd          = studentdepartment.FirstOrDefault(s => s.RegistrationNo == RegNo);

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