




已閱讀5頁,還剩37頁未讀, 繼續(xù)免費(fèi)閱讀
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
濱州學(xué)院數(shù)據(jù)庫原理與應(yīng)用課程設(shè)計(jì) 數(shù)據(jù)庫原理與應(yīng)用課 程 設(shè) 計(jì)題 目 ASP+MSSQL的手機(jī)銷售管理系統(tǒng)系 (院) 計(jì)算機(jī)科學(xué)技術(shù)系 專 業(yè) 計(jì)算機(jī)網(wǎng)絡(luò)技術(shù) 班 級(jí) 2006級(jí)網(wǎng)一 學(xué)生姓名 42數(shù)據(jù)庫原理與應(yīng)用課程設(shè)計(jì)一、課程設(shè)計(jì)概述(一)、課程設(shè)計(jì)的目的數(shù)據(jù)庫原理及應(yīng)用課程設(shè)計(jì)是計(jì)算機(jī)專業(yè)集中實(shí)踐性環(huán)節(jié)之一,是學(xué)習(xí)完數(shù)據(jù)庫原理及應(yīng)用課程后進(jìn)行的一次全面的綜合練習(xí)。本課程設(shè)計(jì)主要在于加深學(xué)生對(duì)數(shù)據(jù)庫基礎(chǔ)理論和基本知識(shí)的理解,掌握數(shù)據(jù)庫應(yīng)用系統(tǒng)設(shè)計(jì)開發(fā)的基本方法,達(dá)到進(jìn)一步使學(xué)生綜合運(yùn)用所學(xué)知識(shí)和增強(qiáng)實(shí)際動(dòng)手能力的目的。(二)、課程設(shè)計(jì)的任務(wù)與要求要求學(xué)生根據(jù)自身的情況,構(gòu)思一個(gè)系統(tǒng),以MS SQL Server作為后臺(tái)數(shù)據(jù)庫平臺(tái),結(jié)合自己掌握的所有語言和平臺(tái),完成一個(gè)小型數(shù)據(jù)庫應(yīng)用系統(tǒng)的系統(tǒng)的分析、設(shè)計(jì)和開發(fā)。二、系統(tǒng)概述 (一)、系統(tǒng)需求分析現(xiàn)在隨著網(wǎng)絡(luò)、計(jì)算機(jī)以及數(shù)據(jù)庫的快速發(fā)展,手機(jī)的銷售也不再是傳統(tǒng)的實(shí)體店鋪模式,已經(jīng)轉(zhuǎn)向網(wǎng)絡(luò)。本系統(tǒng)就是面向一個(gè)企業(yè)的手機(jī)銷售管理系統(tǒng)。此系統(tǒng)是一種比較智能化的管理系統(tǒng),它能夠?qū)崿F(xiàn)手機(jī)銷售的基本功能商品管理和訂單管理,用戶管理和網(wǎng)站管理??梢院芎玫膶?shí)現(xiàn)于用戶之間的互動(dòng).管理員在后臺(tái)必須輸入有效密碼才能成功進(jìn)入此系統(tǒng)然后進(jìn)行一系列的操作。對(duì)于非法操作,系統(tǒng)有識(shí)別和防護(hù)措施。(二)、系統(tǒng)功能需求分析本系統(tǒng)主要面向的用戶為系統(tǒng)管理員。簡(jiǎn)單介紹下本系統(tǒng)的主要功能模塊:、登陸功能:登陸系統(tǒng)為身份驗(yàn)證登錄。、商品管理:添加 刪除 修改 圖片上傳、訂單管理:查看,刪除,確認(rèn)訂單 查看,刪除已確認(rèn)訂單 查看,刪除訂單投訴、用戶管理:查看修改用戶資料,刪除用戶,設(shè)置用戶等級(jí)(普通,VIP) 管理員添加刪除、分類管理:添加,修改,刪除一級(jí)分類,二級(jí)分類、信息管理:添加,修改,刪除網(wǎng)站新聞 三、系統(tǒng)總體設(shè)計(jì)(一)、系統(tǒng)總體結(jié)構(gòu)設(shè)計(jì)報(bào)刊訂閱管理系統(tǒng)主要是由登錄、使用幫助、商品管理、訂單管理、用戶管理、分類管理、信息管理等主要模塊構(gòu)成。本系統(tǒng)的結(jié)構(gòu)功能圖:手機(jī)銷售管理系統(tǒng)登陸使用幫助商品管理訂單管理用戶管理網(wǎng)站管理返回首頁注銷登陸查看服務(wù)器變量添加新廠商使用幫助添加新分類添加新手機(jī)查看新修改最新訂單已確認(rèn)訂單查看投訴訂單管理網(wǎng)站用戶添加用戶添加新聞修改新聞添加評(píng)測(cè)修改評(píng)測(cè)添加軟件修改軟件添加故事修改故事圖3-1 系統(tǒng)結(jié)構(gòu)功能圖(二)、系統(tǒng)數(shù)據(jù)模型設(shè)計(jì)1. 系統(tǒng)E-R圖本系統(tǒng)采用E-R圖(實(shí)體-關(guān)系圖)的方法進(jìn)行數(shù)據(jù)庫概念結(jié)構(gòu)設(shè)計(jì)。系統(tǒng)主要部分的E-R圖如下所示: 廠商:廠商名字廠 商I D圖3-2 廠商ER圖手機(jī)編號(hào)出品日期價(jià)格型號(hào)尺碼顏色出品公司包裝類型品牌手機(jī):圖3-3 手機(jī)ER圖訂單訂 單訂單號(hào)訂貨人地址日期送出圖3-4 訂單的ER圖用戶:用戶用戶名EMAIL郵政編碼類型注冊(cè)時(shí)間地址ID圖3-5 用戶ER圖2. 關(guān)系模式廠商(id,名稱)手機(jī)(品牌,型號(hào),編號(hào),出品日期,出品公司,顏色,尺碼,包裝類型,價(jià)格)訂單(訂單號(hào),訂貨人,日期,地址,送出)用戶(ID,用戶名,EMAIL,郵政編碼,地址,注冊(cè)時(shí)間,類型)新聞(標(biāo)題,內(nèi)容)評(píng)測(cè)(標(biāo)題,內(nèi)容)軟件(標(biāo)題,內(nèi)容)故事(標(biāo)題,內(nèi)容)3. 數(shù)據(jù)表下述為本系統(tǒng)關(guān)鍵表,其他非關(guān)鍵表不在敘述。、廠商表(表 sort)sort_namer為廠商名,如圖3-6圖3-6 廠商數(shù)據(jù)表、用戶表(表member)user_name是用戶名,Usrmail是EMAIl地址,User_pass是密碼,User_adds是地址,user_tel是聯(lián)系電話,User_regtime是注冊(cè)時(shí)間, User_lasttime是最后登陸時(shí)間,User_lastip是最后登陸IP,User_buymoney是所有資金.如圖3-7圖3-7 用戶數(shù)據(jù)表、手機(jī)表(表 hw)hw_name是貨物名字,hw_cash是價(jià)格,hw_content是描述,hw_date是添加時(shí)間,hw_pic是手機(jī)圖片,daili是代理價(jià)格,pifa是批發(fā)價(jià)格yeshu是顏色。如圖3-8圖3-8 手機(jī)數(shù)據(jù)表、訂單表(表 sub)user_name 是訂貨人,sub_numbersub_date是訂單時(shí)間,sub_emil是訂人EMAiL,sub_tel是訂貨人電話,sub_adds是訂貨人地址,qian是支付方式;如圖3-9圖3-9 訂單數(shù)據(jù)表4系統(tǒng)實(shí)施主要開發(fā)步驟:1 打開SQL SERVER 建立數(shù)據(jù)庫和相關(guān)數(shù)據(jù)表2 創(chuàng)業(yè)CONN.ASP,實(shí)現(xiàn)對(duì)數(shù)據(jù)庫的鏈接;代碼:3. 制作后臺(tái)登錄驗(yàn)證界面index.asp,2login.asp對(duì)數(shù)據(jù)庫操作部分的代碼如下,它主要對(duì)應(yīng)的是數(shù)據(jù)庫中的admin表 0 or InStr(admin_pass,) 0 thenresponse.write 請(qǐng)不要使用非法字符else%set rs=server.createobject(adodb.recordset)sql=select * from admin where admin_name=&admin_name& and admin_pass=&admin_pass&rs.open sql,conn,3,3 if rs.eof then response.write 用戶名和密碼不匹配 else session(admin_name)=rs(admin_name) response.redirect manage.asp end ifrs.closeset rs=nothingconn.closeset conn=nothingend ifend if%圖3-10 管理員登陸窗口4. 制作管理員主操作界面主界面采用了框架結(jié)合代碼如下: 5. 制作主操作界面中的 使用幫助模塊本模塊包括四個(gè)文件1.Index.asp(返回管理員登陸驗(yàn)證界面)2.quit.asp(注銷登錄)3.aspchenk.asp(查看服務(wù)器變量)如圖3-11圖3-11 查看服務(wù)器變量4. main.asp(使用幫助)圖3-12 使用幫助界面6. 制作主操作界面中的商品管理模塊本模塊有四部分組成:圖3-13 商品管理界面、 addnewgrp.asp,addnewgrp1.asp(添加新廠商)本部分主要對(duì)應(yīng)數(shù)據(jù)庫中的sort表操作。 addnewgrp.asp代碼 %if rs.eof and rs.bof then response.write 請(qǐng)?jiān)黾宇悇eelse Do while not rs.eof response.write + rs(sort_name) + rs.MoveNext Loopend if% addnewgrp1.asp代碼% dim cmdTemp select case request.form(options) case rename on error resume next Set cmdTemp = Server.CreateObject(ADODB.Command) set rs=server.createobject(adodb.recordset) cmdTemp.CommandText = SELECT * FROM sort where sort_id= & request.form(subject) cmdTemp.CommandType = 1 Set cmdTemp.ActiveConnection = conn rs.Open cmdTemp, , 1, 3 if err.Number0 then err.clear response.write 數(shù) 據(jù) 庫 操 作 失 敗 ! else rs(sort_name) = request.form(reTitle) rs.Update rs.Close set rs=nothing set cmdTemp=nothing finished end if case delRem 刪除欄目on error resume next sql=delete from sort where sort_id= & request.form(subject) conn.execute sql if err.Number0 then err.clear response.write 數(shù) 據(jù) 庫 操 作 失 敗 ! else finished end if case new on error resume next Set cmdTemp = Server.CreateObject(ADODB.Command) set rs=server.createobject(adodb.recordset) cmdTemp.CommandText = SELECT * FROM sort where (sort_id IS NULL) cmdTemp.CommandType = 1 Set cmdTemp.ActiveConnection = conn rs.Open cmdTemp, , 1, 3 if err.Number0 then err.clear response.write 數(shù) 據(jù) 庫 操 作 失 敗 ! else rs.AddNew rs(sort_name) = request.form(newTitle) rs.Update rs.Close set rs=nothing set cmdTemp=nothing finished end if end selectsub finished() %圖3-14 添加新廠商頁面、addsort.asp,addsort2.asp(添加新分類)本部分主要對(duì)應(yīng)數(shù)據(jù)可中的NSORT表操作。addsort2.asp代碼如下:% dim cmdTemp select case request.form(options) case rename on error resume next Set cmdTemp = Server.CreateObject(ADODB.Command) set rs=server.createobject(adodb.recordset) cmdTemp.CommandText = SELECT * FROM Nsort where Nsort_id= & request.form(subject) cmdTemp.CommandType = 1 Set cmdTemp.ActiveConnection = conn rs.Open cmdTemp, , 1, 3 if err.Number0 then err.clear response.write 數(shù) 據(jù) 庫 操 作 失 敗 ! else rs(Nsort_name) = trim(request.form(reTitle) rs(sort_id) = request.form(sort_id) rs.Update rs.Close set rs=nothing set cmdTemp=nothing finished end if case delRem 刪除子欄目 on error resume next sql=delete from Nsort where Nsort_id= & request.form(subject) conn.execute sqlRem 刪除相關(guān)子欄目程序 sql=delete from hw where Nsort_id= & request.form(subject) conn.execute sql if err.Number0 then err.clear response.write 數(shù) 據(jù) 庫 操 作 失 敗 ! else finished end if case new Set cmdTemp = Server.CreateObject(ADODB.Command) set rs=server.createobject(adodb.recordset) cmdTemp.CommandText = SELECT * FROM Nsort where (Nsort_id IS NULL) cmdTemp.CommandType = 1 Set cmdTemp.ActiveConnection = conn rs.Open cmdTemp, , 1, 3 if err.Number0 or request.form(psubject)= then err.clear response.write 數(shù) 據(jù) 庫 操 作 失 敗 ! else rs.AddNew rs(Nsort_name) = request.form(newTitle) rs(sort_id) = request.form(psubject) rs.Update rs.Close set rs=nothing set cmdTemp=nothing finished end if end select sub finished() %圖3-15 添加新分類頁面、ddnewtp.asp(添加新手機(jī))本部分主要對(duì)數(shù)據(jù)庫中的NSORT表進(jìn)行操作%if request(action)=save then hw_name=request(hw_name) hw_content=htmlencode2(request(hw_content)hw_content2=htmlencode2(request(hw_content2) hw_cash=request(hw_cash) hw_pic=request(hw_pic)chubsh=request(chubsh)zhuang=request(zhuang)yeshu=request(yeshu)isbn=request(isbn) sort_id=request(sort_id) Nsort_id=request(Nsort_id) company=request(company) pifa=request(pifa)daili=request(daili)hwsn=request(hwsn)data=request(data)kaiben=request(kaiben)tuijian=request(tuijian)jia=request(jia) if not(isnumeric(hw_cash) then errmsg=+價(jià)格應(yīng)該為數(shù)字 founderr=true end if if hw_name= then errmsg=errmsg+名稱不能為空 founderr=true end if if hw_content= then errmsg=errmsg+介紹不能為空 founderr=true end if if sort_id= then errmsg=errmsg+類別不能為空 founderr=true end if if nsort_id= then errmsg=errmsg+類別不能為空 founderr=true end if if hw_pic= then hw_pic=image/noimage.gif if founderr=true then response.write errmsg response.write response.write 返回 response.end else hw_name=server.htmlencode(hw_name) hw_name=replace(hw_name, , ) hw_name=replace(hw_name,chr(13)&chr(10),) hw_content=server.htmlencode(hw_content) hw_content=replace(hw_content, , ) hw_content=replace(hw_content,chr(13)&chr(10),) hw_pic=server.htmlencode(hw_pic) sql=select * from hwset rs=server.createobject(adodb.recordset) rs.open sql,conn,3,3 rs.addnew rs(hw_name)=hw_name rs(hw_content)=hw_contentrs(hw_content2)=hw_content2 rs(hw_cash)=hw_cash rs(sort_id)=sort_id rs(Nsort_id)=Nsort_id rs(company)=company rs(daili)=daili rs(pifa)=pifa rs(hw_sn)=hwsn rs(chubsh)=chubsh rs(kaiben)=kaiben rs(yeshu)=yeshu rs(data)=data rs(isbn)=isbn rs(zhuang)=zhuang rs(hw_pic)=hw_pic rs(tuijian)=tuijian rs(jia)=jia rs.update end if response.write 貨物添加成功 response.write response.write 返回 rs.close else%var onecount;onecount=0;subcat = new Array(); subcat = new Array(,); onecount=;function changelocation(locationid) document.myform.Nsort_id.length = 0; var locationid=locationid; var i; for (i=0;i onecount; i+) if (subcati1 = locationid) document.myform.Nsort_id.optionsdocument.myform.Nsort_id.length = new Option(subcati0, subcati2); option selected value= option value= option selected value= option value=圖3-16 添加新手機(jī)頁面、elhw.asp changehw.asp(查看與修改)%if request(action)=del then sql=select * from hw where hw_id=&request(hw_id)set rs=server.createobject(adodb.recordset) rs.open sql,conn,3,3 if rs.eof then response.redirect delhw.asp else rs.delete rs.update end if rs.close response.write 貨物刪除成功 response.write response.write 返回else% % page=request.querystring(page) if page= then page=1 if not(isnumeric(page) then page=1 if pagetotalpage then page=totalpage rs.absolutepage=page rs.absolutepage=page i=0 dim hw_id(),hw_name(),hw_cash(),hw_pic(),hw_date(),sort_id(),isbn(),hw_sn(),Nsort_ind() do while not rs.eof and (i修改部分代碼如下:%if request(action)=save then hw_name=request(hw_name) hw_content=request(hw_content)hw_content2=request(hw_content2) hw_cash=request(hw_cash) hw_pic=request(hw_pic)chubsh=request(chubsh)zhuang=request(zhuang)yeshu=request(yeshu)isbn=request(isbn) sort_id=request(sort_id)Nsort_id=request(Nsort_id)tuijian=request(tuijian) company=request(company) pifa=request(pifa)daili=request(daili)hw_sn=request(hw_sn)data=request(data)kaiben=request(kaiben) if not(isnumeric(hw_cash) then errmsg=+價(jià)格應(yīng)該為數(shù)字 founderr=true end if if hw_name= then errmsg=errmsg+名稱不能為空 founderr=true end if if hw_content= then errmsg=errmsg+介紹不能為空 founderr=true end if if sort_id= then errmsg=errmsg+類別不能為空 founderr=true end if if hw_pic= then hw_pic=image/noimage.gif if founderr=true then response.write errmsg response.write response.write 返回 response.end else hw_name=server.htmlencode(hw_name) hw_name=replace(hw_name, , ) hw_name=replace(hw_name,chr(13)&chr(10),) hw_content=server.htmlencode(hw_content) hw_content=replace(hw_content, , ) hw_content=replace(hw_content,chr(13)&chr(10),) hw_pic=server.htmlencode(hw_pic) sql=select * from hw where hw_id=&request(hw_id) rs.open sql,conn,3,3 rs(hw_name)=hw_name rs(hw_content)=hw_contentrs(hw_content2)=hw_content2 rs(hw_cash)=hw_cash rs(sort_id)=sort_id rs(company)=company rs(daili)=daili rs(pifa)=pifa rs(hw_sn)=hw_sn rs(chubsh)=chubsh rs(kaiben)=kaiben rs(yeshu)=yeshu rs(data)=data rs(isbn)=isbn rs(zhuang)=zhuang rs(hw_pic)=hw_picrs(Nsort_id)=Nsort_idrs(tuijian)=tuijian rs.update end if response.write 商品修改成功! response.write response.write 返回 rs.close else% %dim rs,sqldim content,selsort_id=request(sort_id)Nsort_id=request(Nsort_id) set rs=server.createobject(adodb.recordset) sql=
溫馨提示
- 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. 人人文庫網(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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 保安房子出租合同范例
- 借款抵押車輛買賣合同范例
- 個(gè)人收房合同范例
- 上海綜合設(shè)備租賃合同范例
- 企業(yè)公司注冊(cè)合同范例
- 中建采購合同范例
- 人臉識(shí)別設(shè)備合同范例
- 產(chǎn)品購銷合同范例甲方
- 全民健身中心合同范例
- 專業(yè)管理團(tuán)隊(duì)合同范例
- 統(tǒng)計(jì)法律知識(shí)培訓(xùn)課件
- 活動(dòng)三《垃圾“流浪”記》(教學(xué)設(shè)計(jì))-2023-2024學(xué)年三年級(jí)下冊(cè)綜合實(shí)踐活動(dòng)滬科黔科版
- 2025年2月廣東省深圳市羅湖區(qū)聯(lián)考初三年級(jí)質(zhì)量檢測(cè)英語試卷(含答案)
- 政治-廣西壯族自治區(qū)考閱評(píng)·2025屆(年)2月高三畢業(yè)班聯(lián)合調(diào)研測(cè)試試題和答案
- 2025年合伙協(xié)議模板
- 2025年南京鐵道職業(yè)技術(shù)學(xué)院?jiǎn)握新殬I(yè)適應(yīng)性測(cè)試題庫及答案一套
- 對(duì)外漢語綜合課教案集成
- 北京市朝陽區(qū)2024-2025學(xué)年高一上學(xué)期期末質(zhì)量檢測(cè)數(shù)學(xué)試題【含答案解析】
- 2025年南京科技職業(yè)學(xué)院高職單招職業(yè)技能測(cè)試近5年??及鎱⒖碱}庫含答案解析
- 信息系統(tǒng)監(jiān)理師教程筆記版
- 龍門吊拆除合同
評(píng)論
0/150
提交評(píng)論