freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

酒店客房餐飲管理系統(tǒng)實現(xiàn)—免費畢業(yè)設(shè)計論文(已修改)

2024-12-17 11:56 本頁面
 

【正文】 酒店客房餐飲管理系統(tǒng)實現(xiàn) 酒店客房餐飲管理系統(tǒng)功能完善,能管理普通酒店的客房住宿和餐飲等服務(wù)。本系統(tǒng)采用 DELPHI和 SQL SERVER工具開發(fā),分為前臺和后臺管理。前臺與后臺管理程序相對獨立,均共用一個數(shù)據(jù)庫。下面對該系統(tǒng)的部份功能和模塊以及代碼進行分析。 一.前臺管理 1. 數(shù)據(jù)模塊 該模塊是整個程序數(shù)據(jù)的提供者,以及包括大部分的處理函數(shù)和實現(xiàn)功能。 單元文件名: ,數(shù)據(jù)模塊名: DM_main。 部分代碼分析: 返回指表中某字段的最大值,返回值為整型。因此該函數(shù)只能應(yīng)用字段為整型的表 。 function (aTable,aField:string):integer。 var sSql:string。 begin Result:=0。 sSql:=39。select max(%s) from %s39。 with Q_getmax do begin :=Format(sSql,[aField,aTable])。 Open。 if not IsEmpty then Result:=Fields[0].AsInteger+1。 Close。 end。 end。 接下來這個函數(shù)也是返回最大值,但是其為一個訂單的最大編號為字符型。 function :string。 var id:String。 count:Integer。 begin with Q_count_order do begin Open。 count:=Fields[0].Value。 Close。 end。 id:=39。00039。+IntToStr(count)。 id:=Copy(id, length(id)3, 4)。 id:=39。F39。+FormatDateTime(39。yymmdd39。,now)+id。 Result:=id。 end。 系統(tǒng)登陸函數(shù):在進行系統(tǒng)的操作處理時,必須登陸。該函數(shù)對用戶輸入的用戶名和密碼數(shù)據(jù)庫驗證。其密碼是進行加密的(加密模塊稍后分析) function (user, passwd:String):String。 var Flag:Boolean。 begin if =false then :=True。 passwd:=Copy(passwd+passwd, 1, 10)。 //加密處理 passwd:=Encrypt(passwd, 111)。 with Q_login do begin Close。 [39。ID39。]:=user。 [39。PASSWD39。]:=passwd。 Open。 //在用戶請中查詢該用戶和密碼是否存在 Flag:=( not IsEmpty)。 if Flag then begin Login:=FieldValues[39。NAME39。]。 IsPass:=Flag。 end else begin Login:=39。39。 (39。請重新輸入! 39。, 39。登錄失敗 39。, MB_OK)。 end。 Close。 end。 end。 系統(tǒng)登出: procedure 。 begin :=False。 //斷開數(shù)據(jù)庫的連接 end。 2. 加密模塊: 單元文件名: 。 簡單的加密算法。 const C1 = 52845。 C2 = 22719。 function Encrypt( S: String。 Key: Word): String。 //S:加密的字符串; Key:密鑰 var I: Integer。 j: Integer。 begin Result := S。 for I := 1 to Length(S) do begin Result[I] := char(byte(S[I]) xor (Key shr 8))。 Key := (byte(Result[I]) + Key) * C1 + C2。 end。 s:=Result。 Result:=39。39。 for i:=1 to length(s) do begin j:=Integer(s[i])。 Result:=Result + Char(65+(j div 26))+Char(65+(j mod 26))。 end。 end。 3. 主模塊 系統(tǒng)的主界面,包括系統(tǒng)登陸。在沒有進行登陸之前 4個功能按鈕為灰色。 第一個按鈕為客房管理,其次是餐飲管理,再次是客戶查詢,最后是收費管理。 4. 客房管理模塊 客房管理包括客房預(yù)定,入住,調(diào)整。其界面如下: 操作介紹: 預(yù)定:首先在證件編號文體框中輸入相關(guān)的證件編號,按回車鍵,顯示如下窗口: 輸入完整后單擊添加則返回上一個界面,相關(guān)的數(shù)據(jù)將自動填寫。然后在右邊選擇相應(yīng)的客房等級。在網(wǎng)格中將顯示該等級的所有空閑房號。選擇一個房間,再點擊“新建”按鈕,然后點擊“添加”??头款A(yù)定完畢。 入?。?在證件編號文體框中輸入相關(guān)的證件編號,按回車鍵。如果該客戶已經(jīng)預(yù)定則自動顯示信息,否則將彈出上面的窗口要求輸入信息。 5. 餐飲管理 包括選菜、點菜、打單: 下面是其相代碼說明: procedure (Sender: TObject)。 var id:integer。 total:single。 begin if sid=39。39。 then begin B_neworderClick(nil)。 end。 //訂單明細 id:=(39。order_detail39。,39。id39。)。 with Q_foodetail do begin Append。 Fields[0].AsInteger:=id。 Fields[1].AsString:=sid。 Fields[2].AsString:=。 Fields[3].AsString:=。 Fields[4].AsString:=。 Post。 DisableControls。 Close。 Open。 EnableControls。 end。 //更新總訂單的總金額 with do begin Edit。 total:=(sid)。 Fields[3].AsFloat:=total。 Post。 end。 end。 //撤銷選擇的一項菜目 procedure (Sender: TObject)。 var total:Single。 begin with Q_foodetail do begin if IsEmpty then Exit。 if not Active then begin ParamByName(39。sid39。).Value:=sid。 Open。 end。 Delete。 end。 total:=(sid)。 with do begin if not Active then Open。 Locate(39。id39。,sid,[])。 Edit。 Fields[3].AsFloat:=total。 Post。 end。 end。 procedure (Sender: TObject)。 begin //新建總訂單 sid:=。 with do begin Open。 Append。 Fields[0].AsString:=sid。 Fields[1].AsString:=DateTimeToStr(Now)。 Fields[2].AsString:=Trim()。 Post。 end。 with Q_foodetail do begin Close。 ParamByName(39。sid39。).Value:=sid。 Prepare。 Open。 end。 end。 打單:票據(jù)示例如下。 二.后臺管理 1. 數(shù)據(jù)模塊 該模塊是整個程序數(shù)據(jù)的提供者,以及包括大部分的處理函數(shù)和實現(xiàn)功能。 單元文件名: ,數(shù)據(jù)模塊名: DM_main。 部分代碼分析: 設(shè)置前臺操作員的密碼: procedure (password:String)。 begin password:=Copy(password+password, 1, 10)。 password:=Encrypt(password, 111)。 //加密單元 with T_operator do begin Edit。 FieldValues[39。PASSWD39。]:=password。 end。 end。 根據(jù)客房 ID 篩選客房: procedure (RoomID:String)。 begin with T_room_modify do begin Close。 if length(RoomID)0 then begin Filter:=39。ID=39。39。39。+RoomID+39。39。39。39。 Filtered:=True。 end else Filtered:=False。 Open。 end。 end。 獲得客房級別: procedure (RoomLevel:TStrings)。 begin 。 (39。全部級別 39。)。 with Q_room_level do begin Open。 First。 while not Eof do begin (FieldValues[39。DESCRIPT39。])。 Next。 end。 Close。 end。 end。 客房統(tǒng)計圖實現(xiàn)函數(shù): //StarDate: 開始日期; EndDate:結(jié)束日期; procedure (StartDate,EndDate:TDate。 TimeStep, StatType:Boolean。RoomLevel:Integer。 BarSeries:TBarSeries)。 var StatResult:integer。 MidDate:TDate。 StatLabel:String。 begin 。 while StartDateEndDate do begin MidDate:=GetNextDate(StartDate, TimeStep)。 if StatType then StatResult:=SumTurnover(StartDate, MidDate) else StatResult:=SumUsedRoom(StartDate, MidDate, RoomLevel)。 if TimeStep then StatLabel:=FormatDateTime(39。dd39。, StartDate)+39。日 39。 else StatLabel:=FormatDateTime(39。mm39。, StartDate)+39。月 39。 (StatResult,StatLabel)。 StartDate:=MidDate。 end。 end。 換算下個月(日)日期: function (StartDate:TDate。TimeStep:Boolean):TDate。 var TimeYear,TimeMonth:String。 begin if TimeStep then Result:=StartDate+1 else begin TimeYear:=FormatDateTime(39。yyyy39。, StartDate)。 TimeMonth:=FormatDateTime(39。mm39。, StartDate)。 if TimeMonth=39。1239。 then begin TimeYear:=IntToStr(StrTo
點擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
公安備案圖鄂ICP備17016276號-1