private async static Task <BambooHrEmployee> GetEmployee(int employeeId) { var bambooHrClient = new BambooHrClient(); var employee = await bambooHrClient.GetEmployee(employeeId); Console.WriteLine($"Got employee with ID {employee.Id}"); return(employee); }
public async static Task <int> CreateTimeOffRequest() { var userId = 5; var reason = "vacation"; var startDate = DateTime.Now; var endDate = DateTime.Now.AddDays(1); var timeOffTypeId = GetTimeOffTypeId(reason); var bambooHrClient = new BambooHrClient(); var employee = bambooHrClient.GetEmployee(userId); var result = await bambooHrClient.CreateTimeOffRequest(employee.Id, timeOffTypeId, startDate, endDate); Console.WriteLine($"Result: {result}"); return(result); }
public async static Task<int> CreateTimeOffRequest() { var userId = 5; var reason = "vacation"; var startDate = DateTime.Now; var endDate = DateTime.Now.AddDays(1); var timeOffTypeId = GetTimeOffTypeId(reason); var bambooHrClient = new BambooHrClient(); var employee = bambooHrClient.GetEmployee(userId); var result = await bambooHrClient.CreateTimeOffRequest(employee.Id, timeOffTypeId, startDate, endDate); Console.WriteLine($"Result: {result}"); return result; }
private async static Task<BambooHrEmployee> GetEmployee(int employeeId) { var bambooHrClient = new BambooHrClient(); var employee = await bambooHrClient.GetEmployee(employeeId); Console.WriteLine($"Got employee with ID {employee.Id}"); return employee; }