private static string CreateLeave(int userId, DateTime start, DateTime end, string reason) { var leaveWf = new LeaveWorkflowClient(); return leaveWf.CreateLeave(new tempuri.org.CreateLeave { startTime = start, endTime = end, userId = userId, reason = reason }); }
private static string Review(string ticketId, string comment, bool approve) { var leaveWf = new LeaveWorkflowClient(); try { return leaveWf.Review(new tempuri.org.Review { approve = approve, id = ticketId, comment = comment }); } catch (Exception) { return null; } }