public void DeleteRelation(IRelation item) { if (item == null) { return; } if (item is KeyColumn && KeyRelations.Contains(item)) { KeyRelations.Remove(item); } else if (item is SubstitutionColumn && ColumnsRelations.Contains(item)) { ColumnsRelations.Remove(item); } NotifyOfPropertyChange(() => CanParse); }
public void AddKey() { if (string.IsNullOrEmpty(OriginColumn)) { return; } if (string.IsNullOrEmpty(DestinyColumn)) { return; } var relation = IoC.Get <IRelation>(Constants.KEY_COLUMN_RELATION_KEY); relation.Origin = OriginColumn; relation.Destiny = DestinyColumn; if (!KeyRelations.Contains(relation)) { KeyRelations.Add(relation); } NotifyOfPropertyChange(() => CanParse); }