示例#1
0
 /// <summary>
 /// Determines whether [is valid apprenticeship (category)] [the specified delivery].
 /// this is an FM35 and FM36 routine
 /// </summary>
 /// <param name="delivery">The delivery.</param>
 /// <param name="learner">The learner.</param>
 /// <returns>
 ///   <c>true</c> if [is valid apprenticeship (category)] [the specified delivery]; otherwise, <c>false</c>.
 /// </returns>
 public BranchResult IsQualifyingCategoryApprenticeship(ILearningDelivery delivery, ILearner learner) =>
 BranchResult.Create(
     !Check.IsRestart(delivery) &&
     !Check.IsStandardApprencticeship(delivery) &&
     Check.InApprenticeship(delivery) &&
     Check.IsComponentOfAProgram(delivery) &&
     Check.HasQualifyingStart(delivery, ApprenticeshipMinimumStart, DateTime.MaxValue),
     TypeOfLARSValidity.Apprenticeships);
示例#2
0
 /// <summary>
 /// Determines whether [is valid unemployed (category)] [the specified delivery].
 /// this is an FM35 routine
 /// </summary>
 /// <param name="delivery">The delivery.</param>
 /// <param name="learner">The learner.</param>
 /// <returns>
 ///   <c>true</c> if [is valid unemployed (category)] [the specified delivery]; otherwise, <c>false</c>.
 /// </returns>
 public BranchResult IsQualifyingCategoryUnemployed(ILearningDelivery delivery, ILearner learner) =>
 BranchResult.Create(
     !Check.IsRestart(delivery) &&
     !Check.IsLearnerInCustody(delivery) &&
     !Check.InApprenticeship(delivery) &&
     Check.HasQualifyingStart(delivery, DateTime.MinValue, UnemployedMaximumStart) &&
     InReceiptOfBenefitsAtStart(delivery, learner?.LearnerEmploymentStatuses.AsSafeReadOnlyList()),
     TypeOfLARSValidity.Unemployed);
示例#3
0
        private void OnNewTab(NewTabMessage obj)
        {
            if (_branchResult == null || _branchResult.Branch.Parent == null)
            {
                _branchResult = Layout.Branch(xamlTabz, Orientation.Vertical, false, 0.5);
            }

            _branchResult.TabablzControl.AddToSource(obj.NewTab);
            _branchResult.TabablzControl.SelectedItem = obj.NewTab;
        }
示例#4
0
        /// <summary>
        /// Gets the branching result for (this delivery and learner)
        /// </summary>
        /// <param name="thisDelivery">this delivery.</param>
        /// <param name="andLearner">and learner.</param>
        /// <returns>
        /// a branching result
        /// </returns>
        public IBranchResult GetBranchingResultFor(ILearningDelivery thisDelivery, ILearner andLearner)
        {
            It.IsNull(thisDelivery)
            .AsGuard <ArgumentNullException>(nameof(thisDelivery));
            It.IsNull(andLearner)
            .AsGuard <ArgumentNullException>(nameof(andLearner));

            foreach (var doActionFor in GetRoutines(thisDelivery.FundModel))
            {
                var branch = doActionFor(thisDelivery, andLearner);
                if (branch.Passed)
                {
                    return(branch);
                }
            }

            return(BranchResult.Create(false, string.Empty));
        }
示例#5
0
 /// <summary>
 /// Determines whether [is valid esf (category)] [the specified delivery].
 /// this is an FM70 routine
 /// </summary>
 /// <param name="delivery">The delivery.</param>
 /// <param name="learner">The learner.</param>
 /// <returns>
 ///   <c>true</c> if [is valid esf (category)] [the specified delivery]; otherwise, <c>false</c>.
 /// </returns>
 public BranchResult IsQualifyingCategoryESF(ILearningDelivery delivery, ILearner learner) =>
 BranchResult.Create(
     !Check.IsRestart(delivery),
     TypeOfLARSValidity.EuropeanSocialFund);
示例#6
0
 /// <summary>
 /// Determines whether [is valid community learning (category)] [the specified delivery].
 /// this is an FM10 routine
 /// </summary>
 /// <param name="delivery">The delivery.</param>
 /// <param name="learner">The learner.</param>
 /// <returns>
 ///   <c>true</c> if [is valid community learning (category)] [the specified delivery]; otherwise, <c>false</c>.
 /// </returns>
 public BranchResult IsQualifyingCategoryCommunityLearning(ILearningDelivery delivery, ILearner learner) =>
 BranchResult.Create(
     !Check.IsRestart(delivery),
     TypeOfLARSValidity.CommunityLearning);
示例#7
0
 /// <summary>
 /// Determines whether [is valid 16 to 19 efa (category)] [the specified delivery].
 /// this is an FM25 and FM82 routine
 /// </summary>
 /// <param name="delivery">The delivery.</param>
 /// <param name="learner">The learner.</param>
 /// <returns>
 ///   <c>true</c> if [is valid 16 to 19 efa (category)] [the specified delivery]; otherwise, <c>false</c>.
 /// </returns>
 public BranchResult IsQualifyingCategory16To19EFA(ILearningDelivery delivery, ILearner learner) =>
 BranchResult.Create(
     !Check.IsRestart(delivery),
     TypeOfLARSValidity.EFA16To19);
示例#8
0
 /// <summary>
 /// Determines whether [is valid advanced learner loan (category)] [the specified delivery].
 /// this is an FM99 routine
 /// </summary>
 /// <param name="delivery">The delivery.</param>
 /// <param name="learner">The learner.</param>
 /// <returns>
 ///   <c>true</c> if [is valid advanced learner loan] [the specified delivery]; otherwise, <c>false</c>.
 /// </returns>
 public BranchResult IsQualifyingCategoryAdvancedLearnerLoan(ILearningDelivery delivery, ILearner learner) =>
 BranchResult.Create(
     !Check.IsRestart(delivery) &&
     Check.IsAdvancedLearnerLoan(delivery),
     TypeOfLARSValidity.AdvancedLearnerLoan);
示例#9
0
 public BranchResult IsQualifyingCategoryApprencticeshipAny(ILearningDelivery delivery, ILearner learner) =>
 BranchResult.Create(
     !Check.IsRestart(delivery) &&
     !Check.IsAdvancedLearnerLoan(delivery) &&
     Check.IsStandardApprencticeship(delivery),
     TypeOfLARSValidity.Any);
示例#10
0
 /// <summary>
 /// Determines whether [is valid adult skills (category)] [the specified delivery].
 /// this is an FM35 routine
 /// </summary>
 /// <param name="delivery">The delivery.</param>
 /// <param name="learner">The learner.</param>
 /// <returns>
 ///   <c>true</c> if [is valid adult skills (category)] [the specified delivery]; otherwise, <c>false</c>.
 /// </returns>
 public BranchResult IsQualifyingCategoryAdultSkills(ILearningDelivery delivery, ILearner learner) =>
 BranchResult.Create(
     !Check.IsRestart(delivery) &&
     !Check.IsLearnerInCustody(delivery) &&
     !Check.InApprenticeship(delivery),
     TypeOfLARSValidity.AdultSkills);
示例#11
0
 /// <summary>
 /// Determines whether [is valid olass (category)] [the specified delivery].
 /// this is an FM35 routine
 /// </summary>
 /// <param name="delivery">The delivery.</param>
 /// <param name="learner">The learner.</param>
 /// <returns>
 ///   <c>true</c> if [is valid olass (category)] [the specified delivery]; otherwise, <c>false</c>.
 /// </returns>
 public BranchResult IsQualifyingCategoryOLASS(ILearningDelivery delivery, ILearner learner) =>
 BranchResult.Create(
     !Check.IsRestart(delivery) &&
     Check.IsLearnerInCustody(delivery),
     TypeOfLARSValidity.OLASSAdult);