public void SetWorkingHours(int hours, string date, string name, string task)
        {
            string[] info = WorkerRepository.FindWorker(name);
            switch (info[1])
            {
            case "руководитель":
                Manager manager = Manager.GetCurrentManager(name);
                manager.NewTask = task;
                manager.SetWorkingHours(hours, date);
                break;

            case "сотрудник":
                Employee employee = Employee.GetCurrentEmployee(name);
                employee.NewTask = task;
                employee.SetWorkingHours(hours, date);
                break;

            case "фрилансер":
                Freelancer freelancer = Freelancer.GetCurrentFreelancer(name);
                freelancer.NewTask = task;
                freelancer.SetWorkingHours(hours, date);
                break;
            }
        }