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