- 博客(0)
- 资源 (5)
- 收藏
- 关注
基于asp.net的购物车系统
经典的购物车系统:
关键词: Internet 网上书店开发 购书系统
开发一套网上购书系统,可以让顾客通过浏览器浏览网站售书目录,从而挑选自己满意的图书,并下订单购买。而网站后台人员需要维护网站会员信息、书籍信息以及订单信息。本系统的目的就是要开发一套既方便客户网上购书,又方便网站维护人员维护网站WEB服务系统。
用户信息显示:
protected void Button1_Click(object sender, EventArgs e)
{
Book book =new Book();
DetailsViewRowCollection rows=DetailsView1.Rows;
book.Bookname = rows[1].Cells[1].Text;
book.Bookid =(String)rows[0].Cells[1].Text;
book.Introduce = rows[8].Cells[1].Text;
CartItem item = new CartItem();
item.Book = book;
item.Quantity = Int32.Parse(TextBoxQuerty.Text);
Profile.ShoppingCart.AddItem(item);
Response.Redirect(@"~\products\CartInfor.aspx");
Labelnfor.Text ="Bookname"+ item.Book.Bookname+"<br/>数量:"+item.Quantity;
}
订单生成:
protected void Page_Load(object sender, EventArgs e)
{
ShowInfor();
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect(@"~\products\BookInforByCatalog.aspx");
}
private void ShowInfor()
{
ListBox1.Items.Clear();
CartItem[] items = Profile.ShoppingCart.GetAllItems();
for (int i = 0; i < items.Length; ++i)
{
CartItem item =items[i];
String str = String.Format("Bookname:{0} Quantity:{1}",item.Book.Bookname,item.Quantity);
ListBox1.Items.Add(str);
}
}
protected void Button3_Click(object sender, EventArgs e)
{
ListBox1.Items.Remove(ListBox1.Items[index]);
}
protected void Button4_Click(object sender, EventArgs e)
{
ListBox1.Items.Clear();
}
protected void Button2_Click(object sender, EventArgs e)
{
}
}
2010-05-24
记事本,Visual C#.NET
在Visual Studio 200上开发的C#.NET 的类似于记事本样子的,可以实现一些基本功能,要做记事本程序的可以下载下来看看,希望能帮到你们哦!!
2010-04-15
住房公积金,Visual C#.NET,Pocket PC 2003
住房公积金贷款计算器能够更方便地使用住房公积金贷款购买房屋,该软件能运行在Pockect PC上面,并采用.NET Compact Framework 2.0进行开发。公积金贷款计算分为等额本金法和等额本息法,
2010-04-15
C#+SQL 多人聊天系统
一般的多人聊天系统大多数是用线程做的,而这个是通过数据库链接的。在压缩包里还包含了我建的数据库,只要打开SQL Server,附加一下就好了。并且,是完整的!
2010-01-06
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人