예제 #1
0
 /// <summary>
 /// adds a dependent to the database
 /// </summary>
 /// <param name="aDependent">the dependent to add</param>
 public int AddDependent(Dependent aDependent)
 {
     // TODO: implement this when DB is in place
     return -1;
 }
예제 #2
0
 /// <summary>
 /// Method to calculate the yearly benefit cost of a dependent
 /// </summary>
 /// <param name="aDependent">a dependent</param>
 /// <returns>cost of dependent</returns>
 public decimal CalculateDependentCost(Dependent aDependent)
 {
     return aDependent.Name.StartsWith(AvailableDiscount, StringComparison.CurrentCultureIgnoreCase) ?
         DependentCost - (DependentCost * Discount) :
         DependentCost;
 }
예제 #3
0
 /// <summary>
 /// adds a dependent to the list
 /// </summary>
 /// <param name="aDependent">the dependent to add</param>
 public int AddDependent(Dependent aDependent)
 {
     aDependent.DependentId = MockData.dependents.Count + 1;
     MockData.dependents.Add(aDependent);
     return aDependent.DependentId;
 }
 /// <summary>
 /// adds a dependent to the list
 /// </summary>
 /// <param name="aDependent">the dependent to add</param>
 public int AddDependent(Dependent aDependent)
 {
     aDependent.DependentId = dependents.Count + 1;
     dependents.Add(aDependent);
     return aDependent.DependentId;
 }