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

📄 dg.vb

📁 一个功能强大的学生公寓管理系统 界面非常友好 十分强大
💻 VB
📖 第 1 页 / 共 3 页
字号:
                Return Me.column水电费合记
            End Get
        End Property
        
        Friend ReadOnly Property 水费超支Column As DataColumn
            Get
                Return Me.column水费超支
            End Get
        End Property
        
        Friend ReadOnly Property _水价_元_立方_Column As DataColumn
            Get
                Return Me.column_水价_元_立方_
            End Get
        End Property
        
        Friend ReadOnly Property 月初电表值Column As DataColumn
            Get
                Return Me.column月初电表值
            End Get
        End Property
        
        Friend ReadOnly Property 月初水表值Column As DataColumn
            Get
                Return Me.column月初水表值
            End Get
        End Property
        
        Friend ReadOnly Property 月底电表值Column As DataColumn
            Get
                Return Me.column月底电表值
            End Get
        End Property
        
        Friend ReadOnly Property 月底水表值Column As DataColumn
            Get
                Return Me.column月底水表值
            End Get
        End Property
        
        Public Default ReadOnly Property Item(ByVal index As Integer) As 水电费管理Row
            Get
                Return CType(Me.Rows(index),水电费管理Row)
            End Get
        End Property
        
        Public Event 水电费管理RowChanged As 水电费管理RowChangeEventHandler
        
        Public Event 水电费管理RowChanging As 水电费管理RowChangeEventHandler
        
        Public Event 水电费管理RowDeleted As 水电费管理RowChangeEventHandler
        
        Public Event 水电费管理RowDeleting As 水电费管理RowChangeEventHandler
        
        Public Overloads Sub Add水电费管理Row(ByVal row As 水电费管理Row)
            Me.Rows.Add(row)
        End Sub
        
        Public Overloads Function Add水电费管理Row(ByVal 电费超支 As Integer, ByVal _电价_元_度_ As Decimal, ByVal 栋号 As String, ByVal 房号 As String, ByVal 免费电量 As Integer, ByVal 免费水量 As Integer, ByVal 时间 As String, ByVal 是否交费 As String, ByVal 水电费合记 As Decimal, ByVal 水费超支 As Integer, ByVal _水价_元_立方_ As Decimal, ByVal 月初电表值 As Integer, ByVal 月初水表值 As Integer, ByVal 月底电表值 As Integer, ByVal 月底水表值 As Integer) As 水电费管理Row
            Dim row水电费管理Row As 水电费管理Row = CType(Me.NewRow,水电费管理Row)
            row水电费管理Row.ItemArray = New Object() {电费超支, _电价_元_度_, 栋号, 房号, 免费电量, 免费水量, 时间, 是否交费, 水电费合记, 水费超支, _水价_元_立方_, 月初电表值, 月初水表值, 月底电表值, 月底水表值}
            Me.Rows.Add(row水电费管理Row)
            Return row水电费管理Row
        End Function
        
        Public Function FindBy栋号房号时间(ByVal 栋号 As String, ByVal 房号 As String, ByVal 时间 As String) As 水电费管理Row
            Return CType(Me.Rows.Find(New Object() {栋号, 房号, 时间}),水电费管理Row)
        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 水电费管理DataTable = CType(MyBase.Clone,水电费管理DataTable)
            cln.InitVars
            Return cln
        End Function
        
        Protected Overrides Function CreateInstance() As DataTable
            Return New 水电费管理DataTable
        End Function
        
        Friend Sub InitVars()
            Me.column电费超支 = Me.Columns("电费超支")
            Me.column_电价_元_度_ = Me.Columns("电价(元/度)")
            Me.column栋号 = Me.Columns("栋号")
            Me.column房号 = Me.Columns("房号")
            Me.column免费电量 = Me.Columns("免费电量")
            Me.column免费水量 = Me.Columns("免费水量")
            Me.column时间 = Me.Columns("时间")
            Me.column是否交费 = Me.Columns("是否交费")
            Me.column水电费合记 = Me.Columns("水电费合记")
            Me.column水费超支 = Me.Columns("水费超支")
            Me.column_水价_元_立方_ = Me.Columns("水价(元/立方)")
            Me.column月初电表值 = Me.Columns("月初电表值")
            Me.column月初水表值 = Me.Columns("月初水表值")
            Me.column月底电表值 = Me.Columns("月底电表值")
            Me.column月底水表值 = Me.Columns("月底水表值")
        End Sub
        
        Private Sub InitClass()
            Me.column电费超支 = New DataColumn("电费超支", GetType(System.Int32), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.column电费超支)
            Me.column_电价_元_度_ = New DataColumn("电价(元/度)", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.column_电价_元_度_)
            Me.column栋号 = New DataColumn("栋号", GetType(System.String), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.column栋号)
            Me.column房号 = New DataColumn("房号", GetType(System.String), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.column房号)
            Me.column免费电量 = New DataColumn("免费电量", GetType(System.Int32), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.column免费电量)
            Me.column免费水量 = New DataColumn("免费水量", GetType(System.Int32), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.column免费水量)
            Me.column时间 = New DataColumn("时间", GetType(System.String), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.column时间)
            Me.column是否交费 = New DataColumn("是否交费", GetType(System.String), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.column是否交费)
            Me.column水电费合记 = New DataColumn("水电费合记", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.column水电费合记)
            Me.column水费超支 = New DataColumn("水费超支", GetType(System.Int32), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.column水费超支)
            Me.column_水价_元_立方_ = New DataColumn("水价(元/立方)", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.column_水价_元_立方_)
            Me.column月初电表值 = New DataColumn("月初电表值", GetType(System.Int32), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.column月初电表值)
            Me.column月初水表值 = New DataColumn("月初水表值", GetType(System.Int32), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.column月初水表值)
            Me.column月底电表值 = New DataColumn("月底电表值", GetType(System.Int32), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.column月底电表值)
            Me.column月底水表值 = New DataColumn("月底水表值", GetType(System.Int32), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.column月底水表值)
            Me.Constraints.Add(New UniqueConstraint("Constraint1", New DataColumn() {Me.column栋号, Me.column房号, Me.column时间}, true))
            Me.column栋号.AllowDBNull = false
            Me.column房号.AllowDBNull = false
            Me.column时间.AllowDBNull = false
        End Sub
        
        Public Function New水电费管理Row() As 水电费管理Row
            Return CType(Me.NewRow,水电费管理Row)
        End Function
        
        Protected Overrides Function NewRowFromBuilder(ByVal builder As DataRowBuilder) As DataRow
            Return New 水电费管理Row(builder)
        End Function
        
        Protected Overrides Function GetRowType() As System.Type
            Return GetType(水电费管理Row)
        End Function
        
        Protected Overrides Sub OnRowChanged(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowChanged(e)
            If (Not (Me.水电费管理RowChangedEvent) Is Nothing) Then
                RaiseEvent 水电费管理RowChanged(Me, New 水电费管理RowChangeEvent(CType(e.Row,水电费管理Row), e.Action))
            End If
        End Sub
        
        Protected Overrides Sub OnRowChanging(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowChanging(e)
            If (Not (Me.水电费管理RowChangingEvent) Is Nothing) Then
                RaiseEvent 水电费管理RowChanging(Me, New 水电费管理RowChangeEvent(CType(e.Row,水电费管理Row), e.Action))
            End If
        End Sub
        
        Protected Overrides Sub OnRowDeleted(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowDeleted(e)
            If (Not (Me.水电费管理RowDeletedEvent) Is Nothing) Then
                RaiseEvent 水电费管理RowDeleted(Me, New 水电费管理RowChangeEvent(CType(e.Row,水电费管理Row), e.Action))
            End If
        End Sub
        
        Protected Overrides Sub OnRowDeleting(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowDeleting(e)
            If (Not (Me.水电费管理RowDeletingEvent) Is Nothing) Then
                RaiseEvent 水电费管理RowDeleting(Me, New 水电费管理RowChangeEvent(CType(e.Row,水电费管理Row), e.Action))
            End If
        End Sub
        
        Public Sub Remove水电费管理Row(ByVal row As 水电费管理Row)
            Me.Rows.Remove(row)
        End Sub
    End Class
    
    <System.Diagnostics.DebuggerStepThrough()>  _
    Public Class 水电费管理Row
        Inherits DataRow
        
        Private table水电费管理 As 水电费管理DataTable
        
        Friend Sub New(ByVal rb As DataRowBuilder)
            MyBase.New(rb)
            Me.table水电费管理 = CType(Me.Table,水电费管理DataTable)
        End Sub
        
        Public Property 电费超支 As Integer
            Get
                Try 
                    Return CType(Me(Me.table水电费管理.电费超支Column),Integer)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("无法获取值,因为它是 DBNull。", e)
                End Try
            End Get
            Set
                Me(Me.table水电费管理.电费超支Column) = value
            End Set
        End Property
        
        Public Property _电价_元_度_ As Decimal
            Get
                Try 
                    Return CType(Me(Me.table水电费管理._电价_元_度_Column),Decimal)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("无法获取值,因为它是 DBNull。", e)
                End Try
            End Get
            Set
                Me(Me.table水电费管理._电价_元_度_Column) = value
            End Set
        End Property
        
        Public Property 栋号 As String
            Get
                Return CType(Me(Me.table水电费管理.栋号Column),String)
            End Get
            Set
                Me(Me.table水电费管理.栋号Column) = value
            End Set
        End Property
        
        Public Property 房号 As String
            Get
                Return CType(Me(Me.table水电费管理.房号Column),String)
            End Get
            Set
                Me(Me.table水电费管理.房号Column) = value
            End Set
        End Property
        
        Public Property 免费电量 As Integer
            Get
                Try 
                    Return CType(Me(Me.table水电费管理.免费电量Column),Integer)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("无法获取值,因为它是 DBNull。", e)
                End Try
            End Get
            Set
                Me(Me.table水电费管理.免费电量Column) = value
            End Set
        End Property
        

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -