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

📄 jzmoney.frm

📁 VB客房管理系统全套(带源码)顾客可以用电话或上网注册的方式预定。其方式不同
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form jzmoney 
   Caption         =   "本日结帐"
   ClientHeight    =   4665
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   8700
   LinkTopic       =   "Form1"
   ScaleHeight     =   4665
   ScaleWidth      =   8700
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   7440
      TabIndex        =   4
      Top             =   240
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   375
      Left            =   6000
      TabIndex        =   3
      Top             =   240
      Width           =   1095
   End
   Begin VB.TextBox txtItem 
      Height          =   375
      Left            =   4560
      TabIndex        =   2
      Top             =   240
      Width           =   1095
   End
   Begin MSFlexGridLib.MSFlexGrid msglist 
      Height          =   3135
      Left            =   120
      TabIndex        =   0
      Top             =   1080
      Width           =   8295
      _ExtentX        =   14631
      _ExtentY        =   5530
      _Version        =   393216
      Cols            =   4
   End
   Begin VB.Label Label1 
      Caption         =   "本 日 结 帐 一 览:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   120
      TabIndex        =   1
      Top             =   120
      Width           =   3975
   End
End
Attribute VB_Name = "jzmoney"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public txtSQL As String
Dim mrc As ADODB.Recordset
Dim msgtext As String

Private Sub command1_click()
Dim txtSQL As String
If IsDate(txtItem.Text) Then
       txtItem.Text = Format(txtItem.Text, "yyyy-mm-dd")
        ShowData
    Else
        MsgBox "入库时间应输入日期(yyyy-mm-dd)!", vbOKOnly + vbExclamation, "警告"
        txtItem.SetFocus
        
        Exit Sub
        
      
End If
End Sub

Private Sub Form_Load()
 flagYedit = True
 txtItem = Date
    txtSQL = "select bookno,customname,customID,roomno,indate,discount,checkdate,dymoney,ammount from bookin where checkdate='trim(txtItem.text)'"
    Set mrc = ExecuteSQL(txtSQL, msgtext)
ShowTitle
   
   
End Sub

Private Sub ShowTitle()
    Dim i As Integer
    
    With msglist
        .Cols = 10
        .TextMatrix(0, 1) = "帐单号"
        .TextMatrix(0, 2) = "顾客姓名"
        .TextMatrix(0, 3) = "身份证号码"
        .TextMatrix(0, 4) = "房间编号"
        .TextMatrix(0, 5) = "入住日期"
        .TextMatrix(0, 6) = "折扣"
        .TextMatrix(0, 7) = "结帐时间"
        .TextMatrix(0, 8) = "抵压金"
        .TextMatrix(0, 9) = "结帐金额"
         
         
        '固定表头
        .FixedRows = 1
                
        '设置各列的对齐方式
       ' For i = 0 To 9
        '    .ColAlignment(i) = 0
        'Next i
        
        
        '表头项居中
        .FillStyle = flexFillRepeat
        .Col = 0
        .Row = 0
        .RowSel = 1
        .ColSel = .Cols - 1
        .CellAlignment = 4
        
        '设置单元大小
        .ColWidth(0) = 300
        .ColWidth(1) = 1500
        .ColWidth(2) = 1000
        .ColWidth(3) = 2000
        .ColWidth(4) = 1000
        .ColWidth(5) = 1000
        .ColWidth(6) = 1000
        .ColWidth(7) = 1000
        .ColWidth(8) = 800
        .ColWidth(9) = 1000
        
        
        .Row = 1
        
    End With
End Sub

Private Sub ShowData()
    Dim amm_money As Integer
    amm_money = 0
    
    
    Dim i As Integer
        

  txtSQL = "select bookno,customname,customID,roomno,indate,discount,checkdate,dymoney,ammount from bookin where checkdate='" & Trim(txtItem.Text) & "'"

  Set mrc = ExecuteSQL(txtSQL, msgtext)
 With msglist
        .Rows = 1
       
        Do While Not mrc.EOF
            .Rows = .Rows + 1
             
            For i = 1 To mrc.Fields.Count
                Select Case mrc.Fields(i - 1).Type
                    Case adDBDate
                        .TextMatrix(.Rows - 1, i) = Format(mrc.Fields(i - 1) & "", "yyyy-mm-dd")
                    Case Else
                        .TextMatrix(.Rows - 1, i) = mrc.Fields(i - 1) & ""
                End Select
            Next i
            amm_money = mrc("ammount") + amm_money
          mrc.MoveNext
          Loop
        text1.Text = amm_money
          
    End With
    mrc.Close
    
    
End Sub

⌨️ 快捷键说明

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