获取指定用户组的角色,需要加帐套编号
获取指定用户组的角色,需要加帐套编号
修改dalUserGroup.cs文件
扫一扫加作者微信
修改dalUserGroup.cs文件
C# Code:
/// <summary>
/// 获取指定用户组的角色
/// </summary>
/// <param name="groupCode">组编号</param>
/// <returns></returns>
public DataTable GetGroupRoles(string groupCode)
{
SqlProcedure sp = SqlBuilder.BuildSqlProcedure("usp_GetGroupRoles");
sp.AddParam("@GroupCode", SqlDbType.VarChar, groupCode);
sp.AddParam("@DataSetID", SqlDbType.VarChar, _Loginer.DataSetID);
return DataProvider.Instance.GetTable(DBName, sp.SqlCommand, tb_MyGroupRole.__TableName);
}
//来源:C/S框架网(www.csframework.com) QQ:1980854898
/// <summary>
/// 获取指定用户组的角色
/// </summary>
/// <param name="groupCode">组编号</param>
/// <returns></returns>
public DataTable GetGroupRoles(string groupCode)
{
SqlProcedure sp = SqlBuilder.BuildSqlProcedure("usp_GetGroupRoles");
sp.AddParam("@GroupCode", SqlDbType.VarChar, groupCode);
sp.AddParam("@DataSetID", SqlDbType.VarChar, _Loginer.DataSetID);
return DataProvider.Instance.GetTable(DBName, sp.SqlCommand, tb_MyGroupRole.__TableName);
}
//来源:C/S框架网(www.csframework.com) QQ:1980854898
SQL Code:
ALTER PROCEDURE [dbo].[usp_GetGroupRoles]
@GroupCode VARCHAR(20), --组编号
@DataSetID VARCHAR(20)--帐套编号
AS
BEGIN
/*********************************************************
功能:获取用户组的角色
SELECT * FROM dbo.tb_MyGroup
SELECT * FROM dbo.tb_MyRole
SELECT * FROM tb_MyGroupRole
usp_GetGroupRoles 'admins','normal'
**********************************************************/
SELECT a.*,b.RoleName FROM tb_MyGroupRole a LEFT JOIN tb_MyRole b ON a.RoleID=b.RoleID
WHERE a.GroupCode=@GroupCode AND a.DataSetID=@DataSetID
END
//来源:C/S框架网(www.csframework.com) QQ:1980854898
ALTER PROCEDURE [dbo].[usp_GetGroupRoles]
@GroupCode VARCHAR(20), --组编号
@DataSetID VARCHAR(20)--帐套编号
AS
BEGIN
/*********************************************************
功能:获取用户组的角色
SELECT * FROM dbo.tb_MyGroup
SELECT * FROM dbo.tb_MyRole
SELECT * FROM tb_MyGroupRole
usp_GetGroupRoles 'admins','normal'
**********************************************************/
SELECT a.*,b.RoleName FROM tb_MyGroupRole a LEFT JOIN tb_MyRole b ON a.RoleID=b.RoleID
WHERE a.GroupCode=@GroupCode AND a.DataSetID=@DataSetID
END
//来源:C/S框架网(www.csframework.com) QQ:1980854898
扫一扫加作者微信
版权声明:本文为开发框架文库发布内容,转载请附上原文出处连接
NewDoc C/S框架网