小程序接口修改
This commit is contained in:
@@ -170,14 +170,38 @@
|
||||
|
||||
return roleName;
|
||||
}
|
||||
public static string getRoleNamesRoleIdsForApi(object roleIds)
|
||||
{
|
||||
string roleName = string.Empty;
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
if (roleIds != null)
|
||||
{
|
||||
string[] roles = roleIds.ToString().Split(',');
|
||||
foreach (string roleId in roles)
|
||||
{
|
||||
var q = db.Sys_Role.FirstOrDefault(x => x.RoleId == roleId);
|
||||
if (q != null && !roleName.Contains(q.RoleName))
|
||||
{
|
||||
roleName += q.RoleName + ",";
|
||||
}
|
||||
}
|
||||
if (roleName != string.Empty)
|
||||
{
|
||||
roleName = roleName.Substring(0, roleName.Length - 1); ;
|
||||
}
|
||||
}
|
||||
}
|
||||
return roleName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 角色下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="projectId">项目id</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitRoleDropDownList(FineUIPro.DropDownList dropName, string roleId, bool? isOffice, bool isShowPlease)
|
||||
/// <summary>
|
||||
/// 角色下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="projectId">项目id</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitRoleDropDownList(FineUIPro.DropDownList dropName, string roleId, bool? isOffice, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "RoleId";
|
||||
dropName.DataTextField = "RoleName";
|
||||
|
||||
Reference in New Issue
Block a user