public Decimal GetDependentCost(Int32 id)
        {
            IPayrollRepository repo = GetRepository();
            Decimal            cost = 0;

            Dependent dependent = repo.GetDependentById(id);

            if (dependent != null)
            {
                BenefitCalculator calc = new BenefitCalculator(dependent.Employee.BenefitPlan, dependent.Employee.PayCycle, new NameDiscount());
                cost = calc.CalculatePayPeriodCost(dependent);
            }

            return(cost);
        }
        public Boolean Update(Dependent current)
        {
            IPayrollRepository repo = GetRepository();

            Dependent original = repo.GetDependentById(current.Id);

            if (original != null)
            {
                current.RelationshipId = original.RelationshipId;

                return(repo.Update(current, original));
            }

            return(false);
        }