📄 dataset5.vb
字号:
Me.Columns.Add(Me.columnanount)
Me.columnsno = New DataColumn("sno", GetType(System.String), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnsno)
End Sub
Public Function NewaccessoryRow() As accessoryRow
Return CType(Me.NewRow,accessoryRow)
End Function
Protected Overrides Function NewRowFromBuilder(ByVal builder As DataRowBuilder) As DataRow
Return New accessoryRow(builder)
End Function
Protected Overrides Function GetRowType() As System.Type
Return GetType(accessoryRow)
End Function
Protected Overrides Sub OnRowChanged(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowChanged(e)
If (Not (Me.accessoryRowChangedEvent) Is Nothing) Then
RaiseEvent accessoryRowChanged(Me, New accessoryRowChangeEvent(CType(e.Row,accessoryRow), e.Action))
End If
End Sub
Protected Overrides Sub OnRowChanging(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowChanging(e)
If (Not (Me.accessoryRowChangingEvent) Is Nothing) Then
RaiseEvent accessoryRowChanging(Me, New accessoryRowChangeEvent(CType(e.Row,accessoryRow), e.Action))
End If
End Sub
Protected Overrides Sub OnRowDeleted(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowDeleted(e)
If (Not (Me.accessoryRowDeletedEvent) Is Nothing) Then
RaiseEvent accessoryRowDeleted(Me, New accessoryRowChangeEvent(CType(e.Row,accessoryRow), e.Action))
End If
End Sub
Protected Overrides Sub OnRowDeleting(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowDeleting(e)
If (Not (Me.accessoryRowDeletingEvent) Is Nothing) Then
RaiseEvent accessoryRowDeleting(Me, New accessoryRowChangeEvent(CType(e.Row,accessoryRow), e.Action))
End If
End Sub
Public Sub RemoveaccessoryRow(ByVal row As accessoryRow)
Me.Rows.Remove(row)
End Sub
End Class
<System.Diagnostics.DebuggerStepThrough()> _
Public Class accessoryRow
Inherits DataRow
Private tableaccessory As accessoryDataTable
Friend Sub New(ByVal rb As DataRowBuilder)
MyBase.New(rb)
Me.tableaccessory = CType(Me.Table,accessoryDataTable)
End Sub
Public Property Expr2 As String
Get
Try
Return CType(Me(Me.tableaccessory.Expr2Column),String)
Catch e As InvalidCastException
Throw New StrongTypingException("无法获取值,因为它是 DBNull。", e)
End Try
End Get
Set
Me(Me.tableaccessory.Expr2Column) = value
End Set
End Property
Public Property Expr3 As String
Get
Try
Return CType(Me(Me.tableaccessory.Expr3Column),String)
Catch e As InvalidCastException
Throw New StrongTypingException("无法获取值,因为它是 DBNull。", e)
End Try
End Get
Set
Me(Me.tableaccessory.Expr3Column) = value
End Set
End Property
Public Property Expr4 As Decimal
Get
Try
Return CType(Me(Me.tableaccessory.Expr4Column),Decimal)
Catch e As InvalidCastException
Throw New StrongTypingException("无法获取值,因为它是 DBNull。", e)
End Try
End Get
Set
Me(Me.tableaccessory.Expr4Column) = value
End Set
End Property
Public Property Expr5 As String
Get
Try
Return CType(Me(Me.tableaccessory.Expr5Column),String)
Catch e As InvalidCastException
Throw New StrongTypingException("无法获取值,因为它是 DBNull。", e)
End Try
End Get
Set
Me(Me.tableaccessory.Expr5Column) = value
End Set
End Property
Public Property Expr6 As Integer
Get
Try
Return CType(Me(Me.tableaccessory.Expr6Column),Integer)
Catch e As InvalidCastException
Throw New StrongTypingException("无法获取值,因为它是 DBNull。", e)
End Try
End Get
Set
Me(Me.tableaccessory.Expr6Column) = value
End Set
End Property
Public Property aname As String
Get
Try
Return CType(Me(Me.tableaccessory.anameColumn),String)
Catch e As InvalidCastException
Throw New StrongTypingException("无法获取值,因为它是 DBNull。", e)
End Try
End Get
Set
Me(Me.tableaccessory.anameColumn) = value
End Set
End Property
Public Property ano As String
Get
Try
Return CType(Me(Me.tableaccessory.anoColumn),String)
Catch e As InvalidCastException
Throw New StrongTypingException("无法获取值,因为它是 DBNull。", e)
End Try
End Get
Set
Me(Me.tableaccessory.anoColumn) = value
End Set
End Property
Public Property descript As String
Get
Try
Return CType(Me(Me.tableaccessory.descriptColumn),String)
Catch e As InvalidCastException
Throw New StrongTypingException("无法获取值,因为它是 DBNull。", e)
End Try
End Get
Set
Me(Me.tableaccessory.descriptColumn) = value
End Set
End Property
Public Property price As Decimal
Get
Try
Return CType(Me(Me.tableaccessory.priceColumn),Decimal)
Catch e As InvalidCastException
Throw New StrongTypingException("无法获取值,因为它是 DBNull。", e)
End Try
End Get
Set
Me(Me.tableaccessory.priceColumn) = value
End Set
End Property
Public Property stand As String
Get
Try
Return CType(Me(Me.tableaccessory.standColumn),String)
Catch e As InvalidCastException
Throw New StrongTypingException("无法获取值,因为它是 DBNull。", e)
End Try
End Get
Set
Me(Me.tableaccessory.standColumn) = value
End Set
End Property
Public Property anount As Integer
Get
Try
Return CType(Me(Me.tableaccessory.anountColumn),Integer)
Catch e As InvalidCastException
Throw New StrongTypingException("无法获取值,因为它是 DBNull。", e)
End Try
End Get
Set
Me(Me.tableaccessory.anountColumn) = value
End Set
End Property
Public Property sno As String
Get
Try
Return CType(Me(Me.tableaccessory.snoColumn),String)
Catch e As InvalidCastException
Throw New StrongTypingException("无法获取值,因为它是 DBNull。", e)
End Try
End Get
Set
Me(Me.tableaccessory.snoColumn) = value
End Set
End Property
Public Function IsExpr2Null() As Boolean
Return Me.IsNull(Me.tableaccessory.Expr2Column)
End Function
Public Sub SetExpr2Null()
Me(Me.tableaccessory.Expr2Column) = System.Convert.DBNull
End Sub
Public Function IsExpr3Null() As Boolean
Return Me.IsNull(Me.tableaccessory.Expr3Column)
End Function
Public Sub SetExpr3Null()
Me(Me.tableaccessory.Expr3Column) = System.Convert.DBNull
End Sub
Public Function IsExpr4Null() As Boolean
Return Me.IsNull(Me.tableaccessory.Expr4Column)
End Function
Public Sub SetExpr4Null()
Me(Me.tableaccessory.Expr4Column) = System.Convert.DBNull
End Sub
Public Function IsExpr5Null() As Boolean
Return Me.IsNull(Me.tableaccessory.Expr5Column)
End Function
Public Sub SetExpr5Null()
Me(Me.tableaccessory.Expr5Column) = System.Convert.DBNull
End Sub
Public Function IsExpr6Null() As Boolean
Return Me.IsNull(Me.tableaccessory.Expr6Column)
End Function
Public Sub SetExpr6Null()
Me(Me.tableaccessory.Expr6Column) = System.Convert.DBNull
End Sub
Public Function IsanameNull() As Boolean
Return Me.IsNull(Me.tableaccessory.anameColumn)
End Function
Public Sub SetanameNull()
Me(Me.tableaccessory.anameColumn) = System.Convert.DBNull
End Sub
Public Function IsanoNull() As Boolean
Return Me.IsNull(Me.tableaccessory.anoColumn)
End Function
Public Sub SetanoNull()
Me(Me.tableaccessory.anoColumn) = System.Convert.DBNull
End Sub
Public Function IsdescriptNull() As Boolean
Return Me.IsNull(Me.tableaccessory.descriptColumn)
End Function
Public Sub SetdescriptNull()
Me(Me.tableaccessory.descriptColumn) = System.Convert.DBNull
End Sub
Public Function IspriceNull() As Boolean
Return Me.IsNull(Me.tableaccessory.priceColumn)
End Function
Public Sub SetpriceNull()
Me(Me.tableaccessory.priceColumn) = System.Convert.DBNull
End Sub
Public Function IsstandNull() As Boolean
Return Me.IsNull(Me.tableaccessory.standColumn)
End Function
Public Sub SetstandNull()
Me(Me.tableaccessory.standColumn) = System.Convert.DBNull
End Sub
Public Function IsanountNull() As Boolean
Return Me.IsNull(Me.tableaccessory.anountColumn)
End Function
Public Sub SetanountNull()
Me(Me.tableaccessory.anountColumn) = System.Convert.DBNull
End Sub
Public Function IssnoNull() As Boolean
Return Me.IsNull(Me.tableaccessory.snoColumn)
End Function
Public Sub SetsnoNull()
Me(Me.tableaccessory.snoColumn) = System.Convert.DBNull
End Sub
End Class
<System.Diagnostics.DebuggerStepThrough()> _
Public Class accessoryRowChangeEvent
Inherits EventArgs
Private eventRow As accessoryRow
Private eventAction As DataRowAction
Public Sub New(ByVal row As accessoryRow, ByVal action As DataRowAction)
MyBase.New
Me.eventRow = row
Me.eventAction = action
End Sub
Public ReadOnly Property Row As accessoryRow
Get
Return Me.eventRow
End Get
End Property
Public ReadOnly Property Action As DataRowAction
Get
Return Me.eventAction
End Get
End Property
End Class
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -