Beispiel #1
0
        public SQLAttribute GetAttributeByID(int AttributeID)
        {
            SQLAttribute foundElement            = null;
            String       attributePropertyString = "";

            if (FullDatabaseCheckout)
            {
                if (t_attributeAttributeID.ContainsKey(AttributeID.ToString()))
                {
                    attributePropertyString = t_attributeAttributeID[AttributeID.ToString()];
                }
            }
            else
            {
                String attributeQry = this.SQLQuery("select * from t_attribute where ID = " + AttributeID);
                attributePropertyString = EAEcoreAddin.Util.EAUtil.getXMLNodeContentFromSQLQueryString(attributeQry, "Row")[0];
            }
            if (attributePropertyString != "")
            {
                foundElement = new SQLAttribute(attributePropertyString, this);
            }
            if (foundElement == null)
            {
                throw new COMException("Can't find matching ID");
            }
            return(foundElement);
        }
Beispiel #2
0
        public SQLAttribute GetAttributeByGuid(string GUID)
        {
            String connectorPropertyString = "";

            if (FullDatabaseCheckout)
            {
                if (t_attributeGUID.ContainsKey(GUID))
                {
                    connectorPropertyString = t_attributeGUID[GUID];
                }
            }
            else
            {
                String attributeQry = this.SQLQuery("select * from t_attribute where ea_guid = '" + GUID + "'");
                connectorPropertyString = EAEcoreAddin.Util.EAUtil.getXMLNodeContentFromSQLQueryString(attributeQry, "Row")[0];
            }
            if (connectorPropertyString != "")
            {
                SQLAttribute foundElement = new SQLAttribute(connectorPropertyString, this);
                return(foundElement);
            }
            else
            {
                return(null);
            }
        }