本文整理汇总了C#中IUserService.QueryUsersByObjectCode方法的典型用法代码示例。如果您正苦于以下问题:C# IUserService.QueryUsersByObjectCode方法的具体用法?C# IUserService.QueryUsersByObjectCode怎么用?C# IUserService.QueryUsersByObjectCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IUserService
的用法示例。
在下文中一共展示了IUserService.QueryUsersByObjectCode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetUsers
private Beyondbit.BUA.Client.User[] GetUsers(IUserService us, string orgCode)
{
return us.QueryUsersByObjectCode(ObjectType.Org, orgCode);
}
示例2: parseUnitUserData
private void parseUnitUserData(Hashtable parent, Org org, IUserService us, IOrgService os)
{
//Hashtable hashOrg = new Hashtable();
//parent["id"] = "o_" + org.OrgCode;
//parent["text"] = org.OrgName;
List<Hashtable> lst = parent["children"] as List<Hashtable>;
//Hashtable hsOrg = new Hashtable();
//hsOrg["id"] = "o_" + org.OrgCode;
//hsOrg["text"] = org.OrgName;
//hsOrg["children"] = new List<Hashtable>();
//lst.Add(hsOrg);
List<User> users = new List<Beyondbit.BUA.Client.User>();
User[] _users = null;
try
{
_users = us.QueryUsersByObjectCode(ObjectType.Org, org.OrgCode);
}
catch
{
}
if (_users != null && _users.Length > 0)
{
foreach (Beyondbit.BUA.Client.User u in _users)
{
Hashtable hUser = new Hashtable();
hUser["id"] = "u_" + u.UserUid;
hUser["text"] = u.UserName;
lst.Add(hUser);
}
}
Org[] childOrgs = os.QuerySubOrgs(org.OrgCode);
if (childOrgs != null && childOrgs.Length > 0)
{
foreach (Org o in childOrgs)
{
Hashtable hOrg = new Hashtable();
hOrg["id"] = "o_" + o.OrgCode;
hOrg["text"] = o.OrgName;
hOrg["children"] = new List<Hashtable>();
lst.Add(hOrg);
parseUnitUserData(hOrg, o, us, os);
}
}
}