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

📄 form17.frm

📁 华城酒店管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form Form17 
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "交接班核算"
   ClientHeight    =   3435
   ClientLeft      =   45
   ClientTop       =   315
   ClientWidth     =   8310
   LinkTopic       =   "Form17"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3435
   ScaleWidth      =   8310
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton Command3 
      Caption         =   "确定"
      Height          =   375
      Left            =   5640
      TabIndex        =   20
      Top             =   2880
      Width           =   1095
   End
   Begin VB.TextBox Text1 
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   5040
      PasswordChar    =   "*"
      TabIndex        =   19
      Top             =   2280
      Width           =   2295
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      Left            =   1920
      TabIndex        =   17
      Top             =   2280
      Width           =   2175
   End
   Begin VB.CommandButton Command2 
      Caption         =   "退出"
      Height          =   375
      Left            =   7080
      TabIndex        =   15
      Top             =   2880
      Width           =   1095
   End
   Begin VB.Frame Frame1 
      Caption         =   "请您选择区间,并点击核算按钮"
      ForeColor       =   &H000000FF&
      Height          =   2055
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   8055
      Begin VB.CommandButton Command1 
         Caption         =   "核算"
         Height          =   375
         Left            =   6840
         TabIndex        =   10
         Top             =   360
         Width           =   1095
      End
      Begin MSComCtl2.DTPicker DTPend 
         Height          =   375
         Left            =   4080
         TabIndex        =   4
         Top             =   360
         Width           =   1275
         _ExtentX        =   2249
         _ExtentY        =   661
         _Version        =   393216
         Format          =   171507713
         CurrentDate     =   38718
      End
      Begin MSComCtl2.DTPicker DTPstart 
         Height          =   375
         Left            =   840
         TabIndex        =   2
         Top             =   360
         Width           =   1275
         _ExtentX        =   2249
         _ExtentY        =   661
         _Version        =   393216
         Format          =   171507713
         CurrentDate     =   38718
      End
      Begin MSComCtl2.DTPicker tim3 
         Height          =   375
         Left            =   5400
         TabIndex        =   8
         Top             =   360
         Width           =   1275
         _ExtentX        =   2249
         _ExtentY        =   661
         _Version        =   393216
         Format          =   171507714
         CurrentDate     =   .333333333333333
      End
      Begin MSComCtl2.DTPicker tim2 
         Height          =   375
         Left            =   2160
         TabIndex        =   9
         Top             =   360
         Width           =   1275
         _ExtentX        =   2249
         _ExtentY        =   661
         _Version        =   393216
         Format          =   171507714
         CurrentDate     =   .333333333333333
      End
      Begin VB.Label Label9 
         Height          =   255
         Left            =   4320
         TabIndex        =   14
         Top             =   1440
         Width           =   1575
      End
      Begin VB.Label Label8 
         Height          =   255
         Left            =   2280
         TabIndex        =   13
         Top             =   1440
         Width           =   975
      End
      Begin VB.Label Label7 
         Height          =   255
         Left            =   960
         TabIndex        =   12
         Top             =   1440
         Width           =   975
      End
      Begin VB.Label Label6 
         Height          =   255
         Left            =   960
         TabIndex        =   11
         Top             =   960
         Width           =   1095
      End
      Begin VB.Label Label5 
         Caption         =   "合计"
         Height          =   255
         Left            =   3840
         TabIndex        =   7
         Top             =   1440
         Width           =   495
      End
      Begin VB.Label Label4 
         Caption         =   "销售款"
         Height          =   255
         Left            =   240
         TabIndex        =   6
         Top             =   1440
         Width           =   615
      End
      Begin VB.Label Label3 
         Caption         =   "预收款"
         Height          =   255
         Left            =   240
         TabIndex        =   5
         Top             =   960
         Width           =   615
      End
      Begin VB.Label Label2 
         Caption         =   "到"
         Height          =   255
         Left            =   3720
         TabIndex        =   3
         Top             =   480
         Width           =   375
      End
      Begin VB.Label Label1 
         Caption         =   "期间:"
         Height          =   255
         Left            =   240
         TabIndex        =   1
         Top             =   480
         Width           =   615
      End
   End
   Begin VB.Label Label11 
      Caption         =   "密码"
      Height          =   255
      Left            =   4440
      TabIndex        =   18
      Top             =   2400
      Width           =   495
   End
   Begin VB.Label Label10 
      Caption         =   "接班:"
      Height          =   255
      Left            =   1320
      TabIndex        =   16
      Top             =   2400
      Width           =   615
   End
End
Attribute VB_Name = "Form17"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'FIXIT: 使用 Option Explicit 可以避免隐式创建 Variant 类型的变量                                          FixIT90210ae-R383-H1984
Private Sub Command1_Click()
 Dim db As Database
  Dim EF As Recordset
  Set db = OpenDatabase(ConData, False, False, Constr)
  Set EF = db.OpenRecordset("Select * from djb Where  标志 = '1'", dbOpenDynaset)
  
  Dim curSumMoney As Currency
  Dim curSumQuanty As Currency
  
      curSumMoney = 0
      curSumQuanty = 0
     
  
     '列出记录
      If Not (EF.BOF And EF.EOF) Then
         Do While Not EF.EOF
            
           
            curSumQuanty = curSumQuanty + EF("预收金额")
            Label6.caption = curSumQuanty
            EF.MoveNext
         Loop
      End If
       EF.Close
       db.Close
'--------------------------------------------------
 Dim dbf As Database
  Dim efc As Recordset
  Set dbf = OpenDatabase(ConData, False, False, Constr)
  Set efc = dbf.OpenRecordset("Select * from tfd Where 退房日期 =#" & DTPstart.Value & "# And 时间>= #" & tim2.Value & "#", dbOpenDynaset)
  
  Dim curSumMoneyl As Currency
  
      curSumMoneyl = 0
      
      
      
     
  
     '列出记录
      If Not (efc.BOF And efc.EOF) Then
         Do While Not efc.EOF
            
            
            curSumMoneyl = curSumMoneyl + efc("金额总计")
          Label7.caption = curSumMoneyl
            efc.MoveNext
         Loop
      End If
      
 '
  
  efc.Close
  dbf.Close
'-----------------------------------------------------------------------------------------------
Dim dbl As Database
  Dim efb As Recordset
  Set dbl = OpenDatabase(ConData, False, False, Constr)
  Set efb = dbl.OpenRecordset("Select * from tfd Where 退房日期 =#" & DTPend.Value & "# And 时间<= #" & tim3.Value & "#", dbOpenDynaset)
  
  Dim curSumMoneyll As Currency
  
      curSumMoneyll = 0
      
      
      
     
  
     '列出记录
      If Not (efb.BOF And efb.EOF) Then
         Do While Not efb.EOF
            
            
            curSumMoneyll = curSumMoneyll + efb("金额总计")
         Label8.caption = curSumMoneyll
            efb.MoveNext
         Loop
      End If
      
 '
  
  efb.Close
  dbl.Close
Label9.caption = Val(Label6.caption) + Val(Label7.caption) + Val(Label8.caption)
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Command3_Click()
 
'------------------------------------------------
If Trim(Combo1.Text) = "" Then
MsgBox "您必须选择您的操作员名称!"
End If

If Val(Text1.Text) = GetCustomerName(Combo1) Then
 Dim db As Database
  Dim EF As Recordset
  
  Set db = OpenDatabase(ConData, False, False, Constr)
  Set EF = db.OpenRecordset("Select * from jxjl", dbOpenDynaset)
  
     'Format(Now, "hh:mm:ss")
      '==================1
       
          EF.AddNew
          EF("接班") = Combo1
          
           
          EF("接手现金") = Val(Label9.caption)
          
          EF("交班") = Main.StatusBar1.Panels(4).Text
          
          EF("日期") = Date
          EF("时间") = Format(Now, "hh:mm:ss")
          EF.Update
      EF.Close
  db.Close
  
   Main.StatusBar1.Panels(4).Text = Combo1
  MsgBox ("成功交接班! ")
 
 
 Else
 MsgBox "对不起,您的密码错误!"
 End If
  
  
End Sub

Private Sub Form_Load()
 

 
 Dim db As Database
  Dim EF As Recordset
  Set db = OpenDatabase(ConData, False, False, Constr)
  Set EF = db.OpenRecordset("select * from qxsz", dbOpenDynaset)
  
 
      Do While Not EF.EOF
           Combo1.AddItem EF("操作员")
           
            EF.MoveNext
    Loop
  
  EF.Close
  db.Close







'Text3.Text = Val(Text1.Text) + Val(Text2.Text)





End Sub

Private Function GetCustomerName(sID As String) As String
  
  Dim db As Database
  Dim EF As Recordset
  Set db = OpenDatabase(ConData, 0, 0)
  Set EF = db.OpenRecordset("Select * from qxsz Where 操作员='" & sID & "'", dbOpenDynaset)
  
      If Not (EF.BOF And EF.EOF) Then
         GetCustomerName = EF.Fields("密码")
         
        Else
         GetCustomerName = ""
         
      End If
      
  EF.Close
  db.Close
      
End Function

⌨️ 快捷键说明

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