Exemplo n.º 1
0
        /// <summary>
        /// Get user group inside access group
        /// </summary>
        /// <param name="groupId">Id of access group include user groups</param>
        /// <returns>List of user group</returns>
        public static List <GroupUser> LoadUserGroupByACGroup(string groupId)
        {
            List <GroupUser> groupUsers = new List <GroupUser>();
            DataTable        dt         = null;

            try
            {
                ServiceReference1.WSACUSoapClient client = new ServiceReference1.WSACUSoapClient();
                DataSet ds = client.GroupAccessUGQuery("Q", groupId, "");
                dt = ds.Tables[0];
                foreach (DataRow dr in dt.Rows)
                {
                    string Id = dr["groupUserId"].ToString();

                    GroupUser groupUser = LoadGroupUserById(Id);
                    groupUsers.Add(groupUser);
                }
                return(groupUsers);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }