【正文】
blem. We still have issues with validation, flow control, and updating the state of the application. This is where MVC es to the rescue. MVC helps resolve some of the issues with the single module approach by dividing the problem into three categories: ? Model The model contains the core of the application39。核對(duì)賬單準(zhǔn)確無誤后,選擇付款方式,單擊【收銀結(jié)賬退房】按鈕,完成收銀工作,將客房狀態(tài)改為空房。用戶可根 24 據(jù)自己的身份選擇適合的角色 ]8[ 。 (4)功能實(shí)現(xiàn)部分代碼如下: Public Overrides Sub LoadData() 39。客房 編號(hào) Private strRoomCode As String = (5)為窗體類 frmReserve添加公有函數(shù) GetInfo。登陸用戶的 ID Public UserId As String = 39。用途是將預(yù)訂單轉(zhuǎn)入到入住單后,將預(yù)訂單清除并導(dǎo)入到預(yù)訂單歷史,如表 5所示 表 5.“ 預(yù)訂單歷史”表 (6)“入住單”表:入住單號(hào)、訂單編號(hào)、會(huì)員編號(hào)、客房類型、抵店時(shí)間等。 Sql Serve 2021 SQL Server 是一個(gè)關(guān)系數(shù)據(jù)庫管理系統(tǒng)。雖然信息化并不是酒店走向成功的關(guān)鍵元素,但它可以幫助那些真正影響成敗的要素發(fā)揮更大的效用。因此采用全新的計(jì)算機(jī)網(wǎng)絡(luò)和管理系統(tǒng),將成為提高酒店的管理效率,改善服務(wù)水準(zhǔn)的重要手段之一。它最初是由 Microsoft Sybase 和 AshtonTate三家公司共同開發(fā)的,于 1988 年推出了第一個(gè) OS/2 版本 ]1[ 。用途是散客入住酒店時(shí),信息可由預(yù)訂單轉(zhuǎn)入,如表 6所示 11 表 6.“入住單”表 (7)“入住單歷史”表:入住單號(hào)、訂單編號(hào)、會(huì)員編號(hào)、客房類型、抵店時(shí)間等。登陸的用戶名 Public UserName As String = Friend WithEvents Label1 As 39。 Public Function GetInfo() As String 39。清空 DataSet11 () = Dim strSQL As String _ = SELECT 入住單號(hào) , 客房類型 , 客房編號(hào) , 抵店時(shí)間 , 離店時(shí)間 , 入住價(jià)格 , 加床價(jià)格 , 預(yù)收款 , 應(yīng)收帳款 , 結(jié)帳金額 , 是否結(jié)帳 , 結(jié)帳日期 , 付款方式 FROM 入住單 39。 圖 圖 圖 用戶選擇自己身份后,系統(tǒng)會(huì)自動(dòng)跳出相應(yīng)的用戶名 (如圖 22所示 ),用戶輸入密碼成功后點(diǎn)【確定】會(huì)自動(dòng)進(jìn)入系統(tǒng),如果密碼輸入錯(cuò)誤,系統(tǒng)會(huì)出現(xiàn)以下提示 (如圖 23所示 ) 管理員界面 當(dāng)管理員成功進(jìn)入系統(tǒng)后,可以看到以下界面 (如圖 24 所示 ), 包含有基礎(chǔ)設(shè)置、業(yè)務(wù)管理、房態(tài)管理、退出系統(tǒng)功能。 房態(tài)管理 選擇【收銀退房】命令,進(jìn)入【收銀退房】功能窗體 (如圖 33所示 ),在這里可以查詢出所有客房的房態(tài)信息,以圖形的形式表現(xiàn)出來,非常的直觀。s functionality. The model encapsulates the state of the application. Sometimes the only functionality it contains is state. It knows nothing about the view or controller. ? View The view provides the presentation of the model. It is the look of the application. The view can access the model getters, but it has no knowledge of the setters. In addition, it knows nothing about the controller. The view should be notified when changes to the model occur. ? Controller The controller reacts to the user input. It creates and sets the model. 32 MVC Model 2 The Web brought some unique challenges to software developers, most notably the stateless connection between the client and the server. This stateless behavior made it difficult for the model to notify the view of changes. On the Web, the browser has to requery the server to discover modification to the state of the application. Another noticeable change is that the view uses different technology for implementation than the model or controller. Of course, we could use Java (or PERL, C/C++ or what ever) code to generate HTML. There are several disadvantages to that approach: Java programmers should develop services, not HTML. Changes to layout would require changes to code. Customers of the service should be able to create pages to meet their specific needs. The page designer isn39。 28 圖 33. 房態(tài)管理界面 “ 酒店管理系統(tǒng) ” 在現(xiàn)代酒店管理運(yùn)營過程中起到了舉足輕重的作用,而借助于當(dāng)前蓬勃發(fā)展的 IT工具來擴(kuò)展銷售能力,創(chuàng)造客觀的經(jīng)濟(jì)效益已經(jīng)成為許多酒店的首選。其中【價(jià)格】屬性對(duì)應(yīng)這種類型客房的住宿價(jià)格。為 dgdList保存數(shù)據(jù)的數(shù)據(jù)表 Private dtData As DataTable 39。獲取 DataGrid當(dāng)前被選中的行的內(nèi)容 sId = (iRow)(預(yù)訂單號(hào) ).ToString() Return sId End Function 18 實(shí)現(xiàn)入住管理功能 (1)在【添加新項(xiàng)】對(duì)話框的【模板】列表框中選擇【繼承的窗體】選項(xiàng),并命名為“ ” ,單擊【打開】選項(xiàng)出現(xiàn)【繼承選擇器】對(duì)話框,在選擇 frmBase選項(xiàng)并為窗件添加如圖 17控件 圖 (2)從工具箱中拖到一個(gè) SqlDataAdapter對(duì)象到窗體上,連接 hotelbook數(shù)據(jù)庫,添加入住單,并選擇所有字段。定義一個(gè)數(shù)據(jù)訪問類的對(duì)象 Dim db As DataBase = New DataBase 39。用途是查詢客戶消費(fèi)的明細(xì)單,如表 8所示 12 表 8.“ 賬單明細(xì)”表 (9)“賬單明細(xì)歷史”表:賬單編號(hào)、入住單號(hào)、消費(fèi)內(nèi)容、消費(fèi)金額、消費(fèi)時(shí)間、備注。 Sybase 則較專注于 SQL Server 在 UNIX 操作系統(tǒng)上的應(yīng) SQL Server安裝界面用 ]4[ 。能夠方便酒店管理人員查閱客房動(dòng)態(tài)、采集客戶信息、處理客戶訂單、結(jié)算。 作者簽名: 日 期: 目 錄 ........................................................................................................................ 1 項(xiàng)目開發(fā)背景 ................................................................................................... 1 酒店信息化管理的目標(biāo) ................................................................................... 2 系統(tǒng)開發(fā)工具 ................................................................................................... 2 Visual basic .NET .......................................................................................... 2 Sql Serve 2021 ............................................................................................. 2 ............................................................................................. 2 酒店管理系統(tǒng)的需求分析 .............................................................................. 2 基礎(chǔ)設(shè)置 .................................................................................................. 3 預(yù)訂管理 .................................................................................................. 3 前臺(tái)接待 管理 ............................................................................................ 4 前臺(tái)收銀管理 ............................................................................................ 4 客房及客史管理 ........................................................................................ 5 財(cái)務(wù)核查管理 ............................................................................................ 5 其他系統(tǒng)接口 .......................................................................................... 6 數(shù)據(jù)庫需求分析 ............................................................................................... 6 實(shí)例功能 .......................................................................................................... 8 系統(tǒng)流程圖 ..............................................................................................