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

宾馆客房管理系统ER图.数据流图.功能模块图.流程图 第8页

更新时间:2008-12-10:  来源:毕业论文

宾馆客房管理系统ER图.数据流图.功能模块图.流程图 第8页
 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 Sub6.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获得焦点
End Sub
Private Sub comok_Click()     '确定调房
 Dim bh As String      '定义一个字符串类型的变量
 '查询空闲房间信息
 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
  Data1.Recordset.Update     '更新记录
  Data3.RecordSource = "select * from djys where 凭证号码='" & Data1.Recordset.Fields("凭证号码") & "'"
  Data3.Refresh
  If Data3.Recordset.EOF = False Then Data3.Recordset.MoveLast
  If Data3.Recordset.BOF = False Then Data3.Recordset.MoveFirst
  If Data3.Recordset.RecordCount > 0 Then
   Data3.Recordset.MoveFirst
   For i = 1 To Data3.Recordset.RecordCount
     Data3.Recordset.Edit     '编辑住宿登记预收信息
     If DBCombo1.Text <> "" Then Data3.Recordset.Fields("房间号") = Val(DBCombo1.Text)
     If Texbz.Text <> "" Then Data3.Recordset.Fields("备注") = Texbz.Text
     Data3.Recordset.Fields("标志") = "1"
     Data3.Recordset.Fields("摘要") = "由源房" & DBCombo2.Text & "调到目标房" & DBCombo1.Text
     Data3.Recordset.Update     '更新记录
     If Data3.Recordset.EOF = False Then Data3.Recordset.MoveNext
   Next i
  End If
  '编辑客房状态
  Data2.Recordset.Edit
  Data2.Recordset.Fields("房态") = "入住"
  Data2.Recordset.Update
  Data2.RecordSource = "select * from kf"
  Data2.Refresh
  Data2.Recordset.FindFirst "房间号 ='" & DBCombo2.Text & "'"
  Data2.Recordset.Edit
  Data2.Recordset.Fields("房态") = "空房"
  Data2.Recordset.Update
  '查询空闲房间信息
  Data3.RecordSource = "select * from kf where 房态='空房'"
  Data3.Refresh
  Data4.Refresh
  '设置控件有效或无效
  Texxmb.Enabled = False: Texsfz.Enabled = False: DBCombo1.Enabled = False
  DBCombo2.Enabled = False: Texbz.Enabled = False: Comok.Enabled = False
  Comcancel.Enabled = False: Comdj.Enabled = True
  '清空数据
  DBCombo1.Text = "": DBCombo2.Text = "": Texxmb.Text = ""
  Texsfz.Text = "": Texbz.Text = "": Texjg.Text = ""
  Comdj.SetFocus     'Comdj获得焦点
 Else
  MsgBox ("所选房间已有人入住,请选择空房,再保存!!!")
 End If
End Sub
Private Sub comcancel_Click()     '取消操作
 DBCombo2.Enabled = True: DBCombo1.Enabled = True: Comdj.Enabled = True
 Comok.Enabled = False: Texbz.Enabled = True
 DBCombo1.Text = "": DBCombo2.Text = "": Texxmb.Text = ""
 Texsfz.Text = "": Texbz.Text = "": Texjg.Text = ""
End Sub
Private Sub comend_Click()
 Unload Me
 main.Enabled = True     '设置主窗体有效
End Sub

6.3.4退宿结帐

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

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

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