电子商务应用开发技术课程设计论文模板.docx

上传人:b****3 文档编号:3850786 上传时间:2022-11-25 格式:DOCX 页数:21 大小:2.44MB
下载 相关 举报
电子商务应用开发技术课程设计论文模板.docx_第1页
第1页 / 共21页
电子商务应用开发技术课程设计论文模板.docx_第2页
第2页 / 共21页
电子商务应用开发技术课程设计论文模板.docx_第3页
第3页 / 共21页
电子商务应用开发技术课程设计论文模板.docx_第4页
第4页 / 共21页
电子商务应用开发技术课程设计论文模板.docx_第5页
第5页 / 共21页
点击查看更多>>
下载资源
资源描述

电子商务应用开发技术课程设计论文模板.docx

《电子商务应用开发技术课程设计论文模板.docx》由会员分享,可在线阅读,更多相关《电子商务应用开发技术课程设计论文模板.docx(21页珍藏版)》请在冰豆网上搜索。

电子商务应用开发技术课程设计论文模板.docx

电子商务应用开发技术课程设计论文模板

《电子商务应用开发技术课程设计》论文

1042803109王静娴

一、系统初步规划

该系统主要是以ASP编程技术为核心实现网上购物的功能,本系统是在管理信息系统的理论和方法指导下、数据库技术支持下完成的。

目的是实现用户注册、登录、商品浏览、商品购买、付款等流程。

内容包括:

用户的登录与注册、Table的制作、超链接的制作、大规模商品列表的制作、数据库的制作等。

建立的目标是实现用户在线多次购买不同种类的商品。

二、系统设计背景

1.背景

伴随着Internet的蓬勃发展,网上购物作为电子商务的一种形式正以其高效,低成本的优势,逐步成为新兴的经营模式和理念,人们已经不再满足网站信息浏览和发布的用途,而是渴望着能够享受网络所带来的更多的便利。

网络购物正适应了当今社会快节奏的生活,使顾客足不出户便能方便快捷轻松地选购自己喜欢的商品

2.目的

开发此网站,目的是全面掌握所学的控件、超链接及各种代码知识,全面了解电子商务的开发过程,界面追求简洁,功能力求完美。

3.必要性

因为电子商务的范围波及人们的生活、工作、学习及消费等广泛领域,其服务和管理也涉及政府、工商、金融及用户等诸多方面。

Internet逐渐在渗透到每个人的生活中,而各种业务在网络上的相继展开也在不断推动电子商务这一新兴领域的昌盛和繁荣。

这一趋势必然需要构建完善的系统支持电子商务的发展。

三、系统流程图

四、功能设计以及清单

序号

功能名称

功能详细说明

1

登录

根据用户输入的用户名和密码从数据库中的用户表中检索是否存在此用户,如果存在则进入主页,如果不存在,则登录失败。

2

快速注册

注册账号,将用户填写的用户资料存入到数据库中的用户表中,注册成功后跳转到主页

3

分类浏览商品

按照用户选择从数据库中的T_product表中分类查找并显示。

4

商品详细信息

将用户选择的产品的相关资料从T_product表中查询出来,查看某一个商品的详细信息。

5

购买

选中商品放入购物车,最终结算清单

五.数据库设计

E-R图

数据库表清单:

序号

表名

表说明

1

T_users

用于存储用户资料

2

T_cat

用于存储商品种类信息

3

T_product

用于存储商品详细资料

T_users

T_cat

T_product

六.成果展示

(1)登录页面

(1)注册页面

主要代码

usingSystem;

usingSystem.Collections;

usingSystem.Configuration;

usingSystem.Data;

usingSystem.Linq;

usingSystem.Web;

usingSystem.Web.Security;

usingSystem.Web.UI;

usingSystem.Web.UI.HtmlControls;

usingSystem.Web.UI.WebControls;

usingSystem.Web.UI.WebControls.WebParts;

usingSystem.Xml.Linq;

usingSystem.Data.SqlClient;

namespaceWebApplication3

{

publicpartialclass_Default:

System.Web.UI.Page

{

protectedvoidPage_Load(objectsender,EventArgse)

{

}

protectedvoidLinkButton1_Click(objectsender,EventArgse)

{

Panel1.Visible=false;

Panel2.Visible=true;

}

protectedvoidButton2_Click(objectsender,EventArgse)

{

SqlConnectionconn=newSqlConnection();

conn.ConnectionString=@"DataSource=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database1.mdf;IntegratedSecurity=True;UserInstance=True";

conn.Open();

SqlCommandcmd=newSqlCommand();

cmd.Connection=conn;

cmd.CommandText="Select*FromT_usersWhereusername='"+TextBox3.Text+"'";

if(cmd.ExecuteScalar()!

=null)

{

Label2.Text="该用户已被使用!

";

}

else

{

cmd.CommandText="InsertIntoT_users(username,password)Values('"+TextBox3.Text+"','"+TextBox4.Text+"')";

cmd.ExecuteNonQuery();

Session["username"]=TextBox3.Text;

ArrayListcart=newArrayList();

Session["cart"]=cart;

Response.Redirect("2.aspx");

}

conn.Dispose();

cmd.Dispose();

}

protectedvoidButton1_Click(objectsender,EventArgse)

{

SqlConnectionconn=newSqlConnection();

conn.ConnectionString=@"DataSource=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database1.mdf;IntegratedSecurity=True;UserInstance=True";

conn.Open();

SqlCommandcmd=newSqlCommand();

cmd.Connection=conn;

cmd.CommandText="Select*FromT_usersWhereusername='"+TextBox1.Text+"'ANDpassword='"+TextBox2.Text+"'";

cmd.ExecuteNonQuery();

if(cmd.ExecuteScalar()!

=null)

{

Session["username"]=TextBox1.Text;

ArrayListcart=newArrayList();

Session["cart"]=cart;

Response.Redirect("2.aspx");

}

else

{

Response.Write("登录失败!

");

}

conn.Dispose();

cmd.Dispose();

}

}

}

(3)首页

(4)商品种类页面

主要代码

usingSystem;

usingSystem.Collections;

usingSystem.Configuration;

usingSystem.Data;

usingSystem.Linq;

usingSystem.Web;

usingSystem.Web.Security;

usingSystem.Web.UI;

usingSystem.Web.UI.HtmlControls;

usingSystem.Web.UI.WebControls;

usingSystem.Web.UI.WebControls.WebParts;

usingSystem.Xml.Linq;

usingSystem.Data.SqlClient;

namespaceWebApplication3

{

publicpartialclass_41:

System.Web.UI.Page

{

protectedvoidPage_Load(objectsender,EventArgse)

{

SqlConnectionconn=newSqlConnection();

conn.ConnectionString=@"DataSource=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database1.mdf;IntegratedSecurity=True;UserInstance=True";

conn.Open();

SqlCommandcmd=conn.CreateCommand();

cmd.CommandText="select*fromT_cat";

SqlDataReaderdr=cmd.ExecuteReader();

Response.Write("商品种类名称商品种类描述");

while(dr.Read())

{

Response.Write("");

Response.Write("

catid="+dr[0]+"'>"+dr[1]+""+dr[2]+"");

Response.Write("");

}

Response.Write("");

conn.Dispose();

cmd.Dispose();

dr.Dispose();

}

}

}

(5)以生日礼物为例,点击进入生日礼物页面

主要代码

usingSystem;

usingSystem.Collections;

usingSystem.Configuration;

usingSystem.Data;

usingSystem.Linq;

usingSystem.Web;

usingSystem.Web.Security;

usingSystem.Web.UI;

usingSystem.Web.UI.HtmlControls;

usingSystem.Web.UI.WebControls;

usingSystem.Web.UI.WebControls.WebParts;

usingSystem.Xml.Linq;

usingSystem.Data.SqlClient;

namespaceWebApplication3

{

publicpartialclass_1:

System.Web.UI.Page

{

protectedvoidPage_Load(objectsender,EventArgse)

{

SqlConnectionconn=newSqlConnection();

conn.ConnectionString=@"DataSource=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database1.mdf;IntegratedSecurity=True;UserInstance=True";

conn.Open();

SqlCommandcmd=conn.CreateCommand();

cmd.CommandText="select*fromT_productwherecatid='"+Request.QueryString["catid"]+"'";

SqlDataReaderdr=cmd.ExecuteReader();

Response.Write("");

while(dr.Read())

{

Response.Write("");

for(inti=0;i

{

Response.Write(""+dr[i]+"");

}

Response.Write("

id="+dr[0]+"'><\a>");

Response.Write("");

}

Response.Write("");

conn.Dispose();

cmd.Dispose();

dr.Dispose();

}

}

}

(6)查看牛奋斗玩偶公仔的详细信息

(7)输入购买量,确认购买

主要代码

usingSystem;

usingSystem.Collections;

usingSystem.Configuration;

usingSystem.Data;

usingSystem.Linq;

usingSystem.Web;

usingSystem.Web.Security;

usingSystem.Web.UI;

usingSystem.Web.UI.HtmlControls;

usingSystem.Web.UI.WebControls;

usingSystem.Web.UI.WebControls.WebParts;

usingSystem.Xml.Linq;

usingSystem.Data.SqlClient;

namespaceWebApplication3

{

publicpartialclass_9:

System.Web.UI.Page

{

protectedvoidPage_Load(objectsender,EventArgse)

{

SqlConnectionconn=newSqlConnection();

conn.ConnectionString=@"DataSource=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database1.mdf;IntegratedSecurity=True;UserInstance=True";

conn.Open();

SqlCommandcmd=conn.CreateCommand();

cmd.CommandText="select*fromT_productwhereid='"+Request.QueryString["id"]+"'";

SqlDataReaderdr=cmd.ExecuteReader();

while(dr.Read())

{

Response.Write("商品名称:

"+dr[1]+"
");

Response.Write("商品价格:

"+dr[4]+"
");

Response.Write("商品详细介绍:

"+dr[3]+"
");

Response.Write("");

}

conn.Dispose();

cmd.Dispose();

dr.Dispose();

}

protectedvoidLinkButton1_Click(objectsender,EventArgse)

{

Response.Redirect("3.aspx");

}

protectedvoidLinkButton2_Click(objectsender,EventArgse)

{

Response.Redirect("2.aspx");

}

protectedvoidButton1_Click(objectsender,EventArgse)

{

SqlConnectionconn=newSqlConnection();

conn.ConnectionString=@"DataSource=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database1.mdf;IntegratedSecurity=True;UserInstance=True";

conn.Open();

SqlCommandcmd=conn.CreateCommand();

cmd.CommandText="select*fromT_productwhereid='"+Request.QueryString["id"]+"'";

SqlDataReaderdr=cmd.ExecuteReader();

dr.Read();

ArrayListarr1=(ArrayList)Session["cart"];

if(arr1!

=null)

{

arr1.Add(newClass1(Convert.ToInt32(dr["id"]),Convert.ToInt32(TextBox1.Text)));

Response.Write("购买成功!

查看购物车");

Session["cart"]=arr1;

}

else

{

Response.Write("请先登录再购买");

}

conn.Dispose();

cmd.Dispose();

dr.Dispose();

}

}

}

(8)查看购物车,确认付款

主要代码

usingSystem;

usingSystem.Collections;

usingSystem.Configuration;

usingSystem.Data;

usingSystem.Linq;

usingSystem.Web;

usingSystem.Web.Security;

usingSystem.Web.UI;

usingSystem.Web.UI.HtmlControls;

usingSystem.Web.UI.WebControls;

usingSystem.Web.UI.WebControls.WebParts;

usingSystem.Xml.Linq;

usingSystem.Data.SqlClient;

namespaceWebApplication3

{

publicpartialclass_10:

System.Web.UI.Page

{

protectedvoidPage_Load(objectsender,EventArgse)

{

inttotal=0;

SqlConnectionconn=newSqlConnection();

conn.ConnectionString=@"DataSource=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database1.mdf;IntegratedSecurity=True;UserInstance=True";

conn.Open();

SqlCommandcmd=conn.CreateCommand();

Response.Write("您的购物车中有以下商品:

");

ArrayListarr1=(ArrayList)Session["cart"];

Response.Write("商品名称商品价格商品数量");

foreach(Class1pinarr1)

{

Response.Write("");

cmd.CommandText="select*fromT_productwhereid='"+p.id+"'";

SqlDataReaderdr=cmd.ExecuteReader();

dr.Read();

total=total+Convert.ToInt32(dr["price"])*p.amount;

Response.Write("

id="+dr[0]+"'>"+dr[1]+""+dr["price"]+""+p.amount+"");

Response.Write("");

dr.Dispose();

}

Response.Write("总计:

"+total+"元");

Response.Write("");

conn.Dispose();

cmd.Dispose();

}

protectedvoidButton1_Click(objectsender,EventArgse)

{

Response.Redirect("15.aspx");

}

}

}

(9)确认运输及付款方式

(10)购买成功

(11)会员中心

主要代码

usingSystem;

usingSystem.Collections;

usingSystem.Configuration;

usingSystem.Data;

usingSystem.Linq;

usingSystem.Web;

usingSystem.Web.Security;

usingSystem.Web.UI;

usingSystem.Web.UI.HtmlControls;

usingSystem.Web.UI.WebControls;

usingSystem.Web.UI.WebContro

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

当前位置:首页 > 工程科技 > 能源化工

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

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