




已閱讀5頁(yè),還剩15頁(yè)未讀, 繼續(xù)免費(fèi)閱讀
版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
成績(jī)數(shù)據(jù)庫(kù)原理及應(yīng)用課程設(shè)計(jì)報(bào)告商品銷(xiāo)售管理系統(tǒng)學(xué)院:信息工程學(xué)院班級(jí): 學(xué)號(hào): 姓名: 完成時(shí)間: 201 課程設(shè)計(jì)的任務(wù)數(shù)據(jù)庫(kù)原理及應(yīng)用是計(jì)算機(jī)及其相關(guān)學(xué)科的一門(mén)重要的學(xué)科基礎(chǔ)課程,也是計(jì)算機(jī)軟件科學(xué)與技術(shù)、信息科學(xué)與技術(shù)的重要學(xué)科分支。本課程設(shè)計(jì)旨在通過(guò)對(duì)一個(gè)小型數(shù)據(jù)庫(kù)管理系統(tǒng)(DBMS)的綜合設(shè)計(jì)過(guò)程,強(qiáng)化學(xué)生對(duì)計(jì)算機(jī)系統(tǒng)軟件的設(shè)計(jì)能力,提高學(xué)生的綜合素質(zhì),并通過(guò)課程設(shè)計(jì)進(jìn)一步加強(qiáng)學(xué)生對(duì)所學(xué)知識(shí)的理解,以及對(duì)數(shù)據(jù)庫(kù)的全面、深刻認(rèn)識(shí)。具體要求如下:1)了解DBMS的設(shè)計(jì)過(guò)程;2)掌握關(guān)系型DBMS的結(jié)構(gòu)及實(shí)現(xiàn);3)掌握系統(tǒng)程序設(shè)計(jì)的基礎(chǔ)知識(shí);4)深化理解并掌握數(shù)據(jù)庫(kù)原理及應(yīng)用課程的相關(guān)內(nèi)容;5)強(qiáng)化軟件開(kāi)發(fā)的團(tuán)隊(duì)意識(shí),提高合作能力。系統(tǒng)需求分析與設(shè)計(jì)數(shù)據(jù)流圖ER圖數(shù)據(jù)結(jié)構(gòu)描述商品數(shù)據(jù)結(jié)構(gòu):ShanidChar6ShannameChar8ShancountSmailint2ShanpriceSmailint2Factoridchar6公司數(shù)據(jù)結(jié)構(gòu):FactoridChar6FactornamevarChar24FactoraddrvarChar24FactorphoneChar11銷(xiāo)售數(shù)據(jù)結(jié)構(gòu):ShanidChar6FactoridChar6SalsecountSmailint2銷(xiāo)售管理系統(tǒng)軟件設(shè)計(jì)流程圖和功能模塊圖商品信息查詢(xún)商品信息錄入銷(xiāo)售信息查詢(xún)銷(xiāo)售信息錄入公司信息查詢(xún)公司信息錄入程序模塊匯總 商品信息錄入; 商品信息查詢(xún); 公司信息錄入; 公司信息查詢(xún); 銷(xiāo)售信息錄入; 銷(xiāo)售信息查詢(xún);源程序清單主目錄:using System;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;public partial class _Default : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) protected void Button1_Click(object sender, EventArgs e) Response.Redirect(/Default2.aspx); protected void Button3_Click(object sender, EventArgs e) Response.Redirect(/Default3.aspx); protected void Button2_Click(object sender, EventArgs e) Response.Redirect(/Default4.aspx); protected void Button4_Click(object sender, EventArgs e) Response.Redirect(/Default6.aspx); protected void Button5_Click(object sender, EventArgs e) Response.Redirect(/Default4.aspx); protected void Button6_Click(object sender, EventArgs e) Response.Redirect(/Default5.aspx); protected void Button7_Click(object sender, EventArgs e) Response.Redirect(/Default7.aspx); 1 商品信息錄入;using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;using System.Data.SqlClient;public partial class Default2 : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) protected void Button3_Click(object sender, EventArgs e) if (ShangID.Text.Trim().Length 1) Response.Write(window.alert(沒(méi)有要?jiǎng)h除的項(xiàng)!); return; SqlConnection con = new SqlConnection(server=localhost;user id=sa;pwd=123456;database=studb); con.Open(); string select = select count(*) as total from S where ShanID=+ ShangID.Text.Trim()+ ; SqlCommand cmdsel = new SqlCommand(select, con); SqlDataReader dr = cmdsel.ExecuteReader(); if (dr.Read() if (int.Parse(drtotal.ToString() = 0) Response.Write(window.alert(要?jiǎng)h除的記錄不存在!); return; dr.Close(); string str = delete from S where ShanID= + + ShangID.Text.Trim() + ; SqlCommand cmd = new SqlCommand(str, con); cmd.ExecuteNonQuery(); con.Close(); protected void Exit_Click(object sender, EventArgs e) Response.Redirect (/Default.aspx);protected void Insert_Click(object sender, EventArgs e) SqlConnection con = new SqlConnection(server=localhost;uid=sa;pwd=123456;database=studb); con.Open(); string insert = insert into S(ShanID,ShanName,ShanCount,ShanPrice,FactoryID) values( + + ShangID.Text.Trim() + + , + + ShangName.Text.Trim() + + , + ShangCount.Text.Trim() + , + + ShangPrice.Text.Trim() + + , + + ShangAddr.Text.Trim() + + ); Response.Write(insert); SqlCommand cmd1 = new SqlCommand(insert, con); cmd1.ExecuteNonQuery(); con.Close();2 商品信息查詢(xún);using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;using System.Data.SqlClient;public partial class Default3 : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) protected void MoveToFirst_Click(object sender, EventArgs e) SqlConnection con = new SqlConnection(server=localhost;user id=sa;pwd=123456;database=studb); con.Open(); string str = select ShanID from S order by ShanID asc; SqlCommand cmd = new SqlCommand(str, con); SqlDataReader sr = cmd.ExecuteReader(); if (sr.Read() string Student = srShanID.ToString(); Refresh(Student); sr.Close(); private void Refresh(string shangId) SqlConnection con = new SqlConnection(server=localhost;user id=sa;pwd=123456;database=studb); con.Open(); string str = select * from S where ShanID= + + shangId.ToString() + ; SqlCommand cmd = new SqlCommand(str, con); SqlDataReader sr = cmd.ExecuteReader(); if (sr.Read() ShangID.Text = shangId.ToString(); ShangName.Text = srShanName.ToString(); ShangCount.Text = srShanCount.ToString(); ShangPrice.Text = srShanPrice.ToString(); ShangAddr.Text = srFactoryID.ToString(); protected void MoveToPre_Click(object sender, EventArgs e) if (ShangID.Text.Trim().Length 1) Response.Write(window.alert(請(qǐng)選擇一個(gè)當(dāng)前項(xiàng)!); return; string shangid = ; SqlConnection con = new SqlConnection(server=localhost;user id=sa;pwd=123456;database=studb); con.Open(); string str = select ShanID from S order by ShanID asc; SqlCommand cmd = new SqlCommand(str, con); SqlDataReader sr = cmd.ExecuteReader(); if (sr.Read() shangid = srShanID.ToString(); sr.Close(); if (shangid = ShangID.Text.Trim() Response.Write(window.alert(當(dāng)前數(shù)據(jù)項(xiàng)已經(jīng)是第一個(gè)了!); return; else string tempstr = select max(ShanID) as maxid from S where ShanID + + ShangID.Text.Trim() + ; cmd.CommandText = tempstr; SqlDataReader dr = cmd.ExecuteReader(); if (dr.Read() string shId = drmaxid.ToString(); Refresh(shId); con.Close(); protected void MoveToNext_Click(object sender, EventArgs e) if (ShangID.Text.Trim().Length 1) Response.Write(window.alert(請(qǐng)選擇一個(gè)當(dāng)前項(xiàng)!); return; string shangid = ; SqlConnection con = new SqlConnection(server=localhost;user id=sa;pwd=123456;database=studb); con.Open(); string str = select ShanID from S order by ShanID desc; SqlCommand cmd = new SqlCommand(str, con); SqlDataReader sr = cmd.ExecuteReader(); if (sr.Read() shangid = srShanID.ToString(); sr.Close(); if (shangid = ShangID.Text.Trim() Response.Write(window.alert(當(dāng)前數(shù)據(jù)項(xiàng)已經(jīng)是最后一個(gè)了!); return; else string tempstr = select min(ShanID) as maxid from S where ShanID + + ShangID.Text.Trim() + ; cmd.CommandText = tempstr; SqlDataReader dr = cmd.ExecuteReader(); if (dr.Read() string shId = drmaxid.ToString(); Refresh(shId); con.Close(); protected void MoveToLast_Click(object sender, EventArgs e) SqlConnection con = new SqlConnection(server=localhost;user id=sa;pwd=123456;database=studb); con.Open(); string str = select ShanID from S order by ShanID desc; SqlCommand cmd = new SqlCommand(str, con); SqlDataReader sr = cmd.ExecuteReader(); if (sr.Read() string Shang = srShanID.ToString(); Refresh(Shang); sr.Close(); con.Close(); protected void KeySelect_Click(object sender, EventArgs e) bool find = false; SqlConnection con = new SqlConnection(server=localhost;user id=sa;pwd=123456;database=studb); con.Open(); string cmdstr = select * from S; SqlDataAdapter da = new SqlDataAdapter(cmdstr, con); DataSet ds = new DataSet(); da.Fill(ds); for (int i = 0; i ds.Tables0.Rows.Count; i+) for (int j = 0; j ds.Tables0.Columns.Count; j+) string data = (ds.Tables0.Rowsij.ToString().Trim(); if (data = Select.Text.Trim() ShangID.Text = ds.Tables0.RowsiShanID.ToString(); ShangName.Text = ds.Tables0.RowsiShanName.ToString(); ShangCount.Text = ds.Tables0.RowsiShanCount.ToString(); ShangPrice.Text = ds.Tables0.RowsiShanPrice.ToString(); ShangAddr.Text = ds.Tables0.RowsiFactoryID.ToString(); find = true; if (find = false) Response.Write(window.alert(沒(méi)有相關(guān)記錄!); con.Close(); protected void Exit_Click(object sender, EventArgs e) Response.Redirect(/Default.aspx); 3 公司信息錄入;using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;using System.Data.SqlClient;public partial class Default4 : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) protected void Insert_Click(object sender, EventArgs e) SqlConnection con = new SqlConnection(server=localhost;uid=sa;pwd=123456;database=studb); con.Open(); string insert = insert into Factory(FactorID,FactorName,FactorAddr,FactorPhone) values( + + FactoryID.Text.Trim() + + , + + FactoryName.Text.Trim() + + , + + FactoryAddr.Text.Trim() + + , + + FactoryPhone.Text.Trim() + + ); Response.Write(insert); SqlCommand cmd1 = new SqlCommand(insert, con); cmd1.ExecuteNonQuery(); con.Close(); protected void Delete_Click(object sender, EventArgs e) if (FactoryID.Text.Trim().Length 1) Response.Write(window.alert(沒(méi)有要?jiǎng)h除的項(xiàng)!); return; SqlConnection con = new SqlConnection(server=localhost;user id=sa;pwd=123456;database=studb); con.Open(); string select = select count(*) as total from Factory where FactorID= + + FactoryID.Text.Trim() + ; SqlCommand cmdsel = new SqlCommand(select, con); SqlDataReader dr = cmdsel.ExecuteReader(); if (dr.Read() if (int.Parse(drtotal.ToString() = 0) Response.Write(window.alert(要?jiǎng)h除的記錄不存在!); return; dr.Close(); string str = delete from Factory where FactorID= + + FactoryID.Text.Trim() + ; SqlCommand cmd = new SqlCommand(str, con); cmd.ExecuteNonQuery(); con.Close(); protected void Exit_Click(object sender, EventArgs e) Response.Redirect(/Default.aspx); 4 公司信息查詢(xún);using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;using System.Data.SqlClient;public partial class Default5 : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) protected void MoveToFirst_Click(object sender, EventArgs e) SqlConnection con = new SqlConnection(server=localhost;user id=sa;pwd=123456;database=studb); con.Open(); string str = select FactorID from Factory order by FactorID asc; SqlCommand cmd = new SqlCommand(str, con); SqlDataReader sr = cmd.ExecuteReader(); if (sr.Read() string Student = srFactorID.ToString(); Refresh(Student); sr.Close(); private void Refresh(string factorId) SqlConnection con = new SqlConnection(server=localhost;user id=sa;pwd=123456;database=studb); con.Open(); string str = select * from Factory where FactorID= + + factorId.ToString() + ; SqlCommand cmd = new SqlCommand(str, con); SqlDataReader sr = cmd.ExecuteReader(); if (sr.Read() FactoryID.Text = factorId.ToString(); FactoryName.Text = srFactorName.ToString(); FactoryAddr.Text = srFactorAddr.ToString(); FactoryPhone.Text = srFactorPhone.ToString(); protected void MoveToPre_Click(object sender, EventArgs e) if (FactoryID.Text.Trim().Length 1) Response.Write(window.alert(請(qǐng)選擇一個(gè)當(dāng)前項(xiàng)!); return; string factoryid = ; SqlConnection con = new SqlConnection(server=localhost;user id=sa;pwd=123456;database=studb); con.Open(); string str = select FactorID from Factory order by FactorID asc; SqlCommand cmd = new SqlCommand(str, con); SqlDataReader sr = cmd.ExecuteReader(); if (sr.Read() factoryid = srFactorID.ToString(); sr.Close(); if (factoryid = FactoryID.Text.Trim() Response.Write(window.alert(當(dāng)前數(shù)據(jù)項(xiàng)已經(jīng)是第一個(gè)了!); return; else string tempstr = select max(FactorID) as maxid from Factory where FactorID + + FactoryID.Text.Trim() + ; cmd.CommandText = tempstr; SqlDataReader dr = cmd.ExecuteReader(); if (dr.Read() string faId = drmaxid.ToString(); Refresh(faId); con.Close(); protected void MoveToNext_Click(object sender, EventArgs e) if (FactoryID.Text.Trim().Length 1) Response.Write(window.alert(請(qǐng)選擇一個(gè)當(dāng)前項(xiàng)!); return; string factoryid = ; SqlConnection con = new SqlConnection(server=localhost;user id=sa;pwd=123456;database=studb); con.Open(); string str = select FactorID from Factory order by FactorID desc; SqlCommand cmd = new SqlCommand(str, con); SqlDataReader sr = cmd.ExecuteReader(); if (sr.Read() factoryid = srFactorID.ToString(); sr.Close(); if (factoryid = FactoryID.Text.Trim() Response.Write(window.alert(當(dāng)前數(shù)據(jù)項(xiàng)已經(jīng)是最后一個(gè)了!); return; else string tempstr = select min(FactorID) as maxid from Factory where FactorID + + FactoryID.Text.Trim() + ; cmd.CommandText = tempstr; SqlDataReader dr = cmd.ExecuteReader(); if (dr.Read() string faId = drmaxid.ToString(); Refresh(faId); con.Close(); protected void MoveToLast_Click(object sender, EventArgs e) SqlConnection con = new SqlConnection(server=localhost;user id=sa;pwd=123456;database=studb); con.Open(); string str = select FactorID from Factory order by FactorID desc; SqlCommand cmd = new SqlCommand(str, con); SqlDataReader sr = cmd.ExecuteReader(); if (sr.Read() string Factory = srFactorID.ToString(); Refresh(Factory); sr.Close(); con.Close(); protected void Selecte_Click(object sender, EventArgs e) bool find = false; SqlConnectio
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
- 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ì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 小學(xué)數(shù)學(xué)三 分?jǐn)?shù)除法教案
- 水輪機(jī)發(fā)電站變壓器運(yùn)行與管理考核試卷
- 煤炭市場(chǎng)結(jié)構(gòu)優(yōu)化與產(chǎn)業(yè)轉(zhuǎn)型升級(jí)路徑探索分析研究探討考核試卷
- 塑粉車(chē)間安全培訓(xùn)
- 管道工程應(yīng)急預(yù)案優(yōu)化與實(shí)施策略思考探索考核試卷
- 玉米食品的國(guó)際市場(chǎng)拓展與貿(mào)易壁壘考核試卷
- 皮裝飾制品的時(shí)尚元素融入考核試卷
- 筆的檢測(cè)儀器與設(shè)備使用考核試卷
- 環(huán)境監(jiān)測(cè)中的環(huán)境監(jiān)測(cè)數(shù)據(jù)挖掘技術(shù)考核試卷
- 管道工程安全管理與保障措施考核試卷
- 港口道路與堆場(chǎng)施工規(guī)范
- 創(chuàng)意設(shè)計(jì)工作室合伙合同
- 居家托養(yǎng)合同范本
- 勞務(wù)班組施工合同范本(2024版)
- 人音版小學(xué)六年級(jí)下冊(cè)音樂(lè)教案
- 血透導(dǎo)管滑脫應(yīng)急預(yù)案
- 肺栓塞的應(yīng)急預(yù)案及流程
- 【年加工500噸鮑魚(yú)的綜合加工生產(chǎn)工藝設(shè)計(jì)10000字(論文)】
- (完整版)第19章支原體、衣原體、立克次氏體
- 家宴主題宴會(huì)設(shè)計(jì)說(shuō)明
- 北京市海淀區(qū)2024年七年級(jí)下學(xué)期語(yǔ)文期中試卷(附答案)
評(píng)論
0/150
提交評(píng)論