Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public void clearAllKeys()
 {
     KeyRelations.Clear();
     NotifyOfPropertyChange(() => CanParse);
 }