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

📄 main_ysbb.frm

📁 酒店客房管理系统(vb^+SQLServer2000+使用说明)
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form main_ysbb 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "登记预收报表"
   ClientHeight    =   3900
   ClientLeft      =   45
   ClientTop       =   555
   ClientWidth     =   11100
   Icon            =   "main_ysbb.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   3900
   ScaleWidth      =   11100
   StartUpPosition =   2  '屏幕中心
   Begin MSDataGridLib.DataGrid DataGrid1 
      Height          =   2775
      Left            =   30
      TabIndex        =   16
      Top             =   735
      Width           =   10995
      _ExtentX        =   19394
      _ExtentY        =   4895
      _Version        =   393216
      AllowUpdate     =   0   'False
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         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 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin MSAdodcLib.Adodc Adodc2 
      Height          =   375
      Left            =   2160
      Top             =   4680
      Width           =   2175
      _ExtentX        =   3836
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\程序修改\宾馆客房管理系统\宾馆客房管理系统\DB_KFGL.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\程序修改\宾馆客房管理系统\宾馆客房管理系统\DB_KFGL.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from tb_djys"
      Caption         =   "Adodc2"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   2160
      Top             =   4200
      Width           =   2175
      _ExtentX        =   3836
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\程序修改\宾馆客房管理系统\宾馆客房管理系统\DB_KFGL.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\程序修改\宾馆客房管理系统\宾馆客房管理系统\DB_KFGL.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * From tb_djys"
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Frame Frame2 
      Caption         =   "Frame2"
      Height          =   1170
      Left            =   0
      TabIndex        =   7
      Top             =   3960
      Visible         =   0   'False
      Width           =   4770
      Begin VB.TextBox G1 
         Height          =   270
         Left            =   195
         TabIndex        =   9
         Top             =   600
         Width           =   1635
      End
      Begin VB.TextBox G2 
         Height          =   270
         Left            =   195
         TabIndex        =   8
         Top             =   270
         Width           =   1620
      End
   End
   Begin VB.Frame Frame1 
      Height          =   675
      Left            =   60
      TabIndex        =   0
      Top             =   0
      Width           =   10995
      Begin VB.CommandButton Command1 
         Caption         =   "确定"
         Height          =   345
         Left            =   8520
         Style           =   1  'Graphical
         TabIndex        =   12
         Top             =   210
         Width           =   1200
      End
      Begin VB.TextBox czy 
         BackColor       =   &H80000000&
         BorderStyle     =   0  'None
         Height          =   240
         Left            =   795
         TabIndex        =   10
         Top             =   255
         Width           =   1035
      End
      Begin MSComCtl2.DTPicker DTM1 
         Height          =   315
         Left            =   4005
         TabIndex        =   5
         Top             =   210
         Width           =   1350
         _ExtentX        =   2381
         _ExtentY        =   556
         _Version        =   393216
         Format          =   100204546
         CurrentDate     =   .4375
      End
      Begin MSComCtl2.DTPicker DTP1 
         Height          =   315
         Left            =   2625
         TabIndex        =   3
         Top             =   210
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   556
         _Version        =   393216
         Format          =   100204545
         CurrentDate     =   37143
      End
      Begin VB.CommandButton Command2 
         Caption         =   "退出"
         Height          =   345
         Left            =   9720
         Style           =   1  'Graphical
         TabIndex        =   2
         Top             =   210
         Width           =   1200
      End
      Begin MSComCtl2.DTPicker DTP2 
         Height          =   315
         Left            =   5685
         TabIndex        =   4
         Top             =   210
         Width           =   1380
         _ExtentX        =   2434
         _ExtentY        =   556
         _Version        =   393216
         Format          =   100204545
         CurrentDate     =   37143
      End
      Begin MSComCtl2.DTPicker DTM2 
         Height          =   315
         Left            =   7080
         TabIndex        =   6
         Top             =   210
         Width           =   1350
         _ExtentX        =   2381
         _ExtentY        =   556
         _Version        =   393216
         Format          =   100204546
         CurrentDate     =   .4375
      End
      Begin VB.Label Label2 
         Caption         =   "操作员"
         Height          =   255
         Left            =   75
         TabIndex        =   11
         Top             =   255
         Width           =   765
      End
      Begin VB.Label Label1 
         Caption         =   "日期从:                                到"
         Height          =   285
         Left            =   1905
         TabIndex        =   1
         Top             =   255
         Width           =   6795
      End
   End
   Begin VB.Label Labyj 
      BackStyle       =   0  'Transparent
      Height          =   240
      Left            =   5265
      TabIndex        =   13
      Top             =   3660
      Width           =   2430
   End
   Begin VB.Label Labys 
      BackStyle       =   0  'Transparent
      Height          =   240
      Left            =   1425
      TabIndex        =   15
      Top             =   3660
      Width           =   2430
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "合计应收宿费:                             合计预收宿费:"
      Height          =   270
      Left            =   120
      TabIndex        =   14
      Top             =   3660
      Width           =   7560
   End
End
Attribute VB_Name = "main_ysbb"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
    '自动识别数据库路径
    Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\DB_KFGL.mdb;Persist Security Info=False"
    Adodc1.RecordSource = "select * from tb_djys"
    Adodc1.Refresh
    Set DataGrid1.DataSource = Adodc1
    Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\DB_KFGL.mdb;Persist Security Info=False"
    Adodc2.RecordSource = "select * from tb_djys"
    Adodc2.Refresh
End Sub
Private Sub Form_Activate()
    czy.text = Main.StatusBar1.Panels(4).text
    DTP1.Value = Date
    DTP2.Value = Date + 1
    'Left函数返回 Variant (String),其中包含字符串中从左边算起指定数量的字符。
    'Right 函数返回 Variant (String),其中包含从字符串右边取出的指定数量的字符。
    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)
    Adodc1.RecordSource = "select * from tb_djys where tb_djys.BZ > " & Val(G1.text) & " and tb_djys.BZ < " & Val(G2.text) & " order by 凭证号码"
    Adodc1.Refresh
    DataGrid1.Columns(7).Width = 0
    DataGrid1.Columns(8).Width = 0
    DataGrid1.Columns(20).Width = 0
    Adodc2.RecordSource = "select count(*)as ddd,sum(应收宿费)as 应收宿费1,sum(预收金额)as 预收汇总 from tb_djys where tb_djys.BZ > " & Val(G1.text) & "and tb_djys.BZ <" & Val(G2.text) & " and tb_djys.标志 = '0' or tb_djys.标志='1'"
    Adodc2.Refresh

    If Adodc2.Recordset.Fields(1) <> "" Then Labys.Caption = Format(Adodc2.Recordset.Fields(1)) Else Labys.Caption = "0"
    If Adodc2.Recordset.Fields(2) <> "" Then Labyj.Caption = Format(Adodc2.Recordset.Fields(2)) Else Labyj.Caption = "0"
End Sub
Private Sub Form_Unload(Cancel As Integer)
 Main.Enabled = True
End Sub
Private Sub Command1_Click()
    '统计应收宿费、预收宿费
    If DTP1.Value <= DTP2.Value Then
        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)
        Adodc1.RecordSource = "select * from tb_djys where tb_djys.BZ > " & Val(G1.text) & " and tb_djys.BZ <" & Val(G2.text) & " order by 凭证号码"
        Adodc1.Refresh
        DataGrid1.Columns(7).Width = 0
        DataGrid1.Columns(8).Width = 0
        DataGrid1.Columns(20).Width = 0
        Adodc2.RecordSource = "select count(*) as ddd,sum(应收宿费)as 应收宿费1,sum(预收金额)as 预收汇总 from tb_djys where tb_djys.bz >" & Val(G1.text) & " and tb_djys.Bz <" & Val(G2.text) & ""
        Adodc2.Refresh
        If Adodc2.Recordset.Fields(1) <> "" Then Labys.Caption = Format(Adodc2.Recordset.Fields(1), "0.00") Else Labys.Caption = "0"
        If Adodc2.Recordset.Fields(2) <> "" Then Labyj.Caption = Format(Adodc2.Recordset.Fields(2), "0.00") Else Labyj.Caption = "0"
    Else
        MsgBox "日期不能颠倒", 4, "系统提示"
        DTP2.Value = Date
    End If
End Sub
Private Sub Command2_Click()
  Main.Enabled = True
  Unload Me
End Sub

⌨️ 快捷键说明

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