예제 #1
0
        /// <remarks>
        /// if the training program is not effective on the start date, the user will get a validation message when creating the apprenticeship
        /// (e.g. This training course is only available to apprentices with a start date after 04 2018)
        /// so we shouldn't see FundingCapOn returning 0 (when the start date is outside of a funding cap)
        /// but if we see it, we treat the apprenticeship as *not* over the funding limit
        /// </remarks>
        private int CalculateApprenticeshipsOverFundingLimit()
        {
            if (TrainingProgramme == null)
            {
                return(0);
            }

            return(Apprenticeships.Count(x => x.IsOverFundingLimit(TrainingProgramme, IsLinkedToChangeOfPartyRequest)));
        }
예제 #2
0
        /// <remarks>
        /// if the training program is not effective on the start date, the user will get a validation message when creating the apprenticeship
        /// (e.g. This training course is only available to apprentices with a start date after 04 2018)
        /// so we shouldn't see FundingCapOn returning 0 (when the start date is outside of a funding cap)
        /// but if we see it, we treat the apprenticeship as *not* over the funding limit
        /// </remarks>
        private int CalculateApprenticeshipsOverFundingLimit()
        {
            if (TrainingProgramme == null)
            {
                return(0);
            }

            return(Apprenticeships.Count(x => x.IsOverFundingLimit(TrainingProgramme)));
        }