public DefaultBLInterface(CoreInterface coreInterface, BLModel model) { this.coreInterface = coreInterface; this.ParentModel = model; this.ShortName = coreInterface.Name; this.Name = ConvertName(coreInterface, model?.Config); if (string.IsNullOrEmpty(coreInterface.FormerName)) { this.FormerName = null; } else { this.FormerName = ConvertName(coreInterface.FormerName, coreInterface, model?.Config); } this.Attributes = new List <IBLAttribute>(); // ID-Attribut hinzufügen this.Attributes.Add(CustomBLAttribute.GetNewIDAttribute(this)); foreach (var attr in coreInterface.Attributes) { if (attr is CoreRefAttribute) { this.Attributes.Add(new RefBLAttribute((CoreRefAttribute)attr, this)); } else { this.Attributes.Add(new BaseBLAttribute((CoreBaseAttribute)attr, this)); } } // Ggf. Mandant-Attribut hinzufügen if (coreInterface.IsMandant) { this.Attributes.Add(CustomBLAttribute.GetNewMandantAttribute(this)); } // Technische Hilfsattribute hinzufügen AddTechnicalAttributes(); }
private void ConvertAttributes() { this.Attributes = new List <IBLAttribute>(); this.PrimaryKeyAttributes = new List <IBLAttribute>(); // ID-Attribut hinzufügen var pk = CustomBLAttribute.GetNewIDAttribute(this); this.Attributes.Add(pk); this.PrimaryKeyAttributes.Add(pk); foreach (var attr in coreInterface.Attributes) { if (attr is CoreRefAttribute) { this.Attributes.Add(new RefBLAttribute((CoreRefAttribute)attr, this)); } else { this.Attributes.Add(new BaseBLAttribute((CoreBaseAttribute)attr, this)); } } // Ggf. Mandant-Attribut hinzufügen if (coreInterface.IsMandant) { this.Attributes.Add(CustomBLAttribute.GetNewMandantAttribute(this)); } // Technische Hilfsattribute hinzufügen this.Attributes.Add(CustomBLAttribute.GetNewTModifikationAttribute(this)); this.Attributes.Add(CustomBLAttribute.GetNewTBemerkungAttribute(this)); this.Attributes.Add(CustomBLAttribute.GetNewTBenutzerAttribute(this)); this.Attributes.Add(CustomBLAttribute.GetNewTSystemAttribute(this)); this.HistoryAttribute = CustomBLAttribute.GetNewTGueltigBisAttribute(this, this.ParentModel.FinestTimeAttribute); this.Attributes.Add(this.HistoryAttribute); this.Attributes.Add(CustomBLAttribute.GetNewTErstDatAttribute(this)); this.Attributes.Add(CustomBLAttribute.GetNewTAendDatAttribute(this)); this.Attributes.Add(CustomBLAttribute.GetNewTLadelaufNRAttribute(this)); }