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

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

更新时间:2009-4-8:  来源:毕业论文
酒店客房管理系统VB源代码
 If y1.Text <> y2.Text Then
    bh.Text = Date & "d" & Format(1, "###000")
  End If
End If
'清空数据
For i = 0 To 6
  ZSDJ(i).Text = ""
  ZSDJ(i).Enabled = True
Next i
 ZSDJ(8).Text = "": ZSDJ(10).Text = "": ZSDJ(11).Text = "": DBCombo1.Text = "": DBCombo1.Text = ""
 '设置控件有效或无效
 Comok.Enabled = True: Comdj.Enabled = False: Comprint.Enabled = False: ZSDJ(8).Enabled = True
 ZSDJ(10).Enabled = True: ZSDJ(11).Enabled = True: DBCombo1.Enabled = True: Combo1.Enabled = True
 Combo2.Enabled = True: ZSDJ(0).SetFocus     'ZSDJ(0)获得焦点
End Sub
Private Sub comok_Click()
 Dim mydb1 As Database
 Dim myrs1 As Recordset
 Set mydb1 = Workspaces(0).OpenDatabase(App.Path & "\kfgl.mdb")
 Set myrs1 = mydb1.OpenRecordset("djys", dbOpenTable)
 Data1.Recordset.FindFirst "房间号 like" + Chr(34) + DBCombo1.Text + Chr(34) + "and 标志 like" + Chr(34) + "1" + Chr(34) + ""
 If Data1.Recordset.NoMatch Then
  '添加住宿信息
  Data1.Recordset.AddNew
  If bh.Text <> "" Then Data1.Recordset.Fields("凭证号码") = bh.Text
  If ZSDJ(0).Text <> "" Then Data1.Recordset.Fields("姓名") = ZSDJ(0).Text
  If Combo1.Text <> "" Then Data1.Recordset.Fields("证件名称") = Combo1.Text
  If ZSDJ(1).Text <> "" Then Data1.Recordset.Fields("证件号码") = ZSDJ(1).Text
  If ZSDJ(2).Text <> "" Then Data1.Recordset.Fields("详细地址") = ZSDJ(2).Text
  If ZSDJ(3).Text <> "" Then Data1.Recordset.Fields("出差事由") = ZSDJ(3).Text
  If DBCombo1.Text <> "" Then Data1.Recordset.Fields("房间号") = Val(DBCombo1.Text)
  If ZSDJ(4).Text <> "" Then Data1.Recordset.Fields("客房类型") = ZSDJ(4).Text
  If DTP1.Value <> "" Then Data1.Recordset.Fields("住宿日期") = DTP1.Value
  If tim1.Value <> "" Then Data1.Recordset.Fields("住宿时间") = tim1.Value
  If ZSDJ(5).Text <> "" Then Data1.Recordset.Fields("客房价格") = Val(ZSDJ(5).Text)
  If ZSDJ(6).Text <> "" Then Data1.Recordset.Fields("住宿天数") = ZSDJ(6).Text
  If ZSDJ(8).Text <> "" Then Data1.Recordset.Fields("折扣") = ZSDJ(8).Text
  If ZSDJ(7).Text <> "" Then Data1.Recordset.Fields("宿费") = ZSDJ(7).Text
  If Combo2.Text <> "" Then Data1.Recordset.Fields("结款方式") = Combo2.Text
  If ZSDJ(9).Text <> "" Then Data1.Recordset.Fields("应收宿费") = ZSDJ(9).Text
  If ZSDJ(10).Text <> "" Then Data1.Recordset.Fields("预收金额") = Val(ZSDJ(10).Text)
  If DTP2.Value <> "" Then Data1.Recordset.Fields("提醒日期") = DTP2.Value
  If tim2.Value <> "" Then Data1.Recordset.Fields("提醒时间") = tim2.Value
  If DTP3.Value <> "" Then Data1.Recordset.Fields("退宿日期") = DTP3.Value
  If tim3.Value <> "" Then Data1.Recordset.Fields("退宿时间") = tim3.Value
  If ZSDJ(11).Text <> "" Then Data1.Recordset.Fields("备注") = ZSDJ(11).Text
  Data1.Recordset.Fields("日期") = Date
  Data1.Recordset.Fields("时间") = Time
  Data1.Recordset.Fields("BZ") = Left(Date, 4) & Right(Left(Date, 7), 2) & Right(Date, 2) & Left(Time, 2) & Left(Right(Time, 5), 2)
  Data1.Recordset.Fields("标志") = "1"
  '更新记录
  Data1.Recordset.Update
  '添加住宿预收信息
  myrs1.AddNew
  If bh.Text <> "" Then myrs1.Fields("凭证号码") = bh.Text
  If ZSDJ(0).Text <> "" Then myrs1.Fields("姓名") = ZSDJ(0).Text
  If Combo1.Text <> "" Then myrs1.Fields("证件名称") = Combo1.Text
  If ZSDJ(1).Text <> "" Then myrs1.Fields("证件号码") = ZSDJ(1).Text
  If ZSDJ(2).Text <> "" Then myrs1.Fields("详细地址") = ZSDJ(2).Text
  If ZSDJ(3).Text <> "" Then myrs1.Fields("出差事由") = ZSDJ(3).Text
  If DBCombo1.Text <> "" Then myrs1.Fields("房间号") = Val(DBCombo1.Text)
  If ZSDJ(5).Text <> "" Then myrs1.Fields("客房价格") = Val(ZSDJ(5).Text)
  If DTP1.Value <> "" Then myrs1.Fields("住宿日期") = DTP1.Value
  If tim1.Value <> "" Then myrs1.Fields("住宿时间") = tim1.Value
  If ZSDJ(6).Text <> "" Then myrs1.Fields("住宿天数") = ZSDJ(6).Text
  If Combo2.Text <> "" Then myrs1.Fields("结款方式") = Combo2.Text
  If ZSDJ(8).Text <> "" Then myrs1.Fields("折扣") = ZSDJ(8).Text
  If ZSDJ(7).Text <> "" Then myrs1.Fields("宿费") = ZSDJ(7).Text
  If ZSDJ(9).Text <> "" Then myrs1.Fields("应收宿费") = ZSDJ(9).Text
  If ZSDJ(10).Text <> "" Then myrs1.Fields("预收金额") = Val(ZSDJ(10).Text)
  If DTP2.Value <> "" Then myrs1.Fields("提醒日期") = DTP2.Value
  If tim2.Value <> "" Then myrs1.Fields("提醒时间") = tim2.Value
  If DTP3.Value <> "" Then myrs1.Fields("退宿日期") = DTP3.Value
  If tim3.Value <> "" Then myrs1.Fields("退宿时间") = tim3.Value
  If ZSDJ(11).Text <> "" Then myrs1.Fields("备注") = ZSDJ(11).Text
  myrs1.Fields("日期") = Date
  myrs1.Fields("时间") = Time
  myrs1.Fields("BZ") = Left(Date, 4) & Right(Left(Date, 7), 2) & Right(Date, 2) & Left(Time, 2) & Left(Right(Time, 5), 2)
  myrs1.Fields("标志") = "1"
  '更新记录
  myrs1.Update
  '更新房间状态
  Data2.Recordset.FindFirst "房间号 like " + Chr(34) + DBCombo1.Text + Chr(34) + ""
  Data2.Recordset.Edit
  Data2.Recordset.Fields("房态") = "入住"
  Data2.Recordset.Update
 '设置控件有效或无效
  For i = 0 To 6
     ZSDJ(i).Enabled = False
  Next i
  ZSDJ(8).Enabled = False: ZSDJ(10).Enabled = False: ZSDJ(11).Enabled = False
  DBCombo1.Enabled = False: Combo1.Enabled = False
 End If
 Comok.Enabled = False: Comprint.Enabled = True: Comdj.Enabled = True
 Comprint.SetFocus
End Sub
Private Sub comcancel_Click()         '取消操作
 For i = 0 To 11
  ZSDJ(i).Enabled = False
 Next i
 Comprint.Enabled = False: Comok.Enabled = False: DBCombo1.Enabled = False
 Combo1.Enabled = False: Combo2.Enabled = False: DTP2.Enabled = False: DTP3.Enabled = False
 tim2.Enabled = False: tim3.Enabled = False: Comdj.Enabled = True
End Sub
Private Sub comprint_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." & bh.Text
 B = B + D
 Printer.Line (A, B + 100)-(C, B + 100)
 Printer.CurrentX = 100 + A
 Printer.CurrentY = B + 200
 Printer.Print "姓名:" & ZSDJ(0).Text
 B = B + D
 Printer.CurrentX = 100 + A
 Printer.CurrentY = B + 200
 Printer.Print "房间号:" & DBCombo1.Text
 B = B + D
 Printer.CurrentX = 100 + A
 Printer.CurrentY = B + 200
 Printer.Print "押金:" & Format(ZSDJ(10).Text, "0.00")
 B = B + D
 Printer.CurrentX = 100 + A
 Printer.CurrentY = B + 200
 Printer.Print Combo2.Text & ":" & ZSDJ(8).Text & "%"
 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 comend_Click()
 Unload Me
 main.Enabled = True
End Sub

6.3.2.追加押金Private Sub Text1_Change()     '计算提醒日期及时间
 DTP2.Value = DTP1.Value + Int(Val(Text3.Text) + Val(Text1.Text)) / Val(Text7.Text)
 If (Val(Text3.Text) + Val(Text1.Text) - Int(Val(Text3.Text) + Val(Text1.Text))) / Val(Text7.Text) > 0.5 * Val(Text7.Text) Then
  tim2.Value = #6:00:00 PM#
 Else
  tim2.Value = #12:00:00 AM#
 End If
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyReturn Then Command1.SetFocus
End Sub
Private Sub Command1_Click()

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

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

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