protected override void OnChildDeleted(MappingEFElement melem) { if (_assocSet == melem) { _assocSet = null; } }
public override bool Initialize(object component, TreeGridDesignerColumnDescriptor[] columns) { if (!base.Initialize(component, columns)) { return false; } var mappingAssociationSet = component as MappingAssociationSet; if (mappingAssociationSet != null) { _mappingAssociationSet = mappingAssociationSet; } return true; }
internal override Dictionary <MappingLovEFElement, string> GetListOfValues(ListOfValuesCollection type) { var lov = new Dictionary <MappingLovEFElement, string>(); Debug.Assert(type == ListOfValuesCollection.ThirdColumn, "Unsupported lov type was sent"); if (type == ListOfValuesCollection.ThirdColumn) { var table = MappingAssociationSet.GetTable(); var properties = new List <Property>(); if (table != null) { properties.AddRange(table.Properties()); } // we aren't filtering this list, show all columns of the table if (ScalarProperty != null) { // add the row at the top that the user can click on to remove the item lov.Add(LovDeletePlaceHolder, LovDeletePlaceHolder.DisplayName); } if (properties.Count == 0) { if (ScalarProperty == null) { lov.Add(LovEmptyPlaceHolder, LovEmptyPlaceHolder.DisplayName); } } else { foreach (var prop in properties) { var displayName = ColumnUtils.BuildPropertyDisplay(prop.LocalName.Value, prop.TypeName); lov.Add(new MappingLovEFElement(prop, displayName), displayName); } } return(lov); } return(base.GetListOfValues(type)); }
protected override void LoadChildrenCollection() { _assocSet = ModelToMappingModelXRef.GetNewOrExisting(_context, Association.AssociationSet, this) as MappingAssociationSet; _children.Add(_assocSet); }
internal AssociationSetEndBranch(MappingAssociationSet mappingAssociationSet, TreeGridDesignerColumnDescriptor[] columns) : base(mappingAssociationSet, columns) { _mappingAssociationSet = mappingAssociationSet; }