/// <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);
/// <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);
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; }
/// <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)); }
/// <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);
/// <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);
/// <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);
/// <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);
public BranchResult IsQualifyingCategoryApprencticeshipAny(ILearningDelivery delivery, ILearner learner) => BranchResult.Create( !Check.IsRestart(delivery) && !Check.IsAdvancedLearnerLoan(delivery) && Check.IsStandardApprencticeship(delivery), TypeOfLARSValidity.Any);
/// <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);
/// <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);