毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 课程设计 >> 正文

VB酒店客房管理系统数据流图+ER图+功能模块图 第2页

更新时间:2009-4-8:  来源:毕业论文
酒店客房管理系统
系统的界面设计及源代码

6.1系统登陆窗口界面
Dim TIM As Integer     '定义一个整型变量
Dim myval As String     '定义一个字符串变量
Private Sub Form_Load()
 '自动识别数据库路径
 Data1.DatabaseName = App.Path & "\KFGL.mdb"
 Data2.DatabaseName = App.Path & "\KFGL.mdb"
End Sub
Private Sub Form_Activate()
'当记录为零时,进入系统具有所有权限
 If Data1.Recordset.RecordCount = 0 Then
  MsgBox ("请先设置操作员密码和权限!")
  Load main
  main.Show
  Unload Me
 Else
  Text1.SetFocus
 End If
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
 If KeyCode = vbKeyReturn Then Text2.SetFocus     '按回车键,text2获得焦点
End Sub
Private Sub text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Cmd1.SetFocus     '按回车键cmd1获得焦点
If KeyCode = vbKeyUp Then Text1.SetFocus
If KeyCode = vbKeyDown Then Cmd1.SetFocus
End Sub
Private Sub cmd1_Click()
 main.StatusBar1.Panels(4).Text = Text1.Text     '赋值给main.StatusBar1.Panels(4).Text
 '验证操作员及密码
 If Data2.Recordset.BOF = False Then Data2.Recordset.MoveFirst
 Data2.Recordset.FindFirst "操作员 like " + Chr(34) + Text1.BoundText + Chr(34) + ""
 If Data2.Recordset.NoMatch Then
  MsgBox ("操作员输入错误!")
 Else
  Data1.RecordSource = "select * from qxsz where 操作员='" & Text1.BoundText & "'"
  Data1.Refresh
  If Text1.BoundText <> "" And Text2.Text <> "" And Text2.Text = Data1.Recordset.Fields("密码") Then
    Load main
    main.Show
    Unload Me
  Else
   If TIM = 3 Then     '密码输错3次,退出系统
     myval = MsgBox("密码输入错误,请向系统管理员查询!", 0, "")
     If myval = vbOK Then End
   End If
   If Text1.BoundText = "" Then
     MsgBox ("请输入操作员!")
     Text1.SetFocus
    Else
     If Text1.BoundText <> Data1.Recordset.Fields("操作员") Then
       MsgBox ("查无此操作员,请重新输入操作员!")
       Text1.SetFocus
     Else
      If Text2.Text = "" Then
        MsgBox ("请输入操作员密码!")
        Text2.SetFocus
      Else
        If Text2.Text <> Data1.Recordset.Fields("密码") Then
          MsgBox ("密码错误,请重新输入密码!")
          TIM = TIM + 1
          Text2.SetFocus
        End If
       End If
     End If
   End If
 End If
End If
End Sub
Private Sub cmd2_Click()
  End6.2系统主程序窗口界面
 
Private Sub Form_Load()
 Data1.DatabaseName = App.Path & "\Kfgl.MDB"     '自动识别数据库路径
End Sub
Private Sub Form_Activate()     '设置操作员权限
 With Data1.Recordset
 If .BOF = False Then .MoveFirst
 .FindFirst "操作员 like " + Chr(34) + StatusBar1.Panels(4).Text + Chr(34) + ""
 If .NoMatch Then
 Else
  main.zjyj.Enabled = .Fields("追加押金")
  main.zsdj.Enabled = .Fields("住宿登记")
  main.Label1.Enabled = .Fields("住宿登记")
  main.tf.Enabled = .Fields("退宿登记")
  main.Label2.Enabled = .Fields("退宿登记")
  main.tfdj.Enabled = .Fields("调房登记")
  main.kfsz.Enabled = .Fields("客房管理")
  main.kfcx.Enabled = .Fields("客房查询")
  main.ftck.Enabled = .Fields("房态查看")
  main.khjk.Enabled = .Fields("客户结款")
  main.zscx.Enabled = .Fields("住宿查询")
  main.Label3.Enabled = .Fields("住宿查询")
  main.tfcx.Enabled = .Fields("退宿查询")
  main.sftx.Enabled = .Fields("宿费提醒")
  main.Label5.Enabled = .Fields("宿费提醒")
  main.Label4.Enabled = .Fields("客房销售报表")
  main.xstj.Enabled = .Fields("客房销售统计报表")
  main.czysz.Enabled = .Fields("操作员设置")
  main.ma.Enabled = .Fields("密码设置")
  main.csh.Enabled = .Fields("初始化")
  main.qxsz.Enabled = .Fields("权限设置")
 End If
 End With
End Sub

Private Sub label1_Click()     '调入住宿登记
 zsdj_Click
End Sub
Private Sub label2_Click()      '调入退宿结帐
 tf_Click
End Sub
Private Sub Label3_Click()      '调入住宿查询
 zscx_Click
End Sub
Private Sub Label4_Click()      '调入客房销售报表
 xsbb_Click
End Sub
Private Sub Label5_Click()      '调入宿费提醒
 sftx_Click
End Sub
Private Sub label6_Click()
 End
End Sub


Private Sub zjyj_Click()       '调入追加押金
 Load main_zjyj
 main_zjyj.Show
 main.Enabled = False
End Sub
Private Sub tfdj_Click()      '调入调房登记
 main_tfdj.Show
 main.Enabled = False
End Sub
Private Sub tf_Click()        '调入退宿结帐
 main_tf.Show
 main.Enabled = False
End Sub
Private Sub kfsz_Click()      '调入客房管理

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... 下一页  >> 

VB酒店客房管理系统数据流图+ER图+功能模块图 第2页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。