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

📄 sourcecode.txt

📁 一个国外的宾馆管理程序
💻 TXT
📖 第 1 页 / 共 5 页
字号:
    With Data1.Recordset
        s16 = .Fields("Status")
    End With
    If s16 = "A" Then lblFT1 = "Available"
    If s16 = "R" Then lblFT1 = "Reserved"
    If s16 = "U" Then lblFT1 = "Used"
    If s16 = "O" Then lblFT1 = "Available"
End If
With Data1.Recordset
    .Index = "seeker"
    .Seek "=", "17"
End With
If Data1.Recordset.NoMatch = False Then
    With Data1.Recordset
        s17 = .Fields("Status")
    End With
    If s17 = "A" Then lblFT2 = "Available"
    If s17 = "R" Then lblFT2 = "Reserved"
    If s17 = "U" Then lblFT2 = "Used"
    If s17 = "O" Then lblFT2 = "Available"
End If
With Data1.Recordset
    .Index = "seeker"
    .Seek "=", "18"
End With
If Data1.Recordset.NoMatch = False Then
    With Data1.Recordset
        s18 = .Fields("Status")
    End With
    If s18 = "A" Then lblFT3 = "Available"
    If s18 = "R" Then lblFT3 = "Reserved"
    If s18 = "U" Then lblFT3 = "Used"
    If s18 = "O" Then lblFT3 = "Available"
End If

With Data2.Recordset
    .Index = "seeker"
    .Seek "=", "StandardSingle"
End With
If Data2.Recordset.NoMatch = False Then
    With Data2.Recordset
        frStanSingle.Caption = "Single [ " & .Fields("PerDay") & " / Day ]"
    End With
End If
With Data2.Recordset
    .Index = "seeker"
    .Seek "=", "StandardDouble"
End With
If Data2.Recordset.NoMatch = False Then
    With Data2.Recordset
        frStanDouble.Caption = "Double [ " & .Fields("PerDay") & " / Day ]"
    End With
End If
With Data2.Recordset
    .Index = "seeker"
    .Seek "=", "VIPSingle"
End With
If Data2.Recordset.NoMatch = False Then
    With Data2.Recordset
        frVipSingle.Caption = "Single [ " & .Fields("PerDay") & " / Day ]"
    End With
End If
With Data2.Recordset
    .Index = "seeker"
    .Seek "=", "VIPDouble"
End With
If Data2.Recordset.NoMatch = False Then
    With Data2.Recordset
        frVipDouble.Caption = "Double [ " & .Fields("PerDay") & " / Day ]"
    End With
End If
With Data2.Recordset
    .Index = "seeker"
    .Seek "=", "FamilyDouble"
End With
If Data2.Recordset.NoMatch = False Then
    With Data2.Recordset
        frFamilyDouble.Caption = "Double [ " & .Fields("PerDay") & " / Day ]"
    End With
End If
With Data2.Recordset
    .Index = "seeker"
    .Seek "=", "FamilyTriple"
End With
If Data2.Recordset.NoMatch = False Then
    With Data2.Recordset
        frFamilyTriple.Caption = "Triple [ " & .Fields("PerDay") & " / Day ]"
    End With
End If
Timer1.Enabled = False
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
    Case 1
        Timer1.Enabled = True
    Case 2
        Unload Me
End Select
End Sub

Private Sub Form_Load()
Height = 6750
Top = 750
Left = 0
SSTab1.Tab = 0
dtStatus1.DatabaseName = App.Path + "\" + "Status.mdb"
dtStatus2.DatabaseName = App.Path + "\" + "Status.mdb"
dtStatus3.DatabaseName = App.Path + "\" + "Status.mdb"
Data1.DatabaseName = App.Path + "\" + "MasterList.mdb"
Data2.DatabaseName = App.Path + "\" + "Rooms.mdb"
dtStatus1.RecordSource = "Rooms"
dtStatus2.RecordSource = "Rooms"
dtStatus3.RecordSource = "Rooms"
Data1.RecordSource = "Clients"
Data2.RecordSource = "Rate"
End Sub

Private Sub Timer1_Timer()
'************************* Room 4 ****************************
With dtStatus1.Recordset
    .Index = "seeker"
    .Seek "=", "4"
End With
If dtStatus1.Recordset.NoMatch = False Then
    With dtStatus1.Recordset
        s4 = .Fields("Status")
    End With
End If
SSTab1.TabCaption(0) = "Room 1" & " [" & s4 & "]"
If s4 = "A" Then
    Toolbar1.Buttons(1).Enabled = False
    Toolbar1.Buttons(2).Enabled = False
    Toolbar1.Buttons(3).Enabled = False
    Toolbar1.Buttons(4).Enabled = True
    Toolbar1.Buttons(5).Enabled = False
    frRoom1.Enabled = False
    With dtStatus1.Recordset
        txtName1 = .Fields("Name")
        txtAddress1 = .Fields("Address")
        txtAge1 = .Fields("Age")
        cmdGender1 = .Fields("Gender")
        txtNationality1 = .Fields("Nationality")
        lblDateReserved1 = .Fields("DateReserved")
        lblDateIn1 = .Fields("DateIn")
        lblDateOut1 = .Fields("DateOut")
        lblCharge1 = .Fields("Charge")
        lblDaysIncurred1 = .Fields("DaysIncurred")
    End With
End If
If s4 = "R" Then
    Toolbar1.Buttons(1).Enabled = False
    Toolbar1.Buttons(2).Enabled = True
    Toolbar1.Buttons(3).Enabled = False
    Toolbar1.Buttons(4).Enabled = False
    Toolbar1.Buttons(5).Enabled = True
    frRoom1.Enabled = False
    With dtStatus1.Recordset
        .Index = "seeker"
        .Seek "=", "4"
    End With
    If dtStatus1.Recordset.NoMatch = False Then
        With dtStatus1.Recordset
            txtName1 = .Fields("Name")
            txtAddress1 = .Fields("Address")
            txtAge1 = .Fields("Age")
            cmdGender1 = .Fields("Gender")
            txtNationality1 = .Fields("Nationality")
            lblDateReserved1 = .Fields("DateReserved")
        End With
    End If
End If
If s4 = "U" Then
    Toolbar1.Buttons(1).Enabled = False
    Toolbar1.Buttons(2).Enabled = False
    Toolbar1.Buttons(3).Enabled = True
    Toolbar1.Buttons(4).Enabled = False
    Toolbar1.Buttons(5).Enabled = True
    frRoom1.Enabled = False
    With dtStatus1.Recordset
        .Index = "seeker"
        .Seek "=", "4"
    End With
    If dtStatus1.Recordset.NoMatch = False Then
        With dtStatus1.Recordset
            txtName1 = .Fields("Name")
            txtAddress1 = .Fields("Address")
            txtAge1 = .Fields("Age")
            cmdGender1 = .Fields("Gender")
            txtNationality1 = .Fields("Nationality")
            lblDateReserved1 = .Fields("DateReserved")
            lblDateIn1 = .Fields("DateIn")
            s4 = .Fields("Status")
        End With
    End If
End If
If s4 = "O" Then
    Toolbar1.Buttons(1).Enabled = False
    Toolbar1.Buttons(2).Enabled = False
    Toolbar1.Buttons(3).Enabled = False
    Toolbar1.Buttons(4).Enabled = True
    Toolbar1.Buttons(5).Enabled = False
    frRoom1.Enabled = False
    With dtStatus1.Recordset
        txtName1 = .Fields("Name")
        txtAddress1 = .Fields("Address")
        txtAge1 = .Fields("Age")
        cmdGender1 = .Fields("Gender")
        txtNationality1 = .Fields("Nationality")
        lblDateReserved1 = .Fields("DateReserved")
        lblDateIn1 = .Fields("DateIn")
        lblDateOut1 = .Fields("DateOut")
        lblDaysIncurred1 = .Fields("DaysIncurred")
        lblCharge1 = .Fields("Charge")
    End With
End If
'************************* Room 5 ****************************
With dtStatus2.Recordset
    .Index = "seeker"
    .Seek "=", "5"
End With
If dtStatus2.Recordset.NoMatch = False Then
    With dtStatus2.Recordset
        s5 = .Fields("Status")
    End With
End If
SSTab1.TabCaption(1) = "Room 2" & " [" & s5 & "]"
If s5 = "A" Then
    Toolbar2.Buttons(1).Enabled = False
    Toolbar2.Buttons(2).Enabled = False
    Toolbar2.Buttons(3).Enabled = False
    Toolbar2.Buttons(4).Enabled = True
    Toolbar2.Buttons(5).Enabled = False
    frRoom2.Enabled = False
    With dtStatus2.Recordset
        txtName2 = .Fields("Name")
        txtAddress2 = .Fields("Address")
        txtAge2 = .Fields("Age")
        cmdGender2 = .Fields("Gender")
        txtNationality2 = .Fields("Nationality")
        lblDateReserved2 = .Fields("DateReserved")
        lblDateIn2 = .Fields("DateIn")
        lblDateOut2 = .Fields("DateOut")
        lblCharge2 = .Fields("Charge")
        lblDaysIncurred2 = .Fields("DaysIncurred")
    End With
End If
If s5 = "R" Then
    Toolbar2.Buttons(1).Enabled = False
    Toolbar2.Buttons(2).Enabled = True
    Toolbar2.Buttons(3).Enabled = False
    Toolbar2.Buttons(4).Enabled = False
    Toolbar2.Buttons(5).Enabled = True
    frRoom2.Enabled = False
    With dtStatus2.Recordset
        .Index = "seeker"
        .Seek "=", "5"
    End With
    If dtStatus2.Recordset.NoMatch = False Then
        With dtStatus2.Recordset
            txtName2 = .Fields("Name")
            txtAddress2 = .Fields("Address")
            txtAge2 = .Fields("Age")
            cmdGender2 = .Fields("Gender")
            txtNationality2 = .Fields("Nationality")
            lblDateReserved2 = .Fields("DateReserved")
        End With
    End If
End If
If s5 = "U" Then
    Toolbar2.Buttons(1).Enabled = False
    Toolbar2.Buttons(2).Enabled = False
    Toolbar2.Buttons(3).Enabled = True
    Toolbar2.Buttons(4).Enabled = False
    Toolbar2.Buttons(5).Enabled = True
    frRoom2.Enabled = False
    With dtStatus2.Recordset
        .Index = "seeker"
        .Seek "=", "5"
    End With
    If dtStatus2.Recordset.NoMatch = False Then
        With dtStatus2.Recordset
            txtName2 = .Fields("Name")
            txtAddress2 = .Fields("Address")
            txtAge2 = .Fields("Age")
            cmdGender2 = .Fields("Gender")
            txtNationality2 = .Fields("Nationality")
            lblDateReserved2 = .Fields("DateReserved")
            lblDateIn2 = .Fields("DateIn")
            s5 = .Fields("Status")
        End With
    End If
End If
If s5 = "O" Then
    Toolbar2.Buttons(1).Enabled = False
    Toolbar2.Buttons(2).Enabled = False
    Toolbar2.Buttons(3).Enabled = False
    Toolbar2.Buttons(4).Enabled = True
    Toolbar2.Buttons(5).Enabled = False
    frRoom2.Enabled = False
    With dtStatus2.Recordset
        txtName2 = .Fields("Name")
        txtAddress2 = .Fields("Address")
        txtAge2 = .Fields("Age")
        cmdGender2 = .Fields("Gender")
        txtNationality2 = .Fields("Nationality")
        lblDateReserved2 = .Fields("DateReserved")
        lblDateIn2 = .Fields("DateIn")
        lblDateOut2 = .Fields("DateOut")
        lblDaysIncurred2 = .Fields("DaysIncurred")
        lblCharge2 = .Fields("Charge")
    End With
End If
'************************* Room 6 ****************************
With dtStatus3.Recordset
    .Index = "seeker"
    .Seek "=", "6"
End With
If dtStatus3.Recordset.NoMatch = False Then
    With dtStatus3.Recordset
        s6 = .Fields("Status")
    End With
End If
SSTab1.TabCaption(2) = "Room 3" & " [" & s6 & "]"
If s6 = "A" Then
    Toolbar3.Buttons(1).Enabled = False
    Toolbar3.Buttons(2).Enabled = False
    Toolbar3.Buttons(3).Enabled = False
    Toolbar3.Buttons(4).Enabled = True
    Toolbar3.Buttons(5).Enabled = False
    frRoom3.Enabled = False
    With dtStatus3.Recordset
        txtName3 = .Fields("Name")
        txtAddress3 = .Fields("Address")
        txtAge3 = .Fields("Age")
        cmdGender3 = .Fields("Gender")
        txtNationality3 = .Fields("Nationality")
        lblDateReserved3 = .Fields("DateReserved")
        lblDateIn3 = .Fields("DateIn")
        lblDateOut3 = .Fields("DateOut")
        lblCharge3 = .Fields("Charge")
        lblDaysIncurred3 = .Fields("DaysIncurred")
    End With
End If
If s6 = "R" Then
    Toolbar3.Buttons(1).Enabled = False
    Toolbar3.Buttons(2).Enabled = True
    Toolbar3.Buttons(3).Enabled = False
    Toolbar3.Buttons(4).Enabled = False
    Toolbar3.Buttons(5).Enabled = True
    frRoom3.Enabled = False
    With dtStatus3.Recordset
        .Index = "seeker"
        .Seek "=", "6"
    End With
    If dtStatus3.Recordset.NoMatch = False Then
        With dtStatus3.Recordset
            txtName3 = .Fields("Name")
            txtAddress3 = .Fields("Address")
            txtAge3 = .Fields("Age")
            cmdGender3 = .Fields("Gender")
            txtNationality3 = .Fields("Nationality")
            lblDateReserved3 = .Fields("DateReserved")
        End With
    End If
End If
If s6 = "U" Then
    Toolbar3.Buttons(1).Enabled = False
    Toolbar3.Buttons(2).Enabled = False
    Toolbar3.Buttons(3).Enabled = True
    Toolbar3.Buttons(4).Enabled = False
    Toolbar3.Buttons(5).Enabled = True
    frRoom3.Enabled = False
    With dtStatus3.Recordset
        .Index = "seeker"
        .Seek "=", "6"
    End With
    If dtStatus3.Recordset.NoMatch = False Then
        With dtStatus3.Recordset
            txtName3 = .Fields("Name")
            txtAddress3 = .Fields("Address")
            txtAge3 = .Fields("Age")
            cmdGender3 = .Fields("Gender")
            txtNationality3 = .Fields("Nationality")
            lblDateReserved3 = .Fields("DateReserved")
            lblDateIn3 = .Fields("DateIn")
            s6 = .Fields("Status")
        End With
    End If
End If
If s6 = "O" Then
    Toolbar3.Buttons(1).Enabled = False
    Toolbar3.Buttons(2).Enabled = False
    Toolbar3.Buttons(3).Enabled = False
    Toolbar3.Buttons(4).Enabled = True
    Toolbar3.Buttons(5).Enabled = False
    frRoom3.Enabled = False
    With dtStatus3.Recordset
        txtName3 = .Fields("Name")
        txtAddress3 = .Fields("Address")
        txtAge3 = .Fields("Age")
        cmdGender3 = .Fields("Gender")
        txtNationality3 = .Fields("Nationality")
        lblDateReserved3 = .Fields("DateReserved")
        lblDateIn3 = .Fields("DateIn")
        lblDateOut3 = .Fields("DateOut")
        lblDaysIncurred3 = .Fields("DaysIncurred")
        lblCharge3 = .Fields("Charge")
    End With
End If
Timer1.Enabled = False
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
    '***** Reserve *****
    Case 1

⌨️ 快捷键说明

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