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

📄 frmgroupbook2.frm

📁 VB客房管理系统全套(带源码)顾客可以用电话或上网注册的方式预定。其方式不同
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmGroupBook2 
   Caption         =   "查询团体订房信息"
   ClientHeight    =   3210
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6330
   LinkTopic       =   "Form1"
   ScaleHeight     =   3210
   ScaleWidth      =   6330
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton cmdExit 
      Caption         =   "取消"
      Height          =   495
      Left            =   3360
      TabIndex        =   11
      Top             =   2400
      Width           =   1215
   End
   Begin VB.CommandButton cmd0k 
      Caption         =   "确定"
      Height          =   495
      Left            =   1560
      TabIndex        =   10
      Top             =   2400
      Width           =   1095
   End
   Begin VB.Frame Frame1 
      Height          =   1095
      Left            =   1800
      TabIndex        =   3
      Top             =   1080
      Width           =   3975
      Begin VB.ComboBox cboDay 
         Height          =   300
         Index           =   0
         Left            =   2760
         TabIndex        =   6
         Text            =   "cboDay"
         Top             =   360
         Width           =   615
      End
      Begin VB.ComboBox cboMonth 
         Height          =   300
         Index           =   0
         Left            =   1440
         TabIndex        =   5
         Text            =   "cboMonth"
         Top             =   360
         Width           =   855
      End
      Begin VB.ComboBox cboYear 
         Height          =   300
         Index           =   0
         Left            =   240
         TabIndex        =   4
         Text            =   "cboYear"
         Top             =   360
         Width           =   735
      End
      Begin VB.Label Label3 
         Caption         =   "日"
         Height          =   255
         Left            =   3480
         TabIndex        =   9
         Top             =   360
         Width           =   255
      End
      Begin VB.Label Label2 
         Caption         =   "月"
         Height          =   375
         Left            =   2400
         TabIndex        =   8
         Top             =   360
         Width           =   375
      End
      Begin VB.Label Label1 
         Caption         =   "年"
         Height          =   375
         Left            =   1080
         TabIndex        =   7
         Top             =   360
         Width           =   255
      End
   End
   Begin VB.TextBox txtItem 
      Height          =   375
      Left            =   2400
      TabIndex        =   2
      Top             =   480
      Width           =   2175
   End
   Begin VB.CheckBox chkItem 
      Caption         =   "入住时间"
      Height          =   375
      Index           =   1
      Left            =   240
      TabIndex        =   1
      Top             =   1200
      Width           =   1335
   End
   Begin VB.CheckBox chkItem 
      Caption         =   "负责人身份证号"
      Height          =   375
      Index           =   0
      Left            =   240
      TabIndex        =   0
      Top             =   480
      Width           =   1695
   End
End
Attribute VB_Name = "frmGroupBook2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit




Private Sub chkItem_Click(Index As Integer)
    If Index = 1 Then
        cboYear(0).SetFocus
    Else
        txtItem.SetFocus
        End If
End Sub





Private Sub cmdexit_Click()
    Me.Hide
End Sub

Private Sub cmd0k_Click()

    Dim dBeginDate As String
    Dim sQSql As String
    
    If chkItem(0).Value = vbChecked Then
       sQSql = " prinID = '" & Trim(txtItem & " ") & "'"
    End If
   
    If chkItem(1).Value = vbChecked Then
        dBeginDate = Format(CDate(cboYear(0) & "-" & cboMonth(0) & "-" & cboDay(0)), "yyyy-mm-dd")
        
        
        If Trim(sQSql & " ") = "" Then
            sQSql = " indate ='" & dBeginDate & "'"
        Else
            sQSql = sQSql & " and indate ='" & dBeginDate & "'"
        End If
        
    
    End If
    
    If Trim(sQSql) = "" Then
        MsgBox "请设置查询条件!", vbOKOnly + vbExclamation, "警告"
        Exit Sub
    Else
        If flagBedit Then
            Unload frmGroupBook
        End If
        frmGroupBook.txtSQL = "select bookno,customname,customID,roomno,indate,discount,inmemo,prinID,dymoney,ydtime,tianshu from bookin where ammount = '0' and " & sQSql
        frmGroupBook.Show
    End If
    Me.Hide
End Sub

Private Sub Form_Load()
    
    
    Dim i As Integer
    Dim j As Integer
    Dim sSql As String
    Dim txtSQL As String
    Dim msgtext As String
    Dim mrc As ADODB.Recordset
    
  
    txtSQL = "select distinct datepart(yy,indate) from bookin where ammount = '0' "
    Set mrc = ExecuteSQL(txtSQL, msgtext)
    If mrc.EOF = False Then
        With mrc
            Do While Not .EOF
                cboYear(0).AddItem .Fields(0)
                .MoveNext
            Loop
        End With
        
        cboYear(0).ListIndex = 0
        
        For j = 1 To 12
            cboMonth(0).AddItem j
        Next j
        cboMonth(0).Text = Month(Now())
        
        For j = 1 To 31
            cboDay(0).AddItem j
        Next j
        cboDay(0).Text = Day(Now())
        
    Else
        cmd0k.Enabled = False
    End If
    mrc.Close
End Sub



⌨️ 快捷键说明

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