static void Main(string[] args) { ITarget Itarget = new EmployeeAdapter(); ThirdPartyBillingSystem client = new ThirdPartyBillingSystem(Itarget); client.ShowEmployeeList(); Console.ReadKey(); }
public void ProcessSalary(string[][] employees) { List <Employee> allemployees = new List <Employee>(); foreach (string[] employee in employees) { Employee em = new Employee(Convert.ToInt32(employee[0]), employee[1], employee[2], Convert.ToDecimal(employee[3])); allemployees.Add(em); } billingSystem = new ThirdPartyBillingSystem(); billingSystem.ProcessSalary(allemployees); }
public SalaryAdapter(ThirdPartyBillingSystem thirdPartyBillingSystem) { _thirdPartyBillingSystem = thirdPartyBillingSystem; }