예제 #1
0
        internal override void DeleteLinkedObjects(bool isChildOfDeleted)
        {
            // Remove any relationships this column participates in:
            UsedInRelationships.ToList().ForEach(r => r.Delete());

            if (!isChildOfDeleted)
            {
                if (Handler.CompatibilityLevel >= 1400)
                {
                    ObjectLevelSecurity.Clear();
                }

                // Remove any hierarchy levels this column is used in:
                UsedInLevels.ToList().ForEach(l => l.Delete());

                // Make sure the column is no longer used as a Sort By column:
                UsedInSortBy.ToList().ForEach(c => c.SortByColumn = null);

                // Make sure the column is no longer used in any Calculated Tables:
                foreach (var ctc in OriginForCalculatedTableColumns.ToList())
                {
                    ctc.InternalDelete();
                }
            }

            // Make sure the column is no longer used in any Variations:
            if (Handler.CompatibilityLevel >= 1400)
            {
                UsedInVariations.ToList().ForEach(v => v.Delete());
            }

            base.DeleteLinkedObjects(isChildOfDeleted);
        }
예제 #2
0
        internal override void DeleteLinkedObjects(bool isChildOfDeleted)
        {
            // Make sure the hierarchy is no longer used in any Variations:
            if (Handler.CompatibilityLevel >= 1400)
            {
                UsedInVariations.ToList().ForEach(v => v.Delete());
            }

            base.DeleteLinkedObjects(isChildOfDeleted);
        }