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

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

更新时间:2009-4-8:  来源:毕业论文
酒店客房管理系统VB
Data1.Recordset.Edit
  If Texfjh.Text <> "" Then Data1.Recordset.Fields("房间号") = Texfjh.Text
  If Combo2.Text <> "" Then Data1.Recordset.Fields("房态") = Combo2.Text
  If Combo1.Text <> "" Then Data1.Recordset.Fields("房间类型") = Combo1.Text
  If Texjg.Text <> "" Then Data1.Recordset.Fields("价格") = Texjg.Text
  If DTP1.Value <> "" Then Data1.Recordset.Fields("营业日期") = DTP1.Value
  If Texsz.Text <> "" Then Data1.Recordset.Fields("使用设置") = Texsz.Text
  If Texpz.Text <> "" Then Data1.Recordset.Fields("配置") = Texpz.Text
  If Texbz.Text <> "" Then Data1.Recordset.Fields("备注") = Texbz.Text
  If Texfjh.Text <> "" Then Data1.Recordset.Fields("标志") = "0"
  Data1.Recordset.Update     '更新记录
  Data1.Refresh
 End If
'设置控件有效或无效
 Comsave.Enabled = False: Comcancel.Enabled = False
 Comend.Enabled = True: Comdj.Enabled = True
End Sub
Private Sub comcancel_Click()     '取消操作
 Texfjh.Text = "": Texjg.Text = "": Texsz.Text = ""
 Texpz.Text = "": Texbz.Text = ""
 Comsave.Enabled = False: Comcancel.Enabled = False: Comdj.Enabled = True
End Sub
Private Sub comend_Click()
 main.Enabled = True
 Unload Me
End Sub
6.4.2客房查询

 
Private Sub Form_Load()     '自动识别数据库路径
 Data1.DatabaseName = App.Path & "\KFGL.MDB"
End Sub
Private Sub Form_Unload(Cancel As Integer)
 main.Enabled = True
End Sub
Private Sub Text1_Change()
'查询客房信息
 Data1.RecordSource = "select * from kf where kf.房间号 like " + Chr(34) + Text1.Text + "*" + Chr(34) + ""
 Data1.Refresh
End Sub
Private Sub Command1_Click()     '允许修改客房信息
 DBGrid1.AllowUpdate = True
End Sub
Private Sub Command2_Click()     '删除客房信息
 If Data1.Recordset.RecordCount > 0 Then
  Data1.Recordset.Delete
  Data1.Refresh
 End If
End Sub
Private Sub Command3_Click()
 main.Enabled = True
 Unload Me
End Sub
6.4.3房态查看
 
Private Sub Form_Activate()
 Dim i As Integer     '定义一个整型变量
 Dim criteria As String     '定义一个字符串变量
 Dim mydb1 As Database     '定义数据库
 Dim myrs1 As Recordset     '定义字段
 Dim myrs2 As Recordset
 Dim myrs3 As Recordset
 Set mydb1 = Workspaces(0).OpenDatabase(App.Path & "\kfgl.mdb")     '定义数据环境
 Set myrs1 = mydb1.OpenRecordset("kf", dbOpenSnapshot)     '定义数据表
 '入住房间查询
 sql = "select * from kf where kf.房态 like " + Chr(34) + "入住" + Chr(34) + ""
 Set myrs2 = mydb1.OpenRecordset(sql)
 '文修房间查询
 sql = "select * from kf where kf.房态 like " + Chr(34) + "文修" + Chr(34) + ""
 Set myrs3 = mydb1.OpenRecordset(sql)
 For i = 1 To 25             '房态显示
  criteria = "房间号 ='" & Command1(i).Caption & "'"
  myrs1.FindFirst criteria
  If myrs1.NoMatch Then
  Else
   If myrs1.Fields("房态") = "空房" Then Command1(i).Picture = LoadPicture("")     '空房
   If myrs1.Fields("房态") = "入住" Then Command1(i).Picture = LoadPicture(App.Path & "\image\rz.ico")
   If myrs1.Fields("房态") = "文修" Then Command1(i).Picture = LoadPicture(App.Path & "\image\wx.ico")
  End If
 Next i
 If Not myrs2.EOF Then myrs2.MoveLast
 If Not myrs3.EOF Then myrs3.MoveLast
 Labsy.Caption = myrs2.RecordCount     '客房入住数
 Labwx.Caption = myrs3.RecordCount     '客房文修数
 Labkx.Caption = 25 - Val(Labwx.Caption) - Val(Labsy.Caption)     '客房空闲数
 Labsyl.Caption = Val(Labsy.Caption) / 25 * 100 & "%"     '客房使用率
End Sub
Private Sub Form_Unload(Cancel As Integer)
 main.Enabled = True
End Sub
Private Sub Command1_Click(Index As Integer)     '查询住宿信息
 main_zscx.Text2.Text = "1"
 If Index >= 0 <= 25 Then
  main_zscx.Data1.RecordSource = "select * from djb where 标志='1'and 房间号='" & Command1(Index).Caption & "'"
  main_zscx.Data1.Refresh
 End If
 Load main_zscx
 main_zscx.Show
End Sub
Private Sub Command2_Click()
 Unload Me
 main.Enabled = True
End Sub
6.5 挂帐管理
6.5.1客户结款
 
Private Sub Form_Load()
'自动识别数据库路径
 Data1.DatabaseName = App.Path & "\KFGL.MDB"
 Data2.DatabaseName = App.Path & "\KFGL.MDB"
End Sub
 '客户结款
 Data1.RecordSource = "select * from gzmx where 挂账单位='" & DBCombo1.Text & "'"
 Data1.Refresh
 If Data1.Recordset.EOF = False Then Data1.Recordset.MoveLast
 '添加客户结款信息
 Data1.Recordset.AddNew
 Data1.Recordset.Fields("日期") = Date
 Data1.Recordset.Fields("时间") = Time
 Data1.Recordset.Fields("摘要") = "客户还款"
 Data1.Recordset.Fields("姓名") = Text2.Text
 If DBCombo1.Text <> "" Then Data1.Recordset.Fields("挂账单位") = DBCombo1.Text
 Data1.Recordset.Fields("还款金额") = Format(Val(Text1.Text), "0.00")
 Data1.Recordset.Fields("金额累计") = Format((Val(khye.Text) - Val(Text1.Text)), "0.00")
 Data1.Recordset.Update      '更新记录
 '清空数据
 Text1.Text = "": khye.Text = "": Text2.Text = ""
End Sub
Private Sub Command2_Click()
 main.Enabled = True
 Unload Me
End Sub

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

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

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