




版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、第1章統(tǒng)設(shè)計(jì)的目的與意義: 客房管理系統(tǒng)用于賓館旅客入住情況登記,包括旅客的姓名及身份證號(hào)的登記,以及入住房間信息.當(dāng)旅客離開(kāi)時(shí),需要辦理退房結(jié)帳手續(xù).對(duì)于一定時(shí)間沒(méi)的旅客入住情況實(shí)現(xiàn)基本查詢(xún),報(bào)表打印功能.對(duì)于賓館本身也實(shí)現(xiàn)了客房增減,入住情況查詢(xún)等功能. 無(wú)論各種等級(jí)的賓館,使用客房管理系統(tǒng)都具有非常實(shí)用的價(jià)值.使用該系統(tǒng)可以大大節(jié)省時(shí)間,提高辦公效率,而且非常方便的實(shí)現(xiàn)旅客信息的查詢(xún),以及對(duì)賓館本身客房入住情況及時(shí)了解.因此,客房管理系 統(tǒng)的開(kāi)發(fā)無(wú)疑具有深遠(yuǎn)的意義.系統(tǒng)功能設(shè)計(jì) 系統(tǒng)設(shè)計(jì)包括數(shù)據(jù)庫(kù)設(shè)計(jì),主界面設(shè)計(jì),菜單設(shè)計(jì)以及功能設(shè)計(jì).而其他功能設(shè)計(jì)包括系統(tǒng)登錄設(shè)計(jì),旅客信息登記,旅客信
2、息查詢(xún),退房信息處理設(shè)計(jì)以及報(bào)表輸入等功能設(shè)計(jì),系統(tǒng)功能設(shè)計(jì)流程圖如圖所示開(kāi)始啟動(dòng)圖1.1用戶(hù)登錄 系統(tǒng)主界面信息查詢(xún)旅客基本信息客房基本信息客房信息查詢(xún)旅客信息查詢(xún)旅客退房處理瀏覽客房信息添加旅客信息旅客信息瀏覽第2章數(shù)據(jù)庫(kù)設(shè)計(jì)旅客信息表為旅客的個(gè)人信息加入住客房信息,數(shù)據(jù)結(jié)構(gòu)如表 旅客信息表設(shè)置字段名類(lèi)型大小說(shuō)明登記號(hào)Text8旅客入住號(hào)姓名Text8旅客姓名身份證號(hào)碼Text18旅客身份證號(hào)房間號(hào)Text3入住房間號(hào)登記日期Text日期/時(shí)間旅客入住時(shí)間性別Text3旅客性別籍貫Text8旅客籍貫表2.1客房信息表為客房入住情況的基本信息,數(shù)據(jù)結(jié)構(gòu)如表客房信息表設(shè)置字段名類(lèi)型大小說(shuō)明房間
3、號(hào)Text3房間號(hào)客房等級(jí)Text8客房等級(jí)客房類(lèi)型Text8客房類(lèi)型客房?jī)r(jià)格Text單精度型客房?jī)r(jià)格客房狀態(tài)Text3客房狀態(tài)客房備注信息備注8客房備注信息 表2.2旅客退房記錄表為旅客退房相關(guān)的一些記錄信息,數(shù)據(jù)結(jié)構(gòu)如表旅客退房記錄表設(shè)置字段名類(lèi)型大小說(shuō)明登記號(hào)Text8旅客入住號(hào)登記日期日期/時(shí)間旅客登記時(shí)間退房時(shí)間日期/時(shí)間旅客退房時(shí)間付款金額Text單精度型付費(fèi)金額退房備注信息Text8退房備注信息 表2.3管理人員信息表存儲(chǔ)賓館管理人員使用該系統(tǒng)的帳號(hào)密碼,數(shù)據(jù)結(jié)構(gòu)表管理人員信息表設(shè)置字段名類(lèi)型大小說(shuō)明姓名Text20管理人員帳號(hào)密碼Text20管理人員密碼權(quán)限Text1管理人員權(quán)
4、限表2.4第3章主體內(nèi)容31 設(shè)計(jì)標(biāo)準(zhǔn)模塊本系統(tǒng)設(shè)計(jì)過(guò)程中,創(chuàng)建一個(gè)通用函數(shù)模塊,用于實(shí)現(xiàn)數(shù)據(jù)庫(kù)連接及按需要打開(kāi)一個(gè)數(shù)據(jù)表。程序代碼如下:Option ExplicitPublic Sub opentable(pado As Adodc, precordsource As String)With pado .ConnectionString = Provider=Microsoft.Jet.OLEDB.4.0;Data Source= & App.Path & /Total.mdb .CommandType = adCmdUnknown .RecordSource = precordsourc
5、e .Refresh End WithEnd Sub3.2 戶(hù)登錄界面設(shè)計(jì)用戶(hù)登錄的作用是判斷使用本程序的用戶(hù)是否是合法用戶(hù)。在程序進(jìn)入登錄界面時(shí)要求輸入用戶(hù)名和密碼,如果用戶(hù)名,密碼正確程序繼續(xù)執(zhí)行。當(dāng)密碼錯(cuò)誤輸入的次數(shù)超過(guò)設(shè)定次數(shù)時(shí),給出提示信息退出程序,這樣防止了非法用戶(hù)對(duì)本程序的使用。321工作界面設(shè)計(jì) 圖3.1登錄窗體程序代碼如下:Private Sub cmdok_Click() 檢查正確的密碼首先要對(duì)用戶(hù)名特殊字符的過(guò)濾防止非授權(quán)用戶(hù)的登陸訪(fǎng)問(wèn)Dim s1 As StringDim i As IntegerDim j As IntegerDim a(18) As String j
6、 = Len(txtUserName.Text) s1 = txtUserName.Text Dim c As Integer c = 1 For i = 1 To j a(i) = Mid(s1, i, 1)逐一判斷字符的合格化 If a(i) = Then MsgBox Error, vbOKOnly, Error Exit Sub ElseIf a(i) = Then MsgBox Error, vbOKOnly, Error Exit Sub ElseIf a(i) = = Then MsgBox Error, vbOKOnly, Error Exit Sub ElseIf a(i)
7、= Then MsgBox Error, vbOKOnly, Error Exit Sub ElseIf a(i) = Then MsgBox Error, vbOKOnly, Error Exit Sub ElseIf a(i) = , Then MsgBox Error, vbOKOnly, Error Exit Sub ElseIf a(i) = Then MsgBox Error, vbOKOnly, Error Exit Sub End If c = c + 1 txtUserName.SetFocus Next iDim strusername As StringDim strpa
8、ssword As StringStatic intlogintimes As IntegerIf Trim(txtUserName.Text) = ThenMsgBox 用戶(hù)名不能為空!, vbOKOnly + vbCritical, 錯(cuò)誤Exit SubEnd Ifopentable adousers, usersinfoadousers.Refreshadousers.Recordset.Find 姓名= & & txtUserName.Text & , , adSearchForward, 1If Not adousers.Recordset.EOF Then strusername
9、= adousers.Recordset!姓名strpassword = adousers.Recordset!密碼Elsestrusername = strpassword = End IIf strusername = txtUserName.Text And strpassword = txtPassword.Text Thenadousers.Recordset.CloseUnload Mefrmmdi.Show ElseMsgBox 用戶(hù)名或密碼不對(duì)!, vbOKOnly + vbInformation, 提示 intlogintimes = intlogintimes + 1 If
10、 intlogintimes = 3 Thenadousers.Recordset.Close EndEnd IftxtPassword.SetFocus SendKeys HOME+END End If End Sub Private Sub cmdcancel_click() Unload Me End Sub322 添加新用戶(hù)用于添加新的用戶(hù)包括用戶(hù)名,密碼,及職務(wù) 工作界面設(shè)計(jì)如圖 圖3.2添加用戶(hù)窗體程序代碼如下:Private Sub Command1_Click()opentable adousers, usersinfoadousers.RefreshWith adousers
11、.RecordsetDim i As IntegerIf Trim(Text1(0).Text) = Then MsgBox 用戶(hù)名不能為空!, vbExclamation + vbOKOnly, 警告 Text1(0).SetFocus Exit SubEnd IfIf Trim(Text1(1).Text) = Then MsgBox 密碼不能為空!, vbExclamation + vbOKOnly, 警告 Text1(1).SetFocus Exit SubEnd IfIf Trim(Text1(2).Text) = Then MsgBox 確認(rèn)密碼不能為空!, vbExclamati
12、on + vbOKOnly, 警告 Text1(2).SetFocusExit SubEnd IfIf Trim(Text1(1).Text) Trim(Text1(2).Text) Then MsgBox 確認(rèn)密碼不正確!, vbExclamation + vbOKOnly, 警告 Text1(2).SetFocusExit SubEnd If opentable adousers, usersinfo adousers.Refresh adousers.Recordset.Find 姓名= & & Text1(0).Text & , , adSearchForward, 1If adous
13、ers.Recordset.EOF = False Then MsgBox 已存在該用戶(hù)!, vbExclamation + vbOKOnly, 警告 Text1(0).SetFocus Text1(0).SelStart = 0 Text1(0).SelLength = Len(Text1(0).Text) Exit SubEnd If opentable adousers, usersinfo .AddNew !姓名 = Trim(Text1(0).Text) !密碼 = Trim(Text1(1).Text) If Option1(0) Then !權(quán)限 = 1 If Option1(1
14、) Then !權(quán)限 = 2 If Option1(2) Then !權(quán)限 = 3 .Update MsgBox 用戶(hù)添加成功!, vbExclamation + vbOKOnly, 警告 Text1(0).Text = Text1(1).Text = Text1(2).Text = End With Unload MeEnd SubPrivate Sub Command2_Click()Unload MeEnd Sub33 創(chuàng)建系統(tǒng)主界面當(dāng)系統(tǒng)運(yùn)行時(shí),首先進(jìn)入登錄界面,當(dāng)輸入帳號(hào),密碼合法時(shí),則啟動(dòng)系統(tǒng)主界面。主窗體是進(jìn)入其他模塊的入口。本系統(tǒng)主界面采用多文檔界面,設(shè)計(jì)情況如圖 圖3.3主界
15、面窗體設(shè)計(jì)主界面菜單項(xiàng)在操作項(xiàng)目比較多的情況下,通常是通過(guò)菜單來(lái)調(diào)用下級(jí)程序。菜單項(xiàng)的設(shè)計(jì)包含設(shè)置快捷鍵與訪(fǎng)問(wèn)鍵,設(shè)置如表: 主窗體菜單表3.4級(jí)別菜單名稱(chēng)快捷鍵訪(fǎng)問(wèn)鍵主菜單系統(tǒng)功能mnuSystem&S子菜單用戶(hù)管理mnuUserCtrl+U&U退出系統(tǒng)mnuExit&X主菜單基本信息管理mnuInfo&I子菜單客房信息mnuRoomInfoCtrl+R&R入住情況mnuGuest&G退房記錄mnuQuit&C主菜單信息查詢(xún)mnuQuerySelect&Q主菜單報(bào)表輸出mnuReport&R子菜單房間情況表mnuReportRoomCtrl+R&R收費(fèi)情況表mnuReportMoney&M主
16、菜單窗口布局mnuWindow&W子菜單水平平鋪mnuHorCtrl+R&H垂直平鋪mnuVer&V層疊mnuCascade&C排列圖標(biāo)mnuIcon&I主菜單幫助信息mnuHelpCtrl+H&H內(nèi)容mnuContent&C索引mnuIndex&I設(shè)計(jì)主界面Option ExplicitPrivate Sub MDIForm_Load()App.Title = 賓館客房管理系統(tǒng)opentable adoroom, roomopentable adoguest, guestopentable adoquit, quitEnd SubPrivate Sub mnuCascade_Click()f
17、rmmdi.Arrange vbCascadeEnd SubPrivate Sub mnudenglu_Click()frmLogin.ShowEnd SubPrivate Sub mnuExit_Click()Unload MeEnd SubPrivate Sub mnuGuest_Click()frmGuestInfo.ShowEnd SubPrivate Sub mnuHor_Click()frmmdi.Arrange vbTileHorizontalEnd SubPrivate Sub mnuIcon_Click()frmmdi.Arrange vbArrangeIconsEnd Su
18、bPrivate Sub mnuqueryguest_Click()frmqueryinfo.ShowEnd SubPrivate Sub mnuqueryroom_Click()frmqueryroom.ShowEnd SubPrivate Sub mnuQuit_Click()frmquitinfo.ShowEnd SubPrivate Sub mnuRoomInfo_Click()frmroominfo.ShowEnd SubPrivate Sub mnuUser_Click()frmusers.ShowEnd SubPrivate Sub mnuver_Click()frmmdi.Ar
19、range vbTileVerticalEnd SubPrivate Sub toolbar1_buttonclick(ByVal button As MSComctlLib.button) Select Case button.Index Case 1 mnuRoomInfo_Click Case 2 mnuGuest_Click Case 3 mnuQuit_Click Case 4 mnuqueryroom_Click Case 5 mnuReportRoom_Click Case 6 mnuExit_Click End Select End Sub34 制作客戶(hù)信息登記窗體客戶(hù)信息窗體
20、包括對(duì)全體旅客信息瀏覽,修改及刪除的窗體和添加新入住旅客信息窗體。旅客基本信息窗體,工作界面設(shè)計(jì)情況如圖: 控件屬性表3.5控件名稱(chēng)屬性設(shè)置值DataGrid1(名稱(chēng))dtgGuestInfoCommand1(名稱(chēng))cmdAddNewCaption添加(&A)Command2(名稱(chēng))cmdEditCaption修改(&E)控件名稱(chēng)屬性設(shè)置值Command3(名稱(chēng))cmdDeleteCaption刪除(&D)Command4(名稱(chēng))cmdExitCaption退出(&X) 圖3.6旅客信息窗體程序代碼如下:Option ExplicitPrivate Sub dtgguestrefresh()W
21、ith dtgguestinfo Set .DataSource = frmmdi.adoguest .AllowRowSizing = False .HeadFont = 2 .MarqueeStyle = dbgHighlightRow .AllowAddNew = False .AllowDelete = False .AllowUpdate = False .Columns(0).Caption = 登記號(hào) .Columns(0).Width = 600 .Columns(0).AllowSizing = False .Columns(1).Caption = 客人姓名 .Column
22、s(1).Width = 600 .Columns(1).AllowSizing = False .Columns(2).Caption = 身份證號(hào)碼 .Columns(2).Width = 1500 .Columns(2).AllowSizing = False .Columns(3).Caption = 房間號(hào) .Columns(3).Width = 600 .Columns(3).AllowSizing = False .Columns(4).Caption = 登記日期 .Columns(4).Width = 1000 .Columns(4).AllowSizing = False
23、.Columns(5).Caption = 性別 .Columns(5).Width = 500 .Columns(5).AllowSizing = False .Columns(6).Caption = 籍貫 .Columns(6).Width = 2000 .Columns(6).AllowSizing = False End With End SubPrivate Sub cmdaddnew_Click()With frmguestinfoedit .Caption = 添加新旅客 .txtbookno.Locked = False .txtbookno.Text = .txtguest
24、name.Text = .txtcardid.Text = .txtroomno.Text = dtpbookdate.Text = Date .dtpbookdate.Enabled = False End With frmguestinfoedit.ShowEnd SubPrivate Sub cmddelete_Click()If frmmdi.adoguest.Recordset.EOF True And frmmdi.adoguest.Recordset.BOF True Then With frmmdi.adoroom.Recordset If MsgBox(確認(rèn)要?jiǎng)h除當(dāng)前記錄嗎?
25、, vbYesNo + vbQuestion + vbDefaultButton2, 確認(rèn)框) = vbYes Then .Find 房間號(hào)= & & frmmdi.adoguest.Recordset!房間號(hào) & , , adSearchForward, 1 If Not .EOF Then !客房狀態(tài) = 空 End If With frmmdi.adoguest.Recordset .Delete End With frmGuestInfo.SetFocus End If End With End IfEnd SubPrivate Sub cmdedit_Click() If frmmd
26、i.adoguest.Recordset.EOF True And frmmdi.adoguest.Recordset.BOF True Then With frmguestinfoedit .Caption = 修改客人信息 .txtbookno.Text = frmmdi.adoguest.Recordset!登記號(hào) .txtbookno.Locked = True .txtbookno.Enabled = False .txtguestname.Text = frmmdi.adoguest.Recordset!姓名 .txtcardid.Text = frmmdi.adoguest.Re
27、cordset!身份證號(hào)碼 .txtroomno = frmmdi.adoguest.Recordset!房間號(hào) .dtpbookdate.Text = frmmdi.adoguest.Recordset!登記日期 .dtpbookdate.Enabled = False End With End If frmguestinfoedit.ShowEnd SubPrivate Sub cmdexit_Click() Unload MeEnd SubPrivate Sub Form_Load()Me.Left = (frmmdi.Width - Me.Width) / 2Me.Top = (frm
28、mdi.Height - Me.Height) / 4dtgguestrefreshEnd Sub35 旅客信息登記窗體本窗體用于當(dāng)旅客入住時(shí),登記其基本信息,包括入住房間號(hào)。 圖 3.7添加新旅客窗體窗體初始化與激活事件代碼:Option ExplicitDim proomno As StringPrivate Sub cmdcancle_Click()Unload MeEnd SubPrivate Sub cmdok_Click()With frmmdi.adoguest.Recordset If Not txtbookno.Locked Then If Trim(txtbookno.Te
29、xt) = Then MsgBox 登記號(hào)不能為空!, vbOKOnly + vbInformation, 提示 txtbookno.SetFocus Exit Sub End If .Find 房間號(hào)= & & txtbookno & , , adSearchForward, 1 If Not .EOF Then MsgBox 已經(jīng)有相同登記號(hào)!, vbOKOnly + vbInformation, 提示txtbookno.SetFocus Exit Sub End If frmmdi.adoroom.Recordset.Find 房間號(hào)= & & Trim(txtroomno.Text)
30、& , , adSearchForward, 1 If Not frmmdi.adoroom.Recordset.EOF Then If frmmdi.adoroom.Recordset!客房狀態(tài) 空 Then MsgBox 已有客人居住!, vbOKOnly + vbInformation, 提示 txtroomno.SetFocus Exit Sub End If Else MsgBox 沒(méi)有此客房編號(hào),請(qǐng)重新輸入!, vbOKOnly + vbInformation, 提示 txtroomno.SetFocus Exit Sub End If If Trim(txtguestname.T
31、ext) = Then MsgBox 客人姓名不能為空!, vbOKOnly + vbInformation, 提示 txtguestname.SetFocus Exit Sub End If .AddNew !登記號(hào) = Trim(txtbookno.Text) frmmdi.adoroom.Recordset.Find 房間號(hào)= & &Trim(txtroomno.Text) & , , adSearchForward, 1 frmmdi.adoroom.Recordset!客房狀態(tài) = 有人 End If !姓名 = txtguestname.Text !身份證號(hào)碼 = txtcardi
32、d.Text !性別 = txtsex.Text !籍貫 = txtpro.Text If txtbookno.Locked Then If Trim(txtroomno.Text) proomno Then With frmmdi.adoroom.Recordset .Find 房間號(hào)= & & Trim(txtroomno.Text) & , , adSearchForward, 1 !客房狀態(tài) = 有人 .Find 房間號(hào)= & & proomno & , , adSearchForward, 1 !客房狀態(tài) = 空 End With End If End If !房間號(hào) = Trim(
33、txtroomno.Text) !登記日期 = dtpbookdate.Text .Update Unload Me End With End SubPrivate Sub form_activate()proomno = Trim(txtroomno.Text)End Sub36 制作退房信息處理窗體當(dāng)旅客離開(kāi)賓館時(shí),需要為其辦理退房手續(xù),在這過(guò)程中需要在旅客退房信息表中添加記錄信息,以及修改客房信息表,改變客房狀態(tài)。旅客退房信息窗體,工作界面設(shè)計(jì)情況如圖: 圖3.8退房窗體程序代碼如下:Private Sub dtgQuitRefresh() With dtgQuitInfo 綁定 Set
34、 .DataSource = frmmdi.adoquit .AllowRowSizing = False 表頭寬度設(shè)為兩行 .HeadLines = 2 選擇方式為整行選中 .MarqueeStyle = dbgHighlightRow 不允許修改(設(shè)為只讀) .AllowAddNew = False .AllowDelete = False .AllowUpdate = False 第一列標(biāo)題和寬度 .Columns(0).Caption = 登記號(hào) .Columns(0).Width = 700 .Columns(0).AllowSizing = False 第二列標(biāo)題和寬度 .Colu
35、mns(1).Caption = 登記日期 .Columns(1).Width = 1200 .Columns(1).AllowSizing = False 第三列標(biāo)題和寬度 .Columns(2).Caption = 退房時(shí)間 .Columns(2).Width = 1200 .Columns(2).AllowSizing = False 第四列標(biāo)題和寬度 .Columns(3).Caption = 付費(fèi)金額 .Columns(3).Width = 1200 .Columns(3).AllowSizing = False .Columns(4).Caption = 備注 .Columns(4
36、).Width = 4000Columns(4).AllowSizing = False End WithEnd SubPrivate Sub cmdaddnew_Click() With frmquitinfoedit 窗體標(biāo)題 .Caption = 添加退房信息 .txtbookno.Locked = False .txtbookno.Text = .txtpaymoney.Text = .txtinfo.Text = .dtpquitdate.Text = Date 顯示為模式窗體 .Show End WithEnd SubPrivate Sub cmddelete_Click()If
37、frmmdi.adoquit.Recordset.EOF True And frmmdi.adoquit.Recordset.BOF True Then With frmmdi.adoquit.Recordset If MsgBox(確認(rèn)要?jiǎng)h除當(dāng)前記錄嗎?, vbYesNo + vbQuestion + vbDefaultButton2, 確認(rèn)框) = vbYes Then Find 登記號(hào)= & frmmdi.adoquit.Recordset!登記號(hào) & , , adSearchForward, 1 If Not .EOF Then !QuitStatus = False End If W
38、ith frmmdi.adoquit.Recordset.Delete End With dtgQuitInfo.SetFocus End If End WithEnd IfEnd SubPrivate Sub cmdedit_Click() If frmmdi.adoguest.Recordset.EOF True And frmmdi.adoguest.Recordset.BOF True Then With frmquitinfoedit 窗體標(biāo)題 .Caption = 修改退房信息 .txtbookno.Text = frmmdi.adoquit.Recordset!登記號(hào) .txtb
39、ookno.Locked = True .txtpaymoney.Text = frmmdi.adoquit.Recordset!付款金額 .TxtInfo.Text = frmMDI.AdoQuit.Recordset!QuitInfo .dtpquitdate.Text = frmmdi.adoquit.Recordset!退房時(shí)間 .ShowEnd With End IfEnd SubPrivate Sub cmdexit_Click() Unload MeEnd SubPrivate Sub Form_Load() Me.Height = 4155 Me.Width = 7920 Me
40、.Left = (frmmdi.Width - Me.Width) / 2 Me.Top = (frmmdi.Height - Me.Height) / 4 dtgQuitRefreshEnd Sub37 添加退房信息窗體本窗體用于當(dāng)旅客離開(kāi)時(shí),登記旅客退房信息,以及計(jì)算并記錄付額, : 圖3.9添加退房信息窗體程序代碼如下:Private Sub CmdOK_Click()With frmmdi.adoquit.Recordset If Not txtbookno.Locked Then 可修改狀態(tài)表示是添加記錄 If Trim(txtbookno.Text) = Then MsgBox 登
41、記號(hào)不能為空!, vbOKOnly + vbInformation, 提示 txtbookno.SetFocus Exit Sub End If frmmdi.adoguest.Recordset.Find 登記號(hào)= & Trim(txtbookno.Text) & , ,adSearchForward, 1 If frmmdi.adoguest.Recordset.EOF Then 有就提示,然后退出 MsgBox 非法登記號(hào)!, vbOKOnly + vbInformation, 提示 txtbookno.SetFocusSendKeys HOME+END txtpaymoney.Text
42、 = Exit Sub End If frmmdi.adoquit.Recordset.Find 登記號(hào)= & Trim(txtbookno.Text) & , , adSearchForward, 1 If Not frmmdi.adoquit.Recordset.EOF Then 有就提示,然后退出 MsgBox 已經(jīng)有相同登記號(hào)!, vbOKOnly + vbInformation, 提示 txtbookno.SetFocus SendKeys HOME+END txtpaymoney.Text = Exit Sub End If 沒(méi)有就添加記錄 .AddNew !登記號(hào) = Trim(
43、txtbookno.Text) End If 給字段賦值 !付款金額 = Val(Trim(txtpaymoney.Text) !退房時(shí)間 = dtpquitdate.Text If txtinfo.Text = Then MsgBox 備注不能為空!, vbOKOnly + vbInformation, 提示 txtinfo.SetFocus !退房備注信息 = txtinfo.TextEnd If .Update 退出窗體 Unload MeEnd WithEnd SubPrivate Sub CmdQuit_Click() 退出窗體 Unload MeEnd SubPrivate Sub
44、 Form_Load() Me.Height = 3405 Me.Width = 7440End Sub38制作旅客查詢(xún)窗體旅客查詢(xún)窗體主要功能是實(shí)現(xiàn)客房信息查詢(xún)顯示,查詢(xún)方式可以是按旅客姓名,登記號(hào)也可以按房間號(hào)查詢(xún)。工作界面如圖:旅客查詢(xún)窗體控件屬性表3.10控件名稱(chēng)屬性設(shè)置值DataGrid1(名稱(chēng))dtgQueryOption1(名稱(chēng))OptRoomNoCaption房間號(hào)Option2(名稱(chēng))OptionNameCaption旅客姓名Option3(名稱(chēng))optBookNoCaption登記號(hào)Text1(名稱(chēng))TxtValue 圖3.11旅客信息查詢(xún)窗體程序代碼如Option Exp
45、licitPrivate Sub dtgqueryrefresh()With dtgquery Set .DataSource = frmmdi.adoguest .AllowRowSizing = False .HeadFont = 2 .MarqueeStyle = dbgHighlightRow.AllowAddNew = False .AllowDelete = False.AllowUpdate = False.Columns(0).Caption = 登記號(hào).Columns(0).Width = 600 .Columns(0).AllowSizing = False .Column
46、s(1).Caption = 客人姓名 .Columns(1).Width = 600.Columns(1).AllowSizing = False .Columns(2).Caption = 身份證號(hào)碼 .Columns(2).Width = 1500 .Columns(2).AllowSizing = False .Columns(3).Caption = 房間號(hào).Columns(3).Width = 600 .Columns(3).AllowSizing = False.Columns(4).Caption = 登記日期 .Columns(4).Width = 1000 .Columns
47、(4).AllowSizing = False .Columns(5).Caption = 性別 .Columns(5).Width = 500 .Columns(5).AllowSizing = False .Columns(6).Caption = 籍貫.Columns(6).Width = 2000 .Columns(6).AllowSizing = False End With End SubPrivate Sub Command1_Click()If optroomno Then opentable frmmdi.adoguest, select * from guest where (guest.房間號(hào)) like & Trim(txtvalue.Text) & % ) ElseIf optname Then opentable frmmdi.adoguest, select * from guest where (guest.姓名) like & Trim(txtvalue.Text) & % ) ElseIf optbookno Then opentable frmmdi.ad
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 出售園林鋪面合同范本
- 保潔物料供貨合同范本
- 企業(yè)策劃宣傳合同范本
- 農(nóng)機(jī)割臺(tái)租售合同范本
- 出口螺桿驗(yàn)貨合同范本
- 公司分期手機(jī)合同范本
- 企業(yè)職員培養(yǎng)合同范本
- 企業(yè)終止租賃合同范本
- 化糞池安裝合同范本
- 2024年深圳市南山區(qū)蓓蕾幼教集團(tuán)招聘考試真題
- GB/T 22919.2-2008水產(chǎn)配合飼料第2部分:軍曹魚(yú)配合飼料
- 數(shù)字化轉(zhuǎn)型中數(shù)據(jù)底座湖倉(cāng)一體化
- 典范英語(yǔ)8-1-刺猬女孩艾蜜
- 《教育管理學(xué)》課件
- 水平井套內(nèi)不動(dòng)管柱滑套多段壓裂工藝技術(shù)全解課件
- 凈水設(shè)備技術(shù)參數(shù)要求
- 腦血管造影護(hù)理課件
- 稱(chēng)呼禮儀精品課件
- 課題申報(bào)講座課件
- 系統(tǒng)科學(xué)與系統(tǒng)工程的理論基礎(chǔ)
- 思想道德與法治課件:第四章 第二節(jié) 社會(huì)主義核心價(jià)值觀的顯著特征
評(píng)論
0/150
提交評(píng)論