Exemple #1
0
        public IHttpActionResult GetLeaveRequestListForTeamByStatus(LMS.DomainModel.Models.Condition status)
        {
            var teamLeaderId = User.Identity.GetUserId();
            var list         = _leaveReviewRepository.LeaveRequestUnderTeamLeader(teamLeaderId, status);

            return(Ok(list));
        }
Exemple #2
0
        public IHttpActionResult GetLeavesDetailsForEmployeeByStatus(LMS.DomainModel.Models.Condition status, string employeeId)
        {
            if (_employeeRepository.GetEmployeeById(employeeId) == null)
            {
                return(NotFound());
            }
            var list = _leaveReviewRepository.LeaveRequest(status, employeeId);

            return(Ok(list));
        }
Exemple #3
0
        /// <summary>
        /// Repository method to get leaverequest list depend upon status from database using leavestatus table
        /// </summary>
        /// <param name="status"></param>
        /// <returns></returns>
        public IEnumerable <LeaveStatusAC> LeaveRequest(LMS.DomainModel.Models.Condition status)
        {
            var leaveStatusListAC = new List <LeaveStatusAC>();
            var leaveStatusList   = _leaveStatusDataRepository.Fetch(x => x.Condition.Equals(status));

            foreach (var leaves in leaveStatusList)
            {
                var leaveAC = new LeaveStatusAC
                {
                    Id             = leaves.Id,
                    Condition      = leaves.Condition,
                    ApprovedDate   = leaves.ApprovedDate,
                    LeaveRequestId = leaves.LeaveRequestId,
                    TeamLeaderId   = leaves.TeamLeaderId,
                    EmployeeId     = leaves.EmployeeId,
                };
                leaveStatusListAC.Add(leaveAC);
            }
            return(leaveStatusListAC);
        }
Exemple #4
0
        public IHttpActionResult GetAllLeavesDetailsByStatus(LMS.DomainModel.Models.Condition status)
        {
            var list = _leaveReviewRepository.LeaveRequest(status);

            return(Ok(list));
        }