📄 dsap260.vb
字号:
Me.columnSupplierAttribName = Me.Columns("SupplierAttribName")
Me.columnOVP0030 = Me.Columns("OVP0030")
Me.columnOVP3160 = Me.Columns("OVP3160")
Me.columnOVP6190 = Me.Columns("OVP6190")
Me.columnOVP9120 = Me.Columns("OVP9120")
Me.columnOVP1200 = Me.Columns("OVP1200")
Me.columnOVPBalance = Me.Columns("OVPBalance")
End Sub
Private Sub InitClass()
Me.columnSupplierID = New DataColumn("SupplierID", GetType(System.String), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnSupplierID)
Me.columnSupplierAttribName = New DataColumn("SupplierAttribName", GetType(System.String), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnSupplierAttribName)
Me.columnOVP0030 = New DataColumn("OVP0030", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnOVP0030)
Me.columnOVP3160 = New DataColumn("OVP3160", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnOVP3160)
Me.columnOVP6190 = New DataColumn("OVP6190", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnOVP6190)
Me.columnOVP9120 = New DataColumn("OVP9120", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnOVP9120)
Me.columnOVP1200 = New DataColumn("OVP1200", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnOVP1200)
Me.columnOVPBalance = New DataColumn("OVPBalance", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnOVPBalance)
Me.Constraints.Add(New UniqueConstraint("dsAP260Key1", New DataColumn() {Me.columnSupplierID}, false))
Me.columnSupplierID.AllowDBNull = false
Me.columnSupplierID.Unique = true
End Sub
Public Function NewAP260Row() As AP260Row
Return CType(Me.NewRow,AP260Row)
End Function
Protected Overrides Function NewRowFromBuilder(ByVal builder As DataRowBuilder) As DataRow
Return New AP260Row(builder)
End Function
Protected Overrides Function GetRowType() As System.Type
Return GetType(AP260Row)
End Function
Protected Overrides Sub OnRowChanged(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowChanged(e)
If (Not (Me.AP260RowChangedEvent) Is Nothing) Then
RaiseEvent AP260RowChanged(Me, New AP260RowChangeEvent(CType(e.Row,AP260Row), e.Action))
End If
End Sub
Protected Overrides Sub OnRowChanging(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowChanging(e)
If (Not (Me.AP260RowChangingEvent) Is Nothing) Then
RaiseEvent AP260RowChanging(Me, New AP260RowChangeEvent(CType(e.Row,AP260Row), e.Action))
End If
End Sub
Protected Overrides Sub OnRowDeleted(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowDeleted(e)
If (Not (Me.AP260RowDeletedEvent) Is Nothing) Then
RaiseEvent AP260RowDeleted(Me, New AP260RowChangeEvent(CType(e.Row,AP260Row), e.Action))
End If
End Sub
Protected Overrides Sub OnRowDeleting(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowDeleting(e)
If (Not (Me.AP260RowDeletingEvent) Is Nothing) Then
RaiseEvent AP260RowDeleting(Me, New AP260RowChangeEvent(CType(e.Row,AP260Row), e.Action))
End If
End Sub
Public Sub RemoveAP260Row(ByVal row As AP260Row)
Me.Rows.Remove(row)
End Sub
End Class
<System.Diagnostics.DebuggerStepThrough()> _
Public Class AP260Row
Inherits DataRow
Private tableAP260 As AP260DataTable
Friend Sub New(ByVal rb As DataRowBuilder)
MyBase.New(rb)
Me.tableAP260 = CType(Me.Table,AP260DataTable)
End Sub
Public Property SupplierID As String
Get
Return CType(Me(Me.tableAP260.SupplierIDColumn),String)
End Get
Set
Me(Me.tableAP260.SupplierIDColumn) = value
End Set
End Property
Public Property SupplierAttribName As String
Get
Try
Return CType(Me(Me.tableAP260.SupplierAttribNameColumn),String)
Catch e As InvalidCastException
Throw New StrongTypingException("無法取得值,因為它是 DBNull。", e)
End Try
End Get
Set
Me(Me.tableAP260.SupplierAttribNameColumn) = value
End Set
End Property
Public Property OVP0030 As Decimal
Get
Try
Return CType(Me(Me.tableAP260.OVP0030Column),Decimal)
Catch e As InvalidCastException
Throw New StrongTypingException("無法取得值,因為它是 DBNull。", e)
End Try
End Get
Set
Me(Me.tableAP260.OVP0030Column) = value
End Set
End Property
Public Property OVP3160 As Decimal
Get
Try
Return CType(Me(Me.tableAP260.OVP3160Column),Decimal)
Catch e As InvalidCastException
Throw New StrongTypingException("無法取得值,因為它是 DBNull。", e)
End Try
End Get
Set
Me(Me.tableAP260.OVP3160Column) = value
End Set
End Property
Public Property OVP6190 As Decimal
Get
Try
Return CType(Me(Me.tableAP260.OVP6190Column),Decimal)
Catch e As InvalidCastException
Throw New StrongTypingException("無法取得值,因為它是 DBNull。", e)
End Try
End Get
Set
Me(Me.tableAP260.OVP6190Column) = value
End Set
End Property
Public Property OVP9120 As Decimal
Get
Try
Return CType(Me(Me.tableAP260.OVP9120Column),Decimal)
Catch e As InvalidCastException
Throw New StrongTypingException("無法取得值,因為它是 DBNull。", e)
End Try
End Get
Set
Me(Me.tableAP260.OVP9120Column) = value
End Set
End Property
Public Property OVP1200 As Decimal
Get
Try
Return CType(Me(Me.tableAP260.OVP1200Column),Decimal)
Catch e As InvalidCastException
Throw New StrongTypingException("無法取得值,因為它是 DBNull。", e)
End Try
End Get
Set
Me(Me.tableAP260.OVP1200Column) = value
End Set
End Property
Public Property OVPBalance As Decimal
Get
Try
Return CType(Me(Me.tableAP260.OVPBalanceColumn),Decimal)
Catch e As InvalidCastException
Throw New StrongTypingException("無法取得值,因為它是 DBNull。", e)
End Try
End Get
Set
Me(Me.tableAP260.OVPBalanceColumn) = value
End Set
End Property
Public Function IsSupplierAttribNameNull() As Boolean
Return Me.IsNull(Me.tableAP260.SupplierAttribNameColumn)
End Function
Public Sub SetSupplierAttribNameNull()
Me(Me.tableAP260.SupplierAttribNameColumn) = System.Convert.DBNull
End Sub
Public Function IsOVP0030Null() As Boolean
Return Me.IsNull(Me.tableAP260.OVP0030Column)
End Function
Public Sub SetOVP0030Null()
Me(Me.tableAP260.OVP0030Column) = System.Convert.DBNull
End Sub
Public Function IsOVP3160Null() As Boolean
Return Me.IsNull(Me.tableAP260.OVP3160Column)
End Function
Public Sub SetOVP3160Null()
Me(Me.tableAP260.OVP3160Column) = System.Convert.DBNull
End Sub
Public Function IsOVP6190Null() As Boolean
Return Me.IsNull(Me.tableAP260.OVP6190Column)
End Function
Public Sub SetOVP6190Null()
Me(Me.tableAP260.OVP6190Column) = System.Convert.DBNull
End Sub
Public Function IsOVP9120Null() As Boolean
Return Me.IsNull(Me.tableAP260.OVP9120Column)
End Function
Public Sub SetOVP9120Null()
Me(Me.tableAP260.OVP9120Column) = System.Convert.DBNull
End Sub
Public Function IsOVP1200Null() As Boolean
Return Me.IsNull(Me.tableAP260.OVP1200Column)
End Function
Public Sub SetOVP1200Null()
Me(Me.tableAP260.OVP1200Column) = System.Convert.DBNull
End Sub
Public Function IsOVPBalanceNull() As Boolean
Return Me.IsNull(Me.tableAP260.OVPBalanceColumn)
End Function
Public Sub SetOVPBalanceNull()
Me(Me.tableAP260.OVPBalanceColumn) = System.Convert.DBNull
End Sub
End Class
<System.Diagnostics.DebuggerStepThrough()> _
Public Class AP260RowChangeEvent
Inherits EventArgs
Private eventRow As AP260Row
Private eventAction As DataRowAction
Public Sub New(ByVal row As AP260Row, ByVal action As DataRowAction)
MyBase.New
Me.eventRow = row
Me.eventAction = action
End Sub
Public ReadOnly Property Row As AP260Row
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 + -