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

📄 krzl.frm

📁 酒店管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   375
      Index           =   1
      Left            =   7320
      TabIndex        =   21
      Top             =   480
      Width           =   495
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "客人姓名:"
      Height          =   255
      Index           =   0
      Left            =   3480
      TabIndex        =   20
      Top             =   1320
      Width           =   855
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "国籍:"
      Height          =   255
      Index           =   3
      Left            =   6240
      TabIndex        =   19
      Top             =   1740
      Width           =   855
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "房间价格:"
      Height          =   255
      Index           =   5
      Left            =   3480
      TabIndex        =   18
      Top             =   1740
      Width           =   855
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "附    注:"
      Height          =   255
      Index           =   6
      Left            =   3480
      TabIndex        =   17
      Top             =   3120
      Width           =   855
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "性别:"
      Height          =   255
      Index           =   8
      Left            =   6240
      TabIndex        =   16
      Top             =   1320
      Width           =   495
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "证件类别:"
      Height          =   255
      Index           =   9
      Left            =   3480
      TabIndex        =   15
      Top             =   2220
      Width           =   975
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "证件号码:"
      Height          =   255
      Index           =   10
      Left            =   6240
      TabIndex        =   14
      Top             =   2220
      Width           =   855
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "单位或住址:"
      Height          =   255
      Index           =   12
      Left            =   3480
      TabIndex        =   13
      Top             =   2685
      Width           =   1215
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "房号:"
      Height          =   255
      Index           =   13
      Left            =   7800
      TabIndex        =   12
      Top             =   1320
      Width           =   615
   End
   Begin VB.Shape Shape1 
      BackColor       =   &H00C0E0FF&
      BorderColor     =   &H80000010&
      Height          =   5775
      Index           =   0
      Left            =   3000
      Top             =   120
      Width           =   6615
   End
   Begin VB.Shape Shape3 
      BorderColor     =   &H80000010&
      Height          =   5775
      Left            =   120
      Top             =   120
      Width           =   2775
   End
End
Attribute VB_Name = "KRZL"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim DATJDGL As Database
Dim reclk As Recordset
Dim RECHT As Recordset
Dim RECSK As Recordset
Dim RECSK1 As Recordset
Dim RECTH As Recordset

Private Sub Combo1_KeyPress(Index As Integer, KeyAscii As Integer)
    If KeyAscii = 13 Then SendKeys "{TAB}"
End Sub

Private Sub Combo2_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then SendKeys "{TAB}"
End Sub

Private Sub Combo3_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then SendKeys "{TAB}"
End Sub

Private Sub Command1_Click()
    Unload Me
End Sub

Private Sub Data1_Reposition()
    If IsNumeric(Text5.Text) Then Text5.Text = FormatNumber(Text5.Text, 2, vbTrue, , vbFalse)
    
End Sub
Private Sub Form_Activate()
    If RECSK.RecordCount = 0 Then
       MsgBox "系统无数据可供修改!", vbCritical, "提示信息"
       Unload Me
    End If
    If IsNumeric(Text5.Text) Then Text5.Text = FormatNumber(Text5.Text, 2, vbTrue, , vbFalse)

End Sub

Private Sub Form_Load()
    Data1.DatabaseName = App.Path & "\data\jdgl.mdb"
    Data1.Refresh

    Set DATJDGL = OpenDatabase(App.Path & "\DATA\JDGL.MDB")
    Set RECLC = DATJDGL.OpenRecordset("楼层", dbOpenDynaset)
    Set RECSK = DATJDGL.OpenRecordset("住房散客登记", dbOpenDynaset)
    List1(0).Clear
    If RECSK.RecordCount > 0 Then RECSK.MoveFirst
    While Not RECSK.EOF
          List1(0).AddItem RECSK("客人ID") + "  " + IIf(IsNull(RECSK("姓名")), "", RECSK("姓名"))
          RECSK.MoveNext
    Wend

End Sub

Private Sub Form_Unload(Cancel As Integer)
    DATJDGL.Close
    
End Sub
Private Sub List1_Click(Index As Integer)
    If List1(Index).Text = "" Then
       Exit Sub
       Else
         Data1.Recordset.FindFirst ("客人ID='" & left(List1(Index).Text, 12) & "'")
    End If
End Sub

Private Sub Text2_GotFocus()
    Text2.SelStart = 0
    Text2.SelLength = Len(Text2.Text)
    
End Sub

Private Sub Text5_GotFocus()
    Text5.SelStart = 0
    Text5.SelLength = Len(Text5.Text)
    
End Sub

Private Sub Text4_GotFocus()
    Text4.SelStart = 0
    Text4.SelLength = Len(Text4.Text)
    
End Sub

Private Sub Text7_GotFocus()
    Text7.SelStart = 0
    Text7.SelLength = Len(Text7.Text)
    
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then SendKeys "{TAB}"
    
End Sub

Private Sub Text3_Change(Index As Integer)
    If Text3(Index).DataChanged Then
       List1(0).Clear
       If RECSK.RecordCount > 0 Then RECSK.MoveFirst
       While Not RECSK.EOF
          If InStr(UCase(RECSK("FPY")), UCase(Text3(Index).Text)) > 0 Or Text3(Index).Text = "" Then
             List1(0).AddItem RECSK("客人ID") + "  " + IIf(IsNull(RECSK("姓名")), "", RECSK("姓名"))
          End If
          RECSK.MoveNext
       Wend
    End If
End Sub

Private Sub Text3_KeyPress(Index As Integer, KeyAscii As Integer)
    If KeyAscii = 13 Then
       If List1(0).ListCount > 0 Then
          List1(0).ListIndex = 0
          List1(0).SetFocus
       End If
    End If

End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then SendKeys "{TAB}"
End Sub

Private Sub Text5_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then SendKeys "{TAB}"
    STRVALID = "0123456789.+-"
    If KeyAscii > 26 Then
       If InStr(STRVALID, Chr(KeyAscii)) = 0 Then
          KeyAscii = 0
       End If
    End If

End Sub

Private Sub Text5_Validate(Cancel As Boolean)
    If IsNumeric(Text5.Text) Then Text5.Text = FormatNumber(Text5.Text, 2, vbTrue, , vbFalse)

End Sub
Private Sub Text7_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then SendKeys "{TAB}"
End Sub

⌨️ 快捷键说明

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