Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Console.WriteLine(" \t \t * * * COMPANY MANAGER APP * * *");
            HourlyEmployee hourlyEmployee = new HourlyEmployee
            {
                ID         = 1,
                Name       = "John Doe",
                Position   = "Hourly Employee",
                IsEmployed = true
            };

            hourlyEmployee.GetEmployeeData();
            hourlyEmployee.CalculateSalary();
        }
Ejemplo n.º 2
0
        private void ChangeToHourly()
        {
            Console.Clear();

            if (employeeList[chooseEmployee] is HourlyEmployee)
            {
                Console.WriteLine("Employee is already hourly");
            }

            else if (employeeList[chooseEmployee] is SalariedEmployee || employeeList[chooseEmployee] is Manager)
            {
                employeeList[chooseEmployee] = new HourlyEmployee(employeeList[chooseEmployee].name,
                                                                  employeeList[chooseEmployee].age, employeeList[chooseEmployee].salaryDate, salary);
                Console.WriteLine("Complete");
            }

            Console.ReadKey();
        }