Пример #1
0
        private static void DeleageEmployee()
        {
            List <Concepts.Delegates.Employee> lstEmployess = new List <Concepts.Delegates.Employee>
            {
                new Concepts.Delegates.Employee()
                {
                    ID = 101, Name = "Pranaya", Gender = "Male", Experience = 5, Salary = 10000
                },
                new Concepts.Delegates.Employee()
                {
                    ID = 102, Name = "Priyanka", Gender = "Female", Experience = 10, Salary = 20000
                },
                new Concepts.Delegates.Employee()
                {
                    ID = 103, Name = "Anurag", Experience = 15, Salary = 30000
                }
            };

            Concepts.Delegates.Employee employee = new Concepts.Delegates.Employee();

            Console.WriteLine("----------- Employee Promoted By Salary -------------");
            employee.PromoteEmployee(lstEmployess, PromoteEmployeeBySalary);

            Console.WriteLine("----------- Employee Promoted By Experience -------------");
            employee.PromoteEmployee(lstEmployess, PromoteEmployeeByExperience);
        }
Пример #2
0
 private static bool PromoteEmployeeBySalary(Concepts.Delegates.Employee employee)
 {
     if (employee.Salary > 10000)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Пример #3
0
 private static bool PromoteEmployeeByExperience(Concepts.Delegates.Employee employee)
 {
     if (employee.Experience > 12)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }