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

📄 dataset2.vb

📁 本系统是航空公司的查询系统 所用的代码是ASP希望大家给点意见
💻 VB
📖 第 1 页 / 共 2 页
字号:
            Get
                Return Me.column经济舱价格
            End Get
        End Property
        
        Public Default ReadOnly Property Item(ByVal index As Integer) As SECTORRow
            Get
                Return CType(Me.Rows(index),SECTORRow)
            End Get
        End Property
        
        Public Event SECTORRowChanged As SECTORRowChangeEventHandler
        
        Public Event SECTORRowChanging As SECTORRowChangeEventHandler
        
        Public Event SECTORRowDeleted As SECTORRowChangeEventHandler
        
        Public Event SECTORRowDeleting As SECTORRowChangeEventHandler
        
        Public Overloads Sub AddSECTORRow(ByVal row As SECTORRow)
            Me.Rows.Add(row)
        End Sub
        
        Public Overloads Function AddSECTORRow(ByVal 地区ID As String, ByVal 飞行地区 As String, ByVal 头等舱价格 As Decimal, ByVal 商业舱价格 As Decimal, ByVal 经济舱价格 As Decimal) As SECTORRow
            Dim rowSECTORRow As SECTORRow = CType(Me.NewRow,SECTORRow)
            rowSECTORRow.ItemArray = New Object() {地区ID, 飞行地区, 头等舱价格, 商业舱价格, 经济舱价格}
            Me.Rows.Add(rowSECTORRow)
            Return rowSECTORRow
        End Function
        
        Public Function FindBy地区ID(ByVal 地区ID As String) As SECTORRow
            Return CType(Me.Rows.Find(New Object() {地区ID}),SECTORRow)
        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 SECTORDataTable = CType(MyBase.Clone,SECTORDataTable)
            cln.InitVars
            Return cln
        End Function
        
        Protected Overrides Function CreateInstance() As DataTable
            Return New SECTORDataTable
        End Function
        
        Friend Sub InitVars()
            Me.column地区ID = Me.Columns("地区ID")
            Me.column飞行地区 = Me.Columns("飞行地区")
            Me.column头等舱价格 = Me.Columns("头等舱价格")
            Me.column商业舱价格 = Me.Columns("商业舱价格")
            Me.column经济舱价格 = Me.Columns("经济舱价格")
        End Sub
        
        Private Sub InitClass()
            Me.column地区ID = New DataColumn("地区ID", GetType(System.String), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.column地区ID)
            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.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地区ID}, true))
            Me.column地区ID.AllowDBNull = false
            Me.column地区ID.Unique = true
            Me.column飞行地区.AllowDBNull = false
            Me.column头等舱价格.AllowDBNull = false
            Me.column商业舱价格.AllowDBNull = false
            Me.column经济舱价格.AllowDBNull = false
        End Sub
        
        Public Function NewSECTORRow() As SECTORRow
            Return CType(Me.NewRow,SECTORRow)
        End Function
        
        Protected Overrides Function NewRowFromBuilder(ByVal builder As DataRowBuilder) As DataRow
            Return New SECTORRow(builder)
        End Function
        
        Protected Overrides Function GetRowType() As System.Type
            Return GetType(SECTORRow)
        End Function
        
        Protected Overrides Sub OnRowChanged(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowChanged(e)
            If (Not (Me.SECTORRowChangedEvent) Is Nothing) Then
                RaiseEvent SECTORRowChanged(Me, New SECTORRowChangeEvent(CType(e.Row,SECTORRow), e.Action))
            End If
        End Sub
        
        Protected Overrides Sub OnRowChanging(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowChanging(e)
            If (Not (Me.SECTORRowChangingEvent) Is Nothing) Then
                RaiseEvent SECTORRowChanging(Me, New SECTORRowChangeEvent(CType(e.Row,SECTORRow), e.Action))
            End If
        End Sub
        
        Protected Overrides Sub OnRowDeleted(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowDeleted(e)
            If (Not (Me.SECTORRowDeletedEvent) Is Nothing) Then
                RaiseEvent SECTORRowDeleted(Me, New SECTORRowChangeEvent(CType(e.Row,SECTORRow), e.Action))
            End If
        End Sub
        
        Protected Overrides Sub OnRowDeleting(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowDeleting(e)
            If (Not (Me.SECTORRowDeletingEvent) Is Nothing) Then
                RaiseEvent SECTORRowDeleting(Me, New SECTORRowChangeEvent(CType(e.Row,SECTORRow), e.Action))
            End If
        End Sub
        
        Public Sub RemoveSECTORRow(ByVal row As SECTORRow)
            Me.Rows.Remove(row)
        End Sub
    End Class
    
    <System.Diagnostics.DebuggerStepThrough()>  _
    Public Class SECTORRow
        Inherits DataRow
        
        Private tableSECTOR As SECTORDataTable
        
        Friend Sub New(ByVal rb As DataRowBuilder)
            MyBase.New(rb)
            Me.tableSECTOR = CType(Me.Table,SECTORDataTable)
        End Sub
        
        Public Property 地区ID As String
            Get
                Return CType(Me(Me.tableSECTOR.地区IDColumn),String)
            End Get
            Set
                Me(Me.tableSECTOR.地区IDColumn) = value
            End Set
        End Property
        
        Public Property 飞行地区 As String
            Get
                Return CType(Me(Me.tableSECTOR.飞行地区Column),String)
            End Get
            Set
                Me(Me.tableSECTOR.飞行地区Column) = value
            End Set
        End Property
        
        Public Property 头等舱价格 As Decimal
            Get
                Return CType(Me(Me.tableSECTOR.头等舱价格Column),Decimal)
            End Get
            Set
                Me(Me.tableSECTOR.头等舱价格Column) = value
            End Set
        End Property
        
        Public Property 商业舱价格 As Decimal
            Get
                Return CType(Me(Me.tableSECTOR.商业舱价格Column),Decimal)
            End Get
            Set
                Me(Me.tableSECTOR.商业舱价格Column) = value
            End Set
        End Property
        
        Public Property 经济舱价格 As Decimal
            Get
                Return CType(Me(Me.tableSECTOR.经济舱价格Column),Decimal)
            End Get
            Set
                Me(Me.tableSECTOR.经济舱价格Column) = value
            End Set
        End Property
    End Class
    
    <System.Diagnostics.DebuggerStepThrough()>  _
    Public Class SECTORRowChangeEvent
        Inherits EventArgs
        
        Private eventRow As SECTORRow
        
        Private eventAction As DataRowAction
        
        Public Sub New(ByVal row As SECTORRow, ByVal action As DataRowAction)
            MyBase.New
            Me.eventRow = row
            Me.eventAction = action
        End Sub
        
        Public ReadOnly Property Row As SECTORRow
            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 + -