网上购物系统的设计与实现源代码.doc
《网上购物系统的设计与实现源代码.doc》由会员分享,可在线阅读,更多相关《网上购物系统的设计与实现源代码.doc(59页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、精品文档,仅供学习与交流,如有侵权请联系网站删除cm.aspx(页面) 地址 邮编 电话 真实姓名 cm.aspx.csusing System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using Syste
2、m.Web.UI.WebControls.WebParts;using System.Xml.Linq;using System.Data.SqlClient;public partial class cm1 : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) class insert protected void Button1_Click(object sender, EventArgs e) DataTable dtable; string sql = ConfigurationManager
3、.ConnectionStringsCon.ConnectionString.ToString(); SqlConnection sqlb = new SqlConnection(sql); sqlb.Open(); string strt = select * from gouwuche where username= + Sessionname.ToString() + ; SqlDataAdapter sqlt = new SqlDataAdapter(strt, sqlb); DataSet ds = new DataSet(); DataRowCollection drow; sql
4、t.Fill(ds,tab); dtable = ds.Tablestab; drow = dtable.Rows; Random rnd = new Random(); long n = rnd.Next(10000, 99999); long m = rnd.Next(10000, 99999); long x = rnd.Next(10000, 99999); for (int i = 0; i drow.Count; i+) SqlCommand com = new SqlCommand(); com.Connection = sqlb; com.CommandText = inser
5、t into dingdan(id,sum,sprice,youbian,name,address,username,pho,sname,time,photo,sno)values(id,sum,sprice,youbian,name,address,username,pho,sname,time,photo,sno); com.Parameters.AddWithValue(id, n.ToString()+m.ToString()+x.ToString(); com.Parameters.AddWithValue(sum, drowi4.ToString(); com.Parameters
6、.AddWithValue(sprice, drowi3.ToString(); com.Parameters.AddWithValue(youbian, TextBox2.Text.ToString(); com.Parameters.AddWithValue(name, TextBox4.Text.ToString(); com.Parameters.AddWithValue(address, TextBox1.Text.ToString(); com.Parameters.AddWithValue(username, Sessionname.ToString(); com.Paramet
7、ers.AddWithValue(pho, TextBox3.Text.ToString(); com.Parameters.AddWithValue(sname, drowi2.ToString(); com.Parameters.AddWithValue(time, System.DateTime.Now.ToString(); com.Parameters.AddWithValue(photo, drowi5.ToString(); com.Parameters.AddWithValue(sno, drowi0.ToString(); com.ExecuteNonQuery(); Dat
8、aTable dtable2; string strt2 = select kucun from shangping where name= + drowi2.ToString() + ; SqlDataAdapter sqlf = new SqlDataAdapter(strt2, sqlb); DataSet ds2 = new DataSet(); DataRowCollection drow2; sqlf.Fill(ds, tab2); dtable2 = ds.Tablestab2; drow2 = dtable2.Rows; int a=Int32.Parse(drow200.To
9、String() - Int32.Parse(drowi4.ToString(); string strt3 = update shangping set kucun= + a.ToString() + where name= + drowi2.ToString() + ; SqlCommand upkc = new SqlCommand(strt3,sqlb); upkc.ExecuteNonQuery(); SqlCommand coms = new SqlCommand(); coms.Connection = sqlb; coms.CommandText = delete from g
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 网上 购物 系统 设计 实现 源代码
限制150内