public void AddUsersToOU(string identity, int ouID, string[] userNames) { this.VerifyUser(identity); User user = new User(); OU ou = new OU(); UserInfo userByName = null; for (int i = 0; i < userNames.Length; i++) { userByName = user.GetUserByName(userNames[i]); ou.AddUser(userByName.ID, ouID); } }
///// <summary> ///// 根据名称查找对象(自定义接口使用范例) ///// </summary> //public List<OuInfo> FindByName(string name) //{ // return bll.FindByName(name); //} public void AddUser(int userID, int ouID) { bll.AddUser(userID, ouID); }