代码整理,组件窗口移动到项目中,公共库代码新建UserSystem共同静态数据,v1.6.14

This commit is contained in:
dathlin
2017-10-15 16:04:28 +08:00
parent 2a3a0c5f98
commit 5a5aeca134
54 changed files with 2979 additions and 317 deletions

View File

@@ -84,6 +84,7 @@ namespace CommonLibrary
result = true;
}
}
break;
}
}
@@ -116,6 +117,39 @@ namespace CommonLibrary
}
/// <summary>
/// 获取一个角色的所有的用户名称
/// </summary>
/// <param name="roleCode"></param>
/// <returns></returns>
public string[] GetUsernamesByRolename(string roleCode)
{
string[] result = null;
hybirdLock.Enter();
for (int i = 0; i < m_roles.Count; i++)
{
if (m_roles[i].RoleCode == roleCode)
{
if (m_roles[i].Accounts != null)
{
result = m_roles[i].Accounts.ToArray();
}
else
{
result = new string[0];
}
break;
}
}
hybirdLock.Leave();
if (result == null) result = new string[0]; // 角色不存在的情况
return result;
}
#endregion
#region Private Members