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


In diesem Thema
    RelationName Eigenschaft (ITableRelation)
    In diesem Thema
    Auf diese Eigenschaft wird zugegriffen, um den Relationsnamen abzufragen.
    Syntax
    'Deklaration
     
    
    ReadOnly Property RelationName As String
    string RelationName {get;}
    property String^ RelationName {
       String^ get();
    }
    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 8.1 bis Windows 10 (Version 20H2 - 21H2), Windows 11 (21H2), Windows Server 2012 - 2022

    Siehe auch