Пример #1
0
        public bool Update(gView.Framework.Data.IFeatureClass fClass, gView.Framework.Data.IFeature feature)
        {
            List <IFeature> features = new List <IFeature>();

            features.Add(feature);

            return(Update(fClass, features));
        }
Пример #2
0
        public gView.Framework.Data.IFeatureCursor Query(gView.Framework.Data.IFeatureClass fc, gView.Framework.Data.IQueryFilter filter)
        {
            if (fc == null)
            {
                return(null);
            }

            return(fc.GetFeatures(filter));
        }
Пример #3
0
        async public Task <IFeatureCursor> Query(gView.Framework.Data.IFeatureClass fc, gView.Framework.Data.IQueryFilter filter)
        {
            if (fc == null)
            {
                return(null);
            }

            return(await fc.GetFeatures(filter));
        }
Пример #4
0
        public bool Insert(gView.Framework.Data.IFeatureClass fClass, gView.Framework.Data.IFeature feature)
        {
            if (fClass == null || feature == null)
            {
                return(false);
            }

            List <IFeature> features = new List <IFeature>();

            return(Insert(fClass, features));
        }
Пример #5
0
        public Task <bool> Insert(gView.Framework.Data.IFeatureClass fClass, gView.Framework.Data.IFeature feature)
        {
            if (fClass == null || feature == null)
            {
                return(Task.FromResult <bool>(false));
            }

            List <IFeature> features = new List <IFeature>();

            return(Insert(fClass, features));
        }
Пример #6
0
 public bool Insert(gView.Framework.Data.IFeatureClass fClass, List <gView.Framework.Data.IFeature> features)
 {
     if (fClass is MemFeatureClass)
     {
         foreach (IFeature feature in features)
         {
             ((MemFeatureClass)fClass).InsertFeature(feature);
         }
         return(true);
     }
     return(false);
 }
Пример #7
0
        public bool Insert(gView.Framework.Data.IFeatureClass fClass, List <gView.Framework.Data.IFeature> features)
        {
            if (fClass == null || !(fClass.Dataset is Dataset) || features == null)
            {
                return(false);
            }

            GMLFile gmlFile = null;

            try
            {
                // use always the same GMLFile...
                if (_gmlFiles.TryGetValue(((Dataset)fClass.Dataset).ConnectionString, out gmlFile))
                {
                }
                else
                {
                    gmlFile = ((Dataset)fClass.Dataset).GMLFile;
                    _gmlFiles.Add(((Dataset)fClass.Dataset).ConnectionString, gmlFile);
                }
            }
            catch
            {
                return(false);
            }
            if (gmlFile == null)
            {
                return(false);
            }

            foreach (IFeature feature in features)
            {
                if (feature == null)
                {
                    continue;
                }

                if (!gmlFile.AppendFeature(fClass, feature))
                {
                    return(false);
                }
            }

            return(true);
        }
Пример #8
0
        public void ShowDialog(gView.Framework.Data.IFeatureClass fc)
        {
            _childFc = fc;
            string errMsg;

            _parentFc = Replication.FeatureClassParentFc(_childFc, out errMsg);
            if (_parentFc == null || _parentFc.Dataset == null)
            {
                MessageBox.Show("ERROR: " + errMsg);
            }
            else
            {
                txtDatasetName.Text     = _parentFc.Dataset.GetType().ToString();
                txtDatasetLocation.Text = _parentFc.Dataset.ConnectionString;
                txtTargetClass.Text     = _parentFc.Name;

                this.ShowDialog();
            }
        }
Пример #9
0
 public bool Delete(gView.Framework.Data.IFeatureClass fClass, string where)
 {
     return(false);
 }
Пример #10
0
 public bool Delete(gView.Framework.Data.IFeatureClass fClass, int oid)
 {
     return(false);
 }
Пример #11
0
 public bool Update(gView.Framework.Data.IFeatureClass fClass, List <gView.Framework.Data.IFeature> features)
 {
     return(false);
 }
Пример #12
0
 public bool Delete(gView.Framework.Data.IFeatureClass fClass, string where)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Пример #13
0
 public bool Update(gView.Framework.Data.IFeatureClass fClass, List <gView.Framework.Data.IFeature> features)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Пример #14
0
 public Task <bool> Delete(gView.Framework.Data.IFeatureClass fClass, int oid)
 {
     throw new Exception("The method or operation is not implemented.");
 }