public void AddSubjectToLessonTestMethod()
        {
            CourseSubjectRelBll bll       = new CourseSubjectRelBll();
            LessonBll           lessonBll = new LessonBll();
            Yw_CourseLesson     lesson    = lessonBll.GetLesson(10023);

            bll.AddSubjectToLesson(lesson, 10005);
        }
        public void AddSubjectToLessonTest()
        {
            LessonBll           lessonBll = new LessonBll();
            Yw_CourseLesson     lesson    = lessonBll.GetLesson(10022);
            CourseSubjectRelBll bll       = new CourseSubjectRelBll();

            bll.AddSubjectToLesson(lesson, new List <int> {
                10042, 10043
            });
        }
Esempio n. 3
0
        public void AddSubjectToLessonTest()
        {
            Yw_CourseLesson lesson = new Yw_CourseLesson();

            lesson.Ycl_Id       = 20000;
            lesson.Ycl_CourseId = 20000;
            lesson.Ycl_Index    = 1;

            CourseSubjectRelBll bll = new CourseSubjectRelBll();

            bll.AddSubjectToLesson(lesson, 10000);
        }
        public ActionResult GetSubjectsToPractice(IList <DtoSubjectSearch> searches)
        {
            CourseSubjectRelBll bll = new CourseSubjectRelBll();
            var sch = searches.Select(s => new Tuple <int, int>(s.CourseId, s.NextLessonIndex));
            IList <StudentPractice.DtoSubjectCountToPractice> courses =
                bll.GetSubjectCountOfStudyPractice(sch);

            //将每个课时的练习题按课程分组,得到某个课程的所有能做的练习题
            var result = courses.GroupBy(s => s.CourseId)
                         .Select(g => new { CourseId = g.Key, TotalSubjectCount = g.Count() });

            return(Json(new SuccessJsonResponse(result), JsonRequestBehavior.AllowGet));
        }
        public void RemoveSubjectFromGroupTest()
        {
            CourseSubjectRelBll bll = new CourseSubjectRelBll();

            bll.RemoveSubjectFromGroup(10005, 10000);
        }
        public void AddSubjectToGroupTest()
        {
            CourseSubjectRelBll bll = new CourseSubjectRelBll();

            bll.AddSubjectToGroup(10005, 10000);
        }
        public void RemoveSubjectFromLessonTest()
        {
            CourseSubjectRelBll bll = new CourseSubjectRelBll();

            bll.RemoveSubjectFromLesson(10000, 10000);
        }