ASP.NET手机销售电子商务网站(10)

来源:xiaoniu168.com 作者:本站原创 添加时间:2011-11-25 点击数:27398

计算机毕业设计购物车功能介绍:

(2)购物车
此模块显示已经选择完但未生成订单的手机信息列表,显示此次购物的总数量和总金额。可以对其生成定单,删除操作。如图:
计算机毕业论文

以下是引用片段:

其关键代码如下:
  if (!Page.IsPostBack)
        {
            //调用函数
            initDg();
        }
    }

    private void initDg()
    {
        //将购物车的当前人员的数据显示在当前列表中
        DataTable tmpda = new DataTable();
        tmpda = DataBase.Get_Table("select * from GWC,SMXX where GWC.smbh=SMXX.smbh and Gwc.kh='" + Session["UserID"].ToString() + "'");
        this.GridView1.DataSource = tmpda;
        this.GridView1.DataBind();
        //从数据库中计算出购物车中当前人员的总数量和总金额
        tmpda = DataBase.Get_Table("select sum(gwc.Sl),sum(gwc.sl * SMXX.smjg) from GWC,SMXX where GWC.smbh=SMXX.smbh and  Gwc.kh='" + Session["UserID"].ToString() + "'");
        if (tmpda.Rows.Count > 0)
        {
            this.Label1.Text = tmpda.Rows[0][0].ToString();
            this.Label2.Text = tmpda.Rows[0][1].ToString();
        }
    }

〖资料来源:计算机毕业论文 www.xiaoniu168.com

第11页为计算机毕业论文关键技术介绍......

【联系方式】

【本站信誉】

用心做计算机毕业设计论文网