Ejemplo n.º 1
0
        public void AddNewFileResource(FileResource fileResource, string displayName, string description)
        {
            var priorityLandscapeFileResource = new PriorityLandscapeFileResource(this, fileResource, displayName)
            {
                Description = description
            };

            PriorityLandscapeFileResources.Add(priorityLandscapeFileResource);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Dependent type names of this entity
        /// </summary>
        public void DeleteChildren(DatabaseEntities dbContext)
        {
            foreach (var x in PriorityLandscapeFileResources.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in ProjectPriorityLandscapes.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in ProjectPriorityLandscapeUpdates.ToList())
            {
                x.DeleteFull(dbContext);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Active Dependent type names of this object
        /// </summary>
        public List <string> DependentObjectNames()
        {
            var dependentObjects = new List <string>();

            if (PriorityLandscapeFileResources.Any())
            {
                dependentObjects.Add(typeof(PriorityLandscapeFileResource).Name);
            }

            if (ProjectPriorityLandscapes.Any())
            {
                dependentObjects.Add(typeof(ProjectPriorityLandscape).Name);
            }

            if (ProjectPriorityLandscapeUpdates.Any())
            {
                dependentObjects.Add(typeof(ProjectPriorityLandscapeUpdate).Name);
            }
            return(dependentObjects.Distinct().ToList());
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Does this object have any dependent objects? (If it does have dependent objects, these would need to be deleted before this object could be deleted.)
 /// </summary>
 /// <returns></returns>
 public bool HasDependentObjects()
 {
     return(PriorityLandscapeFileResources.Any() || ProjectPriorityLandscapes.Any() || ProjectPriorityLandscapeUpdates.Any());
 }
        /// <summary>
        /// Dependent type names of this entity
        /// </summary>
        public void DeleteChildren(DatabaseEntities dbContext)
        {
            foreach (var x in AgreementsWhereYouAreTheAgreementFileResource.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in ClassificationsWhereYouAreTheKeyImageFileResource.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in CustomPageImages.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in FieldDefinitionDataImages.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in FirmaHomePageImages.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in FirmaPageImages.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in GrantAllocationAwardContractorInvoicesWhereYouAreTheGrantAllocationAwardContractorInvoiceFileResource.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in GrantAllocationFileResources.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in GrantFileResources.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in GrantModificationFileResources.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in InteractionEventFileResources.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in InvoicesWhereYouAreTheInvoiceFileResource.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in OrganizationsWhereYouAreTheLogoFileResource.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in PriorityLandscapeFileResources.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in ProjectDocuments.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in ProjectDocumentUpdates.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in ProjectImages.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in ProjectImageUpdates.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in SystemAttributesWhereYouAreTheBannerLogoFileResource.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in SystemAttributesWhereYouAreTheSquareLogoFileResource.ToList())
            {
                x.DeleteFull(dbContext);
            }
        }