//根据会员角色查询,并返回对应会员数:
        public List <Reader> GetReaderByRoleId(string roleId, out int readerCount)
        {
            List <Reader> list = objReaderService.GetReaderByRoleId(roleId, out readerCount);

            //根据阅读证状态,修改
            for (int i = 0; i < list.Count; i++)
            {
                switch (list[i].StatusId)
                {
                case 1: list[i].StatuesDesc = "正常"; break;

                case 0: list[i].StatuesDesc = "禁用"; break;
                }
            }
            return(list);
        }
Example #2
0
        /// <summary>
        /// 根据会员角色查询读者信息
        /// </summary>
        /// <param name="roleId"></param>
        /// <param name="readercount"></param>
        /// <returns></returns>
        public List <Reader> GetReaderByRoleId(string roleId, out int readercount)
        {
            var list = readerService.GetReaderByRoleId(roleId, out readercount);

            foreach (Reader reader in list)
            {
                switch (reader.StatusId)
                {
                case 1:
                    reader.StatusDesc = "正常";
                    break;

                default:
                    reader.StatusDesc = "禁用";
                    break;
                }
            }
            return(list);
        }