⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dsin230.vb

📁 通用进销存-visual basic编写
💻 VB
📖 第 1 页 / 共 2 页
字号:
            Me.columnProductName = New DataColumn("ProductName", GetType(System.String), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnProductName)
            Me.columnBGQty = New DataColumn("BGQty", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnBGQty)
            Me.columnPAQty = New DataColumn("PAQty", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnPAQty)
            Me.columnPRQty = New DataColumn("PRQty", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnPRQty)
            Me.columnSAQty = New DataColumn("SAQty", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnSAQty)
            Me.columnSRQty = New DataColumn("SRQty", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnSRQty)
            Me.columnOAQty = New DataColumn("OAQty", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnOAQty)
            Me.columnORQty = New DataColumn("ORQty", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnORQty)
            Me.columnEDQty = New DataColumn("EDQty", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnEDQty)
            Me.Constraints.Add(New UniqueConstraint("dsIN230Key1", New DataColumn() {Me.columnProductID}, true))
            Me.columnProductID.AllowDBNull = false
            Me.columnProductID.Unique = true
        End Sub
        
        Public Function NewIN230Row() As IN230Row
            Return CType(Me.NewRow,IN230Row)
        End Function
        
        Protected Overrides Function NewRowFromBuilder(ByVal builder As DataRowBuilder) As DataRow
            Return New IN230Row(builder)
        End Function
        
        Protected Overrides Function GetRowType() As System.Type
            Return GetType(IN230Row)
        End Function
        
        Protected Overrides Sub OnRowChanged(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowChanged(e)
            If (Not (Me.IN230RowChangedEvent) Is Nothing) Then
                RaiseEvent IN230RowChanged(Me, New IN230RowChangeEvent(CType(e.Row,IN230Row), e.Action))
            End If
        End Sub
        
        Protected Overrides Sub OnRowChanging(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowChanging(e)
            If (Not (Me.IN230RowChangingEvent) Is Nothing) Then
                RaiseEvent IN230RowChanging(Me, New IN230RowChangeEvent(CType(e.Row,IN230Row), e.Action))
            End If
        End Sub
        
        Protected Overrides Sub OnRowDeleted(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowDeleted(e)
            If (Not (Me.IN230RowDeletedEvent) Is Nothing) Then
                RaiseEvent IN230RowDeleted(Me, New IN230RowChangeEvent(CType(e.Row,IN230Row), e.Action))
            End If
        End Sub
        
        Protected Overrides Sub OnRowDeleting(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowDeleting(e)
            If (Not (Me.IN230RowDeletingEvent) Is Nothing) Then
                RaiseEvent IN230RowDeleting(Me, New IN230RowChangeEvent(CType(e.Row,IN230Row), e.Action))
            End If
        End Sub
        
        Public Sub RemoveIN230Row(ByVal row As IN230Row)
            Me.Rows.Remove(row)
        End Sub
    End Class
    
    <System.Diagnostics.DebuggerStepThrough()>  _
    Public Class IN230Row
        Inherits DataRow
        
        Private tableIN230 As IN230DataTable
        
        Friend Sub New(ByVal rb As DataRowBuilder)
            MyBase.New(rb)
            Me.tableIN230 = CType(Me.Table,IN230DataTable)
        End Sub
        
        Public Property ProductID As String
            Get
                Return CType(Me(Me.tableIN230.ProductIDColumn),String)
            End Get
            Set
                Me(Me.tableIN230.ProductIDColumn) = value
            End Set
        End Property
        
        Public Property ProductName As String
            Get
                Try 
                    Return CType(Me(Me.tableIN230.ProductNameColumn),String)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("無法取得值,因為它是 DBNull。", e)
                End Try
            End Get
            Set
                Me(Me.tableIN230.ProductNameColumn) = value
            End Set
        End Property
        
        Public Property BGQty As Decimal
            Get
                Try 
                    Return CType(Me(Me.tableIN230.BGQtyColumn),Decimal)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("無法取得值,因為它是 DBNull。", e)
                End Try
            End Get
            Set
                Me(Me.tableIN230.BGQtyColumn) = value
            End Set
        End Property
        
        Public Property PAQty As Decimal
            Get
                Try 
                    Return CType(Me(Me.tableIN230.PAQtyColumn),Decimal)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("無法取得值,因為它是 DBNull。", e)
                End Try
            End Get
            Set
                Me(Me.tableIN230.PAQtyColumn) = value
            End Set
        End Property
        
        Public Property PRQty As Decimal
            Get
                Try 
                    Return CType(Me(Me.tableIN230.PRQtyColumn),Decimal)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("無法取得值,因為它是 DBNull。", e)
                End Try
            End Get
            Set
                Me(Me.tableIN230.PRQtyColumn) = value
            End Set
        End Property
        
        Public Property SAQty As Decimal
            Get
                Try 
                    Return CType(Me(Me.tableIN230.SAQtyColumn),Decimal)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("無法取得值,因為它是 DBNull。", e)
                End Try
            End Get
            Set
                Me(Me.tableIN230.SAQtyColumn) = value
            End Set
        End Property
        
        Public Property SRQty As Decimal
            Get
                Try 
                    Return CType(Me(Me.tableIN230.SRQtyColumn),Decimal)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("無法取得值,因為它是 DBNull。", e)
                End Try
            End Get
            Set
                Me(Me.tableIN230.SRQtyColumn) = value
            End Set
        End Property
        
        Public Property OAQty As Decimal
            Get
                Try 
                    Return CType(Me(Me.tableIN230.OAQtyColumn),Decimal)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("無法取得值,因為它是 DBNull。", e)
                End Try
            End Get
            Set
                Me(Me.tableIN230.OAQtyColumn) = value
            End Set
        End Property
        
        Public Property ORQty As Decimal
            Get
                Try 
                    Return CType(Me(Me.tableIN230.ORQtyColumn),Decimal)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("無法取得值,因為它是 DBNull。", e)
                End Try
            End Get
            Set
                Me(Me.tableIN230.ORQtyColumn) = value
            End Set
        End Property
        
        Public Property EDQty As Decimal
            Get
                Try 
                    Return CType(Me(Me.tableIN230.EDQtyColumn),Decimal)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("無法取得值,因為它是 DBNull。", e)
                End Try
            End Get
            Set
                Me(Me.tableIN230.EDQtyColumn) = value
            End Set
        End Property
        
        Public Function IsProductNameNull() As Boolean
            Return Me.IsNull(Me.tableIN230.ProductNameColumn)
        End Function
        
        Public Sub SetProductNameNull()
            Me(Me.tableIN230.ProductNameColumn) = System.Convert.DBNull
        End Sub
        
        Public Function IsBGQtyNull() As Boolean
            Return Me.IsNull(Me.tableIN230.BGQtyColumn)
        End Function
        
        Public Sub SetBGQtyNull()
            Me(Me.tableIN230.BGQtyColumn) = System.Convert.DBNull
        End Sub
        
        Public Function IsPAQtyNull() As Boolean
            Return Me.IsNull(Me.tableIN230.PAQtyColumn)
        End Function
        
        Public Sub SetPAQtyNull()
            Me(Me.tableIN230.PAQtyColumn) = System.Convert.DBNull
        End Sub
        
        Public Function IsPRQtyNull() As Boolean
            Return Me.IsNull(Me.tableIN230.PRQtyColumn)
        End Function
        
        Public Sub SetPRQtyNull()
            Me(Me.tableIN230.PRQtyColumn) = System.Convert.DBNull
        End Sub
        
        Public Function IsSAQtyNull() As Boolean
            Return Me.IsNull(Me.tableIN230.SAQtyColumn)
        End Function
        
        Public Sub SetSAQtyNull()
            Me(Me.tableIN230.SAQtyColumn) = System.Convert.DBNull
        End Sub
        
        Public Function IsSRQtyNull() As Boolean
            Return Me.IsNull(Me.tableIN230.SRQtyColumn)
        End Function
        
        Public Sub SetSRQtyNull()
            Me(Me.tableIN230.SRQtyColumn) = System.Convert.DBNull
        End Sub
        
        Public Function IsOAQtyNull() As Boolean
            Return Me.IsNull(Me.tableIN230.OAQtyColumn)
        End Function
        
        Public Sub SetOAQtyNull()
            Me(Me.tableIN230.OAQtyColumn) = System.Convert.DBNull
        End Sub
        
        Public Function IsORQtyNull() As Boolean
            Return Me.IsNull(Me.tableIN230.ORQtyColumn)
        End Function
        
        Public Sub SetORQtyNull()
            Me(Me.tableIN230.ORQtyColumn) = System.Convert.DBNull
        End Sub
        
        Public Function IsEDQtyNull() As Boolean
            Return Me.IsNull(Me.tableIN230.EDQtyColumn)
        End Function
        
        Public Sub SetEDQtyNull()
            Me(Me.tableIN230.EDQtyColumn) = System.Convert.DBNull
        End Sub
    End Class
    
    <System.Diagnostics.DebuggerStepThrough()>  _
    Public Class IN230RowChangeEvent
        Inherits EventArgs
        
        Private eventRow As IN230Row
        
        Private eventAction As DataRowAction
        
        Public Sub New(ByVal row As IN230Row, ByVal action As DataRowAction)
            MyBase.New
            Me.eventRow = row
            Me.eventAction = action
        End Sub
        
        Public ReadOnly Property Row As IN230Row
            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 + -