Показать сообщение отдельно
Старый 07.04.2009, 11:59   #11  
Eldar9x is offline
Eldar9x
MCTS
Аватар для Eldar9x
Oracle
MCBMSS
 
1,064 / 166 (8) ++++++
Регистрация: 29.09.2006
Адрес: Казань
Еще вариант
X++:
    XInfo                   xInfo = new XInfo();
    Object                  obj;
    SysDictLicenseCode      SysDictLicenseCode;
    DictConfigurationKey    dictConfigKey;

    ConfigurationKeyId getParentCKId(ConfigurationKeyId _keyid)
    {
        ConfigurationKeyId      ret;
        DictConfigurationKey    key;
        ;

        key = new DictConfigurationKey(_keyId);
           
        if (key.parentConfigurationKeyId())
            ret = getParentCKId(key.parentConfigurationKeyId());
        else
            ret = _keyId;

        return ret;
    }
    ;

    obj =  xInfo.rootNode();

    obj = obj.AOTfindChild('Menu Items');
    obj = obj.AOTfindChild('Display');
    obj = obj.AOTfindChild('smmActivities');


    if (obj.ConfigurationKey())
    {
        dictConfigKey = new DictConfigurationKey( getParentCKId(obj.ConfigurationKey()) );
        
        if (dictConfigKey.licenseCode())
        {
            sysdictLicenseCode = new SysDictLicenseCode(dictConfigKey.licenseCode());

            if (sysDictLicenseCode)
                info(strfmt("%1", sysDictLicenseCode.isEntered()));
        }
        else
            info("true");
    }
    else
        info("true");
За это сообщение автора поблагодарили: Dima_Dima (1).