數(shù)據(jù)庫(kù)課程設(shè)計(jì)報(bào)告--設(shè)備管理系統(tǒng)_第1頁(yè)
數(shù)據(jù)庫(kù)課程設(shè)計(jì)報(bào)告--設(shè)備管理系統(tǒng)_第2頁(yè)
數(shù)據(jù)庫(kù)課程設(shè)計(jì)報(bào)告--設(shè)備管理系統(tǒng)_第3頁(yè)
數(shù)據(jù)庫(kù)課程設(shè)計(jì)報(bào)告--設(shè)備管理系統(tǒng)_第4頁(yè)
數(shù)據(jù)庫(kù)課程設(shè)計(jì)報(bào)告--設(shè)備管理系統(tǒng)_第5頁(yè)
已閱讀5頁(yè),還剩7頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡(jiǎn)介

1、景德鎮(zhèn)陶瓷學(xué)院科技藝術(shù)學(xué)院工程系數(shù)據(jù)庫(kù)課程設(shè)計(jì)報(bào)告設(shè)備管理系統(tǒng)專 業(yè): 計(jì)算機(jī)科學(xué)與技術(shù) 班 級(jí): 10計(jì)科 學(xué) 號(hào): 201030457135 姓 名: 劉世雨 指導(dǎo)教師: 何福保、胡開(kāi)華 2012年12月10日一、 系統(tǒng)功能: 通過(guò)對(duì)某企業(yè)或單位設(shè)備管理相關(guān)流程進(jìn)行分析,完成具有對(duì)設(shè)備進(jìn)行基本信息管理和信息檢索等基本功能的設(shè)備管理系統(tǒng)的分析、設(shè)計(jì)與實(shí)現(xiàn)。 在這個(gè)設(shè)備管理系統(tǒng)中,基本做到了指導(dǎo)老師要求的“增、刪、改”。 對(duì)于實(shí)驗(yàn)指導(dǎo)書要求的六大項(xiàng),因?yàn)閭€(gè)人學(xué)業(yè)水平有限,所以暫時(shí)才完成了以下四項(xiàng): 1、實(shí)現(xiàn)設(shè)備的錄入、刪除、修改等基本操作。 2、實(shí)現(xiàn)國(guó)家標(biāo)準(zhǔn)設(shè)備代碼的維護(hù)。 3、能夠?qū)υO(shè)備進(jìn)行

2、方便的檢索。 4、能夠輸出設(shè)備分類明細(xì)表。用戶表:管理員表:設(shè)備管理表:設(shè)備信息表:瀏覽器中數(shù)據(jù)庫(kù)預(yù)覽截圖:2、 設(shè)備管理流程圖:驗(yàn)證信息管理員管理員信息修改倉(cāng)庫(kù)信息查詢折舊管理增刪改信息處理密碼信息處理結(jié)果處理結(jié)果設(shè)備管理信息設(shè)備管理設(shè)備操作信息商品銷售信息處理結(jié)果處理結(jié)果入庫(kù)信息打印信息商品銷售信息用戶身份驗(yàn)證管理員信息驗(yàn)證信息用戶相關(guān)設(shè)備操作身份驗(yàn)證收銀信息管理員信息修改密碼信息處理結(jié)果管理員信息成功庫(kù)存信息用戶信息銷售信息三、功能界面設(shè)計(jì)1、系統(tǒng)登錄界面源代碼:if (DropDownList1.SelectedValue = "管理員") if (TextBox1

3、.Text = "" | TextBox2.Text = "") Label1.Text = "用戶名和密碼不能為空。" else string sql; string DBName = ConfigurationManager.AppSettings.Get("DBName").ToString(); /從配置文件中得到數(shù)據(jù)庫(kù)驅(qū)動(dòng) string DBDriver = ConfigurationManager.AppSettings.Get("DBDriver").ToString(); /得到

4、數(shù)據(jù)庫(kù)連接字符串 string DBConnectionString = DBDriver + HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath + "/App_Data/") + DBName; /建立數(shù)據(jù)庫(kù)連接對(duì)象 OleDbConnection OleDbConn = new OleDbConnection(DBConnectionString); OleDbConn.Open(); /sql = "select * from 用戶表 where 用戶

5、名='kaihua' and 密碼='kaihua'"/建立sql查詢語(yǔ)句 sql = "select * from 管理員表 where 用戶名='" + TextBox1.Text.Trim() + "' and 密碼='" + TextBox2.Text.Trim() + "'"/建立sql查詢語(yǔ)句 OleDbCommand cmd = new OleDbCommand(sql, OleDbConn); /執(zhí)行SQL查詢語(yǔ)句 OleDbDataReader

6、 mydata = cmd.ExecuteReader(); if (mydata.Read() /判斷查詢結(jié)果是否為空 /this.Label1.Text = "登入成功!" /Session"username" = this.username.Text; Response.Redirect("zhuye.aspx"); else this.Label1.Text = "用戶不存在,請(qǐng)檢測(cè)用戶名和密碼是否正確!" else if (DropDownList1.SelectedValue = "用戶&qu

7、ot;) if (TextBox1.Text = "" | TextBox2.Text = "") Label1.Text = "賬號(hào)和密碼不能為空。" else string sql; string DBName = ConfigurationManager.AppSettings.Get("DBName").ToString(); /從配置文件中得到數(shù)據(jù)庫(kù)驅(qū)動(dòng) string DBDriver = ConfigurationManager.AppSettings.Get("DBDriver")

8、.ToString(); /得到數(shù)據(jù)庫(kù)連接字符串 string DBConnectionString = DBDriver + HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath + "/App_Data/") + DBName; /建立數(shù)據(jù)庫(kù)連接對(duì)象 OleDbConnection OleDbConn = new OleDbConnection(DBConnectionString); OleDbConn.Open(); /sql = "select * f

9、rom 用戶表 where 用戶名='kaihua' and 密碼='kaihua'"/建立sql查詢語(yǔ)句 sql = "select * from 用戶表 where 用戶名='" + TextBox1.Text.Trim() + "' and 密碼='" + TextBox2.Text.Trim() + "'"/建立sql查詢語(yǔ)句 OleDbCommand cmd = new OleDbCommand(sql, OleDbConn); /執(zhí)行SQL查詢語(yǔ)句

10、OleDbDataReader mydata = cmd.ExecuteReader(); if (mydata.Read() /判斷查詢結(jié)果是否為空 /this.Label1.Text = "登入成功!" /Session"username" = this.username.Text; Response.Redirect("zhuye.aspx"); else this.Label1.Text = "用戶不存在,請(qǐng)檢測(cè)用戶名和密碼是否正確!"2、增刪改信息:增加源代碼: if (this.TextBox10.Te

11、xt = "" | this.TextBox11.Text = "" | this.TextBox12.Text = "" | this.TextBox13.Text = "" |this.TextBox14.Text = "" | this.TextBox15.Text = "") Response.Write("<script language=javascript>alert('帶*號(hào)的信息為必填。')</script>

12、"); else string DBName = ConfigurationManager.AppSettings.Get("DBName").ToString(); string DBDriver = ConfigurationManager.AppSettings.Get("DBDriver").ToString(); string DBConnectionString = DBDriver + HttpContext.Current.Server.MapPath(HttpContext.Current.Request.Applicatio

13、nPath + "/App_Data/") + DBName; OleDbConnection con = new OleDbConnection(DBConnectionString); OleDbCommand cmd = con.CreateCommand(); cmd.CommandText = "insert into 設(shè)備信息表(設(shè)備編號(hào),設(shè)備名,廠商,倉(cāng)庫(kù)號(hào),數(shù)量,備注) values('" + this.TextBox10.Text + "','" + this.TextBox11.Text +

14、 "','" + this.TextBox12.Text + "','" + this.TextBox13.Text + "','" + this.TextBox14.Text + "','" + this.TextBox15.Text + "')" cmd.Connection = con; con.Open(); cmd.ExecuteNonQuery(); con.Close(); GridViewBind(); pr

15、otected void Button3_Click(object sender, EventArgs e) TextBox10.Text = "" TextBox11.Text = "" TextBox12.Text = "" TextBox13.Text = "" TextBox14.Text = "" TextBox15.Text = ""刪除源代碼: string cid = GridView1.DataKeyse.RowIndex.Values0.ToString(

16、); string SqlStr = "delete from 設(shè)備信息表 where 設(shè)備編號(hào)='" + cid + " '" string DBName = ConfigurationManager.AppSettings.Get("DBName").ToString(); /從配置文件中得到數(shù)據(jù)庫(kù)驅(qū)動(dòng) string DBDriver = ConfigurationManager.AppSettings.Get("DBDriver").ToString(); /得到數(shù)據(jù)庫(kù)連接字符串 string

17、 DBConnectionString = DBDriver + HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath + "/App_Data/") + DBName; /建立數(shù)據(jù)庫(kù)連接對(duì)象 OleDbConnection conn = new OleDbConnection(DBConnectionString); conn.Open(); /OleDbConnection conn = new OleDbConnection(System.Configuration

18、.ConfigurationManager.ConnectionStrings1.ConnectionString); /conn.Open(); /OleDbConnection conn = new OleDbConnection(DBConnectionString); /conn.Open(); OleDbCommand comm = new OleDbCommand(SqlStr, conn); comm.ExecuteNonQuery(); comm.Dispose(); if (conn.State.ToString() = "Open") conn.Clos

19、e(); GridView1.EditIndex = -1; GridViewBind();修改源代碼: /string Cid = (TextBox)GridView1.Rowse.RowIndex.Cells0.Controls0).Text.ToString(); string Cid = GridView1.DataKeyse.RowIndex.Values0.ToString(); /string Cname = GridView1.DataKeyse.RowIndex.Values0.ToString(); string Cname = (TextBox)GridView1.Row

20、se.RowIndex.Cells1.Controls0).Text.ToString(); string Cadress = (TextBox)GridView1.Rowse.RowIndex.Cells2.Controls0).Text.ToString(); string Positions = (TextBox)GridView1.Rowse.RowIndex.Cells3.Controls0).Text.ToString(); string Cphone = (TextBox)GridView1.Rowse.RowIndex.Cells4.Controls0).Text.ToStri

21、ng(); string Cgrade = (TextBox)GridView1.Rowse.RowIndex.Cells5.Controls0).Text.ToString(); /string Cname = (TextBox)GridView1.Rowse.RowIndex.FindControl("Cname").Text; /string Cadress = (TextBox)GridView1.Rowse.RowIndex.FindControl("Cadress").Text; /string Position = (TextBox)Gri

22、dView1.Rowse.RowIndex.FindControl("Position").Text; /string Cphone = (TextBox)GridView1.Rowse.RowIndex.FindControl("Cphone").Text; /string Cgrade = (TextBox)GridView1.Rowse.RowIndex.FindControl("Cgrade").Text; string DBName = ConfigurationManager.AppSettings.Get("D

23、BName").ToString(); /從配置文件中得到數(shù)據(jù)庫(kù)驅(qū)動(dòng) string DBDriver = ConfigurationManager.AppSettings.Get("DBDriver").ToString(); /得到數(shù)據(jù)庫(kù)連接字符串 string DBConnectionString = DBDriver + HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath + "/App_Data/") + DBName; /建立數(shù)據(jù)

24、庫(kù)連接對(duì)象 OleDbConnection conn = new OleDbConnection(DBConnectionString); conn.Open(); string SqlStr = "update 設(shè)備信息表 set 設(shè)備名='" + Cname + "',廠商='" + Cadress + "',倉(cāng)庫(kù)號(hào)='" + Positions + "',數(shù)量='" + Cphone + "',備注='" + Cgra

25、de + "' where 設(shè)備編號(hào)='" + Cid + "'" /string SqlStr = "update company set Cname='111',Positions='1111'where Cid='as'"源代碼:mpmenu1=new mMenu('用戶相關(guān)','','self','','','','');mpmenu1.addI

26、tem(new mMenuItem(' 用戶注冊(cè)','yonghuzhuce.aspx','it',false,'用戶登錄',null,'','','','');mpmenu1.addItem(new mMenuItem(' 密碼修改','mimaxiugai.aspx','it',false,'用戶登錄',null,'','','','')

27、;mpmenu2=new mMenu('設(shè)備操作','','self','','','','');mpmenu2.addItem(new mMenuItem(' 增加設(shè)備','shebeicaozao.aspx','it',false,'增加設(shè)備',null,'','','','');mpmenu2.addItem(new mMenuItem(' 刪

28、除設(shè)備','shebeicaozao.aspx','it',false,'刪除設(shè)備',null,'','','','');mpmenu2.addItem(new mMenuItem(' 修改設(shè)備','shebeicaozao.aspx','it',false,'修改設(shè)備',null,'','','','');mpmenu2.addItem(new m

29、MenuItem(' 查找設(shè)備','shebeicaozao.aspx','it',false,'查找設(shè)備',null,'','','','');mpmenu3=new mMenu('設(shè)備管理','','self','','','','');mpmenu3.addItem(new mMenuItem(' 折舊管理','jsjjczs.

30、aspx','blank',false,'折舊管理',null,'','','','');mpmenu3.addItem(new mMenuItem(' 維修管理','windowsjc.aspx','blank',false,'維修管理',null,'','','','');mpmenu4=new mMenu('信息查詢','','self','','','','');mpmenu4.addItem(new mMenuItem('倉(cāng)庫(kù)信息查詢 ','cangkuxinxichaxun.aspx','it',false,'倉(cāng)庫(kù)信息查詢',null,'','','',''

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 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)論