Exemplo n.º 1
0
        /// <summary>
        /// 获取等级列表
        /// </summary>
        /// <param name="type">类型</param>
        /// <returns></returns>
        public static List<Entity.UserLevelEntity> GetUserLevelByType(UserType type)
        {
            List<Entity.UserLevelEntity> list = new List<Entity.UserLevelEntity>();
            DataTable dt = new UserDAL().GetUserLevelByType((int)type);

            foreach (DataRow dr in dt.Rows)
            {
                UserLevelEntity model = new UserLevelEntity();
                model.FillData(dr);
                list.Add(model);
            }

            return list;
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取等级实体
        /// </summary>
        /// <param name="id">ID</param>
        /// <returns></returns>
        public static Entity.UserLevelEntity GetUserLevelByID(int id)
        {
            DataTable dt = new UserDAL().GetUserLevelByID(id);

            UserLevelEntity model = new UserLevelEntity();
            model.FillData(dt.Rows[0]);
            return model;
        }