




版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領
文檔簡介
1、Web系統(tǒng)開發(fā)設計題目:酒店客房管理系統(tǒng)指導教師:黃瀟目錄目錄錯誤!未定義書簽。 TOC o 1-5 h z 第一章問題定義1第二章可行性研究1系統(tǒng)建設目標:1可行性分析1技術可行性1經(jīng)濟可行性222第三章需求分析2系統(tǒng)功能分析2使用結構化方法進行系統(tǒng)分析22.2酒店客房管理系統(tǒng)的E-R圖53.3對系統(tǒng)進行面向?qū)ο蠓治?系統(tǒng)用例模型7系統(tǒng)對象模型8第四章系統(tǒng)的概要設計9系統(tǒng)體系結構圖9數(shù)據(jù)庫設計10第五章系統(tǒng)的詳細設計及其實現(xiàn)11設計思想:11界面設計:11相關程序代碼:14程序流程圖:31第六章系統(tǒng)測試31模塊測試31系統(tǒng)測試32第一章問題定義今年來,我國人民生活水平顯著提高,伴隨著我國旅游
2、業(yè)的高速發(fā)展,酒店行業(yè)的服務檔次迫切需要提高。在酒店行業(yè)競爭激烈的今天,要成為佼佼者,就必須與高新技術緊密結合。傳統(tǒng)的純手工或簡單的計算工具,已經(jīng)不適應現(xiàn)代經(jīng)濟高速發(fā)展的要求,必須運用現(xiàn)代化管理手段,配備完善的自動化設備,提高客房的服務水平與質(zhì)量,從而贏得高信譽,強實力,好效益!酒店客房管理系統(tǒng)提供酒店客房科學、規(guī)范的現(xiàn)代管理模式,使酒店客房管理跨上一個新的臺階,一個先進的管理手段即高效率計算機管理方式引導酒店行業(yè)的發(fā)展,不僅能為酒店帶來巨大的直接經(jīng)濟效益,而且還能提高酒店服務水準和員工工作效率,使酒店客房管理進入一個新層次,提高服務質(zhì)量,改善酒店客房的形象。酒店客房管理系統(tǒng)提供酒店客房科學、
3、規(guī)范的現(xiàn)代管理模式,使酒店客房管理跨上一個新的臺階,一個先進的管理手段即高效率計算機管理方式引導酒店行業(yè)的發(fā)展,不僅能為酒店帶來巨大的直接經(jīng)濟效益,而且還能提高酒店服務水準和員工工作效率,使酒店客房管理進入一個新層次,提高服務質(zhì)量,改善酒店客房的形象。隨著社會服務行業(yè)的發(fā)展,使用管理軟件來管理整個賓館企業(yè)的要求也逐年升溫,有條件的酒店或賓館都采用了相關的酒店管理系統(tǒng),以解決賓館全憑原始的手工記錄管理,效率低、易出錯的缺陷。賓館行業(yè)對自身提供服務的質(zhì)量和能力也有了更高的要求,賓館信息管理系統(tǒng)正因此而越來越受到重視。賓館信息管理系統(tǒng)主要實現(xiàn)賓館酒店的客房管理、客戶信息管理、客戶添加管理、客戶修改管
4、理、客戶刪除管理功能。一個賓館信息管理系統(tǒng)應該包括基本的客房信息管理、客房客戶信息管理、入住退房信息管理等相關的信息管理。我國酒店業(yè)利用計算機管理系統(tǒng)來加強管理、提高服務水平,雖然至今已有了20多年的歷史,但起步發(fā)展較晚,只是一些淺層次應用,大多數(shù)還停留于七拼八湊的MIS系統(tǒng)水平,甚至還僅限于簡單的電算化和信息發(fā)布階段,與國際酒店業(yè)先進信息化應用的差距非常明顯。第二章可行性研究系統(tǒng)建設目標:在現(xiàn)代的酒店等服務行業(yè)中,由于客流量巨增,傳統(tǒng)的管理方法已經(jīng)不能滿足現(xiàn)代社會的需要,在運營中需要對客房資源、顧客信息、結算信息進行管理。通過這套軟件,無論各種等級的酒店,都可輕松進行管理,都具有非常實用的價
5、值,酒店客房管理系統(tǒng)的開發(fā)無疑具有深遠得意義。酒店客房管理系統(tǒng)提供客房科學、規(guī)范的現(xiàn)代管理模式,使酒店客房管理跨上一個的臺階,以高效率計算機管理方式引導酒店行業(yè)的發(fā)展,為酒店帶來直接的經(jīng)濟效益,提高酒店服務水準,改善酒店客房的形象。可行性分析可行性研究的目的就是用最小的代價在盡可能短的時間內(nèi)確定問題是否能夠解決、是否值得去解決。下面從四個方面分析本系統(tǒng)的可行性:技術可行性本系統(tǒng)采用sqlserver進行后臺數(shù)據(jù)庫的管理、操作和維護,用進行前臺界面設計、與后臺數(shù)據(jù)庫的接口、數(shù)據(jù)的錄入、查詢、瀏覽等。由于sqlserver具有強大的數(shù)據(jù)庫開發(fā)功能、方便快捷的數(shù)據(jù)庫接口設計功能、使用的靈活、以及它們
6、實際應用的廣泛,充分說明本系統(tǒng)在技術方面可行。經(jīng)濟可行性目前國內(nèi)的酒店的網(wǎng)點已達數(shù)萬家,然而有相當一部分還沒有使用現(xiàn)代化的計算機管理軟件,因而急需提高客房管理水平、管理質(zhì)量和管理工作的效率,減少不必要的開支,降低成本,同時本系統(tǒng)成本較低,使用靈活,簡單易學,因此,市場前景看好,在經(jīng)濟方面可行。該系統(tǒng)設計思路清晰,操作簡捷,具有良好的用戶界面,和較為完善的異常處理機制及信息提示機制,用戶只需經(jīng)過簡單地培訓就可使用,因而,在操作方面可行。本系統(tǒng)沒有違反國家的相關法律規(guī)定,因此,在法律方面可行。第三章需求分析3.1系統(tǒng)功能分析系統(tǒng)開發(fā)的總體任務是實現(xiàn)酒店各種信息的系統(tǒng)化,規(guī)范化和自動化管理,減少工作
7、量,提高效率,增強可靠性。系統(tǒng)功能分析是在系統(tǒng)開發(fā)設計的總體任務的基礎上完成,本實例中的酒店客房管理系統(tǒng)需要完成的功能主要有:、客房信息管理:包括房間編號、房間級別、房間類型、房間價格(元)、是否住人等信息的輸入、刪除、修改等。、客人信息管理:包括客人姓名、登記號、身份證號、房間號、登記日期的輸入、刪除、修改等。、退房信息管理:包括客人的退房日期、付款金額的輸入、修改、刪除等。、客房信息查詢:包括查詢房間編號、房間級別、房間類型、房間價格(元)、是否住人等信息。、收費信息查詢:包括查詢收費日期、付款金額。、其他特殊功能:隨時查詢、匯總酒店客房和客人情況,并獲得房間入住情況匯總報表;進行房價調(diào)整
8、,房間增減。.2使用結構化方法進行系統(tǒng)分析對用戶需求進行分析,畫出系統(tǒng)的數(shù)據(jù)流圖:頂層流圖:一層流圖:二層流圖酒店操作功能權限交易記錄客房處理客戶管理員工處理圖酒店客房管理系統(tǒng)的E-R圖系統(tǒng)所需的數(shù)據(jù)項:客戶信息:顧客編號,顧客姓名,顧客性別,顧客年齡,顧客身份證id,顧客聯(lián)系方式;員工信息:員工id,賬號,密碼,姓名,級別;客房信息:七駕房問號,房間類型,押金,價格,狀態(tài),備注;交易:交易編號,客戶賬號,房間id,預訂時間,入住時間,離店時間,消費,預訂員工,入住員工,離店員工,狀態(tài);酒店客房管理系統(tǒng)的E-R模型:1.局部E-R圖:登陸2.全局E-R圖:3.3對系統(tǒng)進行面向?qū)?/p>
9、象分析3.3.1系統(tǒng)用例模型登錄進入管理貞卸客戶信息客戶登錄信息員工信息員工信息展示客房信息客房信息展示預定預定房間入住入住房間用例列表3.15參與者列表3.14客戶出錢入住的人員工安排入住的人管理員管理整個系統(tǒng)的人離店離開房間營業(yè)狀況展示營業(yè)狀況3.用例圖圖系統(tǒng)對象模型系統(tǒng)類圖圖3.17第四章系統(tǒng)的概要設計系統(tǒng)體系結構圖圖4.1數(shù)據(jù)庫設計根據(jù)E-R模型和數(shù)據(jù)庫需求分析,本系統(tǒng)總共涉及6個數(shù)據(jù)表格。包括:客戶信息表、員工信息表、客房信息統(tǒng)計表、交易表、功能表、權限表,本系統(tǒng)的數(shù)據(jù)表設計如下所示:客戶信息表4.2FieldTypeCommentcidint(11)NOTNULL
10、顧客編號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級別客房信息統(tǒng)計表4.4FieldTypeCommentrdint(11)NOTNUL主鍵ri
11、dint(11)NULL房問號rtypevarchar(10)NULL房間類型(單、雙、三人、四人)rcashint(11)NULL押金rpriceint(11)NULL價格rstatusvarchar(10)NULL狀態(tài)(空閑、預訂、已住)regvarchar(255)NULL備注交易表4.5FieldTypeCommentdealidint(50)NOTNULL交易編號dcidint(11)NULL客戶賬號dridint(11)NULL房間iddretimedateNULL預訂時間dintimedateNULL入住時間doutimedateNULL離店時間dconsumint(20)NUL
12、L消費dempidreint(20)NULL員工id(預訂)dempidinint(20)NULL員工id(入?。ヾempidouint(20)NULL員工id(離店)dstatusint(20)NULL狀態(tài)(1-預訂2-入住3-空閑)功能表4.6FieldTypeCommentzidint(11)NOTNULL子idfnamevarchar(30)NULL功能名稱funurlvarchar(100)NULL功能urlpidint(11)NULL父id權限表4.7FieldTypeCommentrgradeint(11)NULL級別funidint(11)NULL功能id第五章系統(tǒng)的詳細設計及
13、其實現(xiàn)設計思想:管理員登錄成功后,顯示主模塊、主模塊分菜單、顯示頁面,菜單提供系統(tǒng)所有功能模塊的選擇操作,點擊下拉菜單的各菜單項,打開相應的操作模塊。常用菜單欄包括客房管理,客戶管理、員工管理、功能管理、營業(yè)狀況,此實際的基本目的是在于客房管理以及客戶管理是酒店客房管理系統(tǒng)的最主要也是最關鍵的功能,放在此既易于尋找又方便操作。而員工管理與功能模塊的操作選擇起來不是很方便,但是都利于實現(xiàn)客戶預訂房間,入住登記,離店結帳功能的實現(xià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);/如果我們進行到這一步時某個地方出錯,則重新顯示表單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)/嘗試注冊用戶tryWebSecurity.CreateUserAndAccount(model.UserName
18、,model.Password);WebSecurity.Login(model.UserName,model.Password);returnRedirectToAction(Index,Home);catch(MembershipCreateUserExceptione)ModelState.AddModelError(,ErrorCodeToString(e.StatusCode);/如果我們進行到這一步時某個地方出錯,則重新顯示表單returnView(model);/POST:/Account/DisassociateHttpPostValidateAntiForgeryTokenp
19、ublicActionResultDisassociate(stringprovider,stringproviderUserId)|stringownerAccount=OAuthWebSecurity.GetUserName(provider,providerUserId);ManageMessageIdmessage=null;/只有在當前登錄用戶是所有者時才取消關聯(lián)帳戶if/使用事務來防止用戶刪除其上次使用的登錄憑據(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已設置你的密碼。: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(,當前密碼不正
24、確或新密碼無效。);else/用戶沒有本地密碼,因此將刪除由于缺少/OldPassword字段而導致的所有驗證錯誤ModelStatestate=ModelStateOldPassword;if(state!=null)if(ModelState.IsValid)tryWebSecurityreturnRedirectToAction(Manage,newMessage=ManageMessageldSetPasswordSuccess);catch(Exceptione)ModelState.AddModelError(,e);/如果我們進行到這一步時某個地方出錯,則重新顯示表單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/如果當前用戶已登錄,則添加新帳戶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ù)庫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,用戶名已存在。請輸入其他用戶名?!?;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用戶名已存在。請輸入其他用戶名。;caseMembershipCreateStatus.DuplicateEmail:retur
37、n該電子郵件地址的用戶名已存在。請輸入其他電子郵件地址。caseMembershipCreateStatus.InvalidPassword: TOC o 1-5 h z return提供的密碼無效。請輸入有效的密碼值。;caseMembershipCreateStatus.InvalidEmail:return提供的電子郵件地址無效。請檢查該值并重試。;caseMembershipCreateStatus.InvalidAnswer:return提供的密碼取回答案無效。請檢查該值并重試。;caseMembershipCreateStatus.InvalidQuestion:return提供的
38、密碼取回問題無效。請檢查該值并重試。;caseMembershipCreateStatus.InvalidUserName:return提供的用戶名無效。請檢查該值并重試。;caseMembershipCreateStatus.ProviderError:return身份驗證提供程序返回了錯誤。請驗證您的輸入并重試。如果問題仍然存在,請與系統(tǒng)管理員聯(lián)系。;caseMembershipCreateStatus.UserRejected:return已取消用戶創(chuàng)建請求。請驗證您的輸入并重試。如果問題仍然存在,請與系統(tǒng)管理員聯(lián)系。;default:return發(fā)生未知錯誤。請驗證您的輸入并重試。如果
39、問題仍然存在,請與系統(tǒng)管理員聯(lián)系。;#endregionHomeControllerusingSystem;usingusingSystem.Linq;usingSystem.Web;usingnamespaceHotel.ControllerspublicclassHomeController:ControllerpublicActionResultIndex()ViewBag.Message=修改此模板以快速啟動你的ASP.NETMVC應用程序。;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,高級),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(身份證號:)Html.TextBox(tid)Html.Label(手機號:)Html.TextB
59、ox(ttel)Html.Label(性別:)Html.DropDownList(tsex,newListSelectListItem(newSelectListItem()Text=男,Value=男,Selected=false),(newSelectListItem()Text=女,Value=女,Selected=false)Html.Label(是否會員:)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=高級,Value=高級,Selected=false)Html.Label(客房編號:)Html.TextBox(tno)H
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 公眾參與視角下2025年環(huán)境評價機制優(yōu)化與環(huán)境保護產(chǎn)業(yè)發(fā)展研究
- 濟寧醫(yī)學院《中藥生物技術》2023-2024學年第一學期期末試卷
- 山西職業(yè)技術學院《金融統(tǒng)計分析》2023-2024學年第一學期期末試卷
- 四川長江職業(yè)學院《施工組織與概預算》2023-2024學年第一學期期末試卷
- 2025屆湖北省武漢市武昌區(qū)省水二中學數(shù)學七上期末調(diào)研模擬試題含解析
- 廣東梅州市豐順縣2024-2025學年七年級數(shù)學第一學期期末質(zhì)量跟蹤監(jiān)視模擬試題含解析
- 公路貨運行業(yè)數(shù)字化轉(zhuǎn)型與效率提升的綠色物流發(fā)展路徑報告001
- 公路貨運行業(yè)數(shù)字化轉(zhuǎn)型對物流行業(yè)可持續(xù)發(fā)展的影響報告
- 商業(yè)貸款催收技巧全解析
- 清遠社區(qū)消防培訓課件
- 大學課件-機電傳動控制(完整)
- 抖音短視頻運營部門各崗位KPI關鍵績效考核指標表
- 2023年印度涂料市場亞洲涂料分析報告
- 鋼結構起重機行車軌道安裝工程檢驗批質(zhì)量驗收記錄表
- 彩色完整測試頁(測試版)
- 推理小說簡介
- 熱射病的診斷與治療
- GB/T 9074.18-2017自攻螺釘和平墊圈組合件
- 長沙梅溪湖國際新城產(chǎn)業(yè)組織與西區(qū)土地一級開發(fā)
- GB/T 3768-2017聲學聲壓法測定噪聲源聲功率級和聲能量級采用反射面上方包絡測量面的簡易法
- 胸腔積液PPT.ppt 課件
評論
0/150
提交評論