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

📄 main_qtgl_ydff.frm

📁 一个比较完整的数据库编程技巧”洗浴管理系统“
💻 FRM
📖 第 1 页 / 共 3 页
字号:
            Caption         =   "是否分房"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column07 
            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 
               ColumnWidth     =   884.976
            EndProperty
            BeginProperty Column01 
               ColumnWidth     =   1035.213
            EndProperty
            BeginProperty Column02 
               ColumnWidth     =   824.882
            EndProperty
            BeginProperty Column03 
               ColumnWidth     =   494.929
            EndProperty
            BeginProperty Column04 
               ColumnWidth     =   854.929
            EndProperty
            BeginProperty Column05 
               ColumnWidth     =   464.882
            EndProperty
            BeginProperty Column06 
               ColumnWidth     =   794.835
            EndProperty
            BeginProperty Column07 
               ColumnWidth     =   2085.166
            EndProperty
         EndProperty
      End
      Begin VB.Label Labxh 
         Caption         =   "Labxh"
         ForeColor       =   &H000000FF&
         Height          =   240
         Left            =   4605
         TabIndex        =   22
         Top             =   210
         Width           =   1350
      End
      Begin VB.Label Labdt 
         Caption         =   "Labdt"
         ForeColor       =   &H000000FF&
         Height          =   240
         Left            =   2400
         TabIndex        =   21
         Top             =   210
         Width           =   1350
      End
      Begin VB.Label Label2 
         BackStyle       =   0  'Transparent
         Caption         =   "所在大厅:                  箱号:"
         Height          =   210
         Left            =   1515
         TabIndex        =   20
         Top             =   240
         Width           =   4875
      End
   End
   Begin VB.CommandButton cmdok 
      Caption         =   "确定分房(&A)"
      Height          =   315
      Left            =   795
      TabIndex        =   17
      Top             =   5415
      Width           =   1335
   End
   Begin VB.Frame Frame1 
      Caption         =   "分入包房信息"
      Height          =   5910
      Left            =   60
      TabIndex        =   0
      Top             =   60
      Width           =   2775
      Begin VB.TextBox Text1 
         Height          =   270
         Index           =   0
         Left            =   1185
         Locked          =   -1  'True
         TabIndex        =   13
         Top             =   300
         Width           =   1035
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Index           =   1
         Left            =   1185
         Locked          =   -1  'True
         TabIndex        =   12
         Top             =   662
         Width           =   1035
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Index           =   2
         Left            =   1185
         Locked          =   -1  'True
         TabIndex        =   11
         Top             =   1024
         Width           =   1035
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Index           =   3
         Left            =   1185
         Locked          =   -1  'True
         TabIndex        =   10
         Top             =   1350
         Width           =   1440
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Index           =   4
         Left            =   1185
         Locked          =   -1  'True
         TabIndex        =   9
         Top             =   1748
         Width           =   1440
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Index           =   5
         Left            =   1185
         Locked          =   -1  'True
         TabIndex        =   8
         Top             =   2110
         Width           =   1440
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Index           =   6
         Left            =   1185
         Locked          =   -1  'True
         TabIndex        =   7
         Top             =   2472
         Width           =   1440
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Index           =   7
         Left            =   1185
         Locked          =   -1  'True
         TabIndex        =   6
         Top             =   2834
         Width           =   1440
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Index           =   8
         Left            =   1185
         Locked          =   -1  'True
         TabIndex        =   5
         Top             =   3196
         Width           =   1440
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Index           =   9
         Left            =   1185
         Locked          =   -1  'True
         TabIndex        =   4
         Top             =   3558
         Width           =   1440
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Index           =   10
         Left            =   1185
         Locked          =   -1  'True
         TabIndex        =   3
         Top             =   3920
         Width           =   1440
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Index           =   11
         Left            =   1185
         Locked          =   -1  'True
         TabIndex        =   2
         Top             =   4282
         Width           =   1440
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Index           =   12
         Left            =   1185
         Locked          =   -1  'True
         TabIndex        =   1
         Top             =   4650
         Width           =   1440
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   $"main_qtgl_ydff.frx":002A
         Height          =   4695
         Left            =   135
         TabIndex        =   14
         Top             =   390
         Width           =   1380
      End
   End
End
Attribute VB_Name = "main_qtgl_ydff"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim txtSQL As String
Dim rs1 As ADODB.Recordset
Private Sub cmdOK_Click()
  txtSQL = "select * from 包房消费临时表"
  Set rs1 = ESQL(txtSQL)
  '添加包房消费信息
  rs1.AddNew
  If Text1(2).Text <> "" Then rs1.Fields("房间号") = Trim(Text1(2).Text)
  If Text1(3).Text <> "" Then rs1.Fields("包房名称") = Trim(Text1(3).Text)
  If Text1(10).Text <> "" Then rs1.Fields("包房价格") = Val(Text1(10).Text)
  If Text1(12).Text <> "" Then rs1.Fields("分钟描述") = Val(Text1(12).Text)
  If Labxh.Caption <> "" Then rs1.Fields("箱号") = Trim(Labxh.Caption)
  If Labdt.Caption <> "" Then rs1.Fields("所在大厅") = Trim(Labdt.Caption)
  rs1.Fields("进入时间") = Now
  rs1.Update      '更新数据库
  MsgBox "[" & Labxh.Caption & "]箱号的客人已进入" & Text1(3).Text & "包房消费!"
  '按房间号查包房信息
  txtSQL = "select * from 包房信息表 where 房间号='" + Trim(Text1(2).Text) + "'"
  Set rs1 = ESQL(txtSQL)
  If rs1.RecordCount > 0 Then     '当记录大于零时
     rs1.Fields("状态") = "使用"     '设置包房状态为使用
     rs1.Update
  End If
  Adodc1.RecordSource = "select * from 包房预订表 where 预订编号='" + Text1(0).Text + "'"
  Adodc1.Refresh
  Adodc1.Recordset.Fields("是否分房") = "是"
  Adodc1.Recordset.Update
  Adodc1.RecordSource = "select * from 包房预订表 where 是否分房='否'"
  Adodc1.Refresh
  '刷新营业包房信息表
  Adodc4.Refresh
  DataGrid2.Refresh
End Sub

Private Sub DataGrid1_Click()
  Adodc2.RecordSource = "select * from 包房信息表 where 编号='" + TextNo.Text + "'"
  Adodc2.Refresh
  For i = 0 To 12
      Text1(i).Text = Adodc2.Recordset.Fields(i).Value
  Next i
End Sub

Private Sub Form_Load()
  Adodc1.RecordSource = "select * from 包房预订表 where 是否分房='否'"
  Adodc1.Refresh
End Sub

Private Sub Form_Unload(Cancel As Integer)
  main_qtgl_ztfwgl.Enabled = True
  Unload Me
End Sub

⌨️ 快捷键说明

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