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

📄 dscustomerregister.vb

📁 酒店管理系统,可以用户与酒店的管理,客房登记、结帐、预定
💻 VB
📖 第 1 页 / 共 3 页
字号:
            Me.column身份证号码.AllowDBNull = false
            Me.column身份证号码.Unique = true
            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 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 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 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 Get入住记录Rows() As 入住记录Row()
            Return CType(Me.GetChildRows(Me.Table.ChildRelations("旅客入住记录")),入住记录Row())
        End Function
    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
        
        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
        
        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

⌨️ 快捷键说明

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