Exemplo n.º 1
0
        /// <summary>
        /// Gets the child rows of this DmRow using the specified DmRelation and the specified DmRowVersion
        /// </summary>
        public DmRow[] GetChildRows(DmRelation relation, DmRowVersion version)
        {
            if (relation == null)
            {
                return new DmRow[] { table.NewRow() }
            }
            ;

            if (relation.DmSet != table.DmSet)
            {
                throw new Exception("RowNotInTheDataSet");
            }

            if (relation.ParentKey.Table != table)
            {
                throw new Exception("RelationForeignTable");
            }

            return(DmRelation.GetChildRows(relation.ParentKey, relation.ChildKey, this, version));
        }