combit List & Label 30 - .NET Hilfe
combit.Reporting.DataProviders Namespace / ITableRelation Schnittstelle / ParentTableName Eigenschaft
Beispiele


ParentTableName Eigenschaft (ITableRelation)
Auf diese Eigenschaft wird zugegriffen, um den Eltern-Tabellennamen abzufragen.
Syntax
'Deklaration
 
ReadOnly Property ParentTableName As String
 
Beispiele
class DataRelationWrapper : ITableRelation
{
    private DataRelation _dataRelation;
    public DataRelationWrapper(DataRelation dataRelation)
    {
        _dataRelation = dataRelation;
    }
    #region IDataRelation Members

    public string RelationName
    {
        get { return _dataRelation.RelationName; }
    }

    public string ParentColumnName
    {
        get { return _dataRelation.ParentColumns[0].ColumnName; }
    }

    public string ChildColumnName
    {
        get { return _dataRelation.ChildColumns[0].ColumnName; }
    }

    public string ParentTableName
    {
        get { return _dataRelation.ParentColumns[0].Table.TableName; }
    }

    public string ChildTableName
    {
        get { return _dataRelation.ChildColumns[0].Table.TableName; }
    }

    #endregion
}
Class DataRelationWrapper
    Implements ITableRelation
    Private _dataRelation As DataRelation
    Public Sub New(dataRelation As DataRelation)
        _dataRelation = dataRelation
    End Sub
    #region IDataRelation Members

    Public Readonly Property RelationName() As String
        Get
            Return _dataRelation.RelationName
        End Get
    End Property

    Public Readonly Property ParentColumnName() As String
        Get
            Return _dataRelation.ParentColumns(0).ColumnName
        End Get
    End Property

    Public Readonly Property ChildColumnName() As String
        Get
            Return _dataRelation.ChildColumns(0).ColumnName
        End Get
    End Property

    Public Readonly Property ParentTableName() As String
        Get
            Return _dataRelation.ParentColumns(0).Table.TableName
        End Get
    End Property

    Public Readonly Property ChildTableName() As String
        Get
            Return _dataRelation.ChildColumns(0).Table.TableName
        End Get
    End Property
#End Region
End Class
Anforderungen

Plattformen: Windows 10 (Version 21H2 - 22H2), Windows 11 (21H2 - 23H2), Windows Server 2016 - 2022
.NET: .NET Framework 4.8, .NET 6, .NET 8, .NET 9

Siehe auch