Exemplo n.º 1
0
 /// <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);
 }
Exemplo n.º 2
0
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 public Model.manager_role GetModel(int id)
 {
     return(dal.GetModel(id));
 }