Ejemplo n.º 1
0
        public ActionResult StudyTypes()
        {
            var pages = SimplePageService.GetAll().BySysName(SimplePages.EducationTypes)
                        .Children.OrderBy(x => x.WebSortOrder).ToList();

            return(View(PartialViewNames.StudyTypes, pages));
        }
Ejemplo n.º 2
0
        public virtual ActionResult City(string urlName)
        {
            City city;

            if (urlName == null)
            {
                var cityTC = UserSettingsService.CityTC;
                if (cityTC == null || cityTC == Cities.Moscow)
                {
                    return(Redirect(MainMenu.Urls.Locations));
                }
                city = CityService.GetByPK(cityTC);
            }
            else
            {
                city = CityService.GetAll().ByUrlName(urlName);
            }
            if (city == null)
            {
                return(Redirect(MainMenu.Urls.Locations));
            }
            var model =
                new CityVM {
                City      = city,
                Complexes = ComplexService.GetAll().ByCity(city.City_TC).ToList(),
                Locations = SimplePageService.GetAll().BySysName(SimplePages.Locations),
                Cities    = CityService.GetAll()
                            .Where(c => c.City_TC != city.City_TC).ToList(),
                Groups = GroupService.GetPlannedAndNotBegin().Where(x => x.WebinarExists).Take(20).ToList()
            };

            return(View(model));
        }
Ejemplo n.º 3
0
        public ActionResult JubileeDiscounts()
        {
            var description =
                SimplePageService.GetAll().BySysName(SimplePages.JubileeGroups).GetOrDefault(x => x.Description);
            var groups = GroupService.GetPlannedAndNotBegin().Where(x => x.Discount == 20).ToList();

            return(BaseView(new PagePart(description), new PagePart(
                                Views.Shared.Education.NearestGroupList, new JubileeGroupsVM(groups, false))));
        }
Ejemplo n.º 4
0
 public Dictionary <string, string> Offers()
 {
     return(MethodBase.GetCurrentMethod().CacheDay(() => {
         var pages = SimplePageService.GetAll(x => SimplePages.Offers.All.Contains(x.SysName))
                     .ToList();
         return pages.ToDictionary(x => SimplePages.Offers.Orgs[x.SysName],
                                   x => x.UrlName);
     }));
 }
Ejemplo n.º 5
0
        public ActionResult UsefulInformation(string urlName)
        {
            var usefulInformation = UsefulInformationService.GetAll().ByUrlName(urlName);

            return(View(new UsefulInformationVM {
                UsefulInfo = usefulInformation,
                UsefulInformation =
                    SimplePageService.GetAll().BySysName(SimplePages.UsefulInformation)
            }));
        }
Ejemplo n.º 6
0
        public SimplePage GetHostingInfo()
        {
            var user       = AuthService.CurrentUser;
            var student    = user.Student;
            var simplePage = SimplePageService.GetAll().SysName(SimplePages.HostingInfo);

            simplePage.Description = TemplateEngine.GetText(simplePage.Description,
                                                            new
            {
                user.FullName,
                student.HostingSite,
                student.HostingLogin,
                student.HostingPassword
            });
            return(simplePage);
        }
Ejemplo n.º 7
0
        public ActionResult MarketingAction(string urlName)
        {
            var action = MarketingActionService.FirstOrDefault(x => x.IsActive && x.UrlName == urlName);

            if (action == null)
            {
                return(null);
            }
            if (action.MarketingAction_ID == Specialist.Entities.Const.MarketingActions.Unlimit)
            {
                var button = SimplePageVMService.GetUnlimitOrderButton(Url, User);
                action.Description = TemplateEngine.GetText(action.Description, new { OrderButton = button.ToString() });
            }
            var page = action.IsSpecialOffer ? SimplePages.SpecialActions : SimplePages.MarketingActions;

            return(MView(Views.Center.MarketingAction, new MarketingActionVM {
                MarketingAction = action,
                MarketingActions = SimplePageService.GetAll().BySysName(page),
            }));
        }
Ejemplo n.º 8
0
 public ContactModel(SimplePageService simplePageService, IOptionsSnapshot <MailerSettingsOptions> mailerOptions)
 {
     _mailerOptions     = mailerOptions;
     _simplePageService = simplePageService;
 }
Ejemplo n.º 9
0
 public IndexModel(SimplePageService simplePageService)
 {
     _simplePageService = simplePageService;
 }
Ejemplo n.º 10
0
 public DeleteModel(SimplePageService simplePageService)
 {
     _simplePageService = simplePageService;
 }
Ejemplo n.º 11
0
        public ActionResult Info()
        {
            var model = SimplePageService.GetAll().BySysName(SimplePages.MainPage);

            return(BaseView(Views.Center.Info, model));
        }
Ejemplo n.º 12
0
/*
 *              public ActionResult PartnerVacancies(int? index) {
 *                      if (!index.HasValue)
 *                              return RedirectToAction(() => PartnerVacancies(1));
 *
 *                      var vacancies = VacancyService.GetAll().IsActive()
 *                              .Where(v => v.IsPartner)
 *                              .OrderByDescending(v => v.PublishDate).ToPagedList(index.Value - 1);
 *                      return View(ViewNames.Vacancies, new VacancyListVM {
 *                              IsPartner = true,
 *                              Vacancies = vacancies
 *                      });
 *              }
 */

        private SimplePage GetCareer()
        {
            return(SimplePageService.GetAll().BySysName(SimplePages.Career));
        }
Ejemplo n.º 13
0
        public EntityCommonVM GetByUrl(string url, PageController controller)
        {
            var page = SimplePageService.GetByUrl(url);

            if (page == null)
            {
                return(null);
            }
            if (page.UseTabs && page.Children.Any())
            {
                page = page.Children.OrderBy(x => x.WebSortOrder).First();
            }

            var model = EntityCommonService.Get(page);

            if (page.SysName == SimplePages.HotGroups)
            {
                page.Name = "Группы " + CommonTexts.Discounts + CommonTexts.OnDay;
            }

            switch (page.SysName)
            {
            case SimplePages.UsefulInformation:
                AddControlForUsefulInformation(model);
                break;

            case SimplePages.Trainers:
                AddControlForTrainers(model);
                break;

            case SimplePages.Managers:
                AddControlForManagers(model);
                break;

            case SimplePages.Locations:
                AddControlForLocations(model);
                break;

            case SimplePages.HotGroups:
                AddControlForHotGroups(model, controller);
                break;

            case SimplePages.WeekendCourses:
                AddControlForWeekendCourses(model);
                break;

            case SimplePages.OnlineTesting:
                AddControlForOnlineTesting(model);
                break;

            case SimplePages.NewYearCourses:
                AddControlForNewYearCourses(model);
                break;

            case SimplePages.OpenClasses:
                AddControlForOpenClasses(model);
                break;

            case SimplePages.PartnerVacancy:
                AddControlForPartnerVacancy(model);
                break;

            case SimplePages.Probation:
                AddControlForProbation(model);
                break;

            case SimplePages.ClassIpCamera:
                AddControlForClassIpCamera(model);
                break;

            case SimplePages.Career:
                AddControlForCareer(model);
                break;

            case SimplePages.Job:
                AddControlForCareer(model);
                break;

            case SimplePages.PersonalManager:
                AddControlForPersonalManager(model);
                break;

            case SimplePages.OflManager:
                AddControlForOflManager(model);
                break;

            case SimplePages.MarketingActions:
                AddControlForMarketingActions(model);
                break;

            case SimplePages.SpecialActions:
                AddControlForSpecialActions(model);
                break;

            case SimplePages.Discounts:
                AddControlForDiscounts(model);
                break;

            case SimplePages.Reserve:
                AddControlForReserve(model);
                break;

            case SimplePages.Webinar:
                AddControlForWebinar(model);
                break;

            case SimplePages.WebinarResponses:
                AddControlForWebinarResponses(model);
                break;

            case SimplePages.IntraExtraResponses:
                AddControlForIntraExtraResponses(model);
                break;

            case SimplePages.DiplomResponses:
                AddControlForDiplomResponses(model);
                break;

            case SimplePages.Center:
                AddControlCenter(model);
                break;

            case SimplePages.Recruiter2011:
                AddControlRecruiter2011(model);
                break;

            case SimplePages.SpecialistTV:
                AddControlSpecialistTV(model);
                break;

            case SimplePages.CollectionMcts:
                AddControlForCollectionMcts(model);
                break;

            case SimplePages.SignUpWebinar:
                AddControlForSingUpWebinar(model);
                break;

            case SimplePages.MicrosoftSeminars:
                AddControlForMicrosoftSeminars(model);
                break;

            case SimplePages.TestingCenter:
                AddControlForTestingCenter(model);
                break;

            case SimplePages.IntramuralExtramural:
                AddControlForIntramuralExtramural(model);
                break;

            case SimplePages.AboutDiplom:
                AddControlForAboutDiplom(model);
                break;

            case SimplePages.TrainingPrograms:
                AddControlForTrainingPrograms(model, controller);
                break;

            case SimplePages.CorpOffers:
                AddControlForCorpOffers(model);
                break;

            case SimplePages.Unlimit:
                AddControlForUnlimit(model, controller);
                break;

            case SimplePages.UnlimitEng:
                AddControlForUnlimit(model, controller);
                break;

            case SimplePages.UnlimitWithCharge:
                AddControlForUnlimitWithCharge(model);
                break;

            case SimplePages.WebinarInv:
                AddControlForWebinarInv(model);
                break;

            case SimplePages.UnlimitWithoutCharge:
                AddControlForUnlimitWithoutCharge(model);
                break;

            case SimplePages.UnlimitNoChargeEng:
                AddControlForUnlimitWithoutCharge(model, true);
                break;
            }
            return(model);
        }
Ejemplo n.º 14
0
 public SPageModel(SimplePageService simplePageService)
 {
     _simplePageService = simplePageService;
 }
Ejemplo n.º 15
0
 private SimplePage GetCorporateClients()
 {
     return(SimplePageService.GetAll().BySysName(
                SimplePages.CorporateClients));
 }
Ejemplo n.º 16
0
 private SimplePage GetAboutTrainer()
 {
     return(SimplePageService.GetAll().BySysName(
                SimplePages.AboutTrainer));
 }
Ejemplo n.º 17
0
 public AddModel(SimplePageService simplePageService)
 {
     _simplePageService = simplePageService;
 }
Ejemplo n.º 18
0
 public EditModel(SimplePageService simplePageService)
 {
     _simplePageService = simplePageService;
 }