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

📄 dataset1.vb

📁 VB 人事管理系统 能够为管理人员提供充足的信息和快捷的查询手段
💻 VB
📖 第 1 页 / 共 5 页
字号:
            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
        
        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 Integer, ByVal 基本工资 As Decimal, ByVal 职务补助 As Decimal, ByVal 房补 As Decimal) 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("工资级别")
            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.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.Decimal), 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.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 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 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 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 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

⌨️ 快捷键说明

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