书签 分享 收藏 举报 版权申诉 / 38

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

  • 文档编号:27135881
  • 上传时间:2023-06-27
  • 格式:DOCX
  • 页数:38
  • 大小:2.05MB

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

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

举报
举报
版权申诉
版权申诉
word格式文档无特别注明外均可编辑修改;预览文档经过压缩,下载后原文更清晰! 立即下载
配套讲稿:

如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。

特殊限制:

部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。

关 键  词:
电子商务 应用 系统 网上 书店
提示  冰豆网所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
关于本文
本文标题:电子商务应用系统网上书店.docx
链接地址:https://www.bdocx.com/doc/27135881.html
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

copyright@ 2008-2022 冰点文档网站版权所有

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

收起
展开