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

📄 reside.frm

📁 system是我酒店管理系统的成品。。。又能力的反编可以得到更多资料。。。一个可是化课操作的窗口
💻 FRM
📖 第 1 页 / 共 4 页
字号:
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin VB.Label Label15 
      Caption         =   "业务员"
      Height          =   255
      Left            =   6120
      TabIndex        =   34
      Top             =   5160
      Width           =   975
   End
   Begin VB.Label Label14 
      Caption         =   "客户姓名"
      Height          =   255
      Left            =   4680
      TabIndex        =   33
      Top             =   5160
      Width           =   855
   End
   Begin VB.Label Label13 
      Caption         =   "预收款"
      Height          =   255
      Left            =   3360
      TabIndex        =   32
      Top             =   5160
      Width           =   855
   End
   Begin VB.Label Label7 
      Caption         =   "身份证号"
      Height          =   255
      Left            =   1800
      TabIndex        =   31
      Top             =   5160
      Width           =   855
   End
   Begin VB.Label Label6 
      Caption         =   "抵店时间"
      Height          =   255
      Left            =   3240
      TabIndex        =   30
      Top             =   4440
      Width           =   735
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      Caption         =   "客房类型"
      Height          =   180
      Left            =   1800
      TabIndex        =   29
      Top             =   4440
      Width           =   720
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "入住单号"
      Height          =   180
      Left            =   360
      TabIndex        =   28
      Top             =   4440
      Width           =   720
   End
   Begin VB.Label Label8 
      Caption         =   "联系电话"
      Height          =   255
      Left            =   6120
      TabIndex        =   27
      Top             =   4440
      Width           =   975
   End
   Begin VB.Label Label9 
      Caption         =   "客房价格"
      Height          =   255
      Left            =   120
      TabIndex        =   26
      Top             =   5160
      Width           =   975
   End
   Begin VB.Label Label11 
      Caption         =   "客房编号"
      Height          =   255
      Left            =   7440
      TabIndex        =   25
      Top             =   4440
      Width           =   975
   End
   Begin VB.Label Label12 
      Caption         =   "离店时间"
      Height          =   255
      Left            =   4680
      TabIndex        =   24
      Top             =   4440
      Width           =   855
   End
End
Attribute VB_Name = "Reside"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub LoadData()
    Dim str As String, str1 As String, flag%, mark%
    If Len(Trim(Text1.Text)) = 0 Then       '无入住单号
        If Len(Trim(Text2.Text)) = 0 Then    '无客户姓名
                flag = 0
        Else  '匹配客户姓名
                flag = 1: str1 = Text2.Text: mark = 2
        End If
    Else   '匹配入住单号
                flag = 1: str = Text1.Text: mark = 1
        If Len(Trim(Text2.Text)) <> 0 Then  '匹配入住单号和客户姓名
                flag = 2: str1 = Text2.Text: mark = 2
        End If
    End If
    '根据查询条件重新填充DataGrid
    If flag = 0 Then
    OpenTable Adodc1, "select * from 入住单 "
    ElseIf flag = 1 And mark = 1 Then
    OpenTable Adodc1, "select * from 入住单 " + "where " + " 入住单号 " + " like '" + str + "%'"
    ElseIf flag = 1 And mark = 2 Then
    OpenTable Adodc1, "select * from 入住单 " + "where " + " 客户姓名 " + " like '" + str1 + "%'"
    ElseIf flag = 2 And mark = 2 Then
    OpenTable Adodc1, "select * from 入住单 " + "where " + " 入住单号 " + " like '" + str + "%'" + " and " + " 客户姓名 " + " like '" + str1 + "%'"
    End If
End Sub

Private Sub Search_Click()
    LoadData
End Sub

Private Sub Money_KeyPress(KeyAscii As Integer)
    If (KeyAscii < 48 Or KeyAscii > 57) And KeyAscii <> 8 Then
        KeyAscii = 0
    End If
End Sub

Private Sub Number_KeyPress(KeyAscii As Integer)
    If (KeyAscii < 48 Or KeyAscii > 57) And KeyAscii <> 8 And KeyAscii <> 88 Then
        KeyAscii = 0
    End If
End Sub

Private Sub Operation_KeyPress(KeyAscii As Integer)
    If KeyAscii > 0 And (KeyAscii < 65 Or KeyAscii > 90) And (KeyAscii < 97 Or KeyAscii > 122) And KeyAscii <> 8 Then
        KeyAscii = 0
    End If
End Sub

Private Sub People_KeyPress(KeyAscii As Integer)
    If KeyAscii > 0 And (KeyAscii < 65 Or KeyAscii > 90) And (KeyAscii < 97 Or KeyAscii > 122) And KeyAscii <> 8 Then
        KeyAscii = 0
    End If
End Sub

Private Sub Phone_KeyPress(KeyAscii As Integer)
    If (KeyAscii < 48 Or KeyAscii > 57) And KeyAscii <> 8 Then
        KeyAscii = 0
    End If
End Sub

Private Sub RoomType_LostFocus()
Dim str As String
    str = RoomType.Text
    OpenTable Adodc4, "select * from 客房类型信息 where 客房类型='" + str + "'"
    If Not Adodc4.Recordset.EOF Then
        Price.Text = Adodc4.Recordset.Fields(2)
    End If
End Sub

Private Sub SelectId_Click()
    Consume.InId = Adodc1.Recordset("入住单号")
    Unload Me
End Sub

Private Sub Form_Load()
    LoadData
    Calendar1.Value = Date
    SetTextBoxState (False)
End Sub

Private Sub SetToolBarState(ByVal State As Boolean)
    '设置Button的是否能够单击
    Toolbar1.Buttons("first").Enabled = State
    Toolbar1.Buttons("before").Enabled = State
    Toolbar1.Buttons("next").Enabled = State
    Toolbar1.Buttons("last").Enabled = State
    Toolbar1.Buttons("new").Enabled = State
    Toolbar1.Buttons("modify").Enabled = State
    Toolbar1.Buttons("delete").Enabled = State
    Toolbar1.Buttons("save").Enabled = Not State
    Toolbar1.Buttons("cancel").Enabled = Not State
End Sub

Private Sub SetTextBoxState(ByVal State As Boolean)
    RoomType.Enabled = State
    Ltime.Enabled = State
    Phone.Enabled = State
    Number.Enabled = State
    Money.Enabled = State
    People.Enabled = State
    Operation.Enabled = State
    DataGrid1.Enabled = Not State
    List.Enabled = State
    SelectRoom.Enabled = State
End Sub

Private Sub Clear()
Dim strT As String, strID As String
    OpenTable Adodc3, "select max(入住单号) from 入住单 "
        If Not IsNull(Adodc3.Recordset.Fields(0)) Then
          strT = ""
          strID = Trim(str(Int(Mid(Adodc3.Recordset(0), 3, 4) + 1)))
          For i = Len(strID) To 3
            strT = strT & "0"
          Next i
          InId = "RZ" & strT & strID
        Else
          InId = "RZ0001"
        End If
    RoomType.Text = ""
    Arrive.Text = Date
    Ltime.Text = ""
    Phone.Text = ""
    RoomCode.Text = ""
    Price.Text = ""
    Number.Text = ""
    Money.Text = ""
    People.Text = ""
    Operation.Text = ""
End Sub


Private Sub SelectRoom_Click()
    Dim frm As New RoomState
    If Trim(RoomType.Text) = "" Then
        fla = False
    Else
        fla = True
        strRoomState = RoomType.Text
    End If
    frm.Set.Enabled = False
    frm.SelectReside.Visible = True
    frm.SelectReserve.Visible = False
    frm.SelectReside.Enabled = True
    frm.SelectReserve.Enabled = False
    frm.Show vbModal
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
    If StrComp(Button.Key, "first") = 0 Then
     If Not Adodc1.Recordset.BOF And Not Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveFirst
    ElseIf StrComp(Button.Key, "before") = 0 Then
        If Not Adodc1.Recordset.BOF And Not Adodc1.Recordset.EOF Then
            Adodc1.Recordset.MovePrevious
            If Adodc1.Recordset.BOF Then Adodc1.Recordset.MoveFirst
        End If
    ElseIf StrComp(Button.Key, "next") = 0 Then
        If Not Adodc1.Recordset.BOF And Not Adodc1.Recordset.EOF Then
            Adodc1.Recordset.MoveNext
            If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast
        End If
    ElseIf StrComp(Button.Key, "last") = 0 Then
      If Not Adodc1.Recordset.BOF And Not Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast
    ElseIf StrComp(Button.Key, "new") = 0 Then
        Adodc1.Recordset.AddNew
        SetTextBoxState (True)
        SetToolBarState (False)
        Clear
    ElseIf StrComp(Button.Key, "modify") = 0 Then
        SetTextBoxState (True)
        SetToolBarState (False)
    ElseIf StrComp(Button.Key, "delete") = 0 Then
      If Not Adodc1.Recordset.BOF And Not Adodc1.Recordset.EOF Then
        If MsgBox("确定要删除吗?", vbYesNo, "提示") = vbYes Then
                Adodc1.Recordset.Delete
                Adodc1.Recordset.Update
        End If
      Else
        MsgBox "当前无记录!", 64, "提示"
      End If
    ElseIf StrComp(Button.Key, "save") = 0 Then
       If RoomType = "" Then
         MsgBox "客房类型不能为空", , "提示"
       ElseIf Ltime = "" Or Ltime < Date Then MsgBox "离店时间错误", , "提示"
       ElseIf Phone = "" Then MsgBox "联系电话不能为空", , "提示"
       ElseIf RoomCode = "" Then MsgBox "客房未选择", , "提示"
       ElseIf Number = "" Then MsgBox "身份证号不能为空", , "提示"
       ElseIf Money = "" Then MsgBox "预收款未填", , "提示"
       ElseIf People = "" Then MsgBox "预定人不能为空", , "提示"
       ElseIf Operation = "" Then MsgBox "业务员不能为空", , "提示"
       Else
        SetTextBoxState (False)
        SetToolBarState (True)
        Adodc1.Recordset.Update
      OpenTable Adodc5, "select * from 客房信息 " + " where " + " 客房编号 " + " = '" + RoomCode + " '"
        Adodc5.Recordset(4) = "住房"
        Adodc5.Recordset.Update
        If biaozhi Then
          OpenTable Adodc6, "select * from 预定单 " + " where " + " 客房编号 " + " = '" + RoomCode + " '"
          Adodc6.Recordset.Delete
        End If
           biaozhi = False
       End If
    ElseIf StrComp(Button.Key, "cancel") = 0 Then
        SetTextBoxState (False)
        SetToolBarState (True)
        Form_Load
    ElseIf StrComp(Button.Key, "exit") = 0 Then
        LoadData
        Unload Me
    End If
End Sub

Private Sub Ltime_Click()
    Calendar1.Visible = True
End Sub

Private Sub Calendar1_Click()
    Ltime.Text = Calendar1.Value
    Calendar1.Visible = False
End Sub
Private Sub List_Click()
    Dim frm As New Reserve
    frm.Select.Visible = True
    frm.Show
End Sub

⌨️ 快捷键说明

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