Example #1
0
        void SqlFDB_TableAltered(string table)
        {
            if (_layers == null)
            {
                return;
            }

            foreach (IDatasetElement element in _layers)
            {
                if (element.Class is AccessFDBFeatureClass &&
                    ((AccessFDBFeatureClass)element.Class).Name == table)
                {
                    var fields = _fdb.FeatureClassFields(this._dsID, table);

                    AccessFDBFeatureClass fc = element.Class as AccessFDBFeatureClass;
                    ((Fields)fc.Fields).Clear();

                    foreach (IField field in fields)
                    {
                        ((Fields)fc.Fields).Add(field);
                    }
                }
            }
        }