DAL/system/TCWL_D_Role.cs
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
namespace DAL.system
{
using Common;
using System;
using System.Data;
using System.Runtime.InteropServices;
using System.Text;
public class TCWL_D_Role
{
public string addRole(string name, string srvID, string roleStr)
{
try
{
if (DBHelper.GetDataTable(string.Format("select roleName from TCWL_Role where roleName='{0}' and serviceID='{1}'", name, srvID)).Rows.Count > 0)
{
return "exist";
}
DBHelper.ExecuteSQL(string.Format("insert into TCWL_Role (roleName,serviceID,deleteYes,permission) values('{0}','{1}','1','{2}')", name, srvID, roleStr));
DataTable dataTable = DBHelper.GetDataTable(string.Format("select ID from TCWL_Role where roleName='{0}' and serviceID='{1}'", name, srvID));
if (dataTable.Rows.Count < 1)
{
return "del";
}
return ("success|" + dataTable.Rows[0][0].ToString());
}
catch (Exception)
{
return "error";
}
}
public string delRole(string ID)
{
try
{
DBHelper.ExecuteSQL(string.Format("delete from TCWL_Role where id='{0}'", ID));
return "success";
}
catch (Exception)
{
return "error";
}
}
public DataTable getAuByRole(string id)
{
try
{
return DBHelper.GetDataTable(string.Format("select permission from TCWL_Role where ID='{0}'", id));
}
catch (Exception)
{
return null;
}
}
public DataTable loadAuth(string serviceID, string v)
{
try
后面还有 92 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
