System.Data.DataRow.GetParentRow C# (CSharp) Method

GetParentRow() public method

Gets the parent row of this using the specified .
public GetParentRow ( DataRelation relation ) : DataRow
relation DataRelation
return DataRow
        public DataRow GetParentRow(DataRelation relation) =>
            GetParentRow(relation, DataRowVersion.Default);

Same methods

DataRow::GetParentRow ( DataRelation relation, DataRowVersion version ) : DataRow
DataRow::GetParentRow ( string relationName ) : DataRow
DataRow::GetParentRow ( string relationName, DataRowVersion version ) : DataRow

Usage Example

Example #1
0
        public BaseBusinessProxy(DataRow row)
        {
            this.Name = row["Name"].ToString();

            this.Version = "";
            if (row.GetParentRow("Bla_Blh").Table.Columns.Contains("Version"))
            {
                this.Version = row.GetParentRow("Bla_Blh")["Version"].ToString();
            }
            this.DbName = "";
            if (row.Table.Columns.Contains("DbName"))
            {
                this.DbName = row["DbName"].ToString();
            }
            this.TransactionMode = "false";
            if (row.Table.Columns.Contains("TransactionMode"))
            {
                this.TransactionMode = row["TransactionMode"].ToString();
            }
            if (row.Table.Columns.Contains("Provider"))
            {
                this.Provider = row["Provider"].ToString();
            }
            try
            {
                this.BusinessAssemblyName = row.GetParentRow("Bla_Blh")["Name"].ToString();
            }
            catch { }
        }
All Usage Examples Of System.Data.DataRow::GetParentRow