电子商务应用系统网上书店.docx

上传人:b****5 文档编号:14792029 上传时间:2023-06-27 格式:DOCX 页数:38 大小:2.05MB
下载 相关 举报
电子商务应用系统网上书店.docx_第1页
第1页 / 共38页
电子商务应用系统网上书店.docx_第2页
第2页 / 共38页
电子商务应用系统网上书店.docx_第3页
第3页 / 共38页
电子商务应用系统网上书店.docx_第4页
第4页 / 共38页
电子商务应用系统网上书店.docx_第5页
第5页 / 共38页
电子商务应用系统网上书店.docx_第6页
第6页 / 共38页
电子商务应用系统网上书店.docx_第7页
第7页 / 共38页
电子商务应用系统网上书店.docx_第8页
第8页 / 共38页
电子商务应用系统网上书店.docx_第9页
第9页 / 共38页
电子商务应用系统网上书店.docx_第10页
第10页 / 共38页
电子商务应用系统网上书店.docx_第11页
第11页 / 共38页
电子商务应用系统网上书店.docx_第12页
第12页 / 共38页
电子商务应用系统网上书店.docx_第13页
第13页 / 共38页
电子商务应用系统网上书店.docx_第14页
第14页 / 共38页
电子商务应用系统网上书店.docx_第15页
第15页 / 共38页
电子商务应用系统网上书店.docx_第16页
第16页 / 共38页
电子商务应用系统网上书店.docx_第17页
第17页 / 共38页
电子商务应用系统网上书店.docx_第18页
第18页 / 共38页
电子商务应用系统网上书店.docx_第19页
第19页 / 共38页
电子商务应用系统网上书店.docx_第20页
第20页 / 共38页
亲,该文档总共38页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

电子商务应用系统网上书店.docx

《电子商务应用系统网上书店.docx》由会员分享,可在线阅读,更多相关《电子商务应用系统网上书店.docx(38页珍藏版)》请在冰点文库上搜索。

电子商务应用系统网上书店.docx

电子商务应用系统网上书店

一、实训目的:

本实验为的实训题目,为完成实验,特别选择做电子商务应用系统——网上书店开发。

二、功能模块的描述:

1.用户管理:

用户分为几类不同,分别具有不同的使用权限。

2.用户注册:

新用户填写表单,包括用户名、e-mail地址等信息。

如果输入的用户名已经被其他用户注册使用,系统提示新用户更改自己的用户名。

3.用户登陆:

输入用户名、密码。

如果用户输入的用户名或密码有错误,系统将显示错误信息,如果登陆成功,通过session对象保留用户信息,同时用户被连接到“订购图书”的页面。

4.书目浏览:

成功登陆的用户,可以在该页面分页浏览图书书目,并将想要订购的图书提交到填写订单的页面。

如果用户直接进入该页面,或者没有成功登陆就进入该页面,将被连接到“用户登陆”的页面。

5.订购图书:

成功登陆的用户,可以在该页面订购所需要的图书,如果直接进入该页面或没有成功登陆就进入该页面,将被连接到“用户登陆”的页面。

6.查看订单:

成功登陆的用户,可以在该页面查看所订购的图书,如果直接进入该页面或没有成功登陆就进入该页面,将被连接到“用户登陆”的页面。

7.修改订单:

成功登陆的用户,可以在该页面修改或删除所订购的图书,如果直接进入该页面或没有成功登陆就进入该页面,将被连接到“用户登陆”的页面。

8.修改密码:

成功登陆的用户,可以在该页面修改自己的登陆密码,如果直接进入该页面或没有成功登陆就进入该页面,将被连接到“用户登陆”的页面。

9.修改注册信息:

成功登陆的用户,可以在该页面修改自己的注册信息,如果直接进入该页面或没有成功登陆就进入该页面,将被连接到“用户登陆”的页面。

10.设计购物车的功能。

11.开设二手市场的功能。

12.提供书籍评价和销售量排行的功能。

13.本网站包括用户访问量统计的功能。

三、数据库的设计:

四、界面设计(导航关系的设计):

主界面:

登陆界面:

注册界面:

选购图书界面:

查看详细信息界面:

购物车:

管理员修改用户信息:

修改个人信息页面:

添加商品信息:

评论页面:

五、程序流程描述:

用户登录:

用户注册:

购物车:

六、代码:

主页面代码:

//www.w3.org/1999/xhtml">

无标题页

url(images/1.jpg);">

url(images/2.jpg);width:

80%;height:

100px;left:

10%;position:

absolute;top:

10px">

LabelID="Label1"runat="server"Text="欢迎您来到丹丹购书网">

Label>

ButtonID="Button1"runat="server"Text="登陆"onclick="Button1_Click"/>

ButtonID="Button2"runat="server"Text="注册"onclick="Button2_Click"/>

ButtonID="Button3"runat="server"Text="我的店铺"onclick="Button3_Click"/>

ButtonID="Button4"runat="server"Text="购物车"onclick="Button4_Click"/>

ButtonID="Button5"runat="server"Text="修改个人信息"onclick="Button5_Click"/>



MenuID="Menu1"runat="server"BackColor="#FFFBD6"DynamicHorizontalOffset="2"

Font-Names="Verdana"Font-Size=X-LargeForeColor="#990000"

Orientation="Horizontal"StaticSubMenuIndent="10px"Height="24px"

onmenuitemclick="Menu1_MenuItemClick">

MenuItemNavigateUrl="~/index.aspx"Text="主页面"Value="主页面">

MenuItem>

MenuItemNavigateUrl="~/Sele.aspx"Text="商品列表"Value="商品列表">

MenuItem>

MenuItemNavigateUrl="~/Login.aspx"Text="注册"Value="注册">

MenuItem>

MenuItemText="注销"Value="注销">

MenuItem>

Menu>

----------------------------------------------------------------------------------------->

url('images/10.jpg');width:

40%;height:

373px;left:

10%;position:

absolute;top:

120px">

----------------------------------------------------------------------------------------->

url('images/4.gif');width:

38%;height:

374px;left:

51%;position:

absolute;top:

120px;right:

164px;">

ImageButtonID="ImageButton1"runat="server"Height="374px"

Width="509px"ImageUrl="~/images/a2d3eb80aacc7cff9023d9ae_副本.jpg"

PostBackUrl="~/Sele.aspx"/>


LabelID="Label2"runat="server"Text="Label">

Label>

----------------------------------------------------------------------------------------->

publicpartialclassindex:

System.Web.UI.Page

{

protectedvoidPage_Load(objectsender,EventArgse)

{

//Application["count"]=0;

//Application["count"]=(int)Application["count"]+1;

//Label2.Text="网站流量统计,目前总访问量:

"+Application["count"];

if(Application["y"]==null)

{Application["y"]=0;}

else

{

intx;

x=(int)Application["y"];

x++;

Application["y"]=x;

}

Label2.Text="网站流量统计,目前总访问量:

"+Application["y"];

if(Session["User_ID"]!

=null)

{

Button1.Enabled=false;

Button2.Enabled=false;

if(Session["Master_lvl"].ToString()!

="店主")

{

Button3.Enabled=false;

Label1.Text=Session["User_ID"]+"欢迎您来到丹丹购书网";

}

else

{

Label1.Text=Session["User_ID"]+"欢迎您来到丹丹购书网";

}

}

else

{

Button3.Enabled=false;

Button4.Enabled=false;

Button5.Enabled=false;

}

}

protectedvoidButton1_Click(objectsender,EventArgse)

{

Response.Redirect("login_1.aspx");

}

protectedvoidButton2_Click(objectsender,EventArgse)

{

Response.Redirect("login.aspx");

}

protectedvoidButton3_Click(objectsender,EventArgse)

{

Response.Redirect("Books_Add.aspx");

}

protectedvoidButton4_Click(objectsender,EventArgse)

{

Response.Redirect("cart.aspx");

}

protectedvoidButton5_Click(objectsender,EventArgse)

{

Response.Redirect("update.aspx");

}

 

protectedvoidMenu1_MenuItemClick(objectsender,MenuEventArgse)

{

if(Menu1.SelectedValue=="注销")

{

Session["User_ID"]="";

Session["Master_lvl"]="";

Label1.Text="欢迎您来到丹丹购书网";

Button1.Enabled=true;

Button2.Enabled=true;

Button3.Enabled=false;

Button4.Enabled=false;

Button5.Enabled=false;

}

}

}

注册页面代码:

<%@PageLanguage="C#"AutoEventWireup="true"CodeFile="Login.aspx.cs"Inherits="login_"%>

DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http:

//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

//www.w3.org/1999/xhtml">

无标题页

url('images/5.jpg');">

95px;font-size:

xx-large;font-style:

oblique;font-weight:

600;color:

Blue;">                       

   用户注册,欢迎注册丹丹购书网,成为丹丹购书的会员!

url('images/6.gif');width:

406px;height:

300px;left:

14%;position:

absolute;top:

153px;">

用户名

TextBoxID="TextBox1"runat="server">

TextBox>

ButtonID="Button3"runat="server"Text="用户名验证"onclick="Button3_Click"/>

LabelID="Label1"runat="server"Text="">

Label>

E-Mail

TextBoxID="TextBox2"runat="server">

TextBox>

RegularExpressionValidatorID="RegularExpressionValidator1"runat="server"

ControlToValidate="TextBox2"ErrorMessage="E-Mail格式不正确"

ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">

RegularExpressionValidator>

密码

TextBoxID="TextBox3"runat="server"TextMode="Password">

TextBox>

DropDownListID="DropDownList1"runat="server">

ListItemSelected="True">顾客

ListItem>

ListItem>店主

ListItem>

DropDownList>

重复密码

TextBoxID="TextBox4"runat="server"TextMode="Password">

TextBox>

CompareValidatorID="CompareValidator1"runat="server"

ControlToCompare="TextBox3"ControlToValidate="TextBox4"

ErrorMessage="两次输入密码不一致">

CompareValidator>

ButtonID="Button1"runat="server"Text="确定"onclick="Button1_Click"/>

ButtonID="Button2"runat="server"Text="重置"onclick="Button2_Click"/>

publicpartialclasslogin_:

System.Web.UI.Page

{

protectedvoidButton1_Click(objectsender,EventArgse)

{

stringsql_Str="selectUser_NamefromDb_UserwhereUser_Name='"+TextBox1.Text+"'";

if(Db.seleSQL(sql_Str)>0)

{

Response.Write("");

}

if((CompareValidator1.IsValid==true)&(TextBox1.Text!

=null)&(Db.seleSQL(sql_Str)==0)&(RegularExpressionValidator1.IsValid==true))

{

Response.Write("");

stringcmd_Str="insertintoDb_User(User_Name,E_mail,User_Pwd,Master_lvl,Credit)values('"+TextBox1.Text+"','"+TextBox2.Text+"','"+TextBox3.Text+"','"+DropDownList1.SelectedValue+"','0')";

Db.execSQL(cmd_Str);

Response.Redirect("index.aspx");

}

else

{

Response.Write("");

}

}

protectedvoidButton3_Click(objectsender,EventArgse)

{

stringsql_Str="selectUser_NamefromDb_UserwhereUser_Name='"+TextBox1.Text+"'";

if(Db.seleSQL(sql_Str)>0)

{Label1.Text="用户名已注册";}

else

{Label1.Text="用户名可以注册";}

}

protectedvoidButton2_Click(objectsender,EventArgse)

{Response.Redirect("Login.aspx");}

}

登陆页面:

<%@PageLanguage="C#"AutoEventWireup="true"CodeFile="Login_1.aspx.cs"Inherits="Login_1"%>

DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http:

//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

//www.w3.org/1999/xhtml">

无标题页

url('images/5.jpg');">

95px;font-size:

xx-large;font-style:

oblique;font-weight:

600;color:

Blue;">                       

   用户登陆

url('images/6.gif');width:

220px;height:

90px;left:

17%;position:

absolute;top:

153px;">

221px">

LabelID="Label1"runat="server"Text="用户名">

Labe

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

当前位置:首页 > 农林牧渔 > 林学

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2