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

📄 form9.frm

📁 该程序用VB和Access数据库编写的酒店管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
   End
   Begin VB.Label Label19 
      Caption         =   "元"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   0
      TabIndex        =   36
      Top             =   0
      Width           =   615
   End
   Begin VB.Label Label18 
      Caption         =   "元"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3600
      TabIndex        =   35
      Top             =   5760
      Width           =   615
   End
   Begin VB.Label Label17 
      Caption         =   "元"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   9120
      TabIndex        =   32
      Top             =   8400
      Width           =   375
   End
   Begin VB.Label Label16 
      Caption         =   "元"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   6240
      TabIndex        =   31
      Top             =   8400
      Width           =   375
   End
   Begin VB.Label Label15 
      Caption         =   "元"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   3240
      TabIndex        =   30
      Top             =   8400
      Width           =   495
   End
   Begin VB.Label Label6 
      Caption         =   "找回:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   4200
      TabIndex        =   28
      Top             =   8280
      Width           =   855
   End
   Begin VB.Label Label14 
      Caption         =   "总收:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   6840
      TabIndex        =   26
      Top             =   8280
      Width           =   975
   End
   Begin VB.Label Label13 
      Caption         =   "房价:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   8520
      TabIndex        =   24
      Top             =   4080
      Width           =   975
   End
   Begin VB.Label Label12 
      Caption         =   "房间号:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   8520
      TabIndex        =   22
      Top             =   3240
      Width           =   1095
   End
   Begin VB.Label Label11 
      Caption         =   "还应收:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   960
      TabIndex        =   17
      Top             =   8280
      Width           =   975
   End
   Begin VB.Label Label10 
      Caption         =   "折扣:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   8520
      TabIndex        =   8
      Top             =   4920
      Width           =   855
   End
   Begin VB.Label Label9 
      Caption         =   "续住时间:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   4560
      TabIndex        =   7
      Top             =   4080
      Width           =   1215
   End
   Begin VB.Label Label8 
      Caption         =   "是否会员:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   4560
      TabIndex        =   6
      Top             =   5760
      Width           =   1095
   End
   Begin VB.Label Label7 
      Caption         =   "续费金额:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   4560
      TabIndex        =   5
      Top             =   4920
      Width           =   1095
   End
   Begin VB.Label Label5 
      Caption         =   "应收费:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   4560
      TabIndex        =   4
      Top             =   3240
      Width           =   855
   End
   Begin VB.Label Label4 
      Caption         =   "押金:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   600
      TabIndex        =   3
      Top             =   5760
      Width           =   855
   End
   Begin VB.Label Label3 
      Caption         =   "退房时间:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   600
      TabIndex        =   2
      Top             =   4920
      Width           =   1095
   End
   Begin VB.Label Label2 
      Caption         =   "入住时间:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   600
      TabIndex        =   1
      Top             =   4080
      Width           =   1095
   End
   Begin VB.Label Label1 
      Caption         =   "姓名:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   600
      TabIndex        =   0
      Top             =   3240
      Width           =   855
   End
End
Attribute VB_Name = "Form9"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim str As String

Dim spl1 As String
Dim rs1 As New ADODB.Recordset
Dim cnn1 As New ADODB.Connection


Private Sub Command1_Click()


d = DateDiff("d", Text2.Text, Text3.Text)


'cnn1.Open "provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\信息表.mdb;Persist Security Info=False"
 ' sql1 = "select * from 客房信息表 where 房间号=' " + Text12.Text + "'"
  'rs1.Open sql1, cnn1, adOpenKeyset, adLockPessimistic
 'Text13.Text = rs1.Fields(2)

If Text9.Text = "" Then
Text5.Text = CDbl(d) * CDbl(Text13.Text)

If Combo2.Text = "否" Then
  Text10.Text = "0"
  Text11.Text = CDbl(d) * CDbl(Text13.Text) + CDbl(Text7.Text) - CDbl(Text4.Text)
  Text6.Text = CDbl(d) * CDbl(Text13.Text) + CDbl(Text7.Text)
   Adodc2.Recordset.Fields("折扣") = 0
  Adodc2.Recordset.Update
ElseIf Combo2.Text = "是" Then
  Text10.Text = "9.5"
  Text11.Text = (CDbl(d) * CDbl(Text13.Text) + CDbl(Text7.Text)) * CDbl(Text10.Text) / 10 - CDbl(Text4.Text)
  Text6.Text = (CDbl(d) * CDbl(Text13.Text) + CDbl(Text7.Text)) * CDbl(Text10.Text) / 10
   Adodc2.Recordset.Fields("折扣") = 9.5
  Adodc2.Recordset.Update
End If
Else

 d2 = DateDiff("d", Text2.Text, Text9.Text)
 Text5.Text = CDbl(d2) * CDbl(Text13.Text)
 If Combo2.Text = "否" Then
  Text10.Text = "0"
  Text11.Text = CDbl(d2) * CDbl(Text13.Text) + CDbl(Text7.Text) - CDbl(Text4.Text)
  Text6.Text = CDbl(d2) * CDbl(Text13.Text) + CDbl(Text7.Text)
   Adodc2.Recordset.Fields("折扣") = 0
  Adodc2.Recordset.Update
ElseIf Combo2.Text = "是" Then
  Text10.Text = "9.5"
  Text11.Text = (CDbl(d2) * CDbl(Text13.Text) + CDbl(Text7.Text)) * CDbl(Text10.Text) / 10 - CDbl(Text4.Text)
  Text6.Text = (CDbl(d2) * CDbl(Text13.Text) + CDbl(Text7.Text)) * CDbl(Text10.Text) / 10
  Adodc2.Recordset.Fields("折扣") = 9.5
  Adodc2.Recordset.Update
End If
 
 End If



If Combo2.Text = "" Then
  MsgBox "是否会员项不能为空!", vbOKOnly + vbExclamation, "警告"
  Exit Sub
End If

If CDbl(Text11.Text) < 0 Then

Text8.Text = -CDbl(Text11.Text)
Text11.Text = "0"
Else
Text8.Text = "0"
End If



End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Command3_Click()
Form7.Show

End Sub


Private Sub DataGrid1_Click()
Text6.Text = "0"
Text8.Text = "0"
Text11.Text = "0"
End Sub

⌨️ 快捷键说明

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