B2C电子商务网站源代码.docx

上传人:b****6 文档编号:7260174 上传时间:2023-01-22 格式:DOCX 页数:21 大小:1.87MB
下载 相关 举报
B2C电子商务网站源代码.docx_第1页
第1页 / 共21页
B2C电子商务网站源代码.docx_第2页
第2页 / 共21页
B2C电子商务网站源代码.docx_第3页
第3页 / 共21页
B2C电子商务网站源代码.docx_第4页
第4页 / 共21页
B2C电子商务网站源代码.docx_第5页
第5页 / 共21页
点击查看更多>>
下载资源
资源描述

B2C电子商务网站源代码.docx

《B2C电子商务网站源代码.docx》由会员分享,可在线阅读,更多相关《B2C电子商务网站源代码.docx(21页珍藏版)》请在冰豆网上搜索。

B2C电子商务网站源代码.docx

B2C电子商务网站源代码

综合实训(课程设计)项目

ASP.NET

专业:

计算机应用技术课程名称:

ASP.NET

 

系部:

计算机与信息工程系班级:

091311

 

指导教师:

高祖彦完成时间:

2011-11-22

 

学生姓名:

谈锐学号:

09131120

恩施职业技术学院

学生综合实训(课程设计)评分表

学生姓名

谈锐

专业

计算机应用

班级

091311

课程名称

A

综合实训项目

(课程设计题目)

B2C

完成时间

2011-11-22

实训总结

(设计说明)

摘要

通过这次实验我自己动手用做了一个电子商务网站,在制作的过程中我学到了许多知识,为以后的工作打下良好的基础。

指导教师意见

 

指导教师签字:

年月日

综合实训

(课程设计)成绩

数据库名:

db_NetStore

表名:

sysdiagrams

1

序号

列名

数据类型

长度

小数位

标识

主键

允许空

默认值

说明

1

name

sysname

256

0

2

principal_id

int

4

0

3

diagram_id

int

4

0

4

version

int

4

0

5

definition

varbinary

MAX

0

表名:

tb_Admin

序号

列名

数据类型

长度

小数位

标识

主键

允许空

默认值

说明

1

AdminID

int

4

0

2

AdminName

varchar

50

0

3

Password

varchar

50

0

4

RealName

varchar

50

0

5

Email

varchar

50

0

6

LoadDate

datetime

8

3

getdate

表名:

tb_BookInfo

序号

列名

数据类型

长度

小数位

标识

主键

允许空

默认值

说明

1

BookID

int

4

0

2

ClassID

int

4

0

3

BookName

varchar

50

0

4

BookIntroduce

ntext

16

0

5

Author

varchar

50

0

6

Company

varchar

50

0

7

BookUrl

varchar

200

0

8

MarketPrice

float

8

0

9

HotPrice

float

8

0

10

Isrefinement

bit

1

0

11

IsHot

bit

1

0

12

IsDiscount

bit

1

0

13

LoadDate

datetime

8

3

getdate

表名:

tb_Class

序号

列名

数据类型

长度

小数位

标识

主键

允许空

默认值

说明

1

ClassID

int

4

0

2

ClassName

varchar

50

0

3

CategoryUrl

varchar

50

0

表名:

tb_Detail

序号

列名

数据类型

长度

小数位

标识

主键

允许空

默认值

说明

1

DetailID

int

4

0

2

BookID

int

4

0

3

Num

int

4

0

4

OrderID

int

4

0

5

TotailPrice

float

8

0

6

Remark

varchar

200

0

表名:

tb_Image

序号

列名

数据类型

长度

小数位

标识

主键

允许空

默认值

说明

1

ImageID

int

4

0

2

ImageName

varchar

50

0

3

ImageUrl

varchar

200

0

表名:

tb_LeaveWord

序号

列名

数据类型

长度

小数位

标识

主键

允许空

默认值

说明

1

ID

int

4

0

2

Uid

nvarchar

50

0

3

Subject

nvarchar

50

0

4

Content

ntext

16

0

5

DateTime

datetime

8

3

6

IP

nvarchar

20

0

表名:

tb_Member

序号

列名

数据类型

长度

小数位

标识

主键

允许空

默认值

说明

1

MemberID

int

4

0

2

UserName

varchar

50

0

3

Password

varchar

50

0

4

RealName

varchar

50

0

5

Sex

bit

1

0

6

Phonecode

varchar

20

0

7

Email

varchar

50

0

8

Address

varchar

200

0

9

PostCode

char

10

0

10

LoadDate

datetime

8

3

getdate

表名:

tb_OrderInfo

序号

列名

数据类型

长度

小数位

标识

主键

允许空

默认值

说明

1

OrderID

int

4

0

2

OrderDate

datetime

8

3

getdate

3

BooksFee

float

8

0

4

ShipFee

float

8

0

5

TotalPrice

float

8

0

6

ShipType

varchar

50

0

7

ReceiverName

varchar

50

0

8

ReceiverPhone

varchar

20

0

9

ReceiverPostCode

char

10

0

10

ReceiverAddress

varchar

200

0

11

ReceiverEmail

varchar

50

0

12

IsConfirm

bit

1

0

0

13

IsSend

bit

1

0

0

14

IsEnd

bit

1

0

0

15

AdminID

int

4

0

16

ConfirmTime

datetime

8

3

表名:

tb_Reply

序号

列名

数据类型

长度

小数位

标识

主键

允许空

默认值

说明

1

ID

int

4

0

2

UName

nvarchar

50

0

3

Content

ntext

16

0

4

DateTime

datetime

8

3

5

ReplyID

int

4

0

6

IP

nvarchar

20

0

usingSystem;

usingSystem.Data;

usingSystem.Configuration;

usingSystem.Web;

usingSystem.Web.Security;

usingSystem.Web.UI;

usingSystem.Web.UI.WebControls;

usingSystem.Web.UI.WebControls.WebParts;

usingSystem.Web.UI.HtmlControls;

usingSystem.Data.SqlClient;

usingSystem.Collections;

publicpartialclass_Default:

System.Web.UI.Page

{

CommonClassccObj=newCommonClass();

GoodsClassgcObj=newGoodsClass();

protectedvoidPage_Load(objectsender,EventArgse)

{

if(!

IsPostBack)

{

RefineBind();

HotBind();

DiscountBind();

}

}

//绑定市场价格

publicstringGetVarMKP(stringstrMarketPrice)

{

returnccObj.VarStr(strMarketPrice,2);

}

//绑定热卖价格

publicstringGetVarHot(stringstrHotPrice)

{

returnccObj.VarStr(strHotPrice,2);

}

protectedvoidRefineBind()

{

gcObj.DLDeplayGI(1,this.dLRefine,"Refine");

}

protectedvoidHotBind()

{

gcObj.DLDeplayGI(3,this.dlHot,"Hot");

}

protectedvoidDiscountBind()

{

gcObj.DLDeplayGI(2,this.dlDiscount,"Discount");

}

publicvoidAddressBack(DataListCommandEventArgse)

{

Session["address"]="";

Session["address"]="Default.aspx";

Response.Redirect("~/showInfo.aspx?

id="+Convert.ToInt32(e.CommandArgument.ToString()));

}

protectedvoiddLRefine_ItemCommand(objectsource,DataListCommandEventArgse)

{

if(e.CommandName=="detailSee")

{

AddressBack(e);

}

elseif(e.CommandName=="buy")

{

AddShopCart(e);

}

}

protectedvoiddlDiscount_ItemCommand(objectsource,DataListCommandEventArgse)

{

if(e.CommandName=="detailSee")

{

AddressBack(e);

}

elseif(e.CommandName=="buy")

{

AddShopCart(e);

}

}

protectedvoiddlHot_ItemCommand(objectsource,DataListCommandEventArgse)

{

if(e.CommandName=="detailSee")

{

AddressBack(e);

}

elseif(e.CommandName=="buy")

{

AddShopCart(e);

}

}

///

///向购物车中添加新商品

///

///

///获取或设置可选参数,

///该参数与关联的CommandName

///一起被传递到Command事件。

///

publicvoidAddShopCart(DataListCommandEventArgse)

{

HashtablehashCar;

if(Session["ShopCart"]==null)

{

//如果用户没有分配购物车

hashCar=newHashtable();//新生成一个

hashCar.Add(e.CommandArgument,1);//添加一个商品

Session["ShopCart"]=hashCar;//分配给用户

}

else

{

//用户已经有购物车

hashCar=(Hashtable)Session["ShopCart"];//得到购物车的hash表

if(hashCar.Contains(e.CommandArgument))//购物车中已有此商品,商品数量加1

{

intcount=Convert.ToInt32(hashCar[e.CommandArgument].ToString());//得到该商品的数量

hashCar[e.CommandArgument]=(count+1);//商品数量加1

}

else

hashCar.Add(e.CommandArgument,1);//如果没有此商品,则新添加一个项

}

}

protectedvoidButton1_Click(objectsender,EventArgse)

{

}

}

usingSystem;

usingSystem.Data;

usingSystem.Configuration;

usingSystem.Collections;

usingSystem.Web;

usingSystem.Web.Security;

usingSystem.Web.UI;

usingSystem.Web.UI.WebControls;

usingSystem.Web.UI.WebControls.WebParts;

usingSystem.Web.UI.HtmlControls;

usingSystem.Data.SqlClient;

publicpartialclassManage_Login:

System.Web.UI.Page

{

CommonClassccObj=newCommonClass();

DBClassdbObj=newDBClass();

protectedvoidPage_Load(objectsender,EventArgse)

{

if(!

IsPostBack)

{

this.labCode.Text=ccObj.RandomNum(4);//产生验证码

}

}

protectedvoidbtnLogin_Click(objectsender,EventArgse)

{

//判断用户是否已输入了必要的信息

if(this.txtAdminName.Text.Trim()==""||this.txtAdminPwd.Text.Trim()=="")

{

Response.Write(ccObj.MessageBox("登录名和密码不能为空!

"));

}

else

{

//判断用户输入的验证码是否正确

if(txtAdminCode.Text.Trim()==labCode.Text.Trim())

{

//定义一个字符串,获取用户信息

stringstrSql="select*fromtb_AdminwhereAdminName='"+this.txtAdminName.Text.Trim()+"'andPassword='"+this.txtAdminPwd.Text.Trim()+"'";

DataTabledsTable=dbObj.GetDataSetStr(strSql,"tbAdmin");

if(dsTable.Rows.Count>0)

{

Session["AID"]=Convert.ToInt32(dsTable.Rows[0][0].ToString());//保存用户ID

Session["AName"]=dsTable.Rows[0][1].ToString();//保存用户名

Response.Write("window.open('AdminIndex.aspx');window.close();");

}

else

{

Response.Write(ccObj.MessageBox("您输入的用户名或密码错误,请重新输入!

"));

}

}

else

{

Response.Write(ccObj.MessageBox("验证码输入有误,请重新输入!

"));

}

}

}

protectedvoidbtnCancel_Click(objectsender,EventArgse)

{

Response.Write("");

}

}

usingSystem;

usingSystem.Data;

usingSystem.Configuration;

usingSystem.Collections;

usingSystem.Web;

usingSystem.Web.Security;

usingSystem.Web.UI;

usingSystem.Web.UI.WebControls;

usingSystem.Web.UI.WebControls.WebParts;

usingSystem.Web.UI.HtmlControls;

usingSystem.Data.SqlClient;

publicpartialclassfeedback:

System.Web.UI.Page

{

CommonClassccObj=newCommonClass();

DBClassdbObj=newDBClass();

protectedvoidPage_Load(objectsender,EventArgse)

{

if(!

IsPostBack)

{

if(Session["UserName"]==null)

{

Response.Redirect("Default.aspx");

}

}

}

protectedvoidbtnOK_Click(objectsender,EventArgse)

{

if(Session["UserName"]==null)

{

Response.Redirect("Default.aspx");

}

else

{

stringstrSql="INSERTINTOtb_LeaveWord(Uid,Subject,Content,DateTime,IP)";

strSql+="VALUES('"+Session["UserName"].ToString()+"','"+this.txtTitle.Text+"'";

strSql+=",'"+this.FreeTextBox1.Text+"','"+DateTime.Now+"'";

strSql+=",'"+Request.UserHostAddress+"')";

dbObj.ExecNonQuery(dbObj.GetCommandStr(strSql));

Response.Write(ccObj.MessageBox("添加成功!

","Default.aspx"));

}

}

protectedvoidButton1_Click(objectsender,EventArgse)

{

this.txtTitle.Text="";

this.FreeTextBox1.Text="";

}

protectedvoidbtnBack_Click(objectsender,EventArgse)

{

Response.Redirect("Default.aspx");

}

}

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 表格模板 > 合同协议

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1