ASP.NET在线购物网站的设计(8)

来源:xiaoniu168.com 作者:本站原创 添加时间:2011-12-14 点击数:28202

计算机毕业设计订单审核功能介绍:

5.3  订单审核
此模块可以查看定购商品的用户信息,及该用户定购商品的详细信息,并对订单中的商品同意预定。此时关联用户信息表和商品信息表。

以下是引用片段:

核心代码如下:
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            //根据传递的订单编号 查询 显示订单主表内容
            DataTable tmpda = new DataTable();
            tmpda = DataBase.Get_Table("select * from hyddhz where ddbh='" + Request.QueryString["ID"].ToString() + "'");
            if (tmpda.Rows.Count > 0)
            {
                this.TextBox1.Text = tmpda.Rows[0]["ddbh"].ToString();
                this.TextBox2.Text = tmpda.Rows[0]["hydlm"].ToString();
                this.TextBox3.Text = tmpda.Rows[0]["zsl"].ToString();
                this.TextBox4.Text = tmpda.Rows[0]["zje"].ToString();
                this.TextBox15.Text = tmpda.Rows[0]["ddrq"].ToString();
            }

            //控制订单使用权限
            if (tmpda.Rows[0]["qddd"].ToString() != "")
            {
                this.Button1.Visible = false;
            }

            tmpda = DataBase.Get_Table("select * from hyxx where hydlm='" + this.TextBox2.Text.ToString() + "'");
            if (tmpda.Rows.Count > 0)
            {
                this.TextBox6.Text = tmpda.Rows[0]["ljycj"].ToString();
            }

            //显示订单明细表内容
            tmpda = DataBase.Get_Table("select * from hyddmx,spxx where hyddmx.spbh=spxx.spbh and hyddmx.ddbh='" + Request.QueryString["Id"].ToString() + "'");
            this.GridView1.DataSource = tmpda;
            this.GridView1.DataBind();
        }
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        if (Convert.ToDecimal(this.TextBox4.Text) > Convert.ToDecimal(this.TextBox6.Text))
        {
            Page.ClientScript.'该用户预付金不足,请联系!');");
            return;
        }

        //确认当前的订单信息
        DataBase.ExecSql("update hyddhz set qddd='同意预定' where ddbh='" + Request.QueryString["ID"].ToString() + "'");
        DataBase.ExecSql("update hyxx set ljycj= ljycj - " + this.TextBox4.Text + " where hydlm='" + this.TextBox2.Text.ToString() + "'");
        
    }

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

第9页为计算机毕业论文用户注册功能介绍......

【联系方式】

【本站信誉】

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