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

📄 ds0.vb

📁 高校科研管理系统
💻 VB
📖 第 1 页 / 共 2 页
字号:
            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.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.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.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.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 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 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 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 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 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 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 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
        
        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
        
        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
        
        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
        
        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
        
        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
        
        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
        
        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
End Class

⌨️ 快捷键说明

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