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

📄 form21.frm

📁 利用VB编写的一个完整的酒店管理程序,支持双数据库!
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   270
      Left            =   240
      TabIndex        =   36
      Top             =   5280
      Width           =   945
   End
   Begin VB.Label Lab12 
      BackStyle       =   0  'Transparent
      Caption         =   "备    注"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      Left            =   240
      TabIndex        =   35
      Top             =   6120
      Width           =   1335
   End
   Begin VB.Label Lab7 
      BackStyle       =   0  'Transparent
      Caption         =   "实住天数             宿费"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      Left            =   240
      TabIndex        =   34
      Top             =   4800
      Width           =   4545
   End
   Begin VB.Label Lab4 
      BackStyle       =   0  'Transparent
      Caption         =   "姓    名"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      Left            =   240
      TabIndex        =   33
      Top             =   3840
      Width           =   1110
   End
   Begin VB.Label Lab6 
      BackStyle       =   0  'Transparent
      Caption         =   "房 间 号             客房类型            客房价格"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      Left            =   240
      TabIndex        =   32
      Top             =   4320
      Width           =   7605
   End
   Begin VB.Label Lab11 
      BackStyle       =   0  'Transparent
      Caption         =   "实收金额                 押金             退还金额"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      Left            =   240
      TabIndex        =   31
      Top             =   5640
      Width           =   7620
   End
   Begin VB.Label Label1 
      Caption         =   "单击凭证号码可直接进行内容查询!"
      ForeColor       =   &H000000FF&
      Height          =   615
      Left            =   1080
      TabIndex        =   17
      Top             =   3120
      Width           =   1215
   End
End
Attribute VB_Name = "Form21"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'FIXIT: 使用 Option Explicit 可以避免隐式创建 Variant 类型的变量                                          FixIT90210ae-R383-H1984
Dim Syet As String
Private Sub cmdCancel_Click()
Unload Me
End Sub

Private Sub cmdPrint_Click()

' Caozuo = "补打单据 '" & Text1.Text & "' "
'lu_time = Now
'RiZhil
 
 
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.Height = 7000: Printer.Width = 7000
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.CurrentX = 1500: Printer.CurrentY = 300
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.FontSize = 16
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.Print "  退 宿 结 账 单(补打) "
'FIXIT: 用早期绑定的数据类型声明 "a' and 'b' and 'C"                                                   FixIT90210ae-R1672-R1B8ZE
 Dim a, b, C, D As Integer
 a = 60: b = 650: C = 3800: D = 350
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.FontSize = 10
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.CurrentX = 100 + a
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.CurrentY = b + 200
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.Print Date & " " & Time & "  NO." & Text1.Text
 b = b + D
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.Line (60 + a, b + 100)-(6000 + a, b + 100)
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.CurrentX = 100 + a
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.CurrentY = b + 200
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.Print "姓名:" & Texxm.Text
 b = b + D
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.CurrentX = 100 + a
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.CurrentY = b + 200
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.Print "房间号:" & DBCombo3.Text
 b = b + D
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.CurrentX = 100 + a
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.CurrentY = b + 200
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.Print "房价:" & Format(DBCombo2.Text, "0.00") & "元" & "    " & "入住天数: " & Texts.Text & "天     "

  b = b + D
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
  Printer.CurrentX = 100 + a
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
   Printer.CurrentY = b + 200
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
  Printer.Print "宿费 " & Format(Texxf.Text, "0.00") & "元    " & Combo2.Text & ":" & Texzk.Text & "%"
 '
   b = b + D
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
   Printer.CurrentX = 100 + a
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
   Printer.CurrentY = b + 200
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
   Printer.Print "其他费用:" & Format(Texzf.Text, "0.00") & "元"
'

 b = b + D
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.CurrentX = 100 + a
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.CurrentY = b + 200
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.Print "实收金额:" & Format(Texssje.Text, "0.00") & "元 "
  b = b + D
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
   Printer.CurrentX = 100 + a
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
   Printer.CurrentY = b + 200
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
   Printer.Print "押金: " & Format(Texyj.Text, "0.00") & "元 " & "退还金额: " & Format(Texthje.Text, "0.00") & "元"
 
 
 b = b + D
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.CurrentX = 100 + a
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.CurrentY = b + 200
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.Print "备注:"
 b = b + D
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.Line (60 + a, b + 100)-(6000 + a, b + 100)
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.CurrentX = 400
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.CurrentY = b + 200
 
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
Printer.Print "操作员: " & MDIForm1.StatusBar1.Panels(4).Text & "    " & "顾客签名:"
' Printer.CurrentX = 5000 + a
' Printer.CurrentY = b + 200
' Printer.Print "顾客签名:"
'FIXIT: 升级向导未将 Printer 对象和 Printers 集合升级到 Visual Basic .NET。                               FixIT90210ae-R5481-H1984
 Printer.EndDoc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
End Sub
Private Sub SearchIt()

 '检索数据
  Dim db As Database
  Dim EF As Recordset
  Set db = OpenDatabase(ConData, False, True, Constr)
  Set EF = db.OpenRecordset("select * from tfd where 凭证号码='" & Grid1.Text & "'", dbOpenDynaset)
  
     '列出记录
      If Not (EF.BOF And EF.EOF) Then
         Do While Not EF.EOF
            Texxm = EF.Fields("姓名")
            DBCombo3.Text = EF.Fields("房间号")
            DBCombo1.Text = EF.Fields("客房类型")
            DBCombo2.Text = EF.Fields("客房价格")
            Texts = EF.Fields("住宿天数")
            Texxf = EF.Fields("宿费")
            Combo2.Text = EF.Fields("折扣或招待")
            Texzk = EF.Fields("折扣")
            Texzf = EF.Fields("杂费")
            Texdhf = EF.Fields("电话费")
            Textcf = EF.Fields("存车费")
            Texhyf = EF.Fields("会议费")
          
            Texpcf = EF.Fields("赔偿费")
             Texssje = EF.Fields("金额总计")
             Texyj = EF.Fields("预收宿费")
             Texthje = EF.Fields("退还宿费")
            
            
            EF.MoveNext
         Loop
      End If
      
 '添加合计
  
  
  EF.Close
  db.Close

End Sub



Private Sub PIt()
'Grid1.Clear
'Grid1.FormatString = "凭  证  号  码  | 姓    名 |  房 间 号  | 住  宿  日  期 |   退  房  日  期  |退  房  时  间 "

 '检索数据
  Dim db As Database
  Dim EF As Recordset
  Set db = OpenDatabase(ConData, False, True, Constr)
  Set EF = db.OpenRecordset(Syet, dbOpenDynaset)
  
  
     '列出记录
      If Not (EF.BOF And EF.EOF) Then
         Do While Not EF.EOF
            Grid1.AddItem EF("凭证号码") & vbTab & EF("姓名") & vbTab & EF("房间号") _
                      & vbTab & EF("住宿日期") & vbTab & EF("退房日期") _
                      & vbTab & EF("退房时间")
            
            EF.MoveNext
         Loop
      End If
      
 '添加合计
  'Grid1.AddItem "" & vbTab & "  合  计 " & vbTab & "" _
                     & vbTab & "" & vbTab & vbTab & curSumQuanty & vbTab & "" _
                      & vbTab & curSumMoney & vbTab & ""
 '更换最后一行颜色
  'Grid1.Row = Grid1.Rows - 1
  'Dim X As Integer
      'For X = 7 To 0 Step -1
         'Grid1.Col = X
        ' Grid1.CellBackColor = &HE0E0D0
      'Next
  'Grid1.ColSel = 7
  
  EF.Close
  db.Close

End Sub

Private Sub cmdSearch_Click()
If Check1.Value = Checked And Check2.Value = Unchecked Then
Syet = "select * from tfd where 退房日期=#" & DTPicker1.Value & "# order by 房间号"
PIt
End If
If Check1.Value = Unchecked And Check2.Value = Checked Then
Syet = "select * from tfd where 房间号='" & Text2.Text & "' order by 房间号"
PIt
End If

If Check1.Value = Checked And Check2.Value = Checked Then
Syet = "select * from tfd where 房间号='" & Text2.Text & "' and 退房日期=#" & DTPicker1.Value & "# order by 房间号"
PIt
End If



End Sub

Private Sub Form_Load()
'retValue = SetWindowPos(Me.hwnd, HWND_TOPMOST, Me.CurrentX, Me.CurrentY, 11880, 8280, SWP_SHOWWINDOW)

 'Syet = "select * from tfd"
' PIt
End Sub


Private Sub Grid1_Click()
Text1.Text = Grid1.Text
SearchIt
End Sub

⌨️ 快捷键说明

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