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

📄 frmskgl.frm

📁 宾馆管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Left            =   1320
         List            =   "frmSKGL.frx":05A8
         TabIndex        =   3
         Top             =   960
         Width           =   1455
      End
      Begin VB.TextBox txtid 
         Height          =   375
         Left            =   1320
         TabIndex        =   2
         Top             =   360
         Width           =   1455
      End
      Begin MSComCtl2.DTPicker DTPicker2 
         Height          =   255
         Left            =   5400
         TabIndex        =   10
         Top             =   1800
         Width           =   1575
         _ExtentX        =   2778
         _ExtentY        =   450
         _Version        =   393216
         Format          =   70844417
         CurrentDate     =   38466
      End
   End
   Begin VB.CommandButton cmdcancel 
      Caption         =   "退出"
      Height          =   495
      Left            =   6240
      TabIndex        =   0
      Top             =   5880
      Width           =   2055
   End
End
Attribute VB_Name = "frmYDGL"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub cmdcancel_Click()
Unload Me
Unload mdiHotelmain
mdiHotelmain.Show
End Sub
Private Sub cmdok_Click()  '填写预定客户基本信息
If txtid.Text = "" Or Combono.Text = "" Or txtname = "" Or Combotype.Text = "" Or txtzjno.Text = "" Or DTPicker1.Value = "" Or DTPicker2.Value = "" Then
    MsgBox "请认真填完所有的表格!"
    Exit Sub
Else
Dim i As Integer
i = 1
While i <= List2.ListCount
Dim rst As New ADODB.Recordset
txtsql = "select * from tbSK_Book"
Set rst = ExecuteSQL(txtsql)
rst.AddNew

rst!cAccountId = txtid.Text
rst!cRoomStory = Combocs.Text

rst!croomno = List2.list(i - 1)
rst!cClientName = txtname.Text

If Option1.Value = True Then
rst!cSex = "男"
Else
rst!cSex = "女"
End If

rst!cZJ = Combotype.Text
rst!cZJ_No = txtzjno.Text
rst!dRoom_In = DTPicker1.Value
rst!dRoom_Out = DTPicker2.Value
rst!cRoomType = "预定"
rst.Update
i = i + 1
Wend
End If
rst.Close
cmdok.Enabled = False
Combono.Enabled = True
Unload Me
frmYDGL.Show
End Sub




Private Sub cmdquding_Click() '选择楼层数,加载此楼层的房间

 
 cmdok.Enabled = True
 Dim i As Integer
  Dim rs As New ADODB.Recordset
 If Combocs.Text = "第一层" Then
    i = 1
    While i <= 8
    txtsql = "select * from tbNewRoomStatus where cRoomNo='" & i & "'"
    Set rs = ExecuteSQL(txtsql)
    If rs.EOF Then
        Combono.AddItem i
    End If
    i = i + 1
    Wend
    
    
ElseIf Combocs.Text = "第二层" Then
    i = 9
    While i <= 16
    txtsql = "select * from tbNewRoomStatus where cRoomNo='" & i & "'"
    Set rs = ExecuteSQL(txtsql)
    If rs.EOF Then
        Combono.AddItem i
    End If
    i = i + 1
    Wend
    

    

ElseIf Combocs.Text = "第三层" Then

    i = 17
    While i <= 24
    
    txtsql = "select * from tbNewRoomStatus where cRoomNo='" & i & "'"
    Set rs = ExecuteSQL(txtsql)
    If rs.EOF Then
        Combono.AddItem i
    End If
    i = i + 1
    Wend
   
    
ElseIf Combocs.Text = "第四层" Then
    i = 25
    While i <= 32
    
    txtsql = "select * from tbNewRoomStatus where cRoomNo='" & i & "'"
    Set rs = ExecuteSQL(txtsql)
    If rs.EOF Then
        Combono.AddItem i
    End If
    i = i + 1
    Wend
   
    
End If
rs.Close


List1.Clear
List2.Clear

Dim h As Integer
  Dim rst As New ADODB.Recordset
If Combocs.Text = "第一层" Then
    h = 1
    While h <= 8
    txtsql = "select * from tbNewRoomStatus where cRoomNo='" & h & "'"
    Set rst = ExecuteSQL(txtsql)
    If rst.EOF Then
        List1.AddItem h
    End If
    h = h + 1
    Wend
    
    
ElseIf Combocs.Text = "第二层" Then
    h = 9
    While h <= 16
    txtsql = "select * from tbNewRoomStatus where cRoomNo='" & h & "'"
    Set rst = ExecuteSQL(txtsql)
    If rst.EOF Then
        List1.AddItem h
    End If
    h = h + 1
    Wend
    

    

ElseIf Combocs.Text = "第三层" Then

    h = 17
    While h <= 24
    
    txtsql = "select * from tbNewRoomStatus where cRoomNo='" & h & "'"
    Set rst = ExecuteSQL(txtsql)
    If rst.EOF Then
        List1.AddItem h
    End If
    h = h + 1
    Wend
   
    
ElseIf Combocs.Text = "第四层" Then
    h = 25
    While h <= 32
    
    txtsql = "select * from tbNewRoomStatus where cRoomNo='" & h & "'"
    Set rst = ExecuteSQL(txtsql)
    If rst.EOF Then
        List1.AddItem h
    End If
    h = h + 1
    Wend
   
    
End If
rst.Close


End Sub







Private Sub Combono_Click()

List2.AddItem Combono.Text

List1.ListIndex = Combono.ListIndex
List1.RemoveItem List1.ListIndex
Combono.Enabled = False
End Sub

Private Sub Command1_Click()
    
List2.AddItem List1.Text
List1.RemoveItem List1.ListIndex
If List1.ListCount = 0 Then
    Command1.Enabled = False
    Command2.Enabled = True
Else
    Command1.Enabled = True
    Command2.Enabled = True
End If
End Sub

Private Sub Command2_Click()
List1.AddItem List2.Text
List2.RemoveItem List2.ListIndex


If List2.ListCount = 0 Then
    Command2.Enabled = False
    Command1.Enabled = True
Else
    Command2.Enabled = True
    Command1.Enabled = True
End If

End Sub
Private Sub Option3_Click()
If Option3.Value = True Then
    TabStrip2.Enabled = False
    List1.Enabled = False
    List2.Enabled = False
    Command1.Enabled = False
    Command2.Enabled = False
Else
    TabStrip2.Enabled = True
    List1.Enabled = True
    List2.Enabled = True
    Command1.Enabled = True
    Command2.Enabled = True
End If
End Sub

Private Sub Option4_Click()
If Option4.Value = True Then
    TabStrip2.Enabled = True
    List1.Enabled = True
    List2.Enabled = True
    Command1.Enabled = True
    Command2.Enabled = True
    
Else
    TabStrip2.Enabled = False
    List1.Enabled = False
    List2.Enabled = False
    Command1.Enabled = False
    Command2.Enabled = False
End If
End Sub
Private Sub Form_Load()
Call changeskin(Me, sknYDGL, strSkin)

Dim h As Integer

Combocs.AddItem "第一层"
Combocs.AddItem "第二层"
Combocs.AddItem "第三层"
Combocs.AddItem "第四层"
Combocs.Text = "第一层"

Combotype.AddItem "身份证"
Combotype.AddItem "机关证"
Combotype.AddItem "学生证"

DTPicker1.Value = Date
DTPicker2.Value = Date

Option1.Value = True
cmdok.Enabled = False

End Sub




⌨️ 快捷键说明

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