foreach(FeatureLayer fl in _cacheData.FeatureLayers) { if(!fl.HasEdits) continue; flSync = new FeatureLayerSyncAgent( fl, _svrConn ); flSync.SynchronizationDirection = SyncDirection.UploadOnly; flSync.UploadFilter = new QueryFilter( "MY CONDITION STATEMENT" ); sr = flSync.Synchronize( ); if(sr.Exception != null) throw new ApplicationException( PrepareErrorMessage( fl ) ); }
MobileCacheSyncAgent mobileSync = new MobileCacheSyncAgent(mobileCache1, mobileServiceConnection1); MobileCacheSyncResults mobileResults = new MobileCacheSyncResults(); mobileServiceConnection1.CreateCache(mobileCache1.StoragePath); mobileSync.MapDocumentConnection = mobileServiceConnection1; // To sysnch individual layers FeatureLayerSyncAgent agent0 = new FeatureLayerSyncAgent(mobileCache1.FeatureLayers["LayerName1"], mobileServiceConnection1); agent0.Synchronize(); FeatureLayerSyncAgent agent1 = new FeatureLayerSyncAgent(mobileCache1.FeatureLayers["LayerName2"], mobileServiceConnection1); agent1.Synchronize(); // to synch all layers mobileSync.Synchronize();
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.