public string Execute(string[] args) { int id = int.Parse(args[0]); DateTime newBirthday = DateTime.ParseExact(args[1], "dd-MM-yyyy", CultureInfo.InvariantCulture); employeeController.SetBirthday(id, newBirthday); return("Birthday changed successfully!"); }
public string Execute(string[] args) { int employeeId = int.Parse(args[0]); DateTime dateTime = DateTime.ParseExact(args[1], "dd/MM/yyyy", CultureInfo.InvariantCulture); ; employeeController.SetBirthday(employeeId, dateTime); return($"Birthday was added successufully."); }
public override void Execute() { int employeeId = int.Parse(Parameters[0]); string birthDate = Parameters[1]; EmployeeBirthdayDTO employeeDTO = new EmployeeBirthdayDTO() { Id = employeeId, BirthDate = birthDate }; employeeController.SetBirthday(employeeDTO); Console.WriteLine($"Birthday for employee #{employeeId} updated."); }