Discuz.Data/DataProvider/UserGroups.cs

(开头部分) 15KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Text;
using System.Data;

using Discuz.Entity;
using Discuz.Common.Generic;
using Discuz.Common;

namespace Discuz.Data
{
    public class UserGroups
    {
        /// <summary>
        /// 获得用户组数据
        /// </summary>
        /// <returns>用户组数据</returns>
        public static List<UserGroupInfo> GetUserGroupList()
        {
            DataTable dt = GetUserGroupForDataTable();
            List<UserGroupInfo> userGruopInfoList = new List<UserGroupInfo>();

            foreach (DataRow dr in dt.Rows)
            {
                UserGroupInfo info = new UserGroupInfo();
                info.Groupid = TypeConverter.StrToInt(dr["groupid"].ToString());
                info.Radminid = TypeConverter.StrToInt(dr["radminid"].ToString());
                info.Type = TypeConverter.StrToInt(dr["type"].ToString());
                info.System = TypeConverter.StrToInt(dr["system"].ToString());
                info.Color = dr["color"].ToString().Trim();
                info.Grouptitle = dr["grouptitle"].ToString().Trim();
                info.Creditshigher = TypeConverter.StrToInt(dr["creditshigher"].ToString());
                info.Creditslower = TypeConverter.StrToInt(dr["creditslower"].ToString());
                info.Stars = TypeConverter.StrToInt(dr["stars"].ToString());
                info.Groupavatar = dr["groupavatar"].ToString();
                info.Readaccess = TypeConverter.StrToInt(dr["readaccess"].ToString());
                info.Allowvisit = TypeConverter.StrToInt(dr["allowvisit"].ToString());
                info.Allowpost = TypeConverter.StrToInt(dr["allowpost"].ToString());
                info.Allowreply = TypeConverter.StrToInt(dr["allowreply"].ToString());
                info.Allowpostpoll = TypeConverter.StrToInt(dr["allowpostpoll"].ToString());
                info.Allowdirectpost = TypeConverter.StrToInt(dr["allowdirectpost"].ToString());
                info.Allowgetattach = TypeConverter.StrToInt(dr["allowgetattach"].ToString());
                info.Allowpostattach = TypeConverter.StrToInt(dr["allowpostattach"].ToString());
                info.Allowvote = TypeConverter.StrToInt(dr["allowvote"].ToString());
                info.Allowmultigroups = TypeConverter.StrToInt(dr["allowmultigroups"].ToString());
                info.Allowsearch = TypeConverter.StrToInt(dr["allowsearch"].ToString());
                info.Allowavatar = TypeConverter.StrToInt(dr["allowavatar"].ToString());
                info.Allowcstatus = TypeConverter.StrToInt(dr["allowcstatus"].ToString());
                info.Allowuseblog = TypeConverter.StrToInt(dr["allowuseblog"].ToString());
                info.Allowinvisible = TypeConverter.StrToInt(dr["allowinvisible"].ToString());
                info.Allowtransfer = TypeConverter.StrToInt(dr["allowtransfer"].ToString());
                info.Allowsetreadperm = TypeConverter.StrToInt(dr["allowsetreadperm"].ToString());
                info.Allowsetattachperm = TypeConverter.StrToInt(dr["allowsetattachperm"].ToString());
                info.Allowhidecode = TypeConverter.StrToInt(dr["allowhidecode"].ToString());
                info.Allowhtmltitle = TypeConverter.StrToInt(dr["allowhtmltitle"].ToString());
                info.Allowhtml = TypeConverter.StrToInt(dr["allowhtml"].ToString());
                info.Allowcusbbcode = TypeConverter.StrToInt(dr["allowcusbbcode"].ToString());
                info.Allownickname = TypeConverter.StrToInt(dr["allownickname"].ToString());
                info.Allowsigbbcode = TypeConverter.StrToInt(dr["allowsigbbcode"].ToString());
                info.Allowsigimgcode = TypeConverter.StrToInt(dr["allowsigimgcode"].ToString());
                info.Allowviewpro = TypeConverter.StrToInt(dr["allowviewpro"].ToString());
后面还有 299 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。