SVN r498
SVN-Revision: r498
This commit is contained in:
@@ -1034,9 +1034,26 @@ namespace Lskj.Business.Impl
|
|||||||
where = " and isnull(menutype,0)=0";
|
where = " and isnull(menutype,0)=0";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
string sqlTemplate = @"WITH UserRoles AS (
|
||||||
string sqlValue = string.Format("select * from P_systempopupmenu where isnull(visible,0)=0 and (isnull(privilegeOper,'')='' or charindex(',{0},',','+privilegeOper+',')>0) and tab=@tab ", ERPInfo.Instance.UserName) + where + " order by orderid";
|
SELECT r.roleName
|
||||||
return SqlHelper.ExecuteDataTable(sqlValue, new SqlParameter[] { new SqlParameter("@tab", key) });
|
FROM p_systemRoleOperSetTab AS ro
|
||||||
|
JOIN p_systemRoleSetTab AS r ON r.id = ro.roleId
|
||||||
|
WHERE ro.operatorname = '{0}'
|
||||||
|
)
|
||||||
|
SELECT pm.*
|
||||||
|
FROM P_systempopupmenu AS pm WITH (NOLOCK)
|
||||||
|
WHERE ISNULL(pm.visible, 0) = 0
|
||||||
|
AND pm.tab = '{1}'
|
||||||
|
AND (
|
||||||
|
ISNULL(pm.privilegeOper, '') = ''
|
||||||
|
OR CHARINDEX(',' + '{0}' + ',', ',' + pm.privilegeOper + ',') > 0
|
||||||
|
OR EXISTS (
|
||||||
|
SELECT 1
|
||||||
|
FROM UserRoles AS ur
|
||||||
|
WHERE CHARINDEX('{{&' + ur.roleName + '&}}', pm.privilegeOper) > 0)
|
||||||
|
) {2} ORDER BY pm.orderid;";
|
||||||
|
string sqlValue = string.Format(sqlTemplate, ERPInfo.Instance.UserName, key, where);
|
||||||
|
return SqlHelper.ExecuteDataTable(sqlValue);
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取单个右键菜单
|
/// 获取单个右键菜单
|
||||||
|
|||||||
Reference in New Issue
Block a user