電子商務(wù)網(wǎng)站制作說明書_第1頁
電子商務(wù)網(wǎng)站制作說明書_第2頁
電子商務(wù)網(wǎng)站制作說明書_第3頁
電子商務(wù)網(wǎng)站制作說明書_第4頁
電子商務(wù)網(wǎng)站制作說明書_第5頁
已閱讀5頁,還剩30頁未讀, 繼續(xù)免費(fèi)閱讀

VIP免費(fèi)下載

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

文檔簡介

1、一、背景在互聯(lián)網(wǎng)日益流行的今天,網(wǎng)絡(luò)成為了人們獲取信息的主要渠道,而在網(wǎng)絡(luò)的大家庭中,電子商務(wù)則是一個熱門,電子商務(wù)的一個最基本體現(xiàn)就是電子購物網(wǎng)站,從一定程度上講它就是網(wǎng)上超市,也就是一種網(wǎng)上銷售,人們利用網(wǎng)絡(luò)購物,不需要再像傳統(tǒng)的購物一樣在街上東奔西跑,既可以節(jié)約時間,又可以節(jié)約精力,對于在網(wǎng)絡(luò)上開店的企業(yè)來說,電子商務(wù)使得企業(yè)能直接面向最終客戶,從而降低交易成本和客戶售后咨詢等服務(wù)費(fèi)用,尤其是對無形產(chǎn)品的服務(wù),現(xiàn)階段企業(yè)開展電子商務(wù)以加強(qiáng)與客戶的溝通和促進(jìn)產(chǎn)品銷售,對于買賣雙方來說都是有益的。二、實(shí)驗(yàn)?zāi)康?. 進(jìn)一步熟悉和掌握Oracle的各種操作。2. 能夠在實(shí)際的事例中靈活運(yùn)用學(xué)到的

2、有關(guān)知識。3. 能夠編寫滿足某種要求的功能。三、實(shí)驗(yàn)內(nèi)容1. 系統(tǒng)設(shè)計2. 數(shù)據(jù)庫設(shè)計3. 公共類設(shè)計4. 系統(tǒng)主界面與登錄程序設(shè)計5. 商品類別管理模塊設(shè)計四實(shí)驗(yàn)步驟1 系統(tǒng)設(shè)計1.1、系統(tǒng)目標(biāo)對于典型的數(shù)據(jù)庫管理系統(tǒng),尤其是電子商務(wù)平臺這樣的數(shù)據(jù)流比較大的網(wǎng)絡(luò)管理系統(tǒng),必須要滿足使用方便、操作靈活等設(shè)計需求。本系統(tǒng)滿足以下幾個目標(biāo): 1. 界面設(shè)計美觀有好,操作簡便。2. 全面、分類戰(zhàn)士商城內(nèi)所有商品。3. 顯示商品的詳細(xì)信息,方便顧客了解商品信息。4. 查看商城內(nèi)的交易信息。5. 設(shè)置靈活的打印功能。6. 系統(tǒng)對用戶輸入的數(shù)據(jù),進(jìn)行嚴(yán)格的數(shù)據(jù)檢驗(yàn),盡可能的排除人為錯誤。7. 提供新品上市

3、公告,方便顧客及時了解相關(guān)信息。8. 提供網(wǎng)上留言功能。9. 系統(tǒng)最大限度的實(shí)現(xiàn)以維護(hù)性和易操作性。10. 系統(tǒng)運(yùn)行穩(wěn)定、安全可靠。1.2、系流程統(tǒng)圖電子商務(wù)平臺系統(tǒng)流程圖:電子商務(wù)網(wǎng)站在線支付進(jìn)行商品信息管理、訂單管理、用戶管理、系統(tǒng)管理等網(wǎng)站訪問者網(wǎng)站管理員查看訂單更改商品數(shù)量購物車瀏覽網(wǎng)站其他模塊選擇商品注冊購買登錄登錄否是是是否是否否否是1.3、系統(tǒng)功能結(jié)構(gòu) 電子商務(wù)平臺前臺管理系統(tǒng)功能設(shè)計:電子商務(wù)平臺前臺管理系統(tǒng)商品分類購物流程用戶流程特價商品熱門商品我的留言本站留言1.4、構(gòu)建開發(fā)環(huán)境網(wǎng)站開發(fā)環(huán)境網(wǎng)站開發(fā)環(huán)境:Microsoft Visual Studio 2008集成

4、開發(fā)環(huán)境。網(wǎng)站開發(fā)語言:ASP.NET+C#。網(wǎng)站后臺數(shù)據(jù)庫:Oracle 10g開發(fā)環(huán)境運(yùn)行平臺:Windows7。2 數(shù)據(jù)庫設(shè)計2.1 數(shù)據(jù)庫概要說明所使用數(shù)據(jù)庫為Oracle 10g 數(shù)據(jù)庫。2.2 數(shù)據(jù)庫概念設(shè)計通過對網(wǎng)站需求分析、網(wǎng)站流程設(shè)計以及功能結(jié)構(gòu)的確定,規(guī)劃出系統(tǒng)中使用的數(shù)據(jù)庫實(shí)體對象分別是商品類型實(shí)體、商品信息實(shí)體、商品訂單實(shí)體、商品訂單明細(xì)實(shí)體和管理員實(shí)體。商品類型實(shí)體:商品類型類型圖片類型名稱類型編號商品信息實(shí)體:商品信息商品名稱是否打折商品編號商品簡介商品市場價商品熱銷價商品圖片進(jìn)貨如期商品訂單實(shí)體:商品訂單商品訂單編號商品費(fèi)用訂單總費(fèi)用接收人姓名是否打折是否發(fā)貨商品

5、運(yùn)輸方式商品市場價商品訂單明細(xì)實(shí)體:商品訂單明細(xì)商品總金額訂單詳細(xì)表號備注商品對應(yīng)訂單號商品代號商品數(shù)量管理員實(shí)體:管理員管理員真實(shí)姓名管理員密碼管理員登錄名管理員編號創(chuàng)建時間E-mail地址2.3 數(shù)據(jù)庫邏輯結(jié)構(gòu)設(shè)計公共信息表:商品類別表:商品信息表:購物車表:用戶信息表:管理員表3公共類的設(shè)計1 CommonClass類:using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;rols;using Syst

6、em.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.Data.SqlClient;/ <summary>/ CommonClass 的摘要說明/ </summary>public class CommonClasspublic CommonClass()/ TODO: 在此處添加構(gòu)造函數(shù)邏輯/ / <summary> / 說明:MessageBox用來在客戶端彈出對話框,關(guān)閉對話框返回指定頁。 / 參數(shù):TxtMessage 對話框中顯示的內(nèi)容。 / Url

7、 對話框關(guān)閉后,跳轉(zhuǎn)的頁 / </summary> public string MessageBox(string TxtMessage,string Url) string str; str = "<script language=javascript>alert('" + TxtMessage + "');location='" + Url + "'</script>" return str; / <summary> / 說明:MessageBox用來

8、在客戶端彈出對話框。 / 參數(shù):TxtMessage 對話框中顯示的內(nèi)容。 / </summary> public string MessageBox(string TxtMessage) string str; str = "<script language=javascript>alert('" + TxtMessage + "')</script>" return str; / <summary> / 說明:MessageBoxPag用來在客戶端彈出對話框,關(guān)閉對話框返回原頁。 / 參

9、數(shù):TxtMessage 對話框中顯示的內(nèi)容。 / </summary> public string MessageBoxPage(string TxtMessage) string str; str = "<script language=javascript>alert('" + TxtMessage + "');location='javascript:history.go(-1)'</script>" return str; / <summary> / 實(shí)現(xiàn)隨機(jī)驗(yàn)證碼

10、 / </summary> / <param name="n">顯示驗(yàn)證碼的個數(shù)</param> / <returns>返回生成的隨機(jī)數(shù)</returns> public string RandomNum(int n) / /定義一個包括數(shù)字、大寫英文字母和小寫英文字母的字符串 string strchar = "0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,a,b,c,d,e,f,g,h,i,j,k,l,m

11、,n,o,p,q,r,s,t,u,v,w,x,y,z" /將strchar字符串轉(zhuǎn)化為數(shù)組 /String.Split 方法返回包含此實(shí)例中的子字符串(由指定Char數(shù)組的元素分隔)的 String 數(shù)組。 string VcArray = strchar.Split(','); string VNum = "" /記錄上次隨機(jī)數(shù)值,盡量避免產(chǎn)生幾個一樣的隨機(jī)數(shù) int temp = -1; /采用一個簡單的算法以保證生成隨機(jī)數(shù)的不同 Random rand = new Random(); for (int i = 1; i < n + 1;

12、 i+) if (temp != -1) /unchecked 關(guān)鍵字用于取消整型算術(shù)運(yùn)算和轉(zhuǎn)換的溢出檢查。 /DateTime.Ticks 屬性獲取表示此實(shí)例的日期和時間的刻度數(shù)。 rand = new Random(i * temp * unchecked(int)DateTime.Now.Ticks); /Random.Next 方法返回一個小于所指定最大值的非負(fù)隨機(jī)數(shù)。 int t = rand.Next(61); if (temp != -1 && temp = t) return RandomNum(n); temp = t; VNum += VcArrayt; r

13、eturn VNum;/返回生成的隨機(jī)數(shù) / <summary> / 用來截取小數(shù)點(diǎn)后nleng位 / </summary> / <param name="sString">sString原字符串。</param> / <param name="nLeng">nLeng長度。</param> / <returns>處理后的字符串。</returns> public string VarStr(string sString, int nLeng) int ind

14、ex = sString.IndexOf("."); if (index = -1 | index + nLeng >= sString.Length) return sString; else return sString.Substring(0, (index + nLeng + 1); 2DBClass類;using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using Sys

15、tem.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.Data.SqlClient;/ <summary>/ DBClass 的摘要說明/ </summary>public class DBClasspublic DBClass()/ TODO: 在此處添加構(gòu)造函數(shù)邏輯/ / <summary> / 連接數(shù)據(jù)庫 / </summary> / <returns>返回SqlC

16、onnection對象</returns> public SqlConnection GetConnection() string myStr = ConfigurationManager.AppSettings"ConnectionString".ToString(); SqlConnection myConn = new SqlConnection(myStr); return myConn; / <summary> / 執(zhí)行SQL語句,并返回受影響的行數(shù) / </summary> / <param name="myC

17、md">執(zhí)行SQL語句命令的SqlCommand對象</param> public void ExecNonQuery(SqlCommand myCmd) try if (myCmd.Connection.State != ConnectionState.Open) myCmd.Connection.Open(); /打開與數(shù)據(jù)庫的連接 /使用SqlCommand對象的ExecuteNonQuery方法執(zhí)行SQL語句,并返回受影響的行數(shù) myCmd.ExecuteNonQuery(); catch (Exception ex) throw new Exception

18、(ex.Message, ex); finally if (myCmd.Connection.State = ConnectionState.Open) myCmd.Connection.Close(); /關(guān)閉與數(shù)據(jù)庫的連接 / <summary> / 執(zhí)行查詢,并返回查詢所返回的結(jié)果集中第一行的第一列。所有其他的列和行將被忽略。 / </summary> / <param name="myCmd"></param> / <returns>執(zhí)行SQL語句命令的SqlCommand對象</returns>

19、; public string ExecScalar(SqlCommand myCmd) string strSql; try if (myCmd.Connection.State != ConnectionState.Open) myCmd.Connection.Open(); /打開與數(shù)據(jù)庫的連接 /使用SqlCommand對象的ExecuteScalar方法執(zhí)行查詢,并返回查詢所返回的結(jié)果集中第一行的第一列。所有其他的列和行將被忽略。 strSql=Convert.ToString(myCmd.ExecuteScalar(); return strSql ; catch (Excepti

20、on ex) throw new Exception(ex.Message, ex); finally if (myCmd.Connection.State = ConnectionState.Open) myCmd.Connection.Close();/關(guān)閉與數(shù)據(jù)庫的連接 / <summary> / 說 明: 返回數(shù)據(jù)集的表的集合 /返回值: 數(shù)據(jù)源的數(shù)據(jù)表 /參 數(shù): myCmd 執(zhí)行SQL語句命令的SqlCommand對象,TableName 數(shù)據(jù)表名稱 / </summary> public DataTable GetDataSet(SqlCommand my

21、Cmd, string TableName) SqlDataAdapter adapt; DataSet ds = new DataSet(); try if (myCmd.Connection.State != ConnectionState.Open) myCmd.Connection.Open(); adapt = new SqlDataAdapter(myCmd); adapt.Fill(ds,TableName); return ds.TablesTableName; catch (Exception ex) throw new Exception(ex.Message, ex);

22、finally if (myCmd.Connection.State = ConnectionState.Open) myCmd.Connection.Close(); / <summary> / 執(zhí)行存儲過程語句,返回sqlCommand類對象 / </summary> / <param name="strProcName">存儲過程名</param> / <returns>返回sqlCommand類對象</returns> public SqlCommand GetCommandProc(strin

23、g strProcName) SqlConnection myConn = GetConnection(); SqlCommand myCmd = new SqlCommand(); myCmd.Connection = myConn; myCmd.CommandText = strProcName; myCmd.CommandType = CommandType.StoredProcedure; return myCmd; / <summary> / 執(zhí)行查詢語句,返回sqlCommand類對象 / </summary> / <param name="

24、strSql">查詢語句</param> / <returns>返回sqlCommand類對象</returns> public SqlCommand GetCommandStr(string strSql) SqlConnection myConn = GetConnection(); SqlCommand myCmd = new SqlCommand(); myCmd.Connection = myConn; myCmd.CommandText = strSql; myCmd.CommandType = CommandType.Text;

25、 return myCmd; / <summary> / 說 明: 執(zhí)行SQL語句,返回數(shù)據(jù)源的數(shù)據(jù)表 /返回值: 數(shù)據(jù)源的數(shù)據(jù)表DataTable /參 數(shù): sqlStr執(zhí)行的SQL語句,TableName 數(shù)據(jù)表名稱 / </summary> public DataTable GetDataSetStr(string sqlStr, string TableName) SqlConnection myConn = GetConnection(); myConn.Open(); DataSet ds = new DataSet(); SqlDataAdapter a

26、dapt = new SqlDataAdapter(sqlStr, myConn); adapt.Fill(ds, TableName); myConn.Close(); return ds.TablesTableName; 3GoodsClass類:using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.W

27、ebControls.WebParts;using System.Web.UI.HtmlControls;using System.Data.SqlClient;using System.Collections;/ <summary>/ GoodsClass 的摘要說明/ </summary>public class GoodsClass DBClass dbObj = new DBClass();public GoodsClass()/ TODO: 在此處添加構(gòu)造函數(shù)邏輯/ / <summary> / 對DataList控件進(jìn)行綁定 / </summ

28、ary> / <param name="dlName">DataList控件名</param> / <param name="dsTable">數(shù)據(jù)集DataSet的表的集合</param> public void dlBind(DataList dlName,DataTable dsTable) if (dsTable != null) dlName.DataSource = dsTable.DefaultView; dlName.DataKeyField = dsTable.Columns0.To

29、String(); dlName.DataBind(); / <summary> / 商品類別菜單欄 / </summary> / <param name="dlName">綁定商品類別名的DataList控件</param> public void DLClassBind(DataList dlName) string sqlStr = "select Top 10 * from tb_Class" DataTable dsTable = dbObj.GetDataSetStr(sqlStr, "

30、;tbClass"); dlBind(dlName, dsTable); / <summary> / 在首頁面中,綁定商品信息 / </summary> / <param name="IntDeplay">商品分類標(biāo)志</param> / <param name="dlName">綁定商品的DataList控件</param> / <param name="TableName">數(shù)據(jù)集標(biāo)志</param> public void

31、DLDeplayGI(int IntDeplay, DataList dlName, string TableName) SqlCommand myCmd = dbObj.GetCommandProc("proc_DeplayGI"); /添加參數(shù) SqlParameter Deplay = new SqlParameter("Deplay", SqlDbType.Int, 4); Deplay.Value = IntDeplay; myCmd.Parameters.Add(Deplay); dbObj.ExecNonQuery(myCmd); Data

32、Table dsTable = dbObj.GetDataSet(myCmd, TableName); dlBind(dlName, dsTable); / <summary> / 最新商品菜單欄 / </summary> / <param name="dlName">綁定最新商品的DataList控件</param> public void DLNewGoods(DataList dlName) SqlCommand myCmd = dbObj.GetCommandProc("proc_NewGoods"

33、); dbObj.ExecNonQuery(myCmd); DataTable dsTable = dbObj.GetDataSet(myCmd, "tbGoods"); dlBind(dlName, dsTable); / <summary> / 獲取商品類別名 / </summary> / <param name="IntClassID">商品類別號</param> / <returns>返回商品類別名</returns> public string GetClass(int I

34、ntClassID) SqlCommand myCmd = dbObj.GetCommandProc("proc_GCN"); /添加參數(shù) SqlParameter classID = new SqlParameter("ClassID", SqlDbType.Int, 4); classID.Value = IntClassID; myCmd.Parameters.Add(classID); return dbObj.ExecScalar(myCmd).ToString(); / <summary> / 對商品信息進(jìn)行模糊查詢 / <

35、/summary> / <param name="strKeyWord">關(guān)鍵信息</param> / <returns>返回查詢結(jié)果數(shù)據(jù)表DataTable</returns> public DataTable search(string strKeyWord) SqlCommand myCmd = dbObj.GetCommandProc("proc_SearchGI"); SqlParameter key = new SqlParameter("keywords", SqlD

36、bType.VarChar, 50);/添加參數(shù) key.Value = strKeyWord; myCmd.Parameters.Add(key); /執(zhí)行操作 dbObj.ExecNonQuery(myCmd); DataTable dsTable = dbObj.GetDataSet(myCmd, "tbBI"); return dsTable; 4 網(wǎng)站首頁設(shè)計與登錄程序設(shè)計ggggggg<% Page Language="C#" AutoEventWireup="true" CodeFile="wangyal

37、i.aspx.cs" Inherits="wangyali" %><!DOCTYPE html PUBLIC "-/W3C/DTD XHTML 1.0 Transitional/EN" "/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="/1999/xhtml" ><head><meta http-equiv="Content-T

38、ype" content="text/html; charset=gb2312" /><title>麗麗購物系統(tǒng)</title><link href="css/css_page.css" rel="stylesheet" type="text/css" /><style type="text/css"><!-body background-color: #D5E4EE;.style1 color: #FFFFFF->&l

39、t;/style><script src="js/login.js" type="text/javascript">function IMG1_onclick() </script></head><body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="IsIE()"> <form name="

40、form1" method="post" action="wangyali.aspx" id="form1" runat =server><div></div><div></div> <table width="1030" border="0" align="center" cellpadding="0" cellspacing="0"> <tr>

41、<td colspan="2"><table width="100%" height="117" border="0" cellpadding="0" cellspacing="0" background="images/topbg.gif"> </table></td> </tr> <tr bgcolor="#E6E6E6" class="text09&quo

42、t;> <td height="30" style="width: 1050px"> &nbsp; <asp:Image ID="Image1" runat="server" ImageUrl="/image/圖標(biāo).jpg" Style="position: static" DescriptionUrl="/image/未命名-2_場景1.swf" Height="146px" Width="1

43、020px" /><br /> <a href="image/未命名-1.swf"></a> 歡迎您訪問麗麗購物系統(tǒng) 今天是年月日星期三</td> <td height="30">&nbsp;</td> </tr> <tr bgcolor="#B6C79B" class="text09"> <td height="2" colspan="2">&

44、lt;img src="images/transparence.gif" width="2" height="1"></td> </tr></table><table width="1035" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr va

45、lign="top"> <td height="13" style="width: 257px">&nbsp;<div style="text-align: center"> <table style="width: 230px; position: static; height: 82px"> <tr> <td colspan="2" style="height: 7px"> &l

46、t;asp:Label ID="Label1" runat="server" Style="position: static" Text="請登錄"></asp:Label></td> </tr> <tr> <td style="width: 92px"> <asp:Label ID="Label2" runat="server" Style="position: stati

47、c" Text="用戶名" Width="64px"></asp:Label></td> <td style="width: 100px"> <asp:TextBox ID="TextBox1" runat="server" Style="position: static" ></asp:TextBox></td> </tr> <tr> <td style=&

48、quot;width: 92px; height: 25px"> <asp:Label ID="Label3" runat="server" Style="position: static" Text="密碼" Width="46px"></asp:Label></td> <td style="width: 100px; height: 25px"> <asp:TextBox ID="TextBo

49、x2" runat="server" Style="position: static" ReadOnly="false" TextMode="Password"></asp:TextBox></td> </tr> <tr> <td style="width: 92px"> <asp:Button ID="Button1" runat="server" OnClick=&quo

50、t;Button1_Click" Style="position: static" Text="確定" /></td> <td style="width: 100px"> <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Style="position: static" Text="取消" /></td

51、> </tr> </table> </div> <div style="text-align: left"> <div style="text-align: center"> <div style="text-align: center"> <table style="width: 208px; position: static"> <tr> <td style="width: 100px; hei

52、ght: 20px"> <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click" Style="position: static" PostBackUrl="/xiaogang.aspx">新用戶請注冊</asp:LinkButton></td> </tr> </table> </div> </div>

53、</div> <div style="text-align: center"> &nbsp;</div> </td> <td rowspan="3" style="width: 782px"><table width="98%" border="0" cellspacing="0" cellpadding="0"> <tr> <td style="h

54、eight: 2px"><img src="images/transparence.gif" width="2" height="1"></td> </tr> </table> <table width="100%" height="256" border="0" cellpadding="0" cellspacing="0"> <tr valign=&q

55、uot;top"> <td width="52%" style="height: 402px"><div align="center"> <table style="width: 402px; height: 394px"> <tr> <td style="width: 100px"> Width="188px" /> </td> <td style="width: 100px"> Width="184px" /></td> </tr> <tr> <td style="width: 100px">

溫馨提示

  • 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)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論