Discuz.Data/DataProvider/AdminGroups.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using Discuz.Entity;
namespace Discuz.Data
{
/// <summary>
/// 管理组数据操作类
/// </summary>
public class AdminGroups
{
/// <summary>
/// 获得到指定管理组信息
/// </summary>
/// <returns>管理组信息</returns>
public static AdminGroupInfo[] GetAdminGroupList()
{
DataTable dt = DatabaseProvider.GetInstance().GetAdminGroupList();
AdminGroupInfo[] admingroupArray = new AdminGroupInfo[dt.Rows.Count];
int Index = 0;
foreach (DataRow dr in dt.Rows)
{
admingroupArray[Index] = LoadAdminGroupInfo(dr);
Index++;
}
dt.Dispose();
return admingroupArray;
}
private static AdminGroupInfo LoadAdminGroupInfo(DataRow dr)
{
AdminGroupInfo admingroup = new AdminGroupInfo();
admingroup.Admingid = short.Parse(dr["admingid"].ToString());
admingroup.Alloweditpost = byte.Parse(dr["alloweditpost"].ToString());
admingroup.Alloweditpoll = byte.Parse(dr["alloweditpoll"].ToString());
admingroup.Allowstickthread = byte.Parse(dr["allowstickthread"].ToString());
admingroup.Allowmodpost = byte.Parse(dr["allowmodpost"].ToString());
admingroup.Allowdelpost = byte.Parse(dr["allowdelpost"].ToString());
admingroup.Allowmassprune = byte.Parse(dr["allowmassprune"].ToString());
admingroup.Allowrefund = byte.Parse(dr["allowrefund"].ToString());
admingroup.Allowcensorword = byte.Parse(dr["allowcensorword"].ToString());
admingroup.Allowviewip = byte.Parse(dr["allowviewip"].ToString());
admingroup.Allowbanip = byte.Parse(dr["allowbanip"].ToString());
admingroup.Allowedituser = byte.Parse(dr["allowedituser"].ToString());
admingroup.Allowmoduser = byte.Parse(dr["allowmoduser"].ToString());
admingroup.Allowbanuser = byte.Parse(dr["allowbanuser"].ToString());
admingroup.Allowpostannounce = byte.Parse(dr["allowpostannounce"].ToString());
admingroup.Allowviewlog = byte.Parse(dr["allowviewlog"].ToString());
admingroup.Disablepostctrl = byte.Parse(dr["disablepostctrl"].ToString());
admingroup.Allowviewrealname = byte.Parse(dr["allowviewrealname"].ToString());
return admingroup;
}
public static void ChangeUserAdminidByGroupid(int radminId, int groupId)
{
DatabaseProvider.GetInstance().UpdateUserAdminIdByGroupId(radminId, groupId);
}
/// <summary>
后面还有 31 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
