Пример #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;
 }