Ejemplo n.º 1
0
        private void ProcessObjectClass(WorkspaceInfo wsInfo, IObjectClass objClass)
        {
            IJTXGDBHistoryChanges gdbHistoryChanges = new JTXGDBHistoryChangesClass();
            DateTime now = (DateTime)((IDatabaseConnectionInfo2) wsInfo.workspace).ConnectionCurrentDateTime;
            IJTXChangeSet changeSet = gdbHistoryChanges.GetChanges(m_database, wsInfo.workspaceID, objClass, wsInfo.lastProcessed, now);
            wsInfo.lastProcessed = now;

            if(changeSet.Count > 0)
            {
                m_database.LogMessage(5, 2000, "Changes found");
            }

            IJTXSpatialNotificationManager snMan = m_database.SpatialNotificationManager;
            bool bHasMatches;
            IJTXChangeRuleMatchSet matches = snMan.EvaluateSet(null, changeSet, out bHasMatches);

            if (bHasMatches)
            {
                m_database.LogMessage(5, 2000, "Matches found");
                snMan.Notify(matches);
            }

        }
Ejemplo n.º 2
0
        private void ProcessObjectClass(WorkspaceInfo wsInfo, IObjectClass objClass)
        {
            IJTXGDBHistoryChanges gdbHistoryChanges = new JTXGDBHistoryChangesClass();
            DateTime      now       = (DateTime)((IDatabaseConnectionInfo2)wsInfo.workspace).ConnectionCurrentDateTime;
            IJTXChangeSet changeSet = gdbHistoryChanges.GetChanges(m_database, wsInfo.workspaceID, objClass, wsInfo.lastProcessed, now);

            wsInfo.lastProcessed = now;

            if (changeSet.Count > 0)
            {
                m_database.LogMessage(5, 2000, "Changes found");
            }

            IJTXSpatialNotificationManager snMan = m_database.SpatialNotificationManager;
            bool bHasMatches;
            IJTXChangeRuleMatchSet matches = snMan.EvaluateSet(null, changeSet, out bHasMatches);

            if (bHasMatches)
            {
                m_database.LogMessage(5, 2000, "Matches found");
                snMan.Notify(matches);
            }
        }