📄 dsar230.vb
字号:
End Function
Public Function FindByCustomerID(ByVal CustomerID As String) As AR230Row
Return CType(Me.Rows.Find(New Object() {CustomerID}),AR230Row)
End Function
Public Function GetEnumerator() As System.Collections.IEnumerator Implements System.Collections.IEnumerable.GetEnumerator
Return Me.Rows.GetEnumerator
End Function
Public Overrides Function Clone() As DataTable
Dim cln As AR230DataTable = CType(MyBase.Clone,AR230DataTable)
cln.InitVars
Return cln
End Function
Friend Sub InitVars()
Me.columnCustomerID = Me.Columns("CustomerID")
Me.columnCustomerAttribName = Me.Columns("CustomerAttribName")
Me.columnARBeginning = Me.Columns("ARBeginning")
Me.columnARPeriod = Me.Columns("ARPeriod")
Me.columnARReceive = Me.Columns("ARReceive")
Me.columnARBalance = Me.Columns("ARBalance")
End Sub
Private Sub InitClass()
Me.columnCustomerID = New DataColumn("CustomerID", GetType(System.String), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnCustomerID)
Me.columnCustomerAttribName = New DataColumn("CustomerAttribName", GetType(System.String), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnCustomerAttribName)
Me.columnARBeginning = New DataColumn("ARBeginning", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnARBeginning)
Me.columnARPeriod = New DataColumn("ARPeriod", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnARPeriod)
Me.columnARReceive = New DataColumn("ARReceive", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnARReceive)
Me.columnARBalance = New DataColumn("ARBalance", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnARBalance)
Me.Constraints.Add(New UniqueConstraint("dsAR230Key1", New DataColumn() {Me.columnCustomerID}, true))
Me.columnCustomerID.AllowDBNull = false
Me.columnCustomerID.Unique = true
End Sub
Public Function NewAR230Row() As AR230Row
Return CType(Me.NewRow,AR230Row)
End Function
Protected Overrides Function NewRowFromBuilder(ByVal builder As DataRowBuilder) As DataRow
Return New AR230Row(builder)
End Function
Protected Overrides Function GetRowType() As System.Type
Return GetType(AR230Row)
End Function
Protected Overrides Sub OnRowChanged(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowChanged(e)
If (Not (Me.AR230RowChangedEvent) Is Nothing) Then
RaiseEvent AR230RowChanged(Me, New AR230RowChangeEvent(CType(e.Row,AR230Row), e.Action))
End If
End Sub
Protected Overrides Sub OnRowChanging(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowChanging(e)
If (Not (Me.AR230RowChangingEvent) Is Nothing) Then
RaiseEvent AR230RowChanging(Me, New AR230RowChangeEvent(CType(e.Row,AR230Row), e.Action))
End If
End Sub
Protected Overrides Sub OnRowDeleted(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowDeleted(e)
If (Not (Me.AR230RowDeletedEvent) Is Nothing) Then
RaiseEvent AR230RowDeleted(Me, New AR230RowChangeEvent(CType(e.Row,AR230Row), e.Action))
End If
End Sub
Protected Overrides Sub OnRowDeleting(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowDeleting(e)
If (Not (Me.AR230RowDeletingEvent) Is Nothing) Then
RaiseEvent AR230RowDeleting(Me, New AR230RowChangeEvent(CType(e.Row,AR230Row), e.Action))
End If
End Sub
Public Sub RemoveAR230Row(ByVal row As AR230Row)
Me.Rows.Remove(row)
End Sub
End Class
<System.Diagnostics.DebuggerStepThrough()> _
Public Class AR230Row
Inherits DataRow
Private tableAR230 As AR230DataTable
Friend Sub New(ByVal rb As DataRowBuilder)
MyBase.New(rb)
Me.tableAR230 = CType(Me.Table,AR230DataTable)
End Sub
Public Property CustomerID As String
Get
Return CType(Me(Me.tableAR230.CustomerIDColumn),String)
End Get
Set
Me(Me.tableAR230.CustomerIDColumn) = value
End Set
End Property
Public Property CustomerAttribName As String
Get
Try
Return CType(Me(Me.tableAR230.CustomerAttribNameColumn),String)
Catch e As InvalidCastException
Throw New StrongTypingException("無法取得值,因為它是 DBNull。", e)
End Try
End Get
Set
Me(Me.tableAR230.CustomerAttribNameColumn) = value
End Set
End Property
Public Property ARBeginning As Decimal
Get
Try
Return CType(Me(Me.tableAR230.ARBeginningColumn),Decimal)
Catch e As InvalidCastException
Throw New StrongTypingException("無法取得值,因為它是 DBNull。", e)
End Try
End Get
Set
Me(Me.tableAR230.ARBeginningColumn) = value
End Set
End Property
Public Property ARPeriod As Decimal
Get
Try
Return CType(Me(Me.tableAR230.ARPeriodColumn),Decimal)
Catch e As InvalidCastException
Throw New StrongTypingException("無法取得值,因為它是 DBNull。", e)
End Try
End Get
Set
Me(Me.tableAR230.ARPeriodColumn) = value
End Set
End Property
Public Property ARReceive As Decimal
Get
Try
Return CType(Me(Me.tableAR230.ARReceiveColumn),Decimal)
Catch e As InvalidCastException
Throw New StrongTypingException("無法取得值,因為它是 DBNull。", e)
End Try
End Get
Set
Me(Me.tableAR230.ARReceiveColumn) = value
End Set
End Property
Public Property ARBalance As Decimal
Get
Try
Return CType(Me(Me.tableAR230.ARBalanceColumn),Decimal)
Catch e As InvalidCastException
Throw New StrongTypingException("無法取得值,因為它是 DBNull。", e)
End Try
End Get
Set
Me(Me.tableAR230.ARBalanceColumn) = value
End Set
End Property
Public Function IsCustomerAttribNameNull() As Boolean
Return Me.IsNull(Me.tableAR230.CustomerAttribNameColumn)
End Function
Public Sub SetCustomerAttribNameNull()
Me(Me.tableAR230.CustomerAttribNameColumn) = System.Convert.DBNull
End Sub
Public Function IsARBeginningNull() As Boolean
Return Me.IsNull(Me.tableAR230.ARBeginningColumn)
End Function
Public Sub SetARBeginningNull()
Me(Me.tableAR230.ARBeginningColumn) = System.Convert.DBNull
End Sub
Public Function IsARPeriodNull() As Boolean
Return Me.IsNull(Me.tableAR230.ARPeriodColumn)
End Function
Public Sub SetARPeriodNull()
Me(Me.tableAR230.ARPeriodColumn) = System.Convert.DBNull
End Sub
Public Function IsARReceiveNull() As Boolean
Return Me.IsNull(Me.tableAR230.ARReceiveColumn)
End Function
Public Sub SetARReceiveNull()
Me(Me.tableAR230.ARReceiveColumn) = System.Convert.DBNull
End Sub
Public Function IsARBalanceNull() As Boolean
Return Me.IsNull(Me.tableAR230.ARBalanceColumn)
End Function
Public Sub SetARBalanceNull()
Me(Me.tableAR230.ARBalanceColumn) = System.Convert.DBNull
End Sub
End Class
<System.Diagnostics.DebuggerStepThrough()> _
Public Class AR230RowChangeEvent
Inherits EventArgs
Private eventRow As AR230Row
Private eventAction As DataRowAction
Public Sub New(ByVal row As AR230Row, ByVal action As DataRowAction)
MyBase.New
Me.eventRow = row
Me.eventAction = action
End Sub
Public ReadOnly Property Row As AR230Row
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 + -