Example #1
0
        public List <LearnerPeriodisedValue> LearnerPeriodisedValues(IDataEntity learner)
        {
            List <string> attributeList = new List <string>()
            {
                Attributes.ALBSeqNum,
            };

            List <LearnerPeriodisedValue> learnerPeriodisedAttributesList = new List <LearnerPeriodisedValue>();

            foreach (var attribute in attributeList)
            {
                var attributeValue = learner.Attributes[attribute];

                var changePoints = attributeValue.Changepoints;

                if (!changePoints.Any())
                {
                    var value = _dataEntityAttributeService.GetDecimalAttributeValue(attributeValue.Value);

                    learnerPeriodisedAttributesList.Add(new LearnerPeriodisedValue
                    {
                        AttributeName = attribute,
                        Period1       = value,
                        Period2       = value,
                        Period3       = value,
                        Period4       = value,
                        Period5       = value,
                        Period6       = value,
                        Period7       = value,
                        Period8       = value,
                        Period9       = value,
                        Period10      = value,
                        Period11      = value,
                        Period12      = value,
                    });
                }

                if (changePoints.Any())
                {
                    learnerPeriodisedAttributesList.Add(new LearnerPeriodisedValue
                    {
                        AttributeName = attribute,
                        Period1       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _internalDataCache.Period1),
                        Period2       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _internalDataCache.Period2),
                        Period3       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _internalDataCache.Period3),
                        Period4       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _internalDataCache.Period4),
                        Period5       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _internalDataCache.Period5),
                        Period6       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _internalDataCache.Period6),
                        Period7       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _internalDataCache.Period7),
                        Period8       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _internalDataCache.Period8),
                        Period9       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _internalDataCache.Period9),
                        Period10      = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _internalDataCache.Period10),
                        Period11      = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _internalDataCache.Period11),
                        Period12      = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _internalDataCache.Period12),
                    });
                }
            }

            return(learnerPeriodisedAttributesList);
        }
Example #2
0
        protected internal List <LearningDeliveryPeriodisedValue> LearningDeliveryPeriodisedValues(IDataEntity learningDelivery)
        {
            List <string> attributeList = new List <string>()
            {
                Attributes.AchievePayment,
                Attributes.AchievePayPct,
                Attributes.AchievePayPctTrans,
                Attributes.BalancePayment,
                Attributes.BalancePaymentUncapped,
                Attributes.BalancePct,
                Attributes.BalancePctTrans,
                Attributes.EmpOutcomePay,
                Attributes.EmpOutcomePct,
                Attributes.EmpOutcomePctTrans,
                Attributes.InstPerPeriod,
                Attributes.LearnSuppFund,
                Attributes.LearnSuppFundCash,
                Attributes.OnProgPayment,
                Attributes.OnProgPaymentUncapped,
                Attributes.OnProgPayPct,
                Attributes.OnProgPayPctTrans,
                Attributes.TransInstPerPeriod
            };

            List <LearningDeliveryPeriodisedValue> learningDeliveryPeriodisedAttributesList = new List <LearningDeliveryPeriodisedValue>();

            foreach (var attribute in attributeList)
            {
                var attributeValue = learningDelivery.Attributes[attribute];

                var changePoints = attributeValue.Changepoints;

                if (!changePoints.Any())
                {
                    var value = _dataEntityAttributeService.GetDecimalAttributeValue(attributeValue.Value);

                    learningDeliveryPeriodisedAttributesList.Add(new LearningDeliveryPeriodisedValue
                    {
                        AttributeName = attribute,
                        Period1       = value,
                        Period2       = value,
                        Period3       = value,
                        Period4       = value,
                        Period5       = value,
                        Period6       = value,
                        Period7       = value,
                        Period8       = value,
                        Period9       = value,
                        Period10      = value,
                        Period11      = value,
                        Period12      = value,
                    });
                }

                if (changePoints.Any())
                {
                    learningDeliveryPeriodisedAttributesList.Add(new LearningDeliveryPeriodisedValue
                    {
                        AttributeName = attribute,
                        Period1       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period1),
                        Period2       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period2),
                        Period3       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period3),
                        Period4       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period4),
                        Period5       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period5),
                        Period6       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period6),
                        Period7       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period7),
                        Period8       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period8),
                        Period9       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period9),
                        Period10      = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period10),
                        Period11      = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period11),
                        Period12      = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period12),
                    });
                }
            }

            return(learningDeliveryPeriodisedAttributesList);
        }
Example #3
0
        public List <LearningDeliveryPeriodisedValues> LearningDeliveryPeriodisedValues(IDataEntity learningDelivery)
        {
            List <string> attributeList = new List <string>()
            {
                Attributes.DisadvFirstPayment,
                Attributes.DisadvSecondPayment,
                Attributes.InstPerPeriod,
                Attributes.LDApplic1618FrameworkUpliftBalancingPayment,
                Attributes.LDApplic1618FrameworkUpliftCompletionPayment,
                Attributes.LDApplic1618FrameworkUpliftOnProgPayment,
                Attributes.LearnDelFirstEmp1618Pay,
                Attributes.LearnDelFirstProv1618Pay,
                Attributes.LearnDelLearnAddPayment,
                Attributes.LearnDelLevyNonPayInd,
                Attributes.LearnDelSecondEmp1618Pay,
                Attributes.LearnDelSecondProv1618Pay,
                Attributes.LearnDelSEMContWaiver,
                Attributes.LearnDelSFAContribPct,
                Attributes.LearnDelESFAContribPct,
                Attributes.LearnSuppFund,
                Attributes.LearnSuppFundCash,
                Attributes.MathEngBalPayment,
                Attributes.MathEngOnProgPayment,
                Attributes.ProgrammeAimBalPayment,
                Attributes.ProgrammeAimCompletionPayment,
                Attributes.ProgrammeAimOnProgPayment,
                Attributes.ProgrammeAimProgFundIndMaxEmpCont,
                Attributes.ProgrammeAimProgFundIndMinCoInvest,
                Attributes.ProgrammeAimTotProgFund
            };

            List <LearningDeliveryPeriodisedValues> learningDeliveryPeriodisedAttributeList = new List <LearningDeliveryPeriodisedValues>();

            foreach (var attribute in attributeList)
            {
                var attributeValue = learningDelivery.Attributes[attribute];

                var changePoints = attributeValue.Changepoints;

                if (!changePoints.Any())
                {
                    var value = _dataEntityAttributeService.GetDecimalAttributeValue(attributeValue.Value);

                    learningDeliveryPeriodisedAttributeList.Add(new LearningDeliveryPeriodisedValues
                    {
                        AttributeName = attribute,
                        Period1       = value,
                        Period2       = value,
                        Period3       = value,
                        Period4       = value,
                        Period5       = value,
                        Period6       = value,
                        Period7       = value,
                        Period8       = value,
                        Period9       = value,
                        Period10      = value,
                        Period11      = value,
                        Period12      = value,
                    });
                }

                if (changePoints.Any())
                {
                    learningDeliveryPeriodisedAttributeList.Add(new LearningDeliveryPeriodisedValues
                    {
                        AttributeName = attribute,
                        Period1       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period1),
                        Period2       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period2),
                        Period3       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period3),
                        Period4       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period4),
                        Period5       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period5),
                        Period6       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period6),
                        Period7       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period7),
                        Period8       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period8),
                        Period9       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period9),
                        Period10      = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period10),
                        Period11      = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period11),
                        Period12      = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period12),
                    });
                }
            }

            return(learningDeliveryPeriodisedAttributeList);
        }
        public List <LearningDeliveryPeriodisedValue> LearningDeliveryPeriodisedValues(IDataEntity learningDelivery)
        {
            List <string> attributeList = new List <string>()
            {
                Attributes.AchPayment,
                Attributes.CoreGovContPayment,
                Attributes.CoreGovContUncapped,
                Attributes.InstPerPeriod,
                Attributes.LearnSuppFund,
                Attributes.LearnSuppFundCash,
                Attributes.MathEngBalPayment,
                Attributes.MathEngBalPct,
                Attributes.MathEngOnProgPayment,
                Attributes.MathEngOnProgPct,
                Attributes.SmallBusPayment,
                Attributes.YoungAppFirstPayment,
                Attributes.YoungAppPayment,
                Attributes.YoungAppSecondPayment,
            };

            List <LearningDeliveryPeriodisedValue> learningDeliveryPeriodisedAttributeList = new List <LearningDeliveryPeriodisedValue>();

            foreach (var attribute in attributeList)
            {
                var attributeValue = learningDelivery.Attributes[attribute];

                var changePoints = attributeValue.Changepoints;

                if (!changePoints.Any())
                {
                    var value = _dataEntityAttributeService.GetDecimalAttributeValue(attributeValue.Value);

                    learningDeliveryPeriodisedAttributeList.Add(new LearningDeliveryPeriodisedValue
                    {
                        AttributeName = attribute,
                        Period1       = value,
                        Period2       = value,
                        Period3       = value,
                        Period4       = value,
                        Period5       = value,
                        Period6       = value,
                        Period7       = value,
                        Period8       = value,
                        Period9       = value,
                        Period10      = value,
                        Period11      = value,
                        Period12      = value,
                    });
                }

                if (changePoints.Any())
                {
                    learningDeliveryPeriodisedAttributeList.Add(new LearningDeliveryPeriodisedValue
                    {
                        AttributeName = attribute,
                        Period1       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period1),
                        Period2       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period2),
                        Period3       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period3),
                        Period4       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period4),
                        Period5       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period5),
                        Period6       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period6),
                        Period7       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period7),
                        Period8       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period8),
                        Period9       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period9),
                        Period10      = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period10),
                        Period11      = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period11),
                        Period12      = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _periods.Period12),
                    });
                }
            }

            return(learningDeliveryPeriodisedAttributeList);
        }
        public List <LearningDeliveryDeliverablePeriodisedValue> LearningDeliveryDeliverablePeriodisedValuesFromEntity(IDataEntity learningDeliveryDeliverable)
        {
            List <string> attributeList = new List <string>()
            {
                Attributes.AchievementEarnings,
                Attributes.AdditionalProgCostEarnings,
                Attributes.DeliverableVolume,
                Attributes.ProgressionEarnings,
                Attributes.ReportingVolume,
                Attributes.StartEarnings,
            };

            List <LearningDeliveryDeliverablePeriodisedValue> learningDeliveryPeriodisedAttributesList = new List <LearningDeliveryDeliverablePeriodisedValue>();

            foreach (var attribute in attributeList)
            {
                var attributeValue = learningDeliveryDeliverable.Attributes[attribute];

                var changePoints = attributeValue.Changepoints;

                if (!changePoints.Any())
                {
                    var value = _dataEntityAttributeService.GetDecimalAttributeValue(attributeValue.Value);

                    learningDeliveryPeriodisedAttributesList.Add(new LearningDeliveryDeliverablePeriodisedValue
                    {
                        AttributeName = attribute,
                        Period1       = value,
                        Period2       = value,
                        Period3       = value,
                        Period4       = value,
                        Period5       = value,
                        Period6       = value,
                        Period7       = value,
                        Period8       = value,
                        Period9       = value,
                        Period10      = value,
                        Period11      = value,
                        Period12      = value,
                    });
                }

                if (changePoints.Any())
                {
                    learningDeliveryPeriodisedAttributesList.Add(new LearningDeliveryDeliverablePeriodisedValue
                    {
                        AttributeName = attribute,
                        Period1       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _internalDataCache.Period1),
                        Period2       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _internalDataCache.Period2),
                        Period3       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _internalDataCache.Period3),
                        Period4       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _internalDataCache.Period4),
                        Period5       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _internalDataCache.Period5),
                        Period6       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _internalDataCache.Period6),
                        Period7       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _internalDataCache.Period7),
                        Period8       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _internalDataCache.Period8),
                        Period9       = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _internalDataCache.Period9),
                        Period10      = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _internalDataCache.Period10),
                        Period11      = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _internalDataCache.Period11),
                        Period12      = _dataEntityAttributeService.GetDecimalAttributeValueForPeriod(attributeValue, _internalDataCache.Period12),
                    });
                }
            }

            return(learningDeliveryPeriodisedAttributesList);
        }