Exemple #1
0
        public List <string> GetCourseTCListForTotalSection(int sectionId)
        {
            var sectionIds = _.List(sectionId)
                             .AddFluent(SectionService.GetChildren(sectionId).Select(x => x.Section_ID));

            return(CourseService.GetCourseTCListForSections(sectionIds));
        }
Exemple #2
0
        public List <Announce> GetHotGroupsForSection(Section section)
        {
            var sections = _.List(section).AddFluent(
                SectionService.GetChildren(section.Section_ID));
            var announces = new List <Announce>();

            foreach (var subSection in sections)
            {
                if (announces.Count >= CommonConst.AnnounceCount)
                {
                    break;
                }
                announces.AddRange(GetAllFor(subSection)
                                   .Take(CommonConst.AnnounceCount - announces.Count));
            }
            return(announces);
        }