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

📄 main_xsbb.frm

📁 宾馆客房管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form main_xsbb 
   BackColor       =   &H00C0C0C0&
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "客房销售报表"
   ClientHeight    =   4425
   ClientLeft      =   45
   ClientTop       =   480
   ClientWidth     =   11880
   Icon            =   "main_xsbb.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4425
   ScaleWidth      =   11880
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin MSFlexGridLib.MSFlexGrid MS1 
      Height          =   3015
      Left            =   360
      TabIndex        =   14
      Top             =   840
      Width           =   9855
      _ExtentX        =   17383
      _ExtentY        =   5318
      _Version        =   393216
   End
   Begin VB.TextBox czy 
      BackColor       =   &H80000000&
      BorderStyle     =   0  'None
      Height          =   270
      Left            =   840
      TabIndex        =   11
      Top             =   315
      Width           =   945
   End
   Begin VB.Frame Frame2 
      Caption         =   "Frame2"
      Height          =   870
      Left            =   45
      TabIndex        =   8
      Top             =   1620
      Visible         =   0   'False
      Width           =   2235
      Begin VB.TextBox G2 
         Height          =   270
         Left            =   165
         TabIndex        =   10
         Top             =   495
         Width           =   600
      End
      Begin VB.TextBox G1 
         Height          =   270
         Left            =   165
         TabIndex        =   9
         Top             =   210
         Width           =   600
      End
   End
   Begin MSFlexGridLib.MSFlexGrid MS2 
      Bindings        =   "main_xsbb.frx":000C
      Height          =   495
      Left            =   75
      TabIndex        =   2
      Top             =   3885
      Width           =   11760
      _ExtentX        =   20743
      _ExtentY        =   873
      _Version        =   393216
      Rows            =   0
      Cols            =   0
      FixedRows       =   0
      FixedCols       =   0
      BackColorBkg    =   16777215
      ScrollBars      =   0
      BorderStyle     =   0
   End
   Begin VB.Frame Frame1 
      Height          =   675
      Left            =   90
      TabIndex        =   0
      Top             =   60
      Width           =   11685
      Begin VB.CommandButton Command1 
         BackColor       =   &H00C0C0C0&
         Caption         =   "确定"
         CausesValidation=   0   'False
         Height          =   345
         Left            =   9195
         Style           =   1  'Graphical
         TabIndex        =   13
         Top             =   225
         Width           =   1170
      End
      Begin VB.CommandButton Command2 
         BackColor       =   &H00C0C0C0&
         Caption         =   "退出"
         Height          =   345
         Left            =   10380
         Style           =   1  'Graphical
         TabIndex        =   1
         Top             =   225
         Width           =   1170
      End
      Begin MSComCtl2.DTPicker DTP1 
         Height          =   315
         Left            =   2340
         TabIndex        =   3
         Top             =   210
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   556
         _Version        =   393216
         Format          =   159907841
         CurrentDate     =   37143
      End
      Begin MSComCtl2.DTPicker DTP2 
         Height          =   315
         Left            =   5385
         TabIndex        =   4
         Top             =   210
         Width           =   1380
         _ExtentX        =   2434
         _ExtentY        =   556
         _Version        =   393216
         Format          =   159907841
         CurrentDate     =   37143
      End
      Begin MSComCtl2.DTPicker DTM1 
         Height          =   315
         Left            =   3675
         TabIndex        =   6
         Top             =   210
         Width           =   1350
         _ExtentX        =   2381
         _ExtentY        =   556
         _Version        =   393216
         Format          =   159907842
         CurrentDate     =   .354166666666667
      End
      Begin MSComCtl2.DTPicker DTM2 
         Height          =   315
         Left            =   6750
         TabIndex        =   7
         Top             =   210
         Width           =   1350
         _ExtentX        =   2381
         _ExtentY        =   556
         _Version        =   393216
         Format          =   159907842
         CurrentDate     =   .354166666666667
      End
      Begin VB.Label Label2 
         Caption         =   "操作员:"
         Height          =   300
         Left            =   60
         TabIndex        =   12
         Top             =   285
         Width           =   765
      End
      Begin VB.Label Label1 
         Caption         =   "日期从:                               到"
         Height          =   285
         Left            =   1695
         TabIndex        =   5
         Top             =   270
         Width           =   3660
      End
   End
End
Attribute VB_Name = "main_xsbb"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim DBcnn As New ADODB.Connection
Dim DBrs1 As New ADODB.Recordset
Dim DBrs2 As New ADODB.Recordset
Dim sqlstr As String
Private Sub Form_Load()
If DBcnn.State = 0 Then
    Dim connectstr As String
    connectstr = "Provider=Microsoft.jet.OLEDB.4.0;Data Source=" & _
               App.Path & "\KFGL.mdb;Persist Security Info=False"
    DBcnn.CursorLocation = adUseClient
    DBcnn.Open connectstr
 End If
'自动识别数据库路径
' Data1.DatabaseName = App.Path & "\KFGL.MDB"
 'Data2.DatabaseName = App.Path & "\KFGL.MDB"
 czy.Text = main.StatusBar1.Panels(4).Text
 DTP1.Value = Date - 1: DTP2.Value = Date
End Sub
Private Sub Form_Activate()
  G1.Text = Left(DTP1, 4) & Right(Left(DTP1, 7), 2) & Right(DTP1, 2) & Left(DTM1, 2) & Left(Right(DTM1, 5), 2)
  G2.Text = Left(DTP2, 4) & Right(Left(DTP2, 7), 2) & Right(DTP2, 2) & Left(DTM2, 2) & Left(Right(DTM2, 5), 2)
  sqlstr = "select * from tfd "
  'where tfd.BZ >" & Val(G1.Text) & _
          ' " AND tfd.BZ<" & Val(G2.Text) & " order by 凭证号码"
  If DBrs1.State = 1 Then
    DBrs1.Close
  End If
  'DBrs1.Open sqlstr, DBcnn, adOpenDynamic, adLockBatchOptimistic
  If DBrs2.State = 1 Then
    DBrs2.Close
  End If
  '统计各项费用
  sqlstr = "select count(*)as 数量1,sum(应收宿费)as 应收宿费1," & _
           "sum(杂费)as 杂费1,sum(电话费)as 电话费1 ,sum(会议费)as 会议费1," & _
            "sum(存车费)as 存车费1,sum(赔偿费)as 赔偿费1,sum(金额总计)as 总计金额1," & _
            "sum(预收宿费)as 预收宿费1,sum(退还宿费)as 退还宿费1 from tfd "
            'where tfd.BZ >" & _
            'Val (G1.Text) & "AND tfd.bz<" & Val(G2.Text)
  DBrs2.Open sqlstr, DBcnn, adOpenStatic, adLockBatchOptimistic
'  Set MS1.DataSource = DBrs2
 ' Data1.RecordSource = "select * from tfd where BZ >=" & G1.Text & " AND tfd.BZ<=" & G2.Text & " order by 凭证号码"
'  Data1.Refresh
  '统计各项费用
 ' Data2.RecordSource = "select count(*)as 数量1,sum(应收宿费)as 应收宿费1,sum(杂费)as 杂费1,sum(电话费)as 电话费1 ,sum(会议费)as 会议费1,sum(存车费)as 存车费1,sum(赔偿费)as 赔偿费1,sum(金额总计)as 总计金额1,sum(预收宿费)as 预收宿费1,sum(退还宿费)as 退还宿费1 from tfd where tfd.BZ >" & Val(G1.Text) & "AND tfd.bz<" & Val(G2.Text)
 ' Data2.Refresh
  '设置MSFlexgrid的列宽
  MS1.colwidth(0) = 0: MS1.colwidth(1) = 1500: MS1.colwidth(2) = 600
  MS1.colwidth(3) = 0: MS1.colwidth(4) = 0: MS1.colwidth(5) = 0
  MS1.colwidth(7) = 600: MS1.colwidth(8) = 0: MS1.colwidth(9) = 450
  MS1.colwidth(10) = 0: MS1.colwidth(11) = 0: MS1.colwidth(12) = 450
  MS1.colwidth(13) = 0: MS1.colwidth(14) = 840: MS1.colwidth(15) = 450
  MS1.colwidth(16) = 900: MS1.colwidth(17) = 450: MS1.colwidth(18) = 780
  MS1.colwidth(19) = 780: MS1.colwidth(20) = 780: MS1.colwidth(21) = 780
  MS1.colwidth(22) = 780: MS1.colwidth(23) = 780: MS1.colwidth(24) = 780
  MS1.colwidth(25) = 0: MS1.colwidth(26) = 0: MS1.colwidth(27) = 0
  MS1.colwidth(28) = 0: MS1.colwidth(29) = 0: MS1.colwidth(30) = 0
  MS1.colwidth(31) = 0: MS1.colwidth(6) = 0
  MS2.colwidth(0) = 4950: MS2.colwidth(1) = 900: MS2.colwidth(2) = 450
  MS2.colwidth(3) = 780: MS2.colwidth(4) = 780: MS2.colwidth(5) = 780
  MS2.colwidth(6) = 780: MS2.colwidth(7) = 780: MS2.colwidth(8) = 780
  MS2.colwidth(9) = 780
  '设置下面各列的标题
  MS1.TextMatrix(0, 9) = "房价": MS1.TextMatrix(0, 25) = "押金"
  MS1.TextMatrix(0, 12) = "天数": MS1.TextMatrix(0, 14) = "结款方式"
  MS1.TextMatrix(0, 17) = "杂费": MS1.TextMatrix(0, 22) = "实收金额"
  MS2.TextMatrix(0, 0) = "合计"
End Sub
Private Sub Command1_Click()
 Form_Activate
End Sub
Private Sub Command2_Click()
 main.Enabled = True
 Unload Me
End Sub


⌨️ 快捷键说明

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