private decimal CalculatePerPayPeriodBenefitAjustment(BenefitDeductionDetail benefitDeductionDetail)
        {
            if (benefitDeductionDetail.PerPayPeriodTotalCostGross == benefitDeductionDetail.PerPayPeriodTotalCostNet)
            {
                return(benefitDeductionDetail.PerPayPeriodTotalCostGross);
            }

            return(benefitDeductionDetail.PerPayPeriodTotalCostNet);

            //(${
            //    this.state.perPayPeriodTotalCostGross === this.state.perPayPeriodTotalCostNet ? this.state.perPayPeriodTotalCostGross :
            //     this.state.perPayPeriodTotalCostNet
            //})
        }
        public IBenefitDeductionDetail CalculateDeductionDetail()
        {
            var ABenefitDeductionDetail = new BenefitDeductionDetail()
            {
                AnnualTotalCostGross       = CalculateAnnualTotalCostGross(),
                AnnualTotalCostNet         = CalculateAnnualTotalCostNet(),
                PerPayPeriodTotalCostGross = CalculatePerPayPeriodTotalCostGross(),
                PerPayPeriodTotalCostNet   = CalculatePerPayPeriodTotalCostNet(),
                BenefitDeductionItems      = _BenefitDeductionItems,
                EmployeeSalary             = _Salary.GrossSalaryAnnual,
                EmployeeSalaryPerPayPeriod = _Salary.GrossSalaryPerPayPeriod
            };

            ABenefitDeductionDetail.AnnualSalaryAjustment =
                CalculateAnnualSalaryAjustment(ABenefitDeductionDetail);

            ABenefitDeductionDetail.PerPayPeriodSalaryAjustment =
                CalculatePerPayPeriodSalaryAjustment(ABenefitDeductionDetail);

            ABenefitDeductionDetail.PerPayPeriodBenefitAjustment =
                CalculatePerPayPeriodBenefitAjustment(ABenefitDeductionDetail);

            return(ABenefitDeductionDetail);
        }
        private decimal CalculatePerPayPeriodSalaryAjustment(BenefitDeductionDetail benefitDeductionDetail)
        {
            var Total = (_Salary.GrossSalaryPerPayPeriod - benefitDeductionDetail.PerPayPeriodTotalCostNet) + .00m;

            return(Math.Round(Total, 2, MidpointRounding.AwayFromZero));
        }
        private decimal CalculateAnnualSalaryAjustment(BenefitDeductionDetail benefitDeductionDetail)
        {
            var Total = (_Salary.GrossSalaryAnnual - benefitDeductionDetail.AnnualTotalCostNet) + .00m;

            return(Math.Round(Total, 2));
        }