예제 #1
0
        /// <summary>
        /// selected or login user will be reporting to resultant users
        /// </summary>
        /// <param name="UserID"></param>
        /// <returns></returns>
        public IList <SelectedUsers> GetUsersReportingByUserID(Guid UserID)
        {
            IList <SelectedUsers> Reporting = new List <SelectedUsers>();

            try
            {
                Reporting = _context.usp_UsersReporting_GetByUserID(UserID)
                            .Select(x => new SelectedUsers
                {
                    id    = x.RepotingToUserID.ToString(),
                    value = x.RepotingToUserDisplayName
                }).ToList();
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(Reporting);
        }