Beispiel #1
0
        public List <LeaveStatusLog> ListLogsByLeave(long leaveID)
        {
            List <LeaveStatusLog> result = null;

            try
            {
                LeaveComponent bc = new LeaveComponent();
                result = bc.ListLogsByLeave(leaveID);
            }
            catch (Exception ex)
            {
                // Repack to Http error.
                var httpError = new HttpResponseMessage()
                {
                    StatusCode   = (HttpStatusCode)422, // Unprocessable Entity
                    ReasonPhrase = ex.Message
                };

                throw new HttpResponseException(httpError);
            }

            return(result);
        }
        /// <summary>
        /// Calls the ListLogsByLeave business method of the LeaveComponent.
        /// </summary>
        /// <param name="leaveID"> A leaveID value.</param>
        /// <returns>Returns a List<LeaveStatusLog> object.</returns>
        public List <LeaveStatusLog> ListLogsByLeave(long leaveID)
        {
            LeaveComponent bc = new LeaveComponent();

            return(bc.ListLogsByLeave(leaveID));
        }