예제 #1
0
        static void Main(string[] args)
        {
            ITarget Itarget = new EmployeeAdapter();
            ThirdPartyBillingSystem client = new ThirdPartyBillingSystem(Itarget);

            client.ShowEmployeeList();

            Console.ReadKey();
        }
예제 #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);
        }
예제 #3
0
 public SalaryAdapter(ThirdPartyBillingSystem thirdPartyBillingSystem)
 {
     _thirdPartyBillingSystem = thirdPartyBillingSystem;
 }