Esempio n. 1
0
        public SQLElement GetElementByIDNullable(int ElementID)
        {
            String elementString = "";

            if (FullDatabaseCheckout)
            {
                if (elementIdToEAElement.ContainsKey(ElementID))
                {
                    return(elementIdToEAElement[ElementID]);
                }

                if (t_objectObjectID.ContainsKey(ElementID.ToString()))
                {
                    elementString = t_objectObjectID[ElementID.ToString()];
                }
            }
            else
            {
                String connectorQry = this.SQLQuery("select * from t_object where Object_ID = " + ElementID);
                elementString = EAEcoreAddin.Util.EAUtil.getXMLNodeContentFromSQLQueryString(connectorQry, "Row")[0];
            }
            if (elementString != "")
            {
                SQLElement element = new SQLElement(this, elementString);
                return(element);
            }
            else
            {
                return(null);
            }
        }
Esempio n. 2
0
        public SQLElement GetElementByGuid(string GUID)
        {
            String elementString = "";

            if (FullDatabaseCheckout)
            {
                if (elementGuidToEAElement.ContainsKey(GUID))
                {
                    return(elementGuidToEAElement[GUID]);
                }

                if (t_objectGUID.ContainsKey(GUID))
                {
                    elementString = t_objectGUID[GUID];
                }
            }
            else
            {
                String connectorQry = this.SQLQuery("select * from t_object where ea_guid = '" + GUID + "'");
                elementString = EAEcoreAddin.Util.EAUtil.getXMLNodeContentFromSQLQueryString(connectorQry, "Row")[0];
            }

            if (elementString != "")
            {
                SQLElement element = new SQLElement(this, elementString);
                return(element);
            }
            else
            {
                return(null);
            }
        }
Esempio n. 3
0
        public SQLElement GetElementByID(int ElementID)
        {
            SQLElement element = GetElementByIDNullable(ElementID);

            if (element != null)
            {
                return(element);
            }
            else
            {
                throw new COMException("Can't find matching ID");
            }
        }