示例#1
0
        public EntityComponent(CrmComponent component, EntityMetadata emd)
        {
            this.emd = emd;
            Id       = emd.MetadataId;
            RootComponentBehavior   = component.RootComponentBehavior;
            RootSolutionComponentId = component.RootSolutionComponentId;
            ComponentType           = component.ComponentType;
            Name        = emd.LogicalName;
            DisplayName = emd.DisplayName?.UserLocalizedLabel?.Label;

            if (RootComponentBehavior == 0)
            {
                foreach (var amd in emd.Attributes)
                {
                    Attributes.Add(new AttributeComponent(amd));
                }
                foreach (var rel in emd.OneToManyRelationships)
                {
                    OneToManyRelashionships.Add(new OneToManyRelationshipComponent(rel));
                }
                foreach (var rel in emd.ManyToManyRelationships)
                {
                    ManyToManyRelationships.Add(new ManyToManyRelationshipComponent(rel));
                }
            }
        }
示例#2
0
 public OptionSetComponent(CrmComponent c, OptionSetMetadataBase osmdb)
 {
     this.osmdb    = osmdb;
     Id            = osmdb.MetadataId;
     ComponentType = c.ComponentType;
     Name          = osmdb.Name;
     DisplayName   = osmdb.DisplayName?.UserLocalizedLabel?.Label;
 }
示例#3
0
 public WorkflowComponent(CrmComponent c, Entity e)
 {
     this.e        = e;
     Id            = e.Id;
     ComponentType = c.ComponentType;
     Name          = e.GetAttributeValue <string>("name");
     DisplayName   = Name;
 }
 public PluginAssemblyComponent(CrmComponent c, Entity e)
 {
     this.e        = e;
     Id            = e.Id;
     ComponentType = c.ComponentType;
     Name          = e.GetAttributeValue <string>("name");
     DisplayName   = e.GetAttributeValue <string>("friendlyname");
 }
 public KbArticleTemplateComponent(CrmComponent c, Entity e)
 {
     this.e        = e;
     Id            = e.Id;
     ComponentType = c.ComponentType;
     Name          = e.GetAttributeValue <string>("title");
     DisplayName   = Name;
 }
示例#6
0
 public ContractTemplateComponent(CrmComponent c, Entity e)
 {
     Id            = e.Id;
     ComponentType = c.ComponentType;
     Name          = e.GetAttributeValue <string>("name");
     DisplayName   = Name;
     this.e        = e;
 }
示例#7
0
 public MailMergeTemplateComponent(CrmComponent c, Entity e)
 {
     this.e        = e;
     Id            = e.Id;
     ComponentType = c.ComponentType;
     Name          = e.GetAttributeValue <string>("name");
     DisplayName   = Name;
 }