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

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

更新时间:2009-4-8:  来源:毕业论文
酒店客房管理系统VB
 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退宿结帐

 
ublic Sub JS()     '定义计算住宿天数的函数
 If DTP2.Value > DTP1.Value Then
   If tim2.Value > #11:59:00 PM# Then
     If tim2.Value > #12:00:00 PM# Then
       If tim2.Value > #6:00:00 PM# Then
         Texts.Text = DTP2.Value - DTP1.Value + 1
       Else
         Texts.Text = DTP2.Value - DTP1.Value + 0.5
       End If
     Else
       Texts.Text = DTP2.Value - DTP1.Value
     End If
   Else
     Texts.Text = DTP2.Value - DTP1.Value
   End If
 Else
 If tim1.Value < #2:00:00 AM# Then
   If tim2.Value > #2:00:00 AM# Then
     If tim2.Value > #12:00:00 PM# Then
       If tim2.Value > #6:00:00 PM# Then
         Texts.Text = 1 + 1
       Else
         Texts.Text = 1 + 0.5
       End If
     Else
       Texts.Text = 1
     End If
   Else
     Texts.Text = 1
   End If
  Else
   Texts.Text = 1
  End If
 End If
End Sub
Public Sub ssje()     '定义计算实收金额和退还金额的函数
 Texssje.Text = Val(Texzhje.Text) + Val(Texzf.Text) + Val(Texdhf.Text) + Val(Texpcf.Text) + Val(Texhyf.Text) + Val(Textcf.Text)
 Texthje.Text = Val(Texyj.Text) - Val(Texssje.Text)
End Sub
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"
 Data5.DatabaseName = App.Path & "\KFGL.MDB"
End Sub
Private Sub Form_Activate()
 czy.Text = main.StatusBar1.Panels(4).Text     '赋值给czy
 DTP2.Value = Date: tim2.Value = Time
'查询住宿登记信息
 Data5.RecordSource = "select 凭证号码 from djb where 标志='1'order by 凭证号码"
 Data5.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 DBCombo2.SetFocus      '按回车键DBCombo2获得焦点
End Sub
Private Sub DBCOMBO2_KeyDown(KeyCode As Integer, Shift As Integer)
751com.cn
  Texzk.Text = 0
End If
If Combo2.Text = "挂帐" Then
  Lab10.Visible = True
  Texgzdw.Visible = True
  Texgzdw.Text = Texxm.Text     '赋值给Texxm.text
Else
  Lab10.Visible = False
  Texgzdw.Visible = False     '设置Texgzdw不可见
  Texgzdw.Text = ""
End If
End Sub
Private Sub Combo3_Click()
 Texfjf.SetFocus     'Texfjf获得焦点
 Texfjf.Text = "0"     '赋值给Texfjf.text
End Sub
Private Sub DBCombo4_Change()
 If DBCombo4.Text <> "" Then
 '查询住宿登记信息
  Data1.RecordSource = "select * from djb where 凭证号码='" + DBCombo4.Text + "'"
  Data1.Refresh
  bh.Text = "T" & DBCombo4.Text
  '赋值给texxm.text等
  If Data1.Recordset.RecordCount > 0 Then
  If Data1.Recordset.Fields("姓名") <> "" Then Texxm.Text = Data1.Recordset.Fields("姓名")
  If Data1.Recordset.Fields("证件名称") <> "" Then Combo1.Text = Data1.Recordset.Fields("证件名称")
  If Data1.Recordset.Fields("证件号码") <> "" Then Texsfz.Text = Data1.Recordset.Fields("证件号码")
  If Data1.Recordset.Fields("详细地址") <> "" Then Texdz.Text = Data1.Recordset.Fields("详细地址")
  If Data1.Recordset.Fields("房间号") <> "" Then DBCombo3.Text = Data1.Recordset.Fields("房间号")
  If Data1.Recordset.Fields("客房类型") <> "" Then DBCombo1.Text = Data1.Recordset.Fields("客房类型")
  If Data1.Recordset.Fields("客房价格") <> "" Then DBCombo2.Text = Data1.Recordset.Fields("客房价格")
  If Data1.Recordset.Fields("住宿日期") <> "" Then DTP1.Value = Data1.Recordset.Fields("住宿日期")
  If Data1.Recordset.Fields("住宿时间") <> "" Then tim1.Value = Data1.Recordset.Fields("住宿时间")
  If Data1.Recordset.Fields("住宿天数") <> "" Then Texts.Text = Data1.Recordset.Fields("住宿天数")
  If Data1.Recordset.Fields("预收金额") <> "" Then Texyj.Text = Data1.Recordset.Fields("预收金额") Else Texyj.Text = "0"
  If Data1.Recordset.Fields("结款方式") <> "" Then Combo2.Text = Data1.Recordset.Fields("结款方式")
  If Data1.Recordset.Fields("折扣") <> "" Then Texzk.Text = Data1.Recordset.Fields("折扣")
  End If
  '计算住宿天数
  If DTP2.Value > DTP1.Value Then
  If tim2.Value > #11:59:00 AM# Then

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

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

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