Пример #1
0
 private FcsContractAllocation MapFcsContractAllocation(ReferenceDataService.Model.FCS.FcsContractAllocation fcsContractAllocation)
 {
     return(new FcsContractAllocation()
     {
         ContractAllocationNumber = fcsContractAllocation.ContractAllocationNumber,
         FundingStreamPeriodCode = fcsContractAllocation.FundingStreamPeriodCode,
     });
 }
        private EsfEligibilityRule EsfEligibilityRuleFromEntity(ReferenceDataService.Model.FCS.FcsContractAllocation fcsContractAllocation)
        {
            if (fcsContractAllocation.EsfEligibilityRule == null)
            {
                return(null);
            }

            return(new EsfEligibilityRule
            {
                Benefits = fcsContractAllocation.EsfEligibilityRule.Benefits,
                TenderSpecReference = fcsContractAllocation.EsfEligibilityRule.TenderSpecReference,
                LotReference = fcsContractAllocation.EsfEligibilityRule.LotReference,
                MaxAge = fcsContractAllocation.EsfEligibilityRule.MaxAge,
                MaxLengthOfUnemployment = fcsContractAllocation.EsfEligibilityRule.MaxLengthOfUnemployment,
                MaxPriorAttainment = fcsContractAllocation.EsfEligibilityRule.MaxPriorAttainment,
                MinAge = fcsContractAllocation.EsfEligibilityRule.MinAge,
                MinLengthOfUnemployment = fcsContractAllocation.EsfEligibilityRule.MinLengthOfUnemployment,
                MinPriorAttainment = fcsContractAllocation.EsfEligibilityRule.MinPriorAttainment,
                EmploymentStatuses = fcsContractAllocation.EsfEligibilityRule.EmploymentStatuses.Select(es => new EsfEligibilityRuleEmploymentStatus
                {
                    Code = es.Code,
                    LotReference = fcsContractAllocation.LotReference,
                    TenderSpecReference = fcsContractAllocation.TenderSpecReference
                }).ToList(),
                LocalAuthorities = fcsContractAllocation.EsfEligibilityRule.LocalAuthorities.Select(la => new EsfEligibilityRuleLocalAuthority
                {
                    Code = la.Code,
                    LotReference = fcsContractAllocation.LotReference,
                    TenderSpecReference = fcsContractAllocation.TenderSpecReference
                }).ToList(),
                LocalEnterprisePartnerships = fcsContractAllocation.EsfEligibilityRule.LocalEnterprisePartnerships.Select(lep => new EsfEligibilityRuleLocalEnterprisePartnership
                {
                    Code = lep.Code,
                    LotReference = fcsContractAllocation.LotReference,
                    TenderSpecReference = fcsContractAllocation.TenderSpecReference
                }).ToList(),
                SectorSubjectAreaLevels = fcsContractAllocation.EsfEligibilityRule.SectorSubjectAreaLevels.Select(ssa => new EsfEligibilityRuleSectorSubjectAreaLevel
                {
                    MaxLevelCode = ssa.MaxLevelCode,
                    MinLevelCode = ssa.MinLevelCode,
                    SectorSubjectAreaCode = ssa.SectorSubjectAreaCode,
                    LotReference = fcsContractAllocation.LotReference,
                    TenderSpecReference = fcsContractAllocation.TenderSpecReference
                }).ToList()
            });
        }