![軟件工程課程設(shè)計_賓館信息管理系統(tǒng)方案_第1頁](http://file3.renrendoc.com/fileroot_temp3/2021-12/27/d601b873-3e88-46f2-84e0-e56c9deb3ff0/d601b873-3e88-46f2-84e0-e56c9deb3ff01.gif)
![軟件工程課程設(shè)計_賓館信息管理系統(tǒng)方案_第2頁](http://file3.renrendoc.com/fileroot_temp3/2021-12/27/d601b873-3e88-46f2-84e0-e56c9deb3ff0/d601b873-3e88-46f2-84e0-e56c9deb3ff02.gif)
![軟件工程課程設(shè)計_賓館信息管理系統(tǒng)方案_第3頁](http://file3.renrendoc.com/fileroot_temp3/2021-12/27/d601b873-3e88-46f2-84e0-e56c9deb3ff0/d601b873-3e88-46f2-84e0-e56c9deb3ff03.gif)
![軟件工程課程設(shè)計_賓館信息管理系統(tǒng)方案_第4頁](http://file3.renrendoc.com/fileroot_temp3/2021-12/27/d601b873-3e88-46f2-84e0-e56c9deb3ff0/d601b873-3e88-46f2-84e0-e56c9deb3ff04.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、分類號編號華北水利水電大學North China University of Water Resources and Electric Power實驗報告課程:軟件工程實驗項目 2:軟件編碼與測試題目:賓館管理信息系統(tǒng)院系信息工程學院專業(yè)計算機科學與技術(shù)班級學號201415717姓名李衛(wèi)朋.指導教師莊晉林2017年 5 月 29 日華北水利水電大學軟件工程實驗報告2016 2017 學年第二學期2014級計算機科學與技術(shù)專業(yè)一、實驗內(nèi)容 :賓館管理信息系統(tǒng)任務(wù):入住或預(yù)訂客房時,用戶要對客戶管理模塊或預(yù)訂管理模塊進行核對審查,并進行登記 ;客戶換房時 ,要對換房信息進行查詢和更新;客戶退房時
2、,要進行結(jié)算,并對更新客房信息 。主要功能模塊 :(1)登錄模塊 :對用戶身份進行驗證 ,只有合法用戶才能進入系統(tǒng);(2)系統(tǒng)管理模塊 :對系統(tǒng)用戶進行管理 ,更改用戶名 、密碼、權(quán)限等;(3)客房管理模塊 :對客房信息的添加 、修改和刪除等 ;(4)入住管理模塊 :對客戶入住信息的登記 、查詢等功能(5)訂房管理模塊 :對客戶訂房信息的登記 、查詢等 。(6)換房管理模塊 :對客戶換房信息的登記 、查詢等(7)賓館結(jié)算模塊 :對已入住賓館的顧客進行結(jié)算及對訂房客戶已交的押金進行結(jié)算、查詢。.專業(yè)學習資料.二、程序源:Win7 64 位電腦,vs2012 編輯環(huán)境 ,sql2005 數(shù)據(jù)庫 。
3、程序源碼 :1、登錄設(shè)計 :namespace賓館管理信息系統(tǒng)public partialclass login1 : Formpublic login1()InitializeComponent();private connectionc =new connection ();private void button1_Click( objectsender, EventArgs e)string id =null , pw =null , gd =null ;select newID = info.id,pw = info.password,gd = info.grade,;if (resu
4、lt.Count() = 0)MessageBox .Show(" 用戶名不存在 !");else if (result.Count() = 1)foreach ( var p in result)id = p.ID;pw = p.pw;gd = p.gd;if (pw.Trim() = textBox2.Text.ToString().Trim().專業(yè)學習資料.this .Hide();manger lf =new manger (gd,textBox1.T ext.Trim().ToString();lf.Show();elseMessageBox .Show( &q
5、uot;密碼錯誤 !" );elseMessageBox .Show( "不能為空 !" );private void button2_Click( objectsender, EventArgs e)this .Close();private void login1_FormClosed(objectsender, FormClosedEventArgse)System. Environment .Exit(0);2、添加住戶設(shè)計namespace賓館管理信息系統(tǒng)public partialclass addpeople: Formprivate connect
6、ionc =new connection ();private string s;public addpeople( Form f,string s)this .Owner = f;InitializeComponent();this .s = s; / 房間號ComboBoxStyle .DropDownList;private void button1_Click( objectsender, EventArgs e)if (textBox1.T ext.Trim().ToString() !=String .Empty && comboBox1.Text.Trim().T
7、oString() !=String .Empty &&.專業(yè)學習資料.textBox3.T ext.Trim().ToString() !=String .Empty && textBox4.Text.Trim().ToString() !=String .Empty)where info. 房間號碼= s.Trim().T oString()select new房間號= info. 房間號碼 ,房間類型= info. 房間種類 ,房間單價= info. 房間單價 ,房間是否使用= info. 房間是否正在使用 ,;foreach ( var item in
8、result)if (item. 房間單價tryguest r =new guest ();r.住店人身份證號碼r.姓名 = textBox2.T ext.Trim().ToString();r.性別 = comboBox1.T ext.Trim().ToString();r.所交押金r.人數(shù) = textBox3.T ext.Trim().ToString();r.房間號碼= s;r.入住天數(shù)= 1;r.入住時間room >(s1 => s1. 房間號碼= s.Trim().T oString();if (edit =null )return ;edit. 房間是否正在使用= &
9、quot;是"/ 修改 student的屬性 ;MessageBox .Show(textBox2.T ext.Trim().ToString() +" 入住成功 ");this .Close();catchMessageBox .Show( "用戶已存在 ! ");.專業(yè)學習資料.elseMessageBox .Show( "所交押金不足 !");elseMessageBox .Show( "不能為空 !" );private void addpeople_FormClosed(object sende
10、r, FormClosedEventArgse)3、添加房間設(shè)計 :namespace賓館管理信息系統(tǒng)public partialclass addroom: Formpublic addroom( Form f)InitializeComponent();this .Owner = f;ComboBoxStyle .DropDownList;private connectionc =new connection ();private void button1_Click( objectsender, EventArgs e)if (textBox1.T ext.Trim().ToString
11、() !=String .Empty && comboBox1.Text.Trim().ToString() !=String .Empty &&textBox3.T ext.Trim().ToString() !=String .Empty)tryroom r = new room ();r.房間號碼r.房間種類r.房間單價r.房間是否正在使用= "否 ".專業(yè)學習資料.MessageBox .Show(textBox1.T ext.Trim().ToString()+ " 號房間添加成功 " );this .textB
12、ox1.T ext =null ;this .textBox3.T ext =null ;this .comboBox1.Text =null ;this .textBox1.Focus();catchMessageBox .Show( "房間號已存在 !");elseMessageBox .Show( "不能為空 !" );private void addroom_FormClosed(object sender, FormClosedEventArgse)this .Owner.Show();private void button2_Click( o
13、bjectsender, EventArgs e)this .Close();4、查看所有房間信息設(shè)計 :namespace賓館管理信息系統(tǒng)public partialclass allroom: Formprivate connectionc= new connection();public allroom( Form f)InitializeComponent();this .Owner = f;this .listView1.Clear();this .listView1.View =View .LargeIcon;this .listView1.LargeImageList =this
14、 .imageList1;Random rd =new Random ();.專業(yè)學習資料.this .listView1.BeginUpdate();select new房間號= info. 房間號碼 ,房間類型= info. 房間種類 ,房間單價= info. 房間單價 ,房間是否使用= info. 房間是否正在使用 ,;foreach (var item in result)ListViewItemlvi =new ListViewItem ();if(item. 房間是否使用 .Trim()= "否 ")lvi.ImageIndex =0;else if (item
15、. 房間是否使用 .Trim() =" 是" )lvi.ImageIndex = 1;lvi.Text = item. 房間號 .Trim().ToString();this .listView1.EndUpdate();private void listView1_ItemActivate(object sender, EventArgs e)where info. 房間號碼select new房間號= info. 房間號碼 ,房間類型= info. 房間種類 ,房間單價= info. 房間單價 ,房間是否使用= info. 房間是否正在使用 ,;foreach (var
16、 item in result)DialogResultdr = MessageBox .Show( "房間號 :房間類型 : " + item.房間類型+ "rn房間單價 :" + item. 房間單價 );private void allroom_FormClosed(object sender, FormClosedEventArgse).專業(yè)學習資料.this .Owner.Show();5、預(yù)訂房間設(shè)計 :namespace賓館管理信息系統(tǒng)public partialclass bookroom: Formprivate connectionc
17、 =new connection ();public bookroom(Form f)InitializeComponent();this .Owner = f;this .listView1.Clear();this .listView1.View =View .LargeIcon;this .listView1.LargeImageList =this .imageList1;Random rd =new Random ();this .listView1.BeginUpdate();where info. 房間是否正在使用 = " 否"select new房間號= i
18、nfo. 房間號碼 ,房間類型= info. 房間種類 ,房間單價= info. 房間單價 ,房間是否使用= info. 房間是否正在使用 ,;foreach (var item in result)ListViewItemlvi =new ListViewItem ();lvi.ImageIndex =0;lvi.Text = item. 房間號 .Trim().ToString();this .listView1.EndUpdate();private void bookroom_FormClosed(object sender, FormClosedEventArgse)this .Ow
19、ner.Show();private void listView1_ItemActivate(object sender, EventArgs e).專業(yè)學習資料.where info. 房間號碼select new房間號= info. 房間號碼 ,房間類型= info. 房間種類 ,房間單價= info. 房間單價 ,房間是否使用= info. 房間是否正在使用 ,;foreach (var item in result)DialogResultdr =MessageBox .Show( "房間號 :房間類型 :"+item.房間類型 + "rn房間單價 :&q
20、uot;+item. 房間單價 + "rn確認使用么 ? ", "提示" , MessageBoxButtons.OKCancel);if (dr =DialogResult .OK)/ 用戶選擇確認的操作a.Show();6、查看所有用戶設(shè)計 :namespace賓館管理信息系統(tǒng)public partialclass chakanyonghu: Formprivateconnectionc =new connection ();public chakanyonghu(Form f)this .Owner = f;InitializeComponent(
21、);select new用戶名= info.id,用戶類型= info.grade,;.專業(yè)學習資料.dataGridView1.DataSource = result;7、修改房間的信息設(shè)計 :namespace賓館管理信息系統(tǒng)public partialclass changeroom: Formprivate connectionc =new connection ();public changeroom(Form f)InitializeComponent();this .Owner = f;select new房間號= info. 房間號碼 ,房間類型= info. 房間種類 ,房間
22、單價= info. 房間單價 ,房間是否使用= info. 房間是否正在使用 ,;dataGridView1.DataSource = result;private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgse)string s =Convert .ToString(dataGridView10, e.RowIndex.Value).Trim();changeroom2d =new changeroom2(this , s);d.Show();this .Hide();private v
23、oid button1_Click( objectsender, EventArgs e)select new房間號= info. 房間號碼 ,房間類型= info. 房間種類 ,房間單價= info. 房間單價 ,房間是否使用= info. 房間是否正在使用 ,;.專業(yè)學習資料.dataGridView1.DataSource = result;namespace賓館管理信息系統(tǒng)public partialclass changeroom2: Formprivate connectionc =new connection ();private string s =null ;public c
24、hangeroom2(Form f,string s)InitializeComponent();ComboBoxStyle .DropDownList;ComboBoxStyle .DropDownList;this .Owner = f;this .s = s;where info. 房間號碼 =sselect new房間號= info. 房間號碼 ,房間類型= info. 房間種類 ,房間單價= info. 房間單價 ,房間是否使用= info. 房間是否正在使用 ,;foreach (var item in result)this .textBox2.Text = item.房間號 ;
25、this .textBox1.Text = item.房間單價 .ToString();this .comboBox1.T ext = item.房間類型 ;this .comboBox2.T ext = item.房間是否使用 ;private void button1_Click( objectsender, EventArgs e)room >(s1=>s1. 房間號碼 =s);if (edit =null ).專業(yè)學習資料.return ;/ 修改 student的屬性edit. 房間單價 = double .Parse( textBox1.T ext.Trim().ToS
26、tring();edit. 房間種類edit. 房間是否正在使用= comboBox2.T ext.Trim().ToString();/ 執(zhí)行更新操作MessageBox .Show( "房間信息修改成功");this .Close();8、刪除用戶信息設(shè)計 :namespace賓館管理信息系統(tǒng)public partialclass delete : Formprivate string s;private connectionc =new connection ();public delete( Form f)InitializeComponent();this .Ow
27、ner = f;where info.grade="普通用戶 "select new用戶名= info.id,用戶類型= info.grade,;dataGridView1.DataSource = result;private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgse)s = Convert .ToString(dataGridView10, e.RowIndex.Value).Trim();delete2 d =new delete2 (s,this );d.
28、Show();this .Hide();.專業(yè)學習資料.private void button2_Click( objectsender, EventArgs e)where info.grade ="普通用戶 "select new用戶名= info.id,用戶類型= info.grade,;dataGridView1.DataSource = result;namespace賓館管理信息系統(tǒng)public partialclass delete2 : Formprivate string h;private connectionc =new connection ();p
29、ublic delete2( string s,Form f)InitializeComponent();h = s;this .Owner = f;where info.id = sselect new用戶名= info.id,用戶類型= info.grade,;dataGridView1.DataSource = result;private void button1_Click( objectsender, EventArgs e)where m.id = hselect m;MessageBox .Show(" 刪除成功 ");this .Close();.專業(yè)學習
30、資料.9、刪除房間信息設(shè)計 :namespace賓館管理信息系統(tǒng)public partialclass deleteroom: Formprivate connectionc =new connection ();public deleteroom(Form f)InitializeComponent();this .Owner = f;select new房間號= info. 房間號碼 ,房間類型= info. 房間種類 ,房間單價 =info. 房間單價 ,房間是否使用 =info. 房間是否正在使用,;dataGridView1.DataSource = result;private v
31、oid button2_Click( objectsender, EventArgs e)select new房間號= info. 房間號碼 ,房間類型= info. 房間種類 ,房間單價= info. 房間單價 ,房間是否使用= info. 房間是否正在使用 ,;dataGridView1.DataSource = result;private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgse)strings = Convert .ToString(dataGridView10, e.Ro
32、wIndex.Value).Trim();deleteroom2d =new deleteroom2 (this ,s);d.Show();.專業(yè)學習資料.this .Hide();namespace賓館管理信息系統(tǒng)public partialclass deleteroom2: Formprivate connectionc =new connection ();private string h;public deleteroom2(Form f,string h)InitializeComponent();this .Owner = f;this .h = h;where info. 房間
33、號碼= hselect new房間號= info. 房間號碼 ,房間類型= info. 房間種類 ,房間單價= info. 房間單價 ,房間是否使用= info. 房間是否正在使用 ,;dataGridView1.DataSource = result;private void button1_Click( objectsender, EventArgs e)where m. 房間號碼= hselect m;foreach (var item in result)if (item. 房間是否正在使用 .Trim().ToString() ="否")MessageBox .S
34、how(" 刪除成功 ");this .Close();elseMessageBox .Show(" 該房間正在使用 ,請先退房 !");.專業(yè)學習資料.10 、查看住戶信息 :namespace賓館管理信息系統(tǒng)public partialclass guestmessage: Formprivate connectionc =new connection ();public guestmessage( Form f)this .Owner = f;InitializeComponent();ComboBoxStyle .DropDownList;pri
35、vate void button1_Click( objectsender, EventArgs e)if (comboBox1.T ext.Trim().ToString() !=string .Empty && textBox1.Text.Trim().ToString() !=string .Empty)case "房間號 ":guest >(s1 => s1.房間號碼 .Trim() = textBox1.Text.Trim().ToString();if (edit !=null )MessageBox .Show( "房間號
36、: " + edit. 房間號碼+ "tn"+ "人數(shù) :" + edit. 人數(shù) + "tn"+ "入住天數(shù): " + edit. 入住天數(shù)+ "tn"+ " 押金:" + edit. 所交押金+ "tn"+ " 姓名: " + edit. 姓名 + "tn"+ "身份證號碼 :" + edit. 住店人身份證號碼 );elseMessageBox .Show( "房間為空
37、!");break ;case "用戶姓名 ":guest >(s1 => s1.姓名oString();if (edit1 !=null )MessageBox .Show( "房間號: " + edit1. 房間號碼+ "tn"+ "人數(shù) :" + edit1. 人數(shù) + "tn"+ "入住天數(shù): " + edit1. 入住天數(shù)+ "tn"+ "押金 :" + edit1. 所交押金+ "tn&quo
38、t;+ "姓名: " + edit1. 姓名+ "tn"+ "身份證號碼 :" + edit1.住店人身份證號碼);.專業(yè)學習資料.elseMessageBox .Show(textBox1.T ext.Trim().ToString() +"不存在 " );break ;case "身份證號 ":guest >(s1 => s1.住店人身份證號碼 .Trim() =textBox1.T ext.Trim().ToString();if (edit2 !=null )MessageB
39、ox .Show( "房間號: " + edit2. 房間號碼+ "tn"+ "人數(shù) :" + edit2. 人數(shù) + "tn"+ "入住天數(shù): " + edit2. 入住天數(shù)+ "tn"+ "押金 :" + edit2. 所交押金+ "tn"+ "姓名: " + edit2. 姓名+ "tn"+ "身份證號碼 :" + edit2.住店人身份證號碼);elseMessageB
40、ox .Show(textBox1.T ext.Trim().ToString() +"不存在 " );break ;elseMessageBox .Show( "不能為空 !" );11 、新用戶注冊namespace賓館管理信息系統(tǒng)public partialclass login2 : Formprivate connectionc =new connection ();public login2()InitializeComponent();ComboBoxStyle .DropDownList;public login2( Form f).專業(yè)
41、學習資料.InitializeComponent();this .Owner = f;ComboBoxStyle .DropDownList;private void button1_Click( objectsender, EventArgs e)String .Empty)if (comboBox1.T ext.Trim().ToString() =" 管理員 " | comboBox1.T ext.Trim().ToString() ="普通用戶 ")trylogin l =new login ();l.password = textBox2.Te
42、xt.Trim().ToString();MessageBox .Show( "注冊成功 ");catchMessageBox .Show( "用戶名已存在 !");elseMessageBox .Show( "請再次輸入確定密碼! ");elseMessageBox .Show(" 請選擇正確的用戶類型!");this .comboBox1.Focus();else.專業(yè)學習資料.MessageBox .Show( "不能為空 !" );12 、主界面設(shè)計 :namespace賓館管理信息系統(tǒng)
43、public partialclass manger : Formprivatestring i,j;/public manger()InitializeComponent();public manger( string i, string j)InitializeComponent();this .i = i;this .j = j;private void button1_Click( objectsender, EventArgs e)this .Hide();login2 l =new login2 (this );l.Show();private void manger_Load(
44、objectsender, EventArgs e)if (i.Trim().Equals( " 管理員 ")this .panel1.Visible =true ;this .panel2.Visible =true ;else if (i.Trim().Equals( "普通用戶 ")this .panel2.Visible =true ;this .panel1.Visible =false ;private void button3_Click( objectsender, EventArgs e).專業(yè)學習資料.this .Hide();del
45、ete l =new delete (this );l.Show();private void manger_FormClosed(object sender, FormClosedEventArgse)System. Environment .Exit(0);private void button4_Click( objectsender, EventArgs e)this .Hide();chakanyonghul = new chakanyonghu (this );l.Show();private void button5_Click( objectsender, EventArgs e)this .Hide();xiugaimimal =new xiugaimima (this , j);l.Show();private void button6_Click(
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2022年新課標八年級上冊道德與法第四課 社會生活講道德 聽課評課記錄
- 五年級下冊數(shù)學聽評課記錄《1總復(fù)習:倍數(shù)和因數(shù)》人教新課標
- 華師大版數(shù)學八年級下冊《平行四邊形邊、角的性質(zhì)》聽評課記錄
- 數(shù)學聽評課記錄二年級下
- 《青銅器與甲骨文》名師聽課評課記錄(新部編人教版七年級上冊歷史)
- 新人教版七年級數(shù)學上冊2.2《 整式的加減》聽評課記錄
- 青島版數(shù)學八年級下冊《實數(shù)》聽評課記錄1
- 小學二年級口算題
- 鄉(xiāng)村振興銀企戰(zhàn)略合作協(xié)議書范本
- 上海商品交易市場進場經(jīng)營合同范本
- 學校教學常規(guī)管理學習活動課件
- 廣東省湛江市2023-2024學年高一上學期期末考試 歷史 含解析
- 2024-2030年中國大閘蟹養(yǎng)殖行業(yè)運營形勢分析及未來銷售格局研究報告
- 集成墻板購銷合同范本(2024版)
- 2023九年級歷史下冊 第三單元 第一次世界大戰(zhàn)和戰(zhàn)后初期的世界第10課《凡爾賽條約》和《九國公約》教案 新人教版
- 骨髓穿刺課件
- 2024版買賣二手車合同范本
- 2024中國保險發(fā)展報告-中南大風險管理研究中心.燕道數(shù)科
- 元素的用途完整版本
- 第15課 列強入侵與中國人民的反抗斗爭 教學設(shè)計-2023-2024學年中職高一上學期高教版(2023)中國歷史全一冊
- 建筑設(shè)計工程設(shè)計方案
評論
0/150
提交評論