Exemple #1
0
        private void CreateExecutives()
        {
            Executive exec = new Executive();

            exec.emp.Age = 34;
            exec.emp.Department = "Marketing";
            exec.emp.Name = "Frank Wills";
            exec.emp.Salary = 23500.00F;
            exec.OptionGrant = 100000;

            objList.Add(exec);


            exec.emp.Age = 55;
            exec.emp.Department = "HR";
            exec.emp.Name = "Mary Tee";
            exec.emp.Salary = 67500.00F;
            exec.OptionGrant = 980000;

            objList.Add(exec);


        }
Exemple #2
0
        public void SelectObjectType(string selector)
            {
                // ReSharper disable once ObjectCreationAsStatement
                //new object();


                switch (selector)
                {
                    case "1":

                        TypeToFind = new Employee();

                        break;
                    case "2":

                        TypeToFind = new Executive();
                        break;
                    case "3":

                        TypeToFind = new SalesPerson();
                        break;
                }
            }
Exemple #3
0
 public ObjectProcessor(SalesPerson spTemplate, Executive exTemplate)
 {
     _spTemplate = spTemplate;
     _exTemplate = exTemplate;
 }