コード例 #1
0
        public bool IsBasicSkillsLearner(ILearningDelivery delivery, ILARSLearningDelivery larsLearningDelivery)
        {
            var annualValues = _larsData.GetAnnualValuesFor(delivery.LearnAimRef);

            return(_dateTimeQueryService.IsDateBetween(delivery.LearnStartDate, larsLearningDelivery.EffectiveFrom, larsLearningDelivery.EffectiveTo ?? DateTime.MaxValue) &&
                   annualValues.Any(IsBasicSkillsLearner));
        }
        public ILARSStandardFunding GetStandardFundingFor(int standardCode, DateTime startDate)
        {
            var standard = _larsData.GetStandardFor(standardCode);

            return(standard?.StandardsFunding
                   .NullSafeWhere(sf => _dateTimeQueryService.IsDateBetween(startDate, sf.EffectiveFrom, sf.EffectiveTo ?? DateTime.MaxValue))
                   .OrderBy(x => x.EffectiveTo) // get the earliest closure first
                   .FirstOrDefault());
        }
コード例 #3
0
        public bool IsBasicSkillsLearner(ILearningDelivery delivery)
        {
            var larsLearningDelivery = _larsDataService.GetDeliveryFor(delivery.LearnAimRef);

            if (larsLearningDelivery == null)
            {
                return(true);
            }

            return(_dateTimeQueryService.IsDateBetween(delivery.LearnStartDate, larsLearningDelivery.EffectiveFrom, larsLearningDelivery.EffectiveTo ?? DateTime.MaxValue) &&
                   _larsDataService.BasicSkillsTypeMatchForLearnAimRef(_basicSkillTypes, delivery.LearnAimRef));
        }
コード例 #4
0
 public bool HasQualifyingStart(ILearningDelivery thisDelivery, DateTime?requiredStart) =>
 !requiredStart.HasValue ||
 _dateTimeQueryService.IsDateBetween(thisDelivery.LearnStartDate, requiredStart.Value, DateTime.MaxValue);
コード例 #5
0
 public bool HasQualifyingStart(ILearningDelivery theDelivery) =>
 _dateTimeQueryService.IsDateBetween(theDelivery.LearnStartDate, FirstViableStart, DateTime.MaxValue);
コード例 #6
0
 public bool HasQualifyingStart(ILearningDelivery thisDelivery, IReadOnlyCollection <ILARSStandardValidity> allocations) =>
 allocations.NullSafeAny(x => _dateTimeQueryService.IsDateBetween(thisDelivery.LearnStartDate, x.StartDate, DateTime.MaxValue));
コード例 #7
0
 public bool IsNotValid(ILearningDelivery delivery, ILearner learner) =>
 !IsExcluded(delivery) &&
 _fundModels.Contains(delivery.FundModel) &&
 _dateTimeQueryService.IsDateBetween(delivery.LearnStartDate, FirstViableDate, DateTime.MaxValue) &&
 InReceiptOfAnotherStateBenefit(delivery, learner) &&
 HasDisqualifyingLearningCategory(delivery);
コード例 #8
0
 public bool IsNotValid(ILearningDelivery delivery) =>
 !IsExcluded(delivery) &&
 delivery.FundModel == FundModels.AdultSkills &&
 _dateTimeQueryService.IsDateBetween(delivery.LearnStartDate, FirstViableDate, DateTime.MaxValue) &&
 HasQualifyingNotionalNVQ(delivery);
 public bool IsACandidate(ILearningDelivery delivery) =>
 _dd07.IsApprenticeship(delivery.ProgTypeNullable) &&
 delivery.AimType == AimTypes.ProgrammeAim &&
 _dateTimeQueryService.IsDateBetween(delivery.LearnStartDate, FirstViableDate, DateTime.MaxValue);
 public bool IsQualifyingPrimaryLearningAim(ILearningDelivery thisDelivery) =>
 thisDelivery != null &&
 _dateTimeQueryService.IsDateBetween(thisDelivery.LearnStartDate, DateTime.MinValue, OldCodeMonitoringThresholdDate) &&
 thisDelivery.ProgTypeNullable == ProgTypes.Traineeship &&
 thisDelivery.AimType == AimTypes.ProgrammeAim;
 public bool HasQualifyingDates(ILearningDelivery delivery) =>
 _dateTimeQueryService.IsDateBetween(delivery.OrigLearnStartDateNullable.Value, DateTime.MinValue, delivery.LearnStartDate, false);
 public bool IsNotValid(ILearnerEmploymentStatus employmentStatus) =>
 employmentStatus != null &&
 _dateTimeQueryService.IsDateBetween(employmentStatus.DateEmpStatApp, FirstViableDate, DateTime.MaxValue) &&
 IsQualifyingEmployment(employmentStatus) &&
 HasDisqualifyingIndicator(employmentStatus);
 public bool HasQualifyingStart(ILearningDelivery thisDelivery, IFcsContractAllocation allocation) =>
 allocation != null &&
 allocation.StartDate.HasValue &&
 _dateTimeQueryService.IsDateBetween(thisDelivery.LearnStartDate, allocation.StartDate.Value, DateTime.MaxValue);
コード例 #14
0
 public bool IsNotValid(ILearningDelivery delivery) =>
 _dateTimeQueryService.IsDateBetween(delivery.LearnStartDate, FirstViableDate, DateTime.MaxValue) &&
 HasDisqualifyingVocationalAim(delivery);
コード例 #15
0
 public bool IsCurrent(ILARSFrameworkAim frameworkAim, DateTime candidateStart) =>
 _dateTimeQueryService.IsDateBetween(candidateStart, DateTime.MinValue, frameworkAim.EndDate ?? DateTime.MaxValue, true);
 public bool PassesRestrictions(ILearningDelivery delivery) =>
 delivery.FundModel == FundModels.AdultSkills &&
 _dateTimeQueryService.IsDateBetween(delivery.LearnStartDate, FirstViableDate, DateTime.MaxValue) &&
 HasQualifyingNotionalNVQ(delivery);
コード例 #17
0
 public bool IsViableStart(ILearningDelivery delivery) =>
 _dateTimeQueryService.IsDateBetween(delivery.LearnStartDate, FirstViableDate, LastViableDate);
コード例 #18
0
 public bool HasQualifyingStart(ILearningDelivery thisDelivery) =>
 _dateTimeQueryService.IsDateBetween(thisDelivery.LearnStartDate, DateTime.MinValue, LastViableDate);
 public bool IsRestrictionMatch(ILearningDelivery delivery) =>
 delivery.ProgTypeNullable == ProgTypes.Traineeship &&
 delivery.AimType == AimTypes.ProgrammeAim &&
 _dateTimeQueryService.IsDateBetween(delivery.LearnStartDate, NewCodeMonitoringThresholdDate, DateTime.MaxValue);
コード例 #20
0
 public bool LARSExclusionCondition(ILARSLearningDelivery larsLearningDelivery, DateTime learnStartDate)
 {
     return(_dateTimeQueryService.IsDateBetween(learnStartDate, larsLearningDelivery.EffectiveFrom, larsLearningDelivery.EffectiveTo ?? DateTime.MaxValue) &&
            _larsDataService.GetAnnualValuesFor(larsLearningDelivery.LearnAimRef).Any(la => _basicSkillTypes.Contains(la.BasicSkillsType)));
 }
コード例 #21
0
 public bool IsNotValid(ILearningDelivery delivery) =>
 _dateTimeQueryService.IsDateBetween(delivery.LearnStartDate, FirstViableDate, DateTime.MaxValue) &&
 HasKnownLDCSCode(delivery) &&
 HasQualifyingPCTLDCSNull(delivery.LearningDeliveryHEEntity);