コード例 #1
0
 public void bindgr()
 {
     Model.orderdetail myorderdetail = new Model.orderdetail();
     myorderdetail.ordernum = Request.QueryString["ordernum"].ToString ();
     BLL.BLLorderupdate blll = new BLL.BLLorderupdate();
     DataSet ds = blll.bindgr(myorderdetail);
     GridView1.DataSource = ds.Tables[0];
     GridView1.DataBind();
 }
コード例 #2
0
 public void bindgr()
 {
     Model.orderdetail myorderdetail = new Model.orderdetail();
     myorderdetail.ordernum = pronum.Text;
     BLL.BLLorderupdate blll = new BLL.BLLorderupdate();
     DataSet ds = blll.bindgr(myorderdetail);
     GridView1.DataSource = ds.Tables[0];
     GridView1.DataBind();
 }
コード例 #3
0
    public void bindgr()
    {
        Model.orderdetail myorderdetail = new Model.orderdetail();
        myorderdetail.ordernum = pronum.Text;
        BLL.BLLorderupdate blll = new BLL.BLLorderupdate();
        DataSet            ds   = blll.bindgr(myorderdetail);

        GridView1.DataSource = ds.Tables[0];
        GridView1.DataBind();
    }
コード例 #4
0
    public void bindgr()
    {
        Model.orderdetail myorderdetail = new Model.orderdetail();
        myorderdetail.ordernum = Request.QueryString["_order_num"].ToString();
        BLL.BLLorderupdate blll = new BLL.BLLorderupdate();
        DataSet            ds   = blll.bindgr(myorderdetail);

        GridView1.DataSource = ds.Tables[0];
        GridView1.DataBind();
    }
コード例 #5
0
ファイル: shoplist2.aspx.cs プロジェクト: Jamehe/-
    public void bindordertable()
    {
        //ordertable数据的插入
        Model.order myorder = new Model.order();
        myorder.ordernum    = DateTime.Now.ToString("yyyyMMddhhmmssfff");
        Session["ordernum"] = myorder.ordernum;
        myorder.userid      = Convert.ToInt32(Session["_userid"]);
        myorder.buyremarks  = Server.HtmlEncode(buyremarks.Text);
        myorder.count       = Convert.ToInt32(wholeprocount.Text);
        myorder.address     = Server.HtmlEncode(address.Text);
        myorder.tel         = Server.HtmlEncode(tel.Text);
        myorder.mobile      = Server.HtmlEncode(mobile.Text);
        myorder.mail        = Server.HtmlEncode(mail.Text);
        myorder.name        = Server.HtmlEncode(receivename.Text);
        myorder.sumprice    = Convert.ToDouble(wprice.Text);
        //if (needbill.Checked)
        //{
        //    myorder.needbill = 1;
        //}
        //else
        //{
        //    myorder.needbill = 0;
        //}
        if (online.Checked)
        {
            myorder.waysgive = "在线支付";
        }
        else
        {
            myorder.waysgive = "货到付款";
        }
        Session["waysgive"]  = myorder.waysgive;
        Session["orderUser"] = myorder;
        BLL.BLLshoplist2 blll = new BLL.BLLshoplist2();
        int result            = blll.insertOrdertable(myorder);
        //ordertabldetail数据的插入
        int result2 = 0;

        for (int i = 0; i < GridView1.Rows.Count; i++)
        {
            Model.orderdetail myorderdetail = new Model.orderdetail();

            Label sumweight  = new Label();
            Label sumprice   = new Label();
            Label weight     = new Label();
            Label count      = new Label();
            Label localprice = new Label();
            Label title      = new Label();
            Label cate       = new Label();
            Label id         = new Label();
            Image img        = new Image();
            sumweight               = (Label)GridView1.Rows[i].FindControl("sumweight");
            sumprice                = (Label)GridView1.Rows[i].FindControl("sumprice");
            weight                  = (Label)GridView1.Rows[i].FindControl("weight");
            count                   = (Label)GridView1.Rows[i].FindControl("count");
            localprice              = (Label)GridView1.Rows[i].FindControl("localprice");
            title                   = (Label)GridView1.Rows[i].FindControl("title");
            img                     = (Image)GridView1.Rows[i].FindControl("img");
            cate                    = (Label)GridView1.Rows[i].FindControl("cate");
            id                      = (Label)GridView1.Rows[i].FindControl("id");
            myorderdetail.ordernum  = Session["ordernum"].ToString();
            myorderdetail.sumweight = sumweight.Text;
            myorderdetail.sumprice  = Convert.ToDouble(sumprice.Text);
            myorderdetail.weight    = weight.Text;
            myorderdetail.count     = Convert.ToInt32(count.Text);
            myorderdetail.price     = Convert.ToDouble(localprice.Text);
            myorderdetail.title     = title.Text;
            myorderdetail.proimage  = img.ImageUrl;
            myorderdetail.cate      = cate.Text;
            myorderdetail.proid     = Convert.ToInt32(id.Text);
            result2                 = blll.insertdetail(myorderdetail);
        }
        if (result > 0 && result2 > 0)
        {
            Response.Redirect("shoplist3.aspx");
        }
        else
        {
            Common.MessageAlert.Alert(Page, "提交失败!");
        }
    }
コード例 #6
0
ファイル: shoplist2.aspx.cs プロジェクト: kavilee2012/kvShop
    public void bindordertable()
    {
        //ordertable数据的插入
        Model.order myorder = new Model.order();
        myorder.ordernum = DateTime.Now.ToString("yyyyMMddhhmmssfff");
        Session["ordernum"] = myorder.ordernum;
        myorder.userid = Convert.ToInt32(Session["_userid"]);
        myorder.buyremarks =Server .HtmlEncode ( buyremarks.Text);
        myorder.count = Convert.ToInt32(wholeprocount.Text);
        myorder.address =Server .HtmlEncode ( address.Text);
        myorder.tel =Server .HtmlEncode ( tel.Text);
        myorder.mobile =Server .HtmlEncode ( mobile.Text);
        myorder.mail =Server .HtmlEncode ( mail.Text);
        myorder.name =Server .HtmlEncode ( receivename.Text);
        myorder.sumprice = Convert.ToDouble(wprice.Text);
        if (needbill.Checked)
        {
            myorder.needbill = 1;
        }
        else
        {
            myorder.needbill = 0;
        }
        if (online.Checked)
        {
            myorder.waysgive = "在线支付";
        }
        else
        {
            myorder.waysgive = "货到付款";
        }
        Session["waysgive"] = myorder.waysgive;
        BLL.BLLshoplist2 blll = new BLL.BLLshoplist2();
        int result = blll.insert(myorder);
        //ordertabldetail数据的插入
        int result2=0;
        for(int i=0;i<GridView1 .Rows .Count ;i++)
        {
        Model .orderdetail myorderdetail=new Model.orderdetail ();

        Label sumweight = new Label();
        Label sumprice = new Label();
        Label weight = new Label();
        Label count = new Label();
        Label localprice = new Label();
        Label title = new Label();
        Label size = new Label();
        Label color = new Label();
        Label cate = new Label();
        Label id=new Label();
        Image img = new Image();
        sumweight = (Label)GridView1.Rows[i].FindControl("sumweight");
        sumprice = (Label)GridView1.Rows[i].FindControl("sumprice");
        weight = (Label)GridView1.Rows[i].FindControl("weight");
        count = (Label)GridView1.Rows[i].FindControl("count");
           localprice = (Label)GridView1.Rows[i].FindControl("localprice");
        title = (Label)GridView1.Rows[i].FindControl("title");
        img = (Image)GridView1.Rows[i].FindControl("img");
        cate = (Label)GridView1.Rows[i].FindControl("cate");
        color = (Label)GridView1.Rows[i].FindControl("color");
        size = (Label)GridView1.Rows[i].FindControl("size");
        id = (Label)GridView1.Rows[i].FindControl("id");
        myorderdetail.ordernum = Session["ordernum"].ToString();
        myorderdetail.sumweight = sumweight.Text;
        myorderdetail.sumprice =Convert .ToDouble ( sumprice.Text);
        myorderdetail.weight = weight.Text;
        myorderdetail.count =Convert .ToInt32( count.Text);
        myorderdetail.price =Convert .ToDouble ( localprice.Text);
        myorderdetail.title = title.Text;
        myorderdetail.proimage = img.ImageUrl;
        myorderdetail.cate = cate.Text;
        myorderdetail.color = color.Text;
        myorderdetail.size = size.Text;
        myorderdetail.proid =Convert .ToInt32 ( id.Text);
        result2 = blll.insertdetail(myorderdetail);
        }
        if (result > 0&&result2 >0)
        {
            Response .Redirect ("shoplist3.aspx");
        }
        else
        {
            Common.MessageAlert.Alert(Page, "提交失败!");
        }
    }