Ejemplo n.º 1
0
        protected IEnumerable <CommonCourseListItemVM> GetCourses()
        {
            var courses = CourseListVMService.GetAll(null)
                          .Common.Items.Where(x => x.Prices.Any(z =>
                                                                !PriceTypes.IsIndividual(z.PriceType_TC)) &&
                                              !CourseTC.HalfTrackCourses.Contains(x.Course.Course_TC));

            return(courses);
        }
Ejemplo n.º 2
0
        public void AddControlForAboutDiplom(SimplePageVM model)
        {
            var diploms  = CourseService.DiplomTracks().ToList();
            var sections = UniqCourseInSection(GroupVMService.GetSectionCourseTCs(diploms));
            var data     = sections.Select(x => Tuple.Create(x.Key,
                                                             CourseListVMService.GetAll(new TrackListVM {
                IsDiplomPage = true,
                Courses      = x.ToList()
            }).FluentUpdate(y => y.EntityName = x.Key.Name))).ToList();
            var list = new DiplomProgramListVM {
                List = data
            };

            model.Controls.Add(new SimplePageVM.Control(Views.Page.DiplomProgramList, list));
        }
Ejemplo n.º 3
0
        public virtual ActionResult CourseList(string typeName, object pk,
                                               string name)
        {
            var entity = SiteObject.GetEntity(typeName, pk);

            if (entity == null)
            {
                return(null);
            }

            var model = CourseListVMService.GetAll(entity);

            model.EntityName = name;
            model.EntityType = entity.GetType();
            return(MView(PartialViewNames.AllCourseListPart, model));
        }
Ejemplo n.º 4
0
        public void AddControlForMicrosoftSeminars(SimplePageVM model)
        {
            var groups = CourseListVMService.GetSeminars(false)
                         .GroupSeminars.Where(x => x.Group.IsMicrosoftseminar).ToList();
            var msSeminars = GroupService.GetPlannedAndNotBegin().Where(
                x => CourseTC.MsSeminars.Contains(x.Course_TC))
                             .Select(x => new GroupSeminar(x)).ToList();

            model.Controls.Add(
                new SimplePageVM.Control(Views.Shared.Education.SeminarList,
                                         groups));
            if (msSeminars.Any())
            {
                model.Controls.Add(
                    new SimplePageVM.Control(Views.Shared.Education.SeminarList,
                                             msSeminars, "Расписание семинаров First Look"));
            }
        }
Ejemplo n.º 5
0
 private DiplomProgramListVM GetTrainingPrograms(PageController page)
 {
     return(MethodBase.GetCurrentMethod().CacheDay(() => {
         var programs = CourseService.GetAllHitTracks()
                        .Select(x => x.Course_TC).Except(CourseTC.HalfTracks.Keys).ToList();
         var sectionCourseTCs = GroupVMService.GetSectionCourseTCs(programs);
         var sections = UniqCourseInSection(sectionCourseTCs);
         var data = sections.Select(x => Tuple.Create(x.Key,
                                                      CourseListVMService.GetAll(new TrackListVM {
             IsTrainingProgramsPage = true,
             Courses = x.ToList()
         }).FluentUpdate(y => {
             y.EntityName = x.Key.Name;
             y.EntityUrl = page.Html.Url().Section().Urls.Details(x.Key.UrlName);
         }))).ToList();
         var list = new DiplomProgramListVM {
             List = data
         };
         return list;
     }));
 }
Ejemplo n.º 6
0
        public virtual ActionResult ElearningList(string name)
        {
            var model = CourseListVMService.ElearningCourses(name);

            return(View(model));
        }
Ejemplo n.º 7
0
        public virtual ActionResult CourseListForModel(object model)
        {
            var courses = CourseListVMService.GetAll(model);

            return(View(PartialViewNames.AllCourseListPart, courses));
        }
Ejemplo n.º 8
0
        public ActionResult Consultations()
        {
            var model = CourseListVMService.GetSeminars(true);

            return(View(ViewNames.Seminars, model));
        }
Ejemplo n.º 9
0
        public ActionResult Seminars()
        {
            var model = CourseListVMService.GetSeminars(false);

            return(View(model));
        }