using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace Basic.BLL { /// /// 管理员 /// public class manager_role { /// /// 检查是否有权限 /// public bool Exists(int role_id, string channel_name, string action_type) { Model.manager_role model = new DAL.manager_role().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.channel_name == channel_name && p.action_type == action_type); if (modelt != null) { return true; } } return false; } /// /// 检查是否有权限 /// public bool Exists(int role_id, int channel_id, string action_type) { Model.manager_role model = new DAL.manager_role().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.channel_id == channel_id && p.action_type == action_type); if (modelt != null) { return true; } } return false; } } }