public static BPMObjectNameCollection AddGroupMembers(IYZDbProvider provider, IDbConnection cn, int groupid, BPMObjectNameCollection uids, string role) { BPMObjectNameCollection added = new BPMObjectNameCollection(); MemberCollection members = GroupManager.GetGroupMembers(provider, cn, groupid); foreach (string uid in uids) { Member member = new Member(); member.GroupID = groupid; member.UID = uid; member.Role = role; if (!members.Contains(uid)) { GroupManager.Insert(provider, cn, member); added.Add(uid); } } return(added); }
static GroupManager() { GroupManager._instance = new GroupManager(); }