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

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

更新时间:2009-4-8:  来源:毕业论文
VB酒店客房管理系统数据流图+ER图+功能模块图 第10页
系统设置
6.8.1操作员设置 
Private Sub Form_Load()
 Data1.DatabaseName = App.Path & "\KFGL.MDB"     '自动识别数据库路径
End Sub
Private Sub Form_Activate()
 Text1.SetFocus     'text1获得焦点
End Sub
Private Sub Form_Unload(Cancel As Integer)
 main.Enabled = True
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 Text3.SetFocus     '回车text3获得焦点
End Sub
Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer)
 If KeyCode = vbKeyReturn Then Command1.SetFocus     '回车Command1获得焦点
End Sub
Private Sub Command1_Click()
 '保存操作员及密码
 If Text1.Text <> "" Then
  If Text2.Text <> "" Then
   Data1.Recordset.AddNew
   Data1.Recordset.Fields("操作员") = Text1.Text
   Data1.Recordset.Fields("密码") = Text2.Text
   Data1.Recordset.Update     '更新记录
   Data1.Refresh
   Text1.Text = "": Text2.Text = "": Text3.Text = ""
   MsgBox ("操作员设置成功!")
  End If
 Else
  MsgBox ("请输入操作员!")
 End If
End Sub
Private Sub Command2_Click()
 Text1.Text = "": Text2.Text = "": Text3.Text = ""
End Sub
Private Sub Command3_Click()
 main.Enabled = True
 Unload Me
End Sub
6.8.2密码设置
Private Sub Form_Load()
 Data1.DatabaseName = App.Path & "\KFGL.MDB"     '自动识别数据库路径
End Sub
Private Sub Form_Activate()
 Text1.SetFocus     'text1获得焦点
End Sub
Private Sub Form_Unload(Cancel As Integer)
 main.Enabled = True
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 Text3.SetFocus     '回车text3获得焦点
End Sub
Private Sub label1_Click()     '修改操作员密码
 Data1.RecordSource = "select * from qxsz where 操作员='" & Text1.Text & "'"
 Data1.Refresh
 If Text1.Text <> "" And Text2.Text <> "" And Text2.Text = Data1.Recordset.Fields("密码") Then
 If Text3.Text <> "" Then
  Data1.Recordset.Edit
  Data1.Recordset.Fields("密码") = Text3.Text
  MsgBox ("密码修改成功,退出操作员密码修改!")
  Data1.Recordset.Update
  main.Enabled = True
  Unload Me
 Else
  MsgBox ("请输入新密码!!")
 End If
 Else
 If Text1.Text = "" Then
  MsgBox ("请输入操作员!")
  Text1.SetFocus
 Else
  If Text1.Text <> Data1.Recordset.Fields("操作员") Then
  Text1.SetFocus
  Text1.Text = ""
  MsgBox ("无此操作员,请重新输入!")
  End If
 End If
 If Text2.Text = "" Then
  MsgBox ("请输入操作员原密码!")
  Text2.SetFocus
 Else
  If Text2.Text <> ma.Text Then
   MsgBox ("原密码错误,请重新输入原密码!")
   Text2.SetFocus
  End If
 End If
 End If
End Sub
Private Sub label2_Click()
 main.Enabled = True
 Unload Me
End Sub

6.8.3权限设置 
Private Sub Form_Load()     '自动识别数据库路径
 Data1.DatabaseName = App.Path & "\KFGL.MDB"
 Data2.DatabaseName = App.Path & "\KFGL.MDB"
End Sub
Private Sub Form_Unload(Cancel As Integer)
 main.Enabled = True
End Sub
Private Sub DBList1_Click()
 If Data2.Recordset.BOF = False Then Data2.Recordset.MoveFirst
 '查找操作员
 Data2.Recordset.FindFirst "操作员='" & DBList1.BoundText & "'"
 If Data2.Recordset.NoMatch Then
  DBList1.BoundText = 0
 Else
  '赋值给Check1
   For i = 0 To 2
    If Data2.Recordset.Fields(i) = -1 Then Check1(i).Value = 1 Else Check1(i).Value = 0
   Next i
 End If
End Sub
Private Sub Command1_Click()     '全选
For i = 0 To 20
  Check1(i).Value = 1
Next i
End Sub
Private Sub Command2_Click()     '全不选
For i = 0 To 20
  Check1(i).Value = 0
Next i
End Sub
Private Sub Command3_Click()     '为操作员设置权限
 If DBList1.BoundText <> "" Then
 Data2.Recordset.FindFirst "操作员= '" & DBList1.BoundText & "'"
 If Data2.Recordset.NoMatch Then
  Else
   Data2.Recordset.Edit
    For i = 0 To 20
     Data2.Recordset.Fields(i) = Check1(i).Value
    Next i
  Data2.Recordset.Update '更新记录
  Data2.Refresh
 End If
 End If
End Sub
Private Sub Command4_Click()     '删除操作员
 On Error Resume Next
 Data2.Recordset.Delete
 Data2.Refresh
 Data1.Refresh
End Sub
Private Sub comend_Click()
 Unload Me
 main.Enabled = True
End Sub
       Data1.Recordset.Fields("房态") = "空房"
       Data1.Recordset.Update
       If Data1.Recordset.EOF = False Then Data1.Recordset.MoveNext
     Next i
   End If
  End If
 End If
 Next Counter
 ProgressBar1.Visible = False
 ProgressBar1.Value = ProgressBar1.Min
End Sub
Private Sub comend_Click()
 main.Enabled = True
 Unload Me
End Sub
Private Sub Frame1_DragDrop(Source As Control, X As Single, Y As Single)
End Sub

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

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

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