MxWeiXinPF.BLL/agent/manager_role.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Collections.Generic;
using MxWeiXinPF.Common;
namespace MxWeiXinPF.BLL
{
/// <summary>
/// 管理角色
/// </summary>
public partial class manager_role
{
private readonly Model.siteconfig siteConfig = new BLL.siteconfig().loadConfig(); //获得站点配置信息
private readonly DAL.manager_role dal;
public manager_role()
{
dal = new DAL.manager_role(siteConfig.sysdatabaseprefix);
}
#region Method
/// <summary>
/// 是否存在该记录
/// </summary>
public bool Exists(int id)
{
return dal.Exists(id);
}
public bool Exists(int id, int agentId)
{
return dal.Exists(id, agentId);
}
/// <summary>
/// 检查是否有权限
/// </summary>
public bool Exists(int role_id, string nav_name, string action_type)
{
Model.manager_role model = dal.GetModel(role_id);
if (model != null)
{
if (model.role_type == 1)
{
return true;
}
Model.manager_role_value modelt = model.manager_role_values.Find(p => p.nav_name == nav_name && p.action_type == action_type);
if (modelt != null)
{
return true;
}
}
return false;
}
/// <summary>
/// 返回角色名称
/// </summary>
public string GetTitle(int id)
{
return dal.GetTitle(id);
}
后面还有 42 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
