コード例 #1
0
        public ActionResult UpdateStudentGrades(int?TermId, int?TermCourseId, int?SectionId)
        {
            if (TermId == null)
            {
                Grading model = new Grading();
                model.TermOptions       = dao.GetAllTermOptions();
                model.TermCourseOptions = new List <TermCourseOption>();
                model.SectionOptions    = new List <SectionOption>();
                return(View(model));
            }
            if (TermCourseId == null)
            {
                return(Json(dao.GetTermCourses(TermId.Value), JsonRequestBehavior.AllowGet));
            }
            if (SectionId == null)
            {
                return(Json(dao.GetSectionOptions(TermCourseId.Value), JsonRequestBehavior.AllowGet));
            }

            return(PartialView("EditGrades", dao.GetGrades(SectionId.Value)));
        }