SetParentRow() публичный Метод

public SetParentRow ( DataRow parentRow ) : void
parentRow DataRow
Результат void
Пример #1
0
 private static void SetNestedParentRow(DataRow childRow, DataRow parentRow)
 {
     DataRelation rel = GetNestedParentRelation(childRow);
     //we should not set this row's parentRow if the table doesn't match.
     if (rel != null)
     {
         if (parentRow == null || rel.ParentKey.Table != parentRow.Table)
             childRow.SetParentRow(null, rel);
         else
             childRow.SetParentRow(parentRow, rel);
     }
 }
Пример #2
0
		private void FillRelationship (DataRow row, DataRow childRow, XmlNode parentNode, XmlNode childNode)
		{
			for (int i = 0; i < childRow.Table.ParentRelations.Count; i++) {
				DataRelation rel = childRow.Table.ParentRelations [i];
				if (rel.ParentTable == row.Table) {
					childRow.SetParentRow (row);
					break;
				}
			}
			CheckDescendantRelationship (childNode, childRow);
		}