示例#1
0
        public override void Execute()
        {
            int employeeId          = int.Parse(Parameters[0]);
            EmployeeBirthdayDTO dto = employeeController.GetBirthday(employeeId);

            if (DateTime.TryParse(dto.BirthDate, out DateTime birthday))
            {
                Console.WriteLine(String.Format(BirthdayKnown, dto.Id, birthday.Day, birthday.ToString("MMMM", CultureInfo.InvariantCulture)));
            }
            else
            {
                Console.WriteLine(String.Format(BirthdayUnknown, dto.Id, dto.BirthDate));
            }
        }