public ALB_Learner_PeriodisedValue BuildLearnerPeriodisedValue(LearnerPeriodisedValue periodisedValue, int ukprn, string learnRefNumber)
 {
     return(new ALB_Learner_PeriodisedValue
     {
         UKPRN = ukprn,
         LearnRefNumber = learnRefNumber,
         AttributeName = periodisedValue.AttributeName,
         Period_1 = periodisedValue.Period1,
         Period_2 = periodisedValue.Period2,
         Period_3 = periodisedValue.Period3,
         Period_4 = periodisedValue.Period4,
         Period_5 = periodisedValue.Period5,
         Period_6 = periodisedValue.Period6,
         Period_7 = periodisedValue.Period7,
         Period_8 = periodisedValue.Period8,
         Period_9 = periodisedValue.Period9,
         Period_10 = periodisedValue.Period10,
         Period_11 = periodisedValue.Period11,
         Period_12 = periodisedValue.Period12
     });
 }
Exemplo n.º 2
0
        private decimal?GetYearToDateTotal(LearnerPeriodisedValue albAreaUpliftBalPaymentObj, LearnerPeriodisedValue albAreaUpliftOnProgPaymentObj, int period)
        {
            decimal total = 0;

            for (int i = 0; i < period; i++)
            {
                switch (i)
                {
                case 0:
                    total += (albAreaUpliftBalPaymentObj?.Period1 ?? 0) +
                             (albAreaUpliftOnProgPaymentObj?.Period1 ?? 0);
                    break;

                case 1:
                    total += (albAreaUpliftBalPaymentObj?.Period2 ?? 0) +
                             (albAreaUpliftOnProgPaymentObj?.Period2 ?? 0);
                    break;

                case 2:
                    total += (albAreaUpliftBalPaymentObj?.Period3 ?? 0) +
                             (albAreaUpliftOnProgPaymentObj?.Period3 ?? 0);
                    break;

                case 3:
                    total += (albAreaUpliftBalPaymentObj?.Period4 ?? 0) +
                             (albAreaUpliftOnProgPaymentObj?.Period4 ?? 0);
                    break;

                case 4:
                    total += (albAreaUpliftBalPaymentObj?.Period5 ?? 0) +
                             (albAreaUpliftOnProgPaymentObj?.Period5 ?? 0);
                    break;

                case 5:
                    total += (albAreaUpliftBalPaymentObj?.Period6 ?? 0) +
                             (albAreaUpliftOnProgPaymentObj?.Period6 ?? 0);
                    break;

                case 6:
                    total += (albAreaUpliftBalPaymentObj?.Period7 ?? 0) +
                             (albAreaUpliftOnProgPaymentObj?.Period7 ?? 0);
                    break;

                case 7:
                    total += (albAreaUpliftBalPaymentObj?.Period8 ?? 0) +
                             (albAreaUpliftOnProgPaymentObj?.Period8 ?? 0);
                    break;

                case 8:
                    total += (albAreaUpliftBalPaymentObj?.Period9 ?? 0) +
                             (albAreaUpliftOnProgPaymentObj?.Period9 ?? 0);
                    break;

                case 9:
                    total += (albAreaUpliftBalPaymentObj?.Period10 ?? 0) +
                             (albAreaUpliftOnProgPaymentObj?.Period10 ?? 0);
                    break;

                case 10:
                    total += (albAreaUpliftBalPaymentObj?.Period11 ?? 0) +
                             (albAreaUpliftOnProgPaymentObj?.Period11 ?? 0);
                    break;

                case 11:
                    total += (albAreaUpliftBalPaymentObj?.Period12 ?? 0) +
                             (albAreaUpliftOnProgPaymentObj?.Period12 ?? 0);
                    break;
                }
            }

            return(total);
        }