Exemplo n.º 1
0
        static void Main(string[] args)
        {
            ITarget Itarget = new EmployeeAdapter();
            ThirdPartyBillingSystem client = new ThirdPartyBillingSystem(Itarget);

            client.ShowEmployeeList();

            Console.ReadKey();
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public SalaryAdapter(ThirdPartyBillingSystem thirdPartyBillingSystem)
 {
     _thirdPartyBillingSystem = thirdPartyBillingSystem;
 }