Esempio n. 1
0
        static void Main(string[] args)
        {
            Logger.ArchiveLog();
            TechnicalStuff technician1 = new TechnicalStuff {
                ID        = 1,
                Name      = "Branko",
                Surname   = "Nikolov",
                BirthDate = DateTime.Now.AddYears(-25),
                Title     = "Hardware specialist",
                Email     = "*****@*****.**",
                Salary    = 1800
            };

            technician1.MaintainSystems();

            Accountant accountant = new Accountant {
                ID        = 2,
                Name      = "Petar",
                Surname   = "Petrov",
                BirthDate = DateTime.Now.AddYears(-25),
                Title     = "Accountant",
                Email     = "*****@*****.**",
                Salary    = 2600
            };

            accountant.MaintainAccounts();

            Robot robot = new Robot {
                ID        = 3,
                Name      = "Robo",
                Surname   = "Robo",
                BirthDate = DateTime.Now.AddYears(-5),
                Title     = "Robot",
                Email     = "*****@*****.**",
                Salary    = 0
            };

            robot.MaintainDatawareHouse();

            Manager manager = new Manager {
                ID        = 4,
                Name      = "Aleksandar",
                Surname   = "Nikolov",
                BirthDate = DateTime.Now.AddYears(-46),
                Title     = "Manager",
                Email     = "*****@*****.**",
                Salary    = 4000
            };

            manager.DoEmployeeApprisal(technician1);
            manager.PromoteEmployee(accountant);
            manager.SendCommunication();
            manager.PromoteSubEmployees(455);
            manager.AddSubEmployee(technician1);
            manager.AddSubEmployee(accountant);
            Console.WriteLine("----------------------------------------------");
            foreach (Employee employee in manager.GetEmployees())
            {
                Console.WriteLine(employee.ToString());
            }
            Console.WriteLine(manager.ToString());

            manager.PromoteSubEmployees(455);
            foreach (Employee employee in manager.GetEmployees())
            {
                Console.WriteLine(employee.ToString());
            }
            Director director = new Director {
                ID        = 5,
                Name      = "Violeta",
                Surname   = "Micova",
                BirthDate = DateTime.Now.AddYears(-55),
                Title     = "Director",
                Email     = "*****@*****.**",
                Salary    = 6400
            };

            Console.WriteLine();
            director.PromoteEmployee(manager);
            director.AddSubEmployee(robot);
            Console.WriteLine("----------------------------------------------");
            foreach (Employee employee in director.GetEmployees())
            {
                Console.WriteLine(employee.ToString());
            }
            Console.WriteLine(director.ToString());

            Console.ReadLine();
        }