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

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

更新时间:2009-4-8:  来源:毕业论文
VB酒店客房管理系统数据流图ER图功能模块图|课程设计|宾馆客房管理系统
If Text1.Text <> "" And DBCombo1.Text <> "" Then
   '查询住宿登记信息
   Data1.RecordSource = "select * from djb where 凭证号码='" & DBCombo1.Text & "'"
   Data1.Refresh
  If Data1.Recordset.RecordCount > 0 Then
  '编辑住宿登记信息
   Data1.Recordset.Edit
   Data1.Recordset.Fields("预收金额") = Val(Text3.Text) + Val(Text1.Text)
   Data1.Recordset.Fields("提醒日期") = DTP2.Value
   Data1.Recordset.Fields("提醒时间") = tim2.Value
   Data1.Recordset.Update     '更新数据
  '查询住宿登记预收信息
   Data3.RecordSource = "select * from djys where 凭证号码='" & DBCombo1.Text & "'"
   Data3.Refresh
  '编辑住宿登记预收信息
   Data3.Recordset.Edit
   Data3.Recordset.Fields("预收金额") = Val(Text3.Text) + Val(Text1.Text)
   Data3.Recordset.Fields("提醒日期") = DTP2.Value
   Data3.Recordset.Fields("提醒时间") = tim2.Value
   Data3.Recordset.Update     '更新数据
   Data3.Refresh
 '设置控件有效或无效
   Command1.Enabled = False: Command2.Enabled = False: Command4.Enabled = True
   Command5.Enabled = True: Command3.Enabled = True
   Command5.SetFocus     'command5获得焦点
  Else
   MsgBox ("请检查凭证号码是否有效,再保存!")
  End If
 Else
  MsgBox ("请填写完整的数据,再保存!")
 End If
End Sub
Private Sub Command2_Click()                  '取消操作
 DBCombo1.Enabled = False: Command1.Enabled = False: Command2.Enabled = False
 Command4.Enabled = False: Command5.Enabled = True: Command3.Enabled = True
'清空数据
 Text1.Text = "": Text2.Text = "": Text3.Text = "": Text4.Text = "":
 Text5.Text = "": Text6.Text = "": Text7.Text = ""
'初始化日期
 DTP1.Value = Date: DTP2.Value = Date: DTP3.Value = Date
End Sub
Private Sub Command3_Click()
 Unload Me
 main.Enabled = True     '设置主窗体有效
End Sub
Private Sub Command4_Click()     '打印追加押金单据
 Printer.Height = 8000: Printer.Width = 8000
 Printer.CurrentX = 1100: Printer.CurrentY = 300
 Printer.FontSize = 12
 Printer.Print "龙海宾馆 (追加押金) "
 Dim A, B, C, D As Integer
 A = 100: B = 500: C = 4800: D = 400
 Printer.FontSize = 10
 Printer.CurrentX = 100 + A
 Printer.CurrentY = B + 200
 Printer.Print Date & " " & Time & "  NO." & DBCombo1.Text
 B = B + D
 Printer.Line (A, B + 100)-(C, B + 100)
 Printer.CurrentX = 100 + A
 Printer.CurrentY = B + 200
 Printer.Print "姓名:" & Text1.Text
 Printer.CurrentX = 100 + A
 Printer.CurrentY = B + 200
 Printer.Print "房间号:" & Text5.Text
 B = B + D
 Printer.CurrentX = 100 + A
 Printer.CurrentY = B + 200
 Printer.Print "追加押金:" & Format(Text1.Text, "0.00")
 B = B + D
 Printer.CurrentX = 100 + A
 Printer.CurrentY = B + 200
 Printer.Print "补交日期:    " & DTP2.Value
 B = B + D
 Printer.Line (A, B + 100)-(C, B + 100)
 Printer.CurrentX = 100 + A
 Printer.CurrentY = B + 200
 Printer.Print "操作员: " & czy.Text & "             欢迎光临"
 Printer.EndDoc
End Sub
Private Sub Command5_Click()     '登记
 Frame1.Enabled = True: DBCombo1.Enabled = True: Command1.Enabled = True
 Command2.Enabled = True: Command3.Enabled = False: Command4.Enabled = True
 Command5.Enabled = False
 Text1.Text = "": Text2.Text = "": Text3.Text = "": Text4.Text = ""
 Text5.Text = "": Text6.Text = "": Text7.Text = ""
 DBCombo1.SetFocus     'DBCombo1获得焦点
End Sub

 

 

6.3.3调房登记

 

Private Sub Form_Load()
 '自动识别数据库路径
 Data1.DatabaseName = App.Path & "\KFGL.MDB"
 Data2.DatabaseName = App.Path & "\KFGL.MDB"
 Data3.DatabaseName = App.Path & "\KFGL.MDB"
 Data4.DatabaseName = App.Path & "\KFGL.MDB"
End Sub
Private Sub Form_Activate()
 czy.Text = main.StatusBar1.Panels(4).Text     '赋值给czy.text
 '查询住宿登记信息
 Data4.RecordSource = "select * from djb where 标志='1'"
 Data4.Refresh
End Sub
Private Sub Form_Unload(Cancel As Integer)
  main.Enabled = True      '设置主窗体有效
End Sub
Private Sub DBCombo1_KeyDown(KeyCode As Integer, Shift As Integer)
 If KeyCode = vbKeyReturn Then Texbz.SetFocus     'texbz获得焦点
End Sub
Private Sub DBCOMBO2_Change()
 If DBCombo2.Text <> "" Then
  Data1.Recordset.FindFirst "房间号='" & DBCombo2.Text & "'and 标志='1'"
  If Data1.Recordset.NoMatch Then
    MsgBox ("请核准住宿房间和住宿人!")
  Else
    If Data1.Recordset.Fields("客房类型") <> "" Then
    With Data1.Recordset
    '查询空闲房间
    Data2.RecordSource = "select * from kf where 房间类型='" & .Fields("客房类型") & "'and 房态='空房'"
    Data2.Refresh
   '赋值给bh.text等
    If .Fields("凭证号码") <> "" Then bh.Text = .Fields("凭证号码")
    If .Fields("姓名") <> "" Then Texxmb.Text = .Fields("姓名")
    If .Fields("证件名称") <> "" Then Combo1.Text = .Fields("证件名称")
    If .Fields("证件号码") <> "" Then Texsfz.Text = .Fields("证件号码")
    If .Fields("客房价格") <> "" Then Texjg.Text = .Fields("客房价格")
    End With
    End If
   End If
   DBCombo1.Enabled = True
   Texbz.Enabled = True
 End If
End Sub
Private Sub DBCOMBO2_KeyDown(KeyCode As Integer, Shift As Integer)
 If KeyCode = vbKeyReturn Then DBCombo1.SetFocus     '按回车键DBCombo1获得焦点
End Sub
Private Sub texbz_KeyDown(KeyCode As Integer, Shift As Integer)
 If KeyCode = vbKeyReturn Then Comok.SetFocus     '按回车键comok获得焦点
End Sub
Private Sub comdj_Click()     '登记
 Frame2.Enabled = True: Frame3.Enabled = True: DBCombo2.Enabled = True
 DBCombo1.Enabled = True: Texjg.Enabled = True: Comok.Enabled = True
 Comcancel.Enabled = True: Comok.Enabled = True: Comdj.Enabled = False
 DBCombo2.SetFocus     'DBCombo2获得焦点
751com.cn
 Data2.RecordSource = "select * from kf where 房间号='" & DBCombo1.Text & "'and 房态='空房'"
 Data2.Refresh
 If Data2.Recordset.RecordCount > 0 Then
  Dim mydb1 As Database
  Dim myrs2 As Recordset
  Set mydb1 = Workspaces(0).OpenDatabase(App.Path & "\KFGL.MDB")
  '查询所有住宿登记信息
  Data1.RecordSource = "select * from djb"
  Data1.Refresh
  Data1.Recordset.FindFirst "房间号 ='" & DBCombo2.Text & "'and 标志='1'"
  bh = Data1.Recordset.Fields("凭证号码")
  Data1.Recordset.Edit     '编辑住宿登记信息
  If DBCombo1.Text <> "" Then Data1.Recordset.Fields("房间号") = Val(DBCombo1.Text)
  If Texbz.Text <> "" Then Data1.Recordset.Fields("备注") = Texbz.Text
  Data1.Recordset.Fields("标志") = "1"
  Data1.Recordset.Fields("摘要") = "由源房" & DBCombo2.Text & "调到目标房" & DBCombo1.Text

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

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

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