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

📄 da.vb

📁 一个功能强大的学生公寓管理系统 界面非常友好 十分强大
💻 VB
📖 第 1 页 / 共 5 页
字号:
        
        Public Sub Set晚归原因Null()
            Me(Me.table晚归记录.晚归原因Column) = System.Convert.DBNull
        End Sub
        
        Public Function Is备注Null() As Boolean
            Return Me.IsNull(Me.table晚归记录.备注Column)
        End Function
        
        Public Sub Set备注Null()
            Me(Me.table晚归记录.备注Column) = System.Convert.DBNull
        End Sub
    End Class
    
    <System.Diagnostics.DebuggerStepThrough()>  _
    Public Class 晚归记录RowChangeEvent
        Inherits EventArgs
        
        Private eventRow As 晚归记录Row
        
        Private eventAction As DataRowAction
        
        Public Sub New(ByVal row As 晚归记录Row, ByVal action As DataRowAction)
            MyBase.New
            Me.eventRow = row
            Me.eventAction = action
        End Sub
        
        Public ReadOnly Property Row As 晚归记录Row
            Get
                Return Me.eventRow
            End Get
        End Property
        
        Public ReadOnly Property Action As DataRowAction
            Get
                Return Me.eventAction
            End Get
        End Property
    End Class
    
    <System.Diagnostics.DebuggerStepThrough()>  _
    Public Class 用户DataTable
        Inherits DataTable
        Implements System.Collections.IEnumerable
        
        Private column用户名 As DataColumn
        
        Private column密码 As DataColumn
        
        Friend Sub New()
            MyBase.New("用户")
            Me.InitClass
        End Sub
        
        Friend Sub New(ByVal table As DataTable)
            MyBase.New(table.TableName)
            If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
                Me.CaseSensitive = table.CaseSensitive
            End If
            If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
                Me.Locale = table.Locale
            End If
            If (table.Namespace <> table.DataSet.Namespace) Then
                Me.Namespace = table.Namespace
            End If
            Me.Prefix = table.Prefix
            Me.MinimumCapacity = table.MinimumCapacity
            Me.DisplayExpression = table.DisplayExpression
        End Sub
        
        <System.ComponentModel.Browsable(false)>  _
        Public ReadOnly Property Count As Integer
            Get
                Return Me.Rows.Count
            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 String, ByVal 密码 As String) 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) 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("密码")
        End Sub
        
        Private Sub InitClass()
            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.Constraints.Add(New UniqueConstraint("Constraint1", New DataColumn() {Me.column用户名}, true))
            Me.column用户名.AllowDBNull = false
            Me.column用户名.Unique = true
        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 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
                Try 
                    Return CType(Me(Me.table用户.密码Column),String)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("无法获取值,因为它是 DBNull。", e)
                End Try
            End Get
            Set
                Me(Me.table用户.密码Column) = value
            End Set
        End Property
        
        Public Function Is密码Null() As Boolean
            Return Me.IsNull(Me.table用户.密码Column)
        End Function
        
        Public Sub Set密码Null()
            Me(Me.table用户.密码Column) = System.Convert.DBNull
        End Sub
    End Class
    
    <System.Diagnostics.DebuggerStepThrough()>  _
    Public Class 用户RowChangeEvent
        Inherits EventArgs
        
        Private eventRow As 用户Row
        
        Private eventAction As DataRowAction
        
        Public Sub New(ByVal row As 用户Row, ByVal action As DataRowAction)
            MyBase.New
            Me.eventRow = row
            Me.eventAction = action
        End Sub
        
        Public ReadOnly Property Row As 用户Row
            Get
                Return Me.eventRow
            End Get
        End Property
        
        Public ReadOnly Property Action As DataRowAction
            Get
                Return Me.eventAction
            End Get
        End Property
    End Class
    
    <System.Diagnostics.DebuggerStepThrough()>  _
    Public Class 公益活动DataTable
        Inherits DataTable
        Implements System.Collections.IEnumerable
        
        Private column日期 As DataColumn
        
        Private column学号 As DataColumn
        
        Private column事务 As DataColumn
        
        Private column加分 As DataColumn
        
        Private column备注 As DataColumn
        
        Friend Sub New()
            MyBase.New("公益活动")
            Me.InitClass
        End Sub
        
        Friend Sub New(ByVal table As DataTable)
            MyBase.New(table.TableName)
            If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
                Me.CaseSensitive = table.CaseSensitive
            End If
            If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
                Me.Locale = table.Locale
            End If
            If (table.Namespace <> table.DataSet.Namespace) Then
                Me.Namespace = table.Namespace
            End If
            Me.Prefix = table.Prefix
            Me.MinimumCapacity = table.MinimumCapacity
            Me.DisplayExpression = table.DisplayExpression
        End Sub
        
        <System.ComponentModel.Browsable(false)>  _
        Public ReadOnly Property Count As Integer
            Get
                Return Me.Rows.Count
            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
        

⌨️ 快捷键说明

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