Exemplo n.º 1
0
        /// <summary>
        /// Get access level inside access group
        /// </summary>
        /// <param name="groupId">Id of group access include access level</param>
        /// <returns>List of access level</returns>
        public static List <AccessLevel> LoadAccessLevelByACGroup(string groupId)
        {
            List <AccessLevel> accessLevels = new List <AccessLevel>();
            DataTable          dt           = null;

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

                    AccessLevel accessLevel = LoadAccessLevelById(Id);
                    accessLevels.Add(accessLevel);
                }
                return(accessLevels);
            }
            catch
            {
                return(null);
            }
        }