public static AdminRegistrationViewModel Create(IRepository repository, IMajorService majorService, ICeremonyService ceremonyService, IRegistrationService registrationService, TermCode termCode, string userId, string studentid, string lastName, string firstName, string majorCode, int? ceremonyId, string collegeCode) { Check.Require(repository != null, "Repository is required."); Check.Require(majorService != null, "Major service is required."); Check.Require(ceremonyService != null, "ceremonyService is required."); var ceremonies = ceremonyService.GetCeremonies(userId, termCode); var colleges = new List<College>(); foreach(var a in ceremonies) colleges.AddRange(a.Colleges); var viewModel = new AdminRegistrationViewModel() { MajorCodes = majorService.GetByCeremonies(userId, ceremonies), Colleges = colleges.Distinct().ToList(), Ceremonies = ceremonies, studentidFilter = studentid, lastNameFilter = lastName, firstNameFilter = firstName, majorCodeFilter = majorCode, ceremonyFilter = ceremonyId ?? -1, collegeFilter = collegeCode, Participations = registrationService.GetFilteredParticipationList(userId, studentid, lastName, firstName, majorCode, ceremonyId, collegeCode, ceremonies, termCode) }; //if (!string.IsNullOrEmpty(majorCode)) // viewModel1111 = viewModel.Registrations.Where(a => a.Student.StrMajorCodes.Contains(majorCode)); return viewModel; }
public HeroSheetModel(IPageRenderer pageRenderer, ICoreLogic coreLogic, IConfiguration configuration, ISkillService skillService, IMajorService majorService) : base(pageRenderer, majorService) { _coreLogic = coreLogic; _configuration = configuration; _skillService = skillService; }
public PdfPage(IPageRenderer pageRenderer, IMajorService majorService) : base(majorService) { _pageRenderer = pageRenderer; Converter = new HtmlToPdfConverter { Size = PageSize.A4 }; }
public EditModel(IBranchService branchService, IAbilityService abilityService, ICoreLogic coreLogic, ISkillService skillService, IMajorService majorService) : base(majorService) { _branchService = branchService; _abilityService = abilityService; _coreLogic = coreLogic; _skillService = skillService; }
public EditModel(IWeaponService weaponService, IBonusService bonusService, ISkillService skillService, ICoreLogic coreLogic, IMajorService majorService) : base(majorService) { _weaponService = weaponService; _bonusService = bonusService; _skillService = skillService; _coreLogic = coreLogic; }
public EditModel(IRaceService raceService, ICoreLogic coreLogic, IAbilityService abilityService, IBonusService bonusService, IMajorService majorService) : base(majorService) { _raceService = raceService; _coreLogic = coreLogic; _abilityService = abilityService; _bonusService = bonusService; }
public CeremonyController(IRepositoryWithTypedId<TermCode, string> termRepository, IRepositoryWithTypedId<vTermCode, string> vTermRepository, IRepositoryWithTypedId<College, string> collegeRepository, IMajorService majorService, ICeremonyService ceremonyService, IUserService userService) { _termRepository = termRepository; _vTermRepository = vTermRepository; _collegeRepository = collegeRepository; _majorService = majorService; _ceremonyService = ceremonyService; _userService = userService; }
public static AdminStudentViewModel Create(IRepository repository, IMajorService majorService, ICeremonyService ceremonyService, TermCode termCode, string studentid, string lastName, string firstName, string majorCode, string college, string userId) { Check.Require(repository != null, "Repository is required."); // build a list of majors that the current user has assigned to their ceremonies var ceremonies = ceremonyService.GetCeremonies(userId, TermService.GetCurrent()); var majors = ceremonies.SelectMany(a => a.Majors).Where(a => a.ConsolidationMajor == null && a.IsActive).ToList(); var colleges = ceremonies.SelectMany(a => a.Colleges).Distinct().ToList(); var viewModel = new AdminStudentViewModel() { MajorCodes = majors, studentidFilter = studentid, lastNameFilter = lastName, firstNameFilter = firstName, majorCodeFilter = majorCode, Colleges = colleges }; var query = repository.OfType<Student>().Queryable.Where(a => a.TermCode == termCode && (a.StudentId.Contains(string.IsNullOrEmpty(studentid) ? string.Empty : studentid.Trim())) && (a.LastName.Contains(string.IsNullOrEmpty(lastName) ? string.Empty : lastName.Trim())) && (a.FirstName.Contains(string.IsNullOrEmpty(firstName) ? string.Empty : firstName.Trim())) ); // get the list of students with optional filters var students = query.ToList(); if (colleges.Count == 1) { var coll = colleges.First(); students = students.Where(a => a.StrColleges.Contains(coll.Id)).ToList(); } if (!string.IsNullOrEmpty(majorCode)) students = students.Where(a => a.StrMajorCodes.Contains(majorCode)).ToList(); if (!string.IsNullOrEmpty(college)) students = students.Where(a => a.StrColleges.Contains(college)).ToList(); // get all active registrations var reg = repository.OfType<RegistrationParticipation>().Queryable.Where( a => a.Ceremony.TermCode == termCode).// && !a.Registration.Student.SjaBlock && !a.Registration.Cancelled). ToList(); var regStudents = reg.Select(a => a.Registration.Student); viewModel.StudentRegistrationModels = new List<StudentRegistrationModel>(); foreach(var s in students.Distinct().ToList()) { var reged = regStudents.Any(a => a == s); viewModel.StudentRegistrationModels.Add(new StudentRegistrationModel(s, reged)); } return viewModel; }
public StudentService(IStudentRepository studentRepository, IGradeService gradeService, IGroupService groupService, IMajorService majorService) { _studentRepository = studentRepository; _gradeService = gradeService; _groupService = groupService; _majorService = majorService; }
public CoreLogic(IMapper mapper, IAbilityService abilityService, IRaceService raceService, IBranchService branchService, ISkillService skillService, ITraitService traitService, IMajorService majorService) : base(mapper) { _abilityService = abilityService; _raceService = raceService; _branchService = branchService; _skillService = skillService; _traitService = traitService; _majorService = majorService; _encoder = new Encoder(); }
public static ChangeMajorViewModel Create(IRepository repository, IMajorService majorService, Registration registration, IList<Ceremony> ceremonies) { Check.Require(repository != null, "Repository is required."); var viewModel = new ChangeMajorViewModel() { MajorCodes = majorService.GetMajors(), Student = registration.Student, Registration = registration, Ceremonies = ceremonies }; return viewModel; }
public AdminController(IRepositoryWithTypedId<Student, Guid> studentRepository, IRepositoryWithTypedId<MajorCode, string> majorRepository, IStudentService studentService, IEmailService emailService, IMajorService majorService, ICeremonyService ceremonyService, IRegistrationService registrationService, IRegistrationPopulator registrationPopulator, IRepository<Registration> registrationRepository, IErrorService errorService, IReportService reportService) { if (emailService == null) throw new ArgumentNullException("emailService"); _studentRepository = studentRepository; _majorRepository = majorRepository; _studentService = studentService; _emailService = emailService; _majorService = majorService; _ceremonyService = ceremonyService; _registrationService = registrationService; _registrationPopulator = registrationPopulator; _registrationRepository = registrationRepository; _errorService = errorService; _reportService = reportService; }
public ReportController(IRepositoryWithTypedId<TermCode, string> termRepository, IUserService userService, ICeremonyService ceremonyService, IMajorService majorService, IRepository<RegistrationParticipation> registrationParticipationRepository) { _termRepository = termRepository; _userService = userService; _ceremonyService = ceremonyService; _majorService = majorService; _registrationParticipationRepository = registrationParticipationRepository; }
public IndexModel(IBranchService branchService, IMajorService majorService) : base(majorService) { _branchService = branchService; }
public EditModel(IMagicService magicService, ICoreLogic coreLogic, IMajorService majorService) : base(majorService) { _magicService = magicService; _coreLogic = coreLogic; }
public MajorsController(IMajorService majorService) { _majorService = majorService; }
public IndexModel(IPerkService perkService, IMajorService majorService) : base(majorService) { _perkService = perkService; }
public ResultModel(ICoreLogic coreLogic, IMajorService majorService) : base(coreLogic, HeroGenStage.Result, majorService) { }
public EditModel(IBonusService bonusService, ICoreLogic coreLogic, IBranchService branchService, IMajorService majorService) : base(majorService) { _bonusService = bonusService; _coreLogic = coreLogic; _branchService = branchService; }
public MajorController(IMajorService service) : base(service) { }
public MajorsController(IMajorService service) { _service = service; }
public MajorController(IMajorService majorService, IMapper mapper, IPasternService pasternService) { _majorService = majorService; _mapper = mapper; _pasternService = pasternService; }
public IndexModel(IMagicService magicService, IMajorService majorService) : base(majorService) { _magicService = magicService; }
public IndexModel(IMajorService majorService) : base(majorService) { }
public MajorPage(IMajorService majorService) { MajorService = majorService; }
public IndexModel(IRaceService raceService, IMajorService majorService) : base(majorService) { _raceService = raceService; }
public static CeremonyViewModel Create(IRepository repository, IPrincipal user, IMajorService majorService , Ceremony ceremony) { Check.Require(repository != null, "Repository is required."); Check.Require(majorService != null, "Major Service is required."); var viewModel = new CeremonyViewModel() { TermCode = TermService.GetCurrent(), IsAdmin = user.IsInRole(Role.Codes.Admin), Ceremony = ceremony, Surveys = repository.OfType<Survey>().GetAll().ToList() }; // populate the colleges and majors var colleges = repository.OfType<College>().Queryable.Where(a => a.Display).ToList(); foreach (var clg in colleges) { if (viewModel.Ceremony.CeremonySurveys.All(a => a.College != clg)) { var ceremonySurvey = new CeremonySurvey(); ceremonySurvey.College = clg; ceremonySurvey.Ceremony = viewModel.Ceremony; viewModel.Ceremony.CeremonySurveys.Add(ceremonySurvey); } } IEnumerable<MajorCode> majors; if (ceremony.Id != 0) { viewModel.Colleges = new MultiSelectList(colleges, "Id", "Name", ceremony.Colleges.Select(x=>x.Id).ToList()); viewModel.TermCode = ceremony.TermCode; majors = majorService.GetByCollege(ceremony.Colleges.ToList()); viewModel.Majors = new MultiSelectList(majors, "Id", "Name", ceremony.Majors.Select(x => x.Id).ToList()); } else { viewModel.Colleges = new MultiSelectList(colleges, "Id", "Name"); } // populate the ticket distribution methods var tdmethods = repository.OfType<TicketDistributionMethod>().Queryable.Where(a => a.IsActive).ToList(); var selectedtdmethods = ceremony.TicketDistributionMethods.Select(a => a.Id).ToList(); viewModel.TicketDistributionMethods = new MultiSelectList(tdmethods, "Id", "Name", selectedtdmethods); // info for the time drop downs viewModel.Hours = new List<int>(); viewModel.Minutes = new List<string>(); viewModel.AmPm = new List<string>(); for (int i = 1; i < 13; i++) { viewModel.Hours.Add(i); } viewModel.Minutes.Add("00"); viewModel.Minutes.Add("30"); viewModel.AmPm.Add("AM"); viewModel.AmPm.Add("PM"); return viewModel; }
public IndexModel(ICoreLogic coreLogic, IMajorService majorService) : base(coreLogic, 0, majorService) { }
public RaceModel(ICoreLogic coreLogic, IRaceService raceService, IMajorService majorService) : base(coreLogic, HeroGenStage.Race, majorService) { _raceService = raceService; }
public EditModel(ICreatureService creatureService, IMajorService majorService) : base(majorService) { _creatureService = creatureService; }
public EditModel(IAbilityService abilityService, ICoreLogic coreLogic, IMajorService majorService) : base(majorService) { _abilityService = abilityService; _coreLogic = coreLogic; }
public BookModel(IPageRenderer pageRenderer, IAlchemyService alchemyService, IRaceService raceService, ITraitService traitService, ISkillService skillService, IMagicService magicService, IAbilityService abilityService, IBranchService branchService, IMajorService majorService) : base(pageRenderer, majorService) { _alchemyService = alchemyService; _raceService = raceService; _traitService = traitService; _skillService = skillService; _magicService = magicService; _abilityService = abilityService; _branchService = branchService; }
public IndexModel(IAbilityService abilityService, IMajorService majorService) : base(majorService) { _abilityService = abilityService; }
public IndexModel(IBonusService bonusService, IMajorService majorService) : base(majorService) { _bonusService = bonusService; }
public IndexModel(IConfiguration configuration, INewsService newsService, IMajorService majorService) { _configuration = configuration; _newsService = newsService; _majorService = majorService; }
public FooterViewComponent(IMajorService majorService) { _majorService = majorService; }
public EditorPage(IMajorService majorService) : base(majorService) { }