/// <summary> /// Calls the ListLogsByLeave operation method in the LeaveService. /// </summary> /// <param name="leaveID">A leaveID value.</param> /// <returns>Returns a List<LeaveStatusLog> object.</returns> public ObservableCollection <LeaveStatusLog> ListLogsByLeave(long leaveID) { var result = default(ObservableCollection <LeaveStatusLog>); LeaveServiceClient proxy = new LeaveServiceClient(); try { result = proxy.ListLogsByLeave(leaveID); } catch (FaultException fex) { // TODO: Handle your exception here or raise it to the UI. // Do not display sensitive information to the UI. throw new ApplicationException(fex.Message); } finally { proxy.Close(); } return(result); }
/// <summary> /// Calls the GetLeaveById operation method in the LeaveService. /// </summary> /// <param name="leaveID">A leaveID value.</param> /// <returns>Returns a Leave object.</returns> public Leave GetLeaveById(long leaveID) { Leave result = default(Leave); LeaveServiceClient proxy = new LeaveServiceClient(); try { result = proxy.GetLeaveById(leaveID); } catch (FaultException fex) { // TODO: Handle your exception here or raise it to the UI. // Do not display sensitive information to the UI. throw new ApplicationException(fex.Message); } finally { proxy.Close(); } return(result); }
/// <summary> /// Calls the ListLeavesByEmployee operation method in the LeaveService. /// </summary> /// <param name="maximumRows">A maximumRows value.</param> /// <param name="startRowIndex">A startRowIndex value.</param> /// <param name="sortExpression">A sortExpression value.</param> /// <param name="employee">A employee value.</param> /// <param name="category">A category value.</param> /// <param name="status">A status value.</param> /// <param name="int">A int value.</param> /// <returns>Returns a List<Leave> object.</returns> public ObservableCollection <Leave> ListLeavesByEmployee(int maximumRows, int startRowIndex, string sortExpression, string employee, LeaveCategories?category, LeaveStatuses?status, out int totalRowCount) { var result = default(ObservableCollection <Leave>); LeaveServiceClient proxy = new LeaveServiceClient(); try { result = proxy.ListLeavesByEmployee(maximumRows, startRowIndex, sortExpression, employee, category, status, out totalRowCount); } catch (FaultException fex) { // TODO: Handle your exception here or raise it to the UI. // Do not display sensitive information to the UI. throw new ApplicationException(fex.Message); } finally { proxy.Close(); } return(result); }