酒店客房管理系統(tǒng)系統(tǒng)開發(fā)_第1頁
酒店客房管理系統(tǒng)系統(tǒng)開發(fā)_第2頁
酒店客房管理系統(tǒng)系統(tǒng)開發(fā)_第3頁
酒店客房管理系統(tǒng)系統(tǒng)開發(fā)_第4頁
酒店客房管理系統(tǒng)系統(tǒng)開發(fā)_第5頁
已閱讀5頁,還剩30頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、Web系統(tǒng)開發(fā)設(shè)計(jì)題目:酒店客房管理系統(tǒng)指導(dǎo)教師:黃瀟目錄目錄錯(cuò)誤!未定義書簽。 TOC o 1-5 h z 第一章問題定義1第二章可行性研究1系統(tǒng)建設(shè)目標(biāo):1可行性分析1技術(shù)可行性1經(jīng)濟(jì)可行性222第三章需求分析2系統(tǒng)功能分析2使用結(jié)構(gòu)化方法進(jìn)行系統(tǒng)分析22.2酒店客房管理系統(tǒng)的E-R圖53.3對(duì)系統(tǒng)進(jìn)行面向?qū)ο蠓治?系統(tǒng)用例模型7系統(tǒng)對(duì)象模型8第四章系統(tǒng)的概要設(shè)計(jì)9系統(tǒng)體系結(jié)構(gòu)圖9數(shù)據(jù)庫(kù)設(shè)計(jì)10第五章系統(tǒng)的詳細(xì)設(shè)計(jì)及其實(shí)現(xiàn)11設(shè)計(jì)思想:11界面設(shè)計(jì):11相關(guān)程序代碼:14程序流程圖:31第六章系統(tǒng)測(cè)試31模塊測(cè)試31系統(tǒng)測(cè)試32第一章問題定義今年來,我國(guó)人民生活水平顯著提高,伴隨著我國(guó)旅游

2、業(yè)的高速發(fā)展,酒店行業(yè)的服務(wù)檔次迫切需要提高。在酒店行業(yè)競(jìng)爭(zhēng)激烈的今天,要成為佼佼者,就必須與高新技術(shù)緊密結(jié)合。傳統(tǒng)的純手工或簡(jiǎn)單的計(jì)算工具,已經(jīng)不適應(yīng)現(xiàn)代經(jīng)濟(jì)高速發(fā)展的要求,必須運(yùn)用現(xiàn)代化管理手段,配備完善的自動(dòng)化設(shè)備,提高客房的服務(wù)水平與質(zhì)量,從而贏得高信譽(yù),強(qiáng)實(shí)力,好效益!酒店客房管理系統(tǒng)提供酒店客房科學(xué)、規(guī)范的現(xiàn)代管理模式,使酒店客房管理跨上一個(gè)新的臺(tái)階,一個(gè)先進(jìn)的管理手段即高效率計(jì)算機(jī)管理方式引導(dǎo)酒店行業(yè)的發(fā)展,不僅能為酒店帶來巨大的直接經(jīng)濟(jì)效益,而且還能提高酒店服務(wù)水準(zhǔn)和員工工作效率,使酒店客房管理進(jìn)入一個(gè)新層次,提高服務(wù)質(zhì)量,改善酒店客房的形象。酒店客房管理系統(tǒng)提供酒店客房科學(xué)、

3、規(guī)范的現(xiàn)代管理模式,使酒店客房管理跨上一個(gè)新的臺(tái)階,一個(gè)先進(jìn)的管理手段即高效率計(jì)算機(jī)管理方式引導(dǎo)酒店行業(yè)的發(fā)展,不僅能為酒店帶來巨大的直接經(jīng)濟(jì)效益,而且還能提高酒店服務(wù)水準(zhǔn)和員工工作效率,使酒店客房管理進(jìn)入一個(gè)新層次,提高服務(wù)質(zhì)量,改善酒店客房的形象。隨著社會(huì)服務(wù)行業(yè)的發(fā)展,使用管理軟件來管理整個(gè)賓館企業(yè)的要求也逐年升溫,有條件的酒店或賓館都采用了相關(guān)的酒店管理系統(tǒng),以解決賓館全憑原始的手工記錄管理,效率低、易出錯(cuò)的缺陷。賓館行業(yè)對(duì)自身提供服務(wù)的質(zhì)量和能力也有了更高的要求,賓館信息管理系統(tǒng)正因此而越來越受到重視。賓館信息管理系統(tǒng)主要實(shí)現(xiàn)賓館酒店的客房管理、客戶信息管理、客戶添加管理、客戶修改管

4、理、客戶刪除管理功能。一個(gè)賓館信息管理系統(tǒng)應(yīng)該包括基本的客房信息管理、客房客戶信息管理、入住退房信息管理等相關(guān)的信息管理。我國(guó)酒店業(yè)利用計(jì)算機(jī)管理系統(tǒng)來加強(qiáng)管理、提高服務(wù)水平,雖然至今已有了20多年的歷史,但起步發(fā)展較晚,只是一些淺層次應(yīng)用,大多數(shù)還停留于七拼八湊的MIS系統(tǒng)水平,甚至還僅限于簡(jiǎn)單的電算化和信息發(fā)布階段,與國(guó)際酒店業(yè)先進(jìn)信息化應(yīng)用的差距非常明顯。第二章可行性研究系統(tǒng)建設(shè)目標(biāo):在現(xiàn)代的酒店等服務(wù)行業(yè)中,由于客流量巨增,傳統(tǒng)的管理方法已經(jīng)不能滿足現(xiàn)代社會(huì)的需要,在運(yùn)營(yíng)中需要對(duì)客房資源、顧客信息、結(jié)算信息進(jìn)行管理。通過這套軟件,無論各種等級(jí)的酒店,都可輕松進(jìn)行管理,都具有非常實(shí)用的價(jià)

5、值,酒店客房管理系統(tǒng)的開發(fā)無疑具有深遠(yuǎn)得意義。酒店客房管理系統(tǒng)提供客房科學(xué)、規(guī)范的現(xiàn)代管理模式,使酒店客房管理跨上一個(gè)的臺(tái)階,以高效率計(jì)算機(jī)管理方式引導(dǎo)酒店行業(yè)的發(fā)展,為酒店帶來直接的經(jīng)濟(jì)效益,提高酒店服務(wù)水準(zhǔn),改善酒店客房的形象??尚行苑治隹尚行匝芯康哪康木褪怯米钚〉拇鷥r(jià)在盡可能短的時(shí)間內(nèi)確定問題是否能夠解決、是否值得去解決。下面從四個(gè)方面分析本系統(tǒng)的可行性:技術(shù)可行性本系統(tǒng)采用sqlserver進(jìn)行后臺(tái)數(shù)據(jù)庫(kù)的管理、操作和維護(hù),用進(jìn)行前臺(tái)界面設(shè)計(jì)、與后臺(tái)數(shù)據(jù)庫(kù)的接口、數(shù)據(jù)的錄入、查詢、瀏覽等。由于sqlserver具有強(qiáng)大的數(shù)據(jù)庫(kù)開發(fā)功能、方便快捷的數(shù)據(jù)庫(kù)接口設(shè)計(jì)功能、使用的靈活、以及它們

6、實(shí)際應(yīng)用的廣泛,充分說明本系統(tǒng)在技術(shù)方面可行。經(jīng)濟(jì)可行性目前國(guó)內(nèi)的酒店的網(wǎng)點(diǎn)已達(dá)數(shù)萬家,然而有相當(dāng)一部分還沒有使用現(xiàn)代化的計(jì)算機(jī)管理軟件,因而急需提高客房管理水平、管理質(zhì)量和管理工作的效率,減少不必要的開支,降低成本,同時(shí)本系統(tǒng)成本較低,使用靈活,簡(jiǎn)單易學(xué),因此,市場(chǎng)前景看好,在經(jīng)濟(jì)方面可行。該系統(tǒng)設(shè)計(jì)思路清晰,操作簡(jiǎn)捷,具有良好的用戶界面,和較為完善的異常處理機(jī)制及信息提示機(jī)制,用戶只需經(jīng)過簡(jiǎn)單地培訓(xùn)就可使用,因而,在操作方面可行。本系統(tǒng)沒有違反國(guó)家的相關(guān)法律規(guī)定,因此,在法律方面可行。第三章需求分析3.1系統(tǒng)功能分析系統(tǒng)開發(fā)的總體任務(wù)是實(shí)現(xiàn)酒店各種信息的系統(tǒng)化,規(guī)范化和自動(dòng)化管理,減少工作

7、量,提高效率,增強(qiáng)可靠性。系統(tǒng)功能分析是在系統(tǒng)開發(fā)設(shè)計(jì)的總體任務(wù)的基礎(chǔ)上完成,本實(shí)例中的酒店客房管理系統(tǒng)需要完成的功能主要有:、客房信息管理:包括房間編號(hào)、房間級(jí)別、房間類型、房間價(jià)格(元)、是否住人等信息的輸入、刪除、修改等。、客人信息管理:包括客人姓名、登記號(hào)、身份證號(hào)、房間號(hào)、登記日期的輸入、刪除、修改等。、退房信息管理:包括客人的退房日期、付款金額的輸入、修改、刪除等。、客房信息查詢:包括查詢房間編號(hào)、房間級(jí)別、房間類型、房間價(jià)格(元)、是否住人等信息。、收費(fèi)信息查詢:包括查詢收費(fèi)日期、付款金額。、其他特殊功能:隨時(shí)查詢、匯總酒店客房和客人情況,并獲得房間入住情況匯總報(bào)表;進(jìn)行房?jī)r(jià)調(diào)整

8、,房間增減。.2使用結(jié)構(gòu)化方法進(jìn)行系統(tǒng)分析對(duì)用戶需求進(jìn)行分析,畫出系統(tǒng)的數(shù)據(jù)流圖:頂層流圖:一層流圖:二層流圖酒店操作功能權(quán)限交易記錄客房處理客戶管理員工處理圖酒店客房管理系統(tǒng)的E-R圖系統(tǒng)所需的數(shù)據(jù)項(xiàng):客戶信息:顧客編號(hào),顧客姓名,顧客性別,顧客年齡,顧客身份證id,顧客聯(lián)系方式;員工信息:?jiǎn)T工id,賬號(hào),密碼,姓名,級(jí)別;客房信息:七駕房問號(hào),房間類型,押金,價(jià)格,狀態(tài),備注;交易:交易編號(hào),客戶賬號(hào),房間id,預(yù)訂時(shí)間,入住時(shí)間,離店時(shí)間,消費(fèi),預(yù)訂員工,入住員工,離店員工,狀態(tài);酒店客房管理系統(tǒng)的E-R模型:1.局部E-R圖:登陸2.全局E-R圖:3.3對(duì)系統(tǒng)進(jìn)行面向?qū)?/p>

9、象分析3.3.1系統(tǒng)用例模型登錄進(jìn)入管理貞卸客戶信息客戶登錄信息員工信息員工信息展示客房信息客房信息展示預(yù)定預(yù)定房間入住入住房間用例列表3.15參與者列表3.14客戶出錢入住的人員工安排入住的人管理員管理整個(gè)系統(tǒng)的人離店離開房間營(yíng)業(yè)狀況展示營(yíng)業(yè)狀況3.用例圖圖系統(tǒng)對(duì)象模型系統(tǒng)類圖圖3.17第四章系統(tǒng)的概要設(shè)計(jì)系統(tǒng)體系結(jié)構(gòu)圖圖4.1數(shù)據(jù)庫(kù)設(shè)計(jì)根據(jù)E-R模型和數(shù)據(jù)庫(kù)需求分析,本系統(tǒng)總共涉及6個(gè)數(shù)據(jù)表格。包括:客戶信息表、員工信息表、客房信息統(tǒng)計(jì)表、交易表、功能表、權(quán)限表,本系統(tǒng)的數(shù)據(jù)表設(shè)計(jì)如下所示:客戶信息表4.2FieldTypeCommentcidint(11)NOTNULL

10、顧客編號(hào)cnamevarchar(30)NULL顧客姓名csexvarchar(3)NULL顧客性別cageint(11)NULL顧客年齡ccardidvarchar(30)NULL顧客身份證idcphonevarchar(20)NULL顧客聯(lián)系方式員工信息表4.3FieldTypeCommenteidint(11)NOTNULL員工ideaccountvarchar(20)NULLepwdvarchar(20)NULL密碼epnamevarchar(30)NULL姓名erankint(11)NULL級(jí)別客房信息統(tǒng)計(jì)表4.4FieldTypeCommentrdint(11)NOTNUL主鍵ri

11、dint(11)NULL房問號(hào)rtypevarchar(10)NULL房間類型(單、雙、三人、四人)rcashint(11)NULL押金rpriceint(11)NULL價(jià)格rstatusvarchar(10)NULL狀態(tài)(空閑、預(yù)訂、已?。﹔egvarchar(255)NULL備注交易表4.5FieldTypeCommentdealidint(50)NOTNULL交易編號(hào)dcidint(11)NULL客戶賬號(hào)dridint(11)NULL房間iddretimedateNULL預(yù)訂時(shí)間dintimedateNULL入住時(shí)間doutimedateNULL離店時(shí)間dconsumint(20)NUL

12、L消費(fèi)dempidreint(20)NULL員工id(預(yù)訂)dempidinint(20)NULL員工id(入?。ヾempidouint(20)NULL員工id(離店)dstatusint(20)NULL狀態(tài)(1-預(yù)訂2-入住3-空閑)功能表4.6FieldTypeCommentzidint(11)NOTNULL子idfnamevarchar(30)NULL功能名稱funurlvarchar(100)NULL功能urlpidint(11)NULL父id權(quán)限表4.7FieldTypeCommentrgradeint(11)NULL級(jí)別funidint(11)NULL功能id第五章系統(tǒng)的詳細(xì)設(shè)計(jì)及

13、其實(shí)現(xiàn)設(shè)計(jì)思想:管理員登錄成功后,顯示主模塊、主模塊分菜單、顯示頁面,菜單提供系統(tǒng)所有功能模塊的選擇操作,點(diǎn)擊下拉菜單的各菜單項(xiàng),打開相應(yīng)的操作模塊。常用菜單欄包括客房管理,客戶管理、員工管理、功能管理、營(yíng)業(yè)狀況,此實(shí)際的基本目的是在于客房管理以及客戶管理是酒店客房管理系統(tǒng)的最主要也是最關(guān)鍵的功能,放在此既易于尋找又方便操作。而員工管理與功能模塊的操作選擇起來不是很方便,但是都利于實(shí)現(xiàn)客戶預(yù)訂房間,入住登記,離店結(jié)帳功能的實(shí)現(xiàn)。界面設(shè)計(jì):相關(guān)程序代碼:Controllers(AccountController)usingSystem;usingusingSystem.Linq;usingSys

14、tem.Transactions;usingSystem.Web;usingusingusingDotNetOpenAuth.AspNet;usingusingWebMatrix.WebData;usingHotel.Filters;usingHotel.Models;namespaceHotel.ControllersAuthorizeInitializeSimpleMembershippublicclassAccountController:Controller/GET:/Account/LoginAllowAnonymouspublicActionResultLogin(stringre

15、turnUrl)ViewBag.ReturnUrl=returnUrl;returnView();/POST:/Account/LoginHttpPostAllowAnonymousValidateAntiForgeryTokenpublicActionResultLogin(LoginModelmodel,stringreturnUrl)if(ModelState.IsValid&WebSecurity.Login(model.UserName,model.Password,persistCookie:model.RememberMe)if(model.UserName=admin)retu

16、rnRedirectToAction(manager,stu);elsereturnRedirectToAction(login,stu);/如果我們進(jìn)行到這一步時(shí)某個(gè)地方出錯(cuò),則重新顯示表單ModelState.AddModelError(,提供的用戶名或密碼不正確。);returnView(model);publicActionResultguanli()returnView();/POST:/Account/LogOffHttpPostValidateAntiForgeryTokenpublicActionResultLogOff()WebSecurity.Logout();return

17、RedirectToAction(Index,Home);/GET:/Account/RegisterAllowAnonymouspublicActionResultRegister()returnView();/POST:/Account/RegisterHttpPostAllowAnonymousValidateAntiForgeryTokenpublicActionResultRegister(RegisterModelmodel)if(ModelState.IsValid)/嘗試注冊(cè)用戶tryWebSecurity.CreateUserAndAccount(model.UserName

18、,model.Password);WebSecurity.Login(model.UserName,model.Password);returnRedirectToAction(Index,Home);catch(MembershipCreateUserExceptione)ModelState.AddModelError(,ErrorCodeToString(e.StatusCode);/如果我們進(jìn)行到這一步時(shí)某個(gè)地方出錯(cuò),則重新顯示表單returnView(model);/POST:/Account/DisassociateHttpPostValidateAntiForgeryTokenp

19、ublicActionResultDisassociate(stringprovider,stringproviderUserId)|stringownerAccount=OAuthWebSecurity.GetUserName(provider,providerUserId);ManageMessageIdmessage=null;/只有在當(dāng)前登錄用戶是所有者時(shí)才取消關(guān)聯(lián)帳戶if/使用事務(wù)來防止用戶刪除其上次使用的登錄憑據(jù)using(varscope=newTransactionScope(TransactionScopeOption.Required,newTransactionOptio

20、nsIsolationLevel=IsolationLevel.Serializable)boolhasLocalAccount=OAuthWebSecurity.HasLocalAccount(WebSecurityOAuthWebSecurity.DeleteAccount(provider,providerUserld);scope.Complete();message=ManageMessageldRemoveLoginSuccess;returnRedirectToAction(Manage,newMessage=message);/GET:/Account/Managepublic

21、ActionResultManage(ManageMessageIdmessage)ViewBag.StatusMessage=message=ManageMessageIdChangePasswordSuccess已更改你的密碼。:message=ManageMessageIdSetPasswordSuccess已設(shè)置你的密碼。:message=ManageMessageIdRemoveLoginSuccess已刪除夕卜部登錄。;:;ViewBag.HasLocalPassword=OAuthWebSecurity.HasLocalAccount(WebSecurityViewBag.Ret

22、urnUrl=Url.Action(Manage);returnView();/POST:/Account/ManageHttpPostValidateAntiForgeryTokenpublicActionResultManage(LocalPasswordModelmodel)boolhasLocalAccount=OAuthWebSecurity.HasLocalAccount(WebSecurityViewBag.HasLocalPassword=hasLocalAccount;ViewBag.ReturnUrl=Url.Action(Manage);if(ModelState.IsV

23、alid)/在某些失敗方案中,ChangePassword將引發(fā)異常,而不是返回falseboolchangePasswordSucceeded;trychangePasswordSucceeded=WebSecuritycatch(Exception)changePasswordSucceeded=false;if(changePasswordSucceeded)|returnRedirectToAction(Manage,newMessage=ManageMessageIdChangePasswordSuccess);elseModelState.AddModelError(,當(dāng)前密碼不正

24、確或新密碼無效。);else/用戶沒有本地密碼,因此將刪除由于缺少/OldPassword字段而導(dǎo)致的所有驗(yàn)證錯(cuò)誤ModelStatestate=ModelStateOldPassword;if(state!=null)if(ModelState.IsValid)tryWebSecurityreturnRedirectToAction(Manage,newMessage=ManageMessageldSetPasswordSuccess);catch(Exceptione)ModelState.AddModelError(,e);/如果我們進(jìn)行到這一步時(shí)某個(gè)地方出錯(cuò),則重新顯示表單return

25、View(model);/POST:/Account/ExternalLoginHttpPostAllowAnonymousValidateAntiForgeryTokenpublicActionResultExternalLogin(stringprovider,stringreturnUrl)returnnewExternalLoginResult(provider,Url.Action(ExternalLoginCallbacknewReturnUrl=returnUrl);/GET:/Account/ExternalLoginCallbackAllowAnonymouspublicAc

26、tionResultExternalLoginCallback(stringreturnUrl)AuthenticationResultresult=OAuthWebSecurity.VerifyAuthentication(Url.Action(ExternalLoginCallback,newReturnUrl=returnUrl);if(!result.IsSuccessful)returnRedirectToAction(ExternalLoginFailure);if(OAuthWebSecurity.Login(result.Provider,result.ProviderUser

27、Id,createPersistentCookie:false)|returnRedirectToLocal(returnUrl);if/如果當(dāng)前用戶已登錄,則添加新帳戶OAuthWebSecurityreturnRedirectToLocal(returnUrl);else/該用戶是新用戶,因此將要求該用戶提供所需的成員名稱stringloginData=OAuthWebSecurity.SerializeProviderUserId(result.Provider,result.ProviderUserId);ViewBag.ProviderDisplayName=OAuthWebSecu

28、rity.GetOAuthClientData(result.Provider).DisplayName;ViewBag.ReturnUrl=returnUrl;returnView(ExternalLoginConfirmation,newRegisterExternalLoginModelUserName=result.UserName,ExternalLoginData=loginData);/POST:/Account/ExternalLoginConfirmationHttpPostAllowAnonymousValidateAntiForgeryTokenpublicActionR

29、esultExternalLoginConfirmation(RegisterExternalLoginModelmodel,stringreturnUrl)stringprovider=null;stringproviderUserId=null;ifOAuthWebSecurity.TryDeserializeProviderUserId(model.ExternalLoginData,outprovider,outproviderUserId)returnRedirectToAction(Manage);if(ModelState.IsValid)/將新用戶插入到數(shù)據(jù)庫(kù)using(Use

30、rsContextdb=newUsersContext()UserProfile/檢查用戶是否已存在if(user=null)/將名稱插入到配置文件表newUserProfileUserName=model.UserName);db.SaveChanges();OAuthWebSecurity.CreateOrUpdateAccount(provider,providerUserId,model.UserName);OAuthWebSecurity.Login(provider,providerUserId,createPersistentCookie:false);returnRedirec

31、tToLocal(returnUrl);elseModelState.AddModelError(UserName,用戶名已存在。請(qǐng)輸入其他用戶名。”);ViewBag.ProviderDisplayName=OAuthWebSecurity.GetOAuthClientData(provider).DisplayName;|ViewBag.ReturnUrl=returnUrl;returnView(model);/GET:/Account/ExternalLoginFailureAllowAnonymouspublicActionResultExternalLoginFailure()re

32、turnView();AllowAnonymousChildActionOnlypublicActionResultExternalLoginsList(stringreturnUrl)ViewBag.ReturnUrl=returnUrl;returnPartialView(_ExternalLoginsListPartial,OAuthWebSecurity.RegisteredClientData);ChildActionOnlypublicActionResultRemoveExternalLogins()ICollectionaccounts=OAuthWebSecurityList

33、externalLogins=newList();foreach(OAuthAccountaccountinaccounts)AuthenticationClientDataclientData=OAuthWebSecurity.GetOAuthClientData(account.Provider);Provider=account.Provider,ProviderDisplayName=clientData.DisplayName,ProviderUserld=account.ProviderUserld,);ViewBag.ShowRemoveButton=externalLogins

34、.Count1|OAuthWebSecurity.HasLocalAccount(WebSecurityreturnPartialView(_RemoveExternalLoginsPartial,externalLogins);#region幫助程序privateActionResultRedirectToLocal(stringreturnUrl)if(Url.IsLocalUrl(returnUrl)returnRedirect(returnUrl);elsereturnRedirectToAction(Index,Home);publicenumManageMessageIdChang

35、ePasswordSuccess,SetPasswordSuccess,RemoveLoginSuccess,internalclassExternalLoginResult:ActionResultpublicExternalLoginResult(stringprovider,stringreturnUrl)Provider=provider;ReturnUrl=returnUrl;publicstringProviderget;privateset;publicstringReturnUrlget;privateset;publicoverridevoidExecuteResult(Co

36、ntrollerContextcontext)OAuthWebSecurity.RequestAuthentication(Provider,ReturnUrl);privatestaticstringErrorCodeToString(MembershipCreateStatuscreateStatus)/狀態(tài)代碼的完整列表。switch(createStatus)caseMembershipCreateStatus.DuplicateUserName:return用戶名已存在。請(qǐng)輸入其他用戶名。;caseMembershipCreateStatus.DuplicateEmail:retur

37、n該電子郵件地址的用戶名已存在。請(qǐng)輸入其他電子郵件地址。caseMembershipCreateStatus.InvalidPassword: TOC o 1-5 h z return提供的密碼無效。請(qǐng)輸入有效的密碼值。;caseMembershipCreateStatus.InvalidEmail:return提供的電子郵件地址無效。請(qǐng)檢查該值并重試。;caseMembershipCreateStatus.InvalidAnswer:return提供的密碼取回答案無效。請(qǐng)檢查該值并重試。;caseMembershipCreateStatus.InvalidQuestion:return提供的

38、密碼取回問題無效。請(qǐng)檢查該值并重試。;caseMembershipCreateStatus.InvalidUserName:return提供的用戶名無效。請(qǐng)檢查該值并重試。;caseMembershipCreateStatus.ProviderError:return身份驗(yàn)證提供程序返回了錯(cuò)誤。請(qǐng)驗(yàn)證您的輸入并重試。如果問題仍然存在,請(qǐng)與系統(tǒng)管理員聯(lián)系。;caseMembershipCreateStatus.UserRejected:return已取消用戶創(chuàng)建請(qǐng)求。請(qǐng)驗(yàn)證您的輸入并重試。如果問題仍然存在,請(qǐng)與系統(tǒng)管理員聯(lián)系。;default:return發(fā)生未知錯(cuò)誤。請(qǐng)驗(yàn)證您的輸入并重試。如果

39、問題仍然存在,請(qǐng)與系統(tǒng)管理員聯(lián)系。;#endregionHomeControllerusingSystem;usingusingSystem.Linq;usingSystem.Web;usingnamespaceHotel.ControllerspublicclassHomeController:ControllerpublicActionResultIndex()ViewBag.Message=修改此模板以快速啟動(dòng)你的ASP.NETMVC應(yīng)用程序。;returnView();publicActionResultAbout()ViewBag.Message=GreenHouse酒店;retur

40、nView();publicActionResultContact。ViewBag.Message =“您的聯(lián)系方式;returnView();stuControllerusingAdonet;usingSystem;usingusingSystem.Data;usingusingSystem.Linq;usingSystem.Web;usingnamespace賓館管理系統(tǒng)修改版.ControllerspublicclassstuController:Controller/GET:/stu/staticdoublemoney=0;publicActionResultIndex()return

41、View();publicActionResultlogin()returnView();HttpGetpublicActionResultAddroom()DataTableds=SQLhelper.ExecuteDataTable(selectnofromroom);ViewData.Model=ds;returnView();HttpPostpublicActionResultAddroom(stringtname,stringtid,stringttel,stringtsex,stringtvip,stringtno,stringtday,stringttype)intflg=0;Da

42、taTabledt=SQLhelper.ExecuteDataTable(select*fromcustomer);DataTableda=SQLhelper.ExecuteDataTable(selectnofromroomwheretype=typeandstate=state,newSqlParameter(type,ttype),newSqlParameter(state,N);for(intif(da.Rowsi0.ToString()=tno)flg=1;break;if(flg=1)SQLhelper.ExecuteNoneQuery(insertintocustomervalu

43、es(name,id,tel,sex,vip,no,day,room_state),newSqlParameter(nametname),newSqlParameter(id,tid),newSqlParameter(tel,ttel),new|SqlParameter(sex,tsex),newSqlParameter(vip,tvip),newSqlParameter(no,tno),newSqlParameter(day,tday),newSqlParameter(room_state,已住);SQLhelper.ExecuteNoneQuery(updateroomsetstate=s

44、tatewhereno=no,newSqlParameter(no,tno),newSqlParameter(state,Y);SQLhelper.ExecuteNoneQuery(insertintolivein_inforvalues(name,id,tel,sex,no,type,vip,day,room_state),newSqlParameter(nametname),newSqlParameter(id,tid),newSqlParameter(tel,ttel),newSqlParameter(sex,tsex),newSqlParameter(vip,tvip),newSqlP

45、arameter(no,tno),newSqlParameter(type,ttype),newSqlParameter(day,tday),newSqlParameter(room_state,已住);returnContent。;elsereturnContent(scriptalert(客房有人住或客房不存在,訂房失??!);history.go(-1););publicActionResultFindbiaozhun()DataTabledt=SQLhelper.ExecuteDataTable(select*fromroomwheretype=typeandstate=state,ne

46、wSqlParameter(type,普通),newSqlParameter(state,N);ViewData.Model=dt;returnView();publicActionResultFindqipai()DataTabledt=SQLhelper.ExecuteDataTable(select*fromroomwheretype=typeandstate=state,newSqlParameter(type,棋牌),newSqlParameter(state,N);ViewData.Model=dt;|returnView();publicActionResultFindgaoji

47、()DataTabledt=SQLhelper.ExecuteDataTable(select*fromroomwheretype=typeandstate=state,newSqlParameter(type,高級(jí)),newSqlParameter(state,N);ViewData.Model=dt;returnView();publicActionResultFindall()DataTabledt=SQLhelper.ExecuteDataTable(select*fromroom);ViewData.Model=dt;returnView();HttpGetpublicActionR

48、esultFindbyno()returnView();HttpPostpublicActionResultFindbyno(stringtno)DataTabledt=SQLhelper.ExecuteDataTable(select*fromroomwhereno=nonewSqlParameter(no,tno);ViewData.Model=dt;|returnView(Findall);publicActionResultFindin()DataTabledt=SQLhelper.ExecuteDataTable(select*fromcustomer,roomwherecustom

49、er.no=room.no);ViewData.Model=dt;|returnView();publicActionResultFindcus()DataTabledt=SQLhelper.ExecuteDataTable(select*fromcustomer);ViewData.Model=dt;|returnView();publicActionResultmanager。returnView();HttpGetpublicActionResultEditprice()returnView();HttpPostpublicActionResultEditprice(stringttyp

50、e)DataTabledt=SQLhelper.ExecuteDataTable(select*fromroomwheretype=type,newSqlParameter(type,ttype);ViewData.Model=dt;returnView(Editp);HttpGetpublicActionResultEditp()returnView();HttpPostpublicActionResultEditp(stringttype,stringcprice)SQLhelper.ExecuteNoneQuery(updateroomsetprice=pricewheretype=ty

51、pe,newSqlParameter(type,ttype),newSqlParameter(price,cprice);returnRedirectToAction(Editprice);publicActionResultDelroom()DataTabledt=SQLhelper.ExecuteDataTable(select*fromroomwherestate=state,newSqlParameter(state,N);DataTableda=SQLhelper.ExecuteDataTable(selectstatefromroom);|ViewData.Model=dt;Vie

52、wDatada = da;returnView();publicActionResultDel(stringtno)SQLhelper.ExecuteNoneQuery(deletefromroomwhereno=no,newSqlParameter(no,tno);returnRedirectToAction(Delroom);HttpGetpublicActionResultInsertroom()returnView();HttpPostpublicActionResultInsertroom(stringtno,stringttype,stringtfloor,stringtprice

53、,stringtstate)DataTableda=SQLhelper.ExecuteDataTable(select*fromroom);SQLhelper.ExecuteNoneQuery(insertintoroomvalues(no,type,floor,price,state),newSqlParameter(no,tno),newSqlParameter(type,ttype),newSqlParameter(floor,tfloor),newSqlParameter(price,tprice),newSqlParameter(state,tstate);|returnView()

54、;HttpGetpublicActionResulttuiroom()returnView();HttpPostpublicActionResulttuiroom(stringtno)DataTabledt=SQLhelper.ExecuteDataTable(select*fromroom,customerwherecustomer.no=room.noandroom.no=noandroom_state=room_state,newSqlParameter(no,tno),newSqlParameter(room_state,已住);DataTablevipd=SQLhelper.Exec

55、uteDataTable(selectvipfromcustomerwhereno=no;newSqlParameter(no,tno);DataTablepriced=SQLhelper.ExecuteDataTable(selectpricefromroomwhereno=no;newSqlParameter(no,tno);DataTabledayd=SQLhelper.ExecuteDataTable(selectdayfromcustomerwhereno=no;newSqlParameter(no,tno);ViewData.Model=dt;if(Convert.ToInt32(

56、vipd.Rows00)=1)money=Convert.ToInt32(priced.Rows00)*Convert.ToInt32(dayd.Rows00)*0.8;SQLhelper.ExecuteNoneQuery(updateroomsetstate=statewhereno=no,newSqlParameter(no,tno),newSqlParameter(state,N);SQLhelper.ExecuteNoneQuery(updatecustomersetroom_state=room_statewhereno=no,newSqlParameter(notno),newSq

57、lParameter(room_state,已退);elsemoney=Convert.ToInt32(priced.Rows00)*Convert.ToInt32(dayd.Rows00);TempDatamoney=money;returnView(show);HttpGetpublicActionResultshow()returnView();HttpPostpublicActionResultshow(doublepay)doublepays=0;pays=pay-money;TempDatapays=pays;TempDatapay=pay;returnContent。;publi

58、cActionResultshow2()returnView();ViewsAddroomsingSystem.DataViewBag.Title=Addroom;AddroomDataTabledt=(DataTable)ViewDatadt;DataTableds=(DataTable)ViewDatads;Iusing(Html.BeginForm(Addroom,stu,FormMethodPost)Html.Label(姓名:)Html.TextBox(tname)Html.Label(身份證號(hào):)Html.TextBox(tid)Html.Label(手機(jī)號(hào):)Html.TextB

59、ox(ttel)Html.Label(性別:)Html.DropDownList(tsex,newListSelectListItem(newSelectListItem()Text=男,Value=男,Selected=false),(newSelectListItem()Text=女,Value=女,Selected=false)Html.Label(是否會(huì)員:)Html.DropDownList(tvip,newListSelectListItem(newSelectListItem()Text=是,Value=1,Selected=false),(newSelectListItem()

60、Text=否,Value=0,Selected=false)Html.Label(客房類型:)Html.DropDownList(ttype,newListSelectListItem TOC o 1-5 h z (newSelectListItem()Text=普通,Value=普通,Selected=false),(newSelectListItem()Text=棋牌,Value=棋牌,Selected=false),(newSelectListItem()Text=高級(jí),Value=高級(jí),Selected=false)Html.Label(客房編號(hào):)Html.TextBox(tno)H

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論