Exemple #1
0
    public void bind_date(int _id)
    {
        Cms.BLL.C_order   bll   = new Cms.BLL.C_order();
        Cms.Model.C_order model = bll.GetModel(_id);
        ordernum.InnerHtml         = model.order_num;
        updateTime.InnerHtml       = model.updateTime.ToString();
        OrderStatus.InnerHtml      = model.order_status.ToString() == "0" ? "未完单" : "已完单";
        isPayment.InnerHtml        = model.is_payment.ToString() == "0" ? "未支付" : "已支付";
        countprice.InnerHtml       = Convert.ToDecimal(model.price_sum).ToString("0.00");
        Quantity.InnerHtml         = model.quantity_sum.ToString();
        isDelivery.InnerHtml       = model.is_delivery.ToString() == "0" ? "未发货" : "已发货";
        is_receiving.InnerHtml     = model.is_receiving.ToString() == "0" ? "未收货" : "已收货";
        integral_sum.InnerHtml     = model.integral_sum.ToString();
        pay_method.InnerHtml       = model.pay_method.ToString() == "" ? "微信支付" : model.pay_method.ToString();
        shipping_method.InnerHtml  = model.shipping_method.ToString();
        note.InnerHtml             = model.note.ToString();
        recommended_code.InnerHtml = model.recommended_code.ToString();
        courierNumber.Text         = model.courier_number.ToString();
        fahuoCode.Text             = model.fahuoCode.ToString();
        fahuoMsg.Text = model.fahuoMsg.ToString();
        if (model.is_delivery == 1)
        {
            btnSubmit.Visible = false;
        }
        #region 会员信息=====================
        int            struserid = Convert.ToInt32(model.user_id);
        Cms.BLL.C_user blluser   = new Cms.BLL.C_user();
        DataSet        ds2       = blluser.GetList("id=" + struserid);
        if (ds2 != null && ds2.Tables[0].Rows.Count > 0)
        {
            UserName.InnerHtml = ds2.Tables[0].Rows[0]["username"].ToString();
            //userMoney.InnerHtml =Convert.ToDecimal(ds2.Tables[0].Rows[0]["userMoney"]).ToString("0.00");
            //userJifen.InnerHtml = ds2.Tables[0].Rows[0]["userscore"].ToString();
        }
        else
        {
            userinfo.InnerHtml = "匿名用户";
        }
        #endregion

        #region 产品信息===========================
        Cms.BLL.C_ordersub bllordersub = new Cms.BLL.C_ordersub();
        DataSet            ds1         = bllordersub.GetList("order_id=" + _id);
        if (ds1 != null && ds1.Tables[0].Rows.Count > 0)
        {
            Repeaterordersub.DataSource = ds1.Tables[0].DefaultView;
            Repeaterordersub.DataBind();
        }
        #endregion

        #region 收货信息===========================

        DataSet ds3 = new Cms.BLL.c_user_address().GetList("id=" + model.adress_id);
        if (ds3 != null && ds3.Tables[0].Rows.Count > 0)
        {
            RepAddress.DataSource = ds3.Tables[0].DefaultView;
            RepAddress.DataBind();
        }
        #endregion
    }
    public void bind_date(int _id)
    {
        Cms.BLL.C_order_integral   bll   = new Cms.BLL.C_order_integral();
        Cms.Model.C_order_integral model = bll.GetModel(_id);
        ordernum.InnerHtml    = model.order_num;
        updateTime.InnerHtml  = model.updateTime.ToString();
        OrderStatus.InnerHtml = getState(Convert.ToInt32(model.order_status));

        countprice.InnerHtml = model.price_sum.ToString();
        Quantity.InnerHtml   = model.quantity_sum.ToString();


        integral_sum.InnerHtml = model.integral_sum.ToString();

        note.InnerHtml             = model.note.ToString();
        recommended_code.InnerHtml = model.recommended_code.ToString();
        #region 会员信息=====================
        int            struserid = Convert.ToInt32(model.user_id);
        Cms.BLL.C_user blluser   = new Cms.BLL.C_user();
        DataSet        ds2       = blluser.GetList("id=" + struserid);
        if (ds2 != null && ds2.Tables[0].Rows.Count > 0)
        {
            UserName.InnerHtml  = ds2.Tables[0].Rows[0]["username"].ToString();
            userMoney.InnerHtml = Convert.ToDecimal(ds2.Tables[0].Rows[0]["userMoney"]).ToString("0.00");
            userJifen.InnerHtml = ds2.Tables[0].Rows[0]["userscore"].ToString();
        }
        else
        {
            userinfo.InnerHtml = "匿名用户";
        }
        #endregion

        #region 产品信息===========================
        Cms.BLL.C_order_integralsub bllordersub = new Cms.BLL.C_order_integralsub();
        DataSet ds1 = bllordersub.GetList("order_id=" + _id);
        if (ds1 != null && ds1.Tables[0].Rows.Count > 0)
        {
            Repeaterordersub.DataSource = ds1.Tables[0].DefaultView;
            Repeaterordersub.DataBind();
        }
        #endregion

        #region 收货信息===========================

        DataSet ds3 = new Cms.BLL.sc_stores().GetList("id=" + model.storesId);
        if (ds3 != null && ds3.Tables[0].Rows.Count > 0)
        {
            RepAddress.DataSource = ds3.Tables[0].DefaultView;
            RepAddress.DataBind();
        }
        #endregion
    }