Public Class DataSourceList
inherits nbfBrowseCol
Public Sub New()
MyBase.new()
End Sub
Shadows Public Property Item(index As Integer) As DataSourceInfo
Get
Item = ctype(mybase.item(Index),DataSourceInfo)
End Get
Set (ByvaL Value as DataSourceInfo)
List(index) = value
End Set
End Property
shadows Readonly Public Property Item(indx As String) As DataSourceInfo
Get
Return CType(mybase.item(indx), DataSourceInfo)
End Get
End Property
shadows Readonly Public Property Item() As DataSourceInfo
Get
Return CType(mybase.Item(), DataSourceInfo)
End Get
End Property
shadows Public Function Add() As Integer
dim ccon = new DataSourceInfo()
Return mybase.Add(ccon)
End Function 'Add
shadows Public Function Add(value As DataSourceInfo) As Integer
Return mybase.Add(value)
End Function 'Add
overrides Public Function AddNewEx() As Object
dim cc as New DataSourceInfo()
mybase.Add(cc)
return ctype(mybase.list(mybase.list.Count - 1),DataSourceInfo)
End Function
shadows Public Function IndexOf(value As DataSourceInfo) As Integer
return mybase.IndexOf(value)
End Function 'IndexOf
shadows Public Sub Insert(index As Integer, value As DataSourceInfo)
mybase.Insert(index,value)
End Sub 'Insert
shadows Public Sub Remove(value As DataSourceInfo)
mybase.Remove(value)
End Sub 'Remove
Public Sub Delete(Index As Integer)
dim s as string
list(index).delete
List.RemoveAt(Index)
End Sub
Public Function Contains(value As DataSourceInfo) As Boolean
' If value is not of type Customer, this will return false.
Return List.Contains(value)
End Function 'Contains
Protected Overrides Sub OnInsert(index As Integer, value As [Object])
If Not value.GetType() Is Type.GetType("nbfSqlReporter.DataSourceInfo") Then
Throw New ArgumentException("value must be of type DataSourceInfo.", "value")
End If
End Sub 'OnInsert
Protected Overrides Sub OnRemove(index As Integer, value As [Object])
If Not value.GetType() Is Type.GetType("nbfSqlReporter.DataSourceInfo") Then
Throw New ArgumentException("value must be of type DataSourceInfo.", "value")
End If
End Sub 'OnRemove
Protected Overrides Sub OnSet(index As Integer, oldValue As [Object], newValue As [Object])
If Not newValue.GetType() Is Type.GetType("nbfSqlReporter.DataSourceInfo") Then
Throw New ArgumentException("newValue must be of type DataSourceInfo.", "newValue")
End If
End Sub 'OnSet
Protected Overrides Sub OnValidate(value As [Object])
If Not value.GetType() Is Type.GetType("nbfSqlReporter.DataSourceInfo") Then
Throw New ArgumentException("value must be of type DataSourceInfo.")
End If
End Sub 'OnValidate
Public ReadOnly Property Name() As String
Get
Return "DataSourceInfos"
End Get
End Property
End Class
public Class DataSourceInfo
public ds as nbfDB.NbfResultSet
public dtb as DataTable
private pvDataSourceName as String
private pvNoRows as Boolean = false
public property DataSourceName() as String
Get
return pvDataSourceName
End Get
Set
pvDataSourceName = Value
End Set
End Property
public property NoRows as Boolean
Get
return pvNoRows
End Get
Set
pvNoRows = Value
End Set
End Property
End Class