GetParentRows() static private method

Gets the parent rows for the given child row across the relation using the version given
static private GetParentRows ( DataKey parentKey, DataKey childKey, DataRow childRow, DataRowVersion version ) : System.Data.DataRow[]
parentKey DataKey
childKey DataKey
childRow DataRow
version DataRowVersion
return System.Data.DataRow[]
Exemplo n.º 1
0
 public DataRow[] GetParentRows(DataRelation relation, DataRowVersion version)
 {
     if (relation == null)
     {
         return(this._table.NewRowArray(0));
     }
     if (relation.DataSet != this._table.DataSet)
     {
         throw ExceptionBuilder.RowNotInTheDataSet();
     }
     if (relation.ChildKey.Table != this._table)
     {
         throw ExceptionBuilder.GetParentRowTableMismatch(relation.ChildTable.TableName, this._table.TableName);
     }
     return(DataRelation.GetParentRows(relation.ParentKey, relation.ChildKey, this, version));
 }