您的位置:那一世范文网 > 论文中心 > 综合论文 > 正文

网上购物电子商务系统论文

综合论文范文 发布时间:2011/1/2

网上购物电子商务系统论文第3页

me,@nvchremailaddress,

@nvchrpassword)

select@intcustomerid=@@identity

proceduresp_customers_details代码如下

alterproceduresp_customers_details

(@intcustomeridint,@nvchrcustomernamenvarchar(50)output,

@nvchremailaddressnvarchar(50)output,

@nvchrpasswordnvarchar(10)output)

as

select@nvchrcustomername=customername,

@nvchremailaddress=emailaddress,@nvchrpassword=password

fromcustomerswherecustomerid=@intcustomerid

4.2.3订单处理

订单处理存储过程主要是选择、插入和更新系统数据库中的订单信息表(orders)、订购产品表(orderitems)的数据,其存储过程有

sp_orders_ins其代码如下

alterproceduresp_orders_ins

(@strcustomeridint,@dtshipdatedatetime,@intorderidintoutput)

as

insertintoorders(customerid,shippeddate)

values(@strcustomerid,@dtshipdate)

select@intorderid=@@identity

sp_orderitem_ins其代码如下

alterproceduresp_orderitem_ins

(@intorderidint,@productidnvarchar(38),@quantityint)

as

declare@unitpricemoney

select@unitprice=products.unitprice

fromproductswhereproducts.productid=@productid

insertintoorderitem(orderid,productid,quantity,unitprice)

values(@intorderid,@productid,@quantity,@unitprice)

sp_orders_sel_bycustomerid其代码如下

alterproceduresp_orders_sel_bycustomerid

(@intcustomeridint)

as

selectorders.orderid,cast(sum(orderitem.quantityorderitem.unitprice)asmoney)asgrandtotal,orders.orderdate,orders.shipdate

fromorders

innerjoinorderitemonorders.orderid=orderitem.orderid

groupbycustomerdi,orders.orderid,orders.orderdate,

orders.shipdate

havingorders.customerid=@intcustomerid

4.2.4购物车管理

购物车管理是所有表单中访问次数最多也是最频繁的,因此它涉及了较多的存储过程,这些存储过程主要是对购物车进行管理、选择和更新商品信息,这些存储过程有:

sp_shoppingcart_additem其代码如下

alterproceduresp_shoppingcart_additem

(@strcartidnvarchar(50),@strproductidchar(38),@intquantityint)

as

declare@itemscountint

select@itemscount=count(quantity)

fromshoppingcartwhereproductid=@strproductidandcartid=@strcartid

if@itemscount%26gt;0

updateshoppingcart

setquantity=(@intquantity+shoppingcart.quantity)

whereproductid=@strproductidandcartid=@strcartid

elseinsertintoshoppingcart(cartid,productid,quantity)

values(@strcartid,@strproductid,@intquantity)

sp_shoppingcart_remitem其代码如下

alterproceduresp_shoppingcart_remitem

(@strcartidnvarchar(50),@strproductidchar(38))

as

deletefromshoppingcartwhereproductid=@strproductid

andcartid=@strcartid

sp_shoppingcart_itemscount其代码如下

alterproceduresp_shoppingcart_itemscount

(@strcartidnvarchar(50))

as

selectproductidfromshoppingcartwherecartid=@strcartid

sp_shoppingcart_subtotail其代码如下

alterproceduresp_shoppingcart_subtotail

(@strcartidnvarchar(50),@totalcostmoneyoutput)

as

select@totalcost=sum(products.unitpriceshoppingcart.quantity)

fromshoppingcart,productswhereshoppingcart.cartid=@strcartid

andproducts.productid=shoppingcart.productid

sp_shoppingcart_upd其代码如下

alterproceduresp_shoppingcart_upd

(@strcartidnvarchar(50),@strproductidchar(38),@intquantityint)

as

updateshoppingcart

setquantity=@intquantity

whereproductid=@strproductid andcartid=@strcartid

sp_shoppingcart_del其代码如下

alterproceduresp_shoppingcart_del

(@strcartidnvarchar(50))

as

deleteshoppingcart

wherecartid=@strcartid

sp_shoppingcart_migrate其代码如下

alterproceduresp_shoppingcart_migrate

(@strorigioncartidnvarchar(50),@strnewcartidnvarchar(50))

as

updateshoppingcart

setcartid=@strnewcartid wherecartid=@strorigioncartid

sp_shoppingcart_itemdetails其代码如下

alterproceduresp_shoppingcart_itemdetails

(@strcartidnvarchar(50))

as

selectproducts.productid,products.sku,products.productname,

products.description,products.unitprice,shoppingcart.quantity,

cast((products.unitpriceshoppingcart.quantity)asmoney)as

etendedprice

fromproducts,shoppingcart

whereproducts.productid=shoppingcart.productid

andshoppingcart.cartid=@strcartid

数据库的基本设计已经完成。

第五章 网站设计

本系统的结构包括数据存储层、商务服务器组件及应用服务层。在应用服务层中主要采用asp.net技术来构建动态网页来支持整个面向服务对象的应用。

整个电子商务系统的网站设计是整个消费客户和商务客户进行交互的页面,服务对象通过访问网站来获得所需要的信息,该网站的设计提供以下功能:

(1)各种功能的连接。包括注册,登录,购物和查看以及结帐

(2)内容简洁明了

(3)各种商品的分类提示、商品的详细信息以及购物车信息的查询

(4)各种以往订单纪录的查询、统计和显示

在本系统中将创建3个基本的web控件,这些控件的名称和用途如图所示

web自定义控件

数据服务层的存储过程

footer

categories

header

数据库

5.1自定义web控件

5.1.1header控件

在header控件中,包括首页、登录、帐单查询、帮助和购物车5个导航连接。还提供显示网站其他信息,比如网站图标、网站名称和当前购物车中的商品数目以及费用。代码略

5.1.2cateories控件

该控件主要是通过数据绑定,将所有的商品的类别显示在该控件中,并提供查询的接口。该控件主要是在每个网页的左边显示所有的商品的种类,可以通过datalist控件的数据绑定方法来实现目的。代码略。

5.1.3footer控件

该控件采用adrotator控件(广告滚动控件),其中广告是随机产生的,当刷新页面时即更换另一个广告,这些广告存放在ml文件中,该文件用来管理这些广告播放,代码略。

5.2创建网站页面

本系统的网站所要开发的网页包括以下几个内容:

网站的首页(default.asp),在该网页中主要是显示欢迎信息以及购物须知等信息,并可以查询和浏览各种商品信息。

用户登录页面(login.asp),主要是提供已经注册的消费客户或者商务客户登陆系统,

新用户注册界面(newaccount.asp),提供新用户填写注册资料和完成注册过程。

商品类别查询页面(catalog.asp),获取用户想要查询的商品信息

商品详细信息页面(product.asp),通过数据绑定,获得商品的详细信息。

购物车页面(shoppingcart.asp),可以查询目前购物车中的商品数目以及其他统计信息。

购物车条目添加页面(additem.asp)。收集用户信息,并且更新购物车,最后重新定向到购物车的显示页面。

结帐页面(checkout.ap),提供用户查询自己的历史帐单。

以上就是这个电子商务系统所包含的所有页面和功能。

结束语

本系统从构想到功能需求以及数据库设计和实现方法,创建了一个电子商务系统,本电子商务系统最核心的部分是提供购物功能,出于安全和身份验证的需要,需要对客户进行管理,本系统提供了用户注册和登录页面。

在电子商务中最重要的就是提供个购物服务,在本系统中创建了一个网络虚拟商场,客户可以对商品进行分类浏览和详细浏览每件商品的详细信息,并把自己选中的商品存放到电子购物车中,本系统还提供了对购物车的各种操作,并提供了结帐退出系统的功能。

本系统还使用了asp.net的webservice技术,用以封装提交订单和订单查询功能。

当然本系统还有很多不足之处,对很多实际中会出现的问题还没有加以考虑,对整个系统的模型也做了很大的简化,还有网络安全方面的技术也没有涉及很多。

致 谢

参考文献

1、olliecornes崔洪斌译. asp.net入门经典 清华大学出版社-3

2、threaronwillis杨浩译.vb.net入门经典 清华大学出版社-3

3、钟永生. vb.net程序设计案例教程 冶金工业出版社 -3

4、廖信彦. asp.net交互式web数据库程序设计中国铁道出版社-10

5、张海藩. 软件工程 人民邮电出版社 -1

网上购物电子商务系统论文》由那一世范文网整理分享,版权归原作者所有,转载引用请注明网址出处。
Copyright © 2010-2018 www.nayishi.com 那一世范文网 All Rights Reserved.