public bool AdultSkillsMatch(ILearningDelivery learningDelivery)
 {
     return(learningDelivery.FundModel == FundModels.AdultSkills &&
            !HasOlassFAMTypeAndCode(learningDelivery.LearningDeliveryFAMs) &&
            !HasDD07(learningDelivery.ProgTypeNullable) &&
            !HasDD35(learningDelivery) &&
            !_learningDeliveryFAMQueryService.HasLearningDeliveryFAMCodeForType(learningDelivery.LearningDeliveryFAMs, LearningDeliveryFAMTypeConstants.LDM, LearningDeliveryFAMCodeConstants.LDM_376));
 }
コード例 #2
0
 public bool IsExcluded(int?progType, string lsdPostcode, IEnumerable <ILearningDeliveryFAM> learningDeliveryFAMs, bool longTermResUkprn)
 {
     return(progType.HasValue ||
            lsdPostcode.CaseInsensitiveEquals(ValidationConstants.TemporaryPostCode) ||
            longTermResUkprn ||
            _learningDeliveryFAMQueryService.HasLearningDeliveryFAMCodeForType(learningDeliveryFAMs, LearningDeliveryFAMTypeConstants.LDM, LearningDeliveryFAMCodeConstants.LDM_OLASS) ||
            _learningDeliveryFAMQueryService.HasLearningDeliveryFAMCodeForType(learningDeliveryFAMs, LearningDeliveryFAMTypeConstants.DAM, LearningDeliveryFAMCodeConstants.DAM_Code_001) ||
            _learningDeliveryFAMQueryService.HasLearningDeliveryFAMType(learningDeliveryFAMs, LearningDeliveryFAMTypeConstants.RES));
 }
コード例 #3
0
 public bool IsExcluded(ILearningDelivery theDelivery)
 {
     return(_learningDeliveryFAMQueryService.HasLearningDeliveryFAMCodeForType(
                theDelivery.LearningDeliveryFAMs,
                LearningDeliveryFAMTypeConstants.LDM,
                LearningDeliveryFAMCodeConstants.LDM_ProcuredAdultEducationBudget) ||
            _learningDeliveryFAMQueryService.HasLearningDeliveryFAMType(
                theDelivery.LearningDeliveryFAMs,
                LearningDeliveryFAMTypeConstants.RES));
 }
コード例 #4
0
 public bool LearningDeliveryFAMsConditionMet(
     int fundModel,
     IEnumerable <ILearningDeliveryFAM> learningDeliveryFAMs)
 => !(_learningDeliveryFAMQueryService.HasLearningDeliveryFAMCodeForType(
          learningDeliveryFAMs,
          LearningDeliveryFAMTypeConstants.LDM,
          LearningDeliveryFAMCodeConstants.LDM_OLASS) ||
      (fundModel == FundModels.NotFundedByESFA &&
       _learningDeliveryFAMQueryService.HasLearningDeliveryFAMCodeForType(
           learningDeliveryFAMs,
           LearningDeliveryFAMTypeConstants.SOF,
           LearningDeliveryFAMCodeConstants.SOF_LA)));
 public bool LearningDeliveryFAMsCondtionMet(IReadOnlyCollection <ILearningDeliveryFAM> learningDeliveryFAMs)
 {
     return(_learningDeliveryFAMQueryService
            .HasLearningDeliveryFAMCodeForType(
                learningDeliveryFAMs,
                LearningDeliveryFAMTypeConstants.EEF,
                LearningDeliveryFAMCodeConstants.ACT_ContractESFA) &&
            _learningDeliveryFAMQueryService
            .HasLearningDeliveryFAMCodeForType(
                learningDeliveryFAMs,
                LearningDeliveryFAMTypeConstants.FFI,
                LearningDeliveryFAMCodeConstants.ACT_ContractESFA));
 }
コード例 #6
0
 public bool IsExcluded(ILearningDelivery delivery) =>
 _learningDeliveryFAMQueryService.HasLearningDeliveryFAMType(
     delivery.LearningDeliveryFAMs,
     LearningDeliveryFAMTypeConstants.RES) ||
 _learningDeliveryFAMQueryService.HasLearningDeliveryFAMCodeForType(
     delivery.LearningDeliveryFAMs,
     LearningDeliveryFAMTypeConstants.LDM,
     LearningDeliveryFAMCodeConstants.LDM_OLASS) ||
 _learningDeliveryFAMQueryService.HasLearningDeliveryFAMCodeForType(
     delivery.LearningDeliveryFAMs,
     LearningDeliveryFAMTypeConstants.LDM,
     LearningDeliveryFAMCodeConstants.LDM_SteelRedundancy) ||
 _dd07.IsApprenticeship(delivery.ProgTypeNullable) ||
 IsSpecialistDesignatedCollege();
コード例 #7
0
 public bool IsExcluded(ILearningDelivery delivery) =>
 _learningDeliveryFAMQueryService.HasLearningDeliveryFAMType(
     delivery.LearningDeliveryFAMs,
     LearningDeliveryFAMTypeConstants.RES) ||
 _dd07.IsApprenticeship(delivery.ProgTypeNullable) ||
 delivery.ProgTypeNullable == ProgTypes.Traineeship ||
 _learningDeliveryFAMQueryService.HasLearningDeliveryFAMCodeForType(
     delivery.LearningDeliveryFAMs,
     LearningDeliveryFAMTypeConstants.DAM,
     LearningDeliveryFAMCodeConstants.DAM_DevolvedLevelTwoOrThreeExclusion) ||
 _learningDeliveryFAMQueryService.HasLearningDeliveryFAMCodeForType(
     delivery.LearningDeliveryFAMs,
     LearningDeliveryFAMTypeConstants.LDM,
     LearningDeliveryFAMCodeConstants.LDM_376);
コード例 #8
0
 public bool LearnDelFamTypeLDMConditionMet(IReadOnlyCollection <ILearningDeliveryFAM> learningDeliveryFams)
 {
     return(_learningDeliveryFamQueryService.HasLearningDeliveryFAMCodeForType(
                learningDeliveryFams,
                LearningDeliveryFAMTypeConstants.LDM,
                LearningDeliveryFAMCodeConstants.LDM_OLASS));
 }
 public bool LearningDeliveryFAMCodeConditionMet(IReadOnlyCollection <ILearningDeliveryFAM> learningDeliveryFAMs)
 {
     return(_learningDeliveryFAMQueryService.HasLearningDeliveryFAMCodeForType(
                learningDeliveryFAMs,
                LearningDeliveryFAMTypeConstants.LDM,
                LearningDeliveryFAMCodeConstants.LDM_Pilot));
 }
コード例 #10
0
 private bool FamConditionMet(IReadOnlyCollection <ILearningDeliveryFAM> learningDeliveryFams)
 {
     return(_learningDeliveryFamQueryService.HasLearningDeliveryFAMCodeForType(
                learningDeliveryFams,
                LearningDeliveryFAMTypeConstants.LDM,
                LearningDeliveryFAMCodeConstants.LDM_MandationtoSkillsTraining));
 }
コード例 #11
0
 public bool LearningDeliveryFAMConditionMet(IEnumerable <ILearningDeliveryFAM> learningDeliveryFAMs)
 {
     return(_learningDeliveryFAMQueryService.HasLearningDeliveryFAMCodeForType(
                learningDeliveryFAMs,
                LearningDeliveryFAMTypeConstants.LDM,
                LearningDeliveryFAMCodeConstants.LDM_LowWages));
 }
コード例 #12
0
 public bool ConditionFamValueMet(long?fundModel, IReadOnlyCollection <ILearningDeliveryFAM> fams)
 {
     return(fundModel.HasValue &&
            (
                fundModel.Value == 10 ||
                (fundModel.Value == 99 && _learningDeliveryFAMQueryService.HasLearningDeliveryFAMCodeForType(fams, LearningDeliveryFAMTypeConstants.SOF, "108"))));
 }
コード例 #13
0
 public bool ConditionMet(DateTime learnStartDate, int aimType, IEnumerable <ILearningDeliveryFAM> learningDeliveryFAMs)
 {
     return(!Excluded(learningDeliveryFAMs) &&
            learnStartDate >= _endDate &&
            aimType == AimTypes.ProgrammeAim &&
            _learningDeliveryFamQueryService.HasLearningDeliveryFAMCodeForType(learningDeliveryFAMs, LearningDeliveryFAMTypeConstants.ACT, LearningDeliveryFAMCodeConstants.ACT_ContractESFA));
 }
 public bool LearningDeliveryFAMsConditionMet(IEnumerable <ILearningDeliveryFAM> learningDeliveryFAMs)
 {
     return(_learningDeliveryFamQueryService.HasLearningDeliveryFAMCodeForType(
                learningDeliveryFAMs,
                LearningDeliveryFAMTypeConstants.LDM,
                LearningDeliveryFAMCodeConstants.LDM_CareerLearningPilot));
 }
 public bool Excluded(int?progType, IEnumerable <ILearningDeliveryFAM> learningDeliveryFams, string learnAimRef)
 {
     return(_derivedData07.IsApprenticeship(progType) ||
            _learningDeliveryFamQueryService.HasLearningDeliveryFAMType(learningDeliveryFams, LearningDeliveryFAMTypeConstants.RES) ||
            _learningDeliveryFamQueryService.HasAnyLearningDeliveryFAMCodesForType(learningDeliveryFams, LearningDeliveryFAMTypeConstants.LDM, _learningDeliveryFamCodes) ||
            _larsDataService.HasAnyLearningDeliveryForLearnAimRefAndTypes(learnAimRef, _learnAimRefTypes) ||
            _learningDeliveryFamQueryService.HasLearningDeliveryFAMCodeForType(learningDeliveryFams, LearningDeliveryFAMTypeConstants.DAM, LearningDeliveryFAMCodeConstants.DAM_DevolvedLevelTwoOrThreeExclusion));
 }
コード例 #16
0
 public void Validate(ILearner objectToValidate)
 {
     foreach (var learningDelivery in objectToValidate.LearningDeliveries.Where(ld => !Exclude(ld)))
     {
         if (ConditionMet(learningDelivery.FundModelNullable,
                          _learningDeliveryFAMQueryService.HasLearningDeliveryFAMCodeForType(learningDelivery.LearningDeliveryFAMs, LearningDeliveryFAMTypeConstants.SOF, "1"),
                          objectToValidate.ULNNullable,
                          _fileDataService.FilePreparationDate,
                          _validationDataService.AcademicYearJanuaryFirst,
                          learningDelivery.LearnStartDateNullable,
                          learningDelivery.LearnPlanEndDateNullable,
                          learningDelivery.LearnActEndDateNullable))
         {
             HandleValidationError(RuleNameConstants.ULN_11, objectToValidate.LearnRefNumber, learningDelivery.AimSeqNumberNullable);
         }
     }
 }
コード例 #17
0
 public bool IsExcluded(ILearningDelivery delivery) =>
 _learningDeliveryFAMQueryService.HasLearningDeliveryFAMType(
     delivery.LearningDeliveryFAMs,
     LearningDeliveryFAMTypeConstants.RES) ||
 _learningDeliveryFAMQueryService.HasLearningDeliveryFAMCodeForType(
     delivery.LearningDeliveryFAMs,
     LearningDeliveryFAMTypeConstants.LDM,
     LearningDeliveryFAMCodeConstants.LDM_OLASS) ||
 _learningDeliveryFAMQueryService.HasLearningDeliveryFAMCodeForType(
     delivery.LearningDeliveryFAMs,
     LearningDeliveryFAMTypeConstants.LDM,
     LearningDeliveryFAMCodeConstants.LDM_SteelRedundancy) ||
 _learningDeliveryFAMQueryService.HasLearningDeliveryFAMCodeForType(
     delivery.LearningDeliveryFAMs,
     LearningDeliveryFAMTypeConstants.DAM,
     LearningDeliveryFAMCodeConstants.DAM_DevolvedLevelTwoOrThreeExclusion) ||
 _dd07.IsApprenticeship(delivery.ProgTypeNullable);
コード例 #18
0
 public bool EmpStatMonitoringCondition(ILearnerEmploymentStatus employmentStatus, IEnumerable <ILearningDeliveryFAM> learningDeliveryFAMs)
 {
     return(_learnerEmploymentStatusMonitoringQueryService
            .HasAnyEmploymentStatusMonitoringTypeAndCodeForEmploymentStatus(employmentStatus, LearnerEmploymentStatusConstants.ESMTypes.BSI_BenefitStatusIndicator, LearnerEmploymentStatusConstants.ESMCodes.BSI_ReceiptOfOtherStateBenefits) ||
            (_learnerEmploymentStatusMonitoringQueryService
             .HasAnyEmploymentStatusMonitoringTypeAndCodeForEmploymentStatus(employmentStatus, LearnerEmploymentStatusConstants.ESMTypes.BSI_BenefitStatusIndicator, LearnerEmploymentStatusConstants.ESMCodes.BSI_ReceiptOfUniversalCredit) &&
             !_learningDeliveryFAMQueryService
             .HasLearningDeliveryFAMCodeForType(learningDeliveryFAMs, LearningDeliveryFAMTypeConstants.LDM, LearningDeliveryFAMCodeConstants.LDM_MandationtoSkillsTraining)));
 }
 public bool FundedAimCondition(int fundModel, int?progType, IEnumerable <ILearningDeliveryFAM> learningDeliveryFAMs)
 {
     return(_fundModels.Contains(fundModel) ||
            (fundModel == FundModels.OtherAdult && progType == ProgTypes.ApprenticeshipStandard) ||
            (fundModel == FundModels.NotFundedByESFA &&
             _learningDeliveryFamQueryService.HasLearningDeliveryFAMCodeForType(
                 learningDeliveryFAMs,
                 LearningDeliveryFAMTypeConstants.ADL,
                 LearningDeliveryFAMCodeConstants.ADL_Code)));
 }
コード例 #20
0
 public void Validate(ILearner objectToValidate)
 {
     foreach (var learningDelivery in objectToValidate.LearningDeliveries)
     {
         if (ConditionMet(_learningDeliveryFAMQueryService.HasLearningDeliveryFAMCodeForType(learningDelivery.LearningDeliveryFAMs, LearningDeliveryFAMTypeConstants.ACT, "1"), objectToValidate.ULNNullable))
         {
             HandleValidationError(RuleNameConstants.ULN_12, objectToValidate.LearnRefNumber, learningDelivery.AimSeqNumberNullable);
         }
     }
 }
コード例 #21
0
 public void Validate(ILearner objectToValidate)
 {
     foreach (var learningDelivery in objectToValidate.LearningDeliveries)
     {
         if (ConditionMet(_learningDeliveryFAMQueryService.HasLearningDeliveryFAMCodeForType(learningDelivery.LearningDeliveryFAMs, LearningDeliveryFAMTypeConstants.LDM, "034"), _fileDataService.FilePreparationDate, _validationDataService.AcademicYearJanuaryFirst, objectToValidate.ULNNullable))
         {
             HandleValidationError(RuleNameConstants.ULN_09, objectToValidate.LearnRefNumber, learningDelivery.AimSeqNumberNullable);
         }
     }
 }
コード例 #22
0
        public bool Exclude(ILearningDelivery learningDelivery)
        {
            var fundModelConditionMet = learningDelivery.FundModelNullable.HasValue &&
                                        _excludeFundModels.Contains(learningDelivery.FundModelNullable.Value);

            var famTypeConditionMet = learningDelivery.FundModelNullable.HasValue &&
                                      (learningDelivery.FundModelNullable.Value == 99 &&
                                       _learningDeliveryFamQueryService.HasLearningDeliveryFAMCodeForType(
                                           learningDelivery.LearningDeliveryFAMs, LearningDeliveryFAMTypeConstants.SOF, "108"));

            return(fundModelConditionMet || famTypeConditionMet);
        }
コード例 #23
0
 public void Validate(ILearner objectToValidate)
 {
     foreach (var learningDelivery in objectToValidate.LearningDeliveries)
     {
         if (ConditionMet(
                 learningDelivery.FundModelNullable,
                 objectToValidate.DateOfBirthNullable,
                 _validationDataService.AcademicYearEnd,
                 _learningDeliveryFAMQueryService.HasLearningDeliveryFAMCodeForType(learningDelivery.LearningDeliveryFAMs, LearningDeliveryFAMTypeConstants.SOF, "1")))
         {
             HandleValidationError(RuleNameConstants.DateOfBirth_13, objectToValidate.LearnRefNumber, learningDelivery.AimSeqNumberNullable);
         }
     }
 }
 public virtual bool LearningDeliveryFAMConditionMet(IEnumerable <ILearningDeliveryFAM> learningDeliveryFams)
 {
     return(!_learningDeliveryFamQueryService.HasLearningDeliveryFAMCodeForType(learningDeliveryFams, LearningDeliveryFAMTypeConstants.LDM, "034"));
 }
コード例 #25
0
 public bool IsAdultEducationBudgets(ILearningDelivery theDelivery) =>
 _learningDeliveryFAMQueryService.HasLearningDeliveryFAMCodeForType(
     theDelivery.LearningDeliveryFAMs,
     LearningDeliveryFAMTypeConstants.LDM,
     LearningDeliveryFAMCodeConstants.LDM_ProcuredAdultEducationBudget);
コード例 #26
0
 public bool LearningDeliveryFAMsConditionMet(IEnumerable <ILearningDeliveryFAM> learningDeliveryFAMs)
 {
     return(!_learningDeliveryFAMQueryService.HasLearningDeliveryFAMType(learningDeliveryFAMs, LearningDeliveryFAMTypeConstants.HHS) &&
            !_learningDeliveryFAMQueryService.HasLearningDeliveryFAMCodeForType(learningDeliveryFAMs, LearningDeliveryFAMTypeConstants.LDM, "034"));
 }
 public bool DeliveryFAMConditionMet(IEnumerable <ILearningDeliveryFAM> learningDeliveryFams)
 {
     return(_learningDeliveryFamQueryService.HasLearningDeliveryFAMCodeForType(learningDeliveryFams, LearningDeliveryFAMTypeConstants.SOF, "1") &&
            !_learningDeliveryFamQueryService.HasLearningDeliveryFAMCodeForType(learningDeliveryFams, LearningDeliveryFAMTypeConstants.LDM, "352"));
 }
 public bool LearningDeliveryFAMsConditionMet(IEnumerable <ILearningDeliveryFAM> learningDeliveryFAMs)
 {
     return(_learningDeliveryFAMsQueryService.HasLearningDeliveryFAMCodeForType(learningDeliveryFAMs, LearningDeliveryFAMTypeConstants.ACT, "1"));
 }
コード例 #29
0
 public bool LearningDeliveryFAMSConditionMet(IEnumerable <ILearningDeliveryFAM> learningDeliveryFAMs)
 {
     return(!_learningDeliveryFamQueryService.HasLearningDeliveryFAMCodeForType(learningDeliveryFAMs, "LDM", "347"));
 }
コード例 #30
0
 public bool FundModelConditionMet(int fundModel, IEnumerable <ILearningDeliveryFAM> learningDeliveryFAMs)
 {
     return(_fundModels.Contains(fundModel) ||
            (fundModel == 99 && _learningDeliveryFAMQueryService.HasLearningDeliveryFAMCodeForType(learningDeliveryFAMs, "ADL", "1")));
 }