Exemplo n.º 1
0
        public ActionResult Primary(string publicDivisionAlias, int studentGroupId, DateTime?weekMonday)
        {
            var studentGroup   = studentGroupRepository.GetStudentGroupById(studentGroupId);
            var publicDivision = publicDivisionRepository.GetPublicDivisionByAlias(publicDivisionAlias);

            if (studentGroup != null)
            {
                var viewModel = StudentGroupEventsPrimaryViewModel.Build(studentGroup, publicDivision, weekMonday);

                return(View(viewModel.ViewName, viewModel));
            }
            return(View());
        }
Exemplo n.º 2
0
        //
        // GET: /Divisions/Show/{alias}
        public ActionResult Show(string alias)
        {
            var publicDivision = publicDivisionRepository.GetPublicDivisionByAlias(alias);

            if (!String.IsNullOrEmpty(publicDivision.ExternalWebSiteReference))
            {
                return(Redirect(publicDivision.ExternalWebSiteReference));
            }
            DivisionShowViewModel divisionViewModel = DivisionShowViewModel.Build(publicDivision);

            return(View(divisionViewModel));
        }
Exemplo n.º 3
0
        public ActionResult Show(string publicDivisionAlias, IEnumerable <int> id)
        {
            var studyPrograms  = studyProgramRepository.GetStudyPrograms(id);
            var publicDivision = publicDivisionRepository.GetPublicDivisionByAlias(publicDivisionAlias);

            #region Here comes Pizdec
            var studyProgram = studyPrograms.First();
            if (publicDivision.Alias == "BIOL" && studyProgram.Name == "Биология" && studyProgram.StudyLevel.Name == "магистратура" && studyProgram.AdmissionYear.Number >= 2016)
            {
                return(RedirectToRoute("XtracurEvents.Index", new { alias = "BIOL" }));
            }
            #endregion

            var studyProgramStudentGroupsViewModel = StudyProgramShowViewModel.Build(studyPrograms, publicDivision);
            return(View(studyProgramStudentGroupsViewModel));
        }