protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string suigongdan = Request.QueryString["suigongdan"];//随工单号
                string PrintCount = Request.QueryString["PrintCount"];//随工单打印数量
                string orderNum = Request.QueryString["orderNum"];//订单编号
                string proType = Request.QueryString["proType"];//产品型号
                if (!string.IsNullOrEmpty(orderNum)&&!string.IsNullOrEmpty(proType))
                {
                    string strWhere = string.Format(" and orderNum='{0}' and proType='{1}' ",orderNum,proType);
                    orderDetail = ProOrdersDetailBLL.GetModelByWhere(strWhere);

                    if (orderDetail != null)
                    {
                        lblpiHao.Text = orderDetail.PiHao;
                        try
                        {
                            if (orderDetail.PlanSendTime != null && Convert.ToDateTime(orderDetail.PlanSendTime).ToString("yyyy-MM-dd") != "0001-01-01")
                            {
                                lblplanSendTime.Text = Convert.ToDateTime(orderDetail.PlanSendTime).ToString("yyyy-MM-dd");
                            }
                        }
                        catch (Exception) { }
                        lblproductAddress.Text = orderDetail.ProductAddress;
                        lblproNum.Text = orderDetail.proNum.ToString();
                        lblproType.Text = orderDetail.proType;

                        //随工单号
                        lblSuiGongDan.Text = suigongdan;
                        //随工单打印数量
                        lblPrintCount.Text = PrintCount;
                        //加载订单基本信息
                        orderMod = ProOrdersBLL.GetModel(orderDetail.orderNum);
                        if (orderMod != null)
                        {
                            txtcustomManager.Text = orderMod.customManager;
                            txtcustomNum.Text = orderMod.customNum;
                            txtcustomOrderNum.Text = orderMod.customOrderNum;
                            txtcustomWLBH.Text = orderMod.customWLBH;
                            txtheTongNum.Text = orderMod.heTongNum;
                            txtorderNum.Text = orderMod.orderNum;
                            txtremark.Text = orderMod.remark;

                            var db = new Web.Model.OrderPrintEntities();
                            var intorderDetailId = orderDetail.orderDetailId;
                            var gt_order = db.proOrders.FirstOrDefault(r => r.orderId == orderMod.orderId);
                            if (!string.IsNullOrEmpty(gt_order.发货状态))
                            {
                                lbl发货状态.Text = gt_order.发货状态;
                            }
                        }
                    }
                }
            }
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {

            if (Request.QueryString["id"] != null && Request.QueryString["id"].ToString() != "")
            {
                string orderNum = Request.QueryString["id"].ToString();
                //加载订单基本信息
                orderMod = ProOrdersBLL.GetModel(orderNum);
                if (orderMod != null)
                {
                    txtcustomManager.Text = orderMod.customManager;
                    txtcustomNum.Text = orderMod.customNum;
                    txtcustomOrderNum.Text = orderMod.customOrderNum;
                    txtcustomWLBH.Text = orderMod.customWLBH;
                    txtheTongNum.Text = orderMod.heTongNum;
                    txtorderNum.Text = orderMod.orderNum;
                    txtremark.Text = orderMod.remark;
                    txtYijiekuanMoney.Text = orderMod.YijiekuanMoney.ToString();
                    txtYikaipiaoMoney.Text = orderMod.YikaipiaoMoney.ToString();
                }
                //加载订单产品
                string strWhere = " and orderNum='" + orderNum + "'";
                DataSet ds = ProOrdersDetailBLL.GetList(strWhere);
                if (ds != null && ds.Tables[0].Rows.Count > 0)
                {
                    rptYongpin.DataSource = ds;
                    rptYongpin.DataBind();
                    txtTRLastIndex.Value = ds.Tables[0].Rows.Count.ToString();
                }
                else
                {
                    txtTRLastIndex.Value = "0";
                }
                //查看客户是否客户提供合同范本,如客户提供,打印合同按钮隐藏
                customer = CustomerManageBLL.GetcustomerByid(orderMod.customNum);
                if (customer != null)
                {
                    if (customer.IsFanben == 0)
                    {
                        IBtn_Print.Visible = false;
                    }
                    else
                    {
                        IBtn_Print.Visible = true;
                    }
                }
                //订单号、客户编号不允许修改
                txtorderNum.Enabled = false;
                txtcustomNum.Enabled = false;
            }
        }
    }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

                if (Request.QueryString["id"] != null && Request.QueryString["id"].ToString() != "")
                {
                    string orderNum = Request.QueryString["id"].ToString();
                    //加载订单基本信息
                    orderMod = ProOrdersBLL.GetModel(orderNum);
                    if (orderMod != null)
                    {
                        txtcustomManager.Text = orderMod.customManager;
                        txtcustomNum.Text = orderMod.customNum;
                        txtcustomOrderNum.Text = orderMod.customOrderNum;
                        txtcustomWLBH.Text = orderMod.customWLBH;
                        txtheTongNum.Text = orderMod.heTongNum;
                        txtorderNum.Text = orderMod.orderNum;
                        txtremark.Text = orderMod.remark;
                        txtYijiekuanMoney.Text = orderMod.YijiekuanMoney.ToString();
                        txtYikaipiaoMoney.Text = orderMod.YikaipiaoMoney.ToString();
                        txtFapiaoDanhao.Text = orderMod.FaPiaoDanhao;
                        txtChengduihao.Text = orderMod.ChengShuiHao;
                        txtRemark1.Text = orderMod.Remark1;
                    }
                    //加载订单产品
                    string strWhere = " and orderNum='" + orderNum + "'";
                    DataSet ds = ProOrdersDetailBLL.GetList(strWhere);
                    if (ds != null && ds.Tables[0].Rows.Count > 0)
                    {
                        rptYongpin.DataSource = ds;
                        rptYongpin.DataBind();

                    }

                    //除结款和开票外其他不允许修改
                    txtorderNum.Enabled = false;
                    txtcustomNum.Enabled = false;
                    txtcustomManager.Enabled = false;
                    txtcustomNum.Enabled = false;
                    txtcustomOrderNum.Enabled = false;
                    txtcustomWLBH.Enabled = false;
                    txtheTongNum.Enabled = false;
                    txtorderNum.Enabled = false;
                    txtremark.Enabled = false;
                }
            }
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {

            if (Request.QueryString["id"] != null && Request.QueryString["id"].ToString() != "")
            {
                orderDetailId = Request.QueryString["id"].ToString();
                orderDetail = ProOrdersDetailBLL.GetModel(Convert.ToInt32(orderDetailId));
                if (orderDetail != null)
                {
                    txtpiHao.Text = orderDetail.PiHao;
                    if (Convert.ToDateTime(orderDetail.PlanSendTime).ToString("yyyy-MM-dd") != "0001-01-01")
                    {
                        txtplanSendTime.Text = Convert.ToDateTime(orderDetail.PlanSendTime).ToString("yyyy-MM-dd");
                    }
                    txtproductAddress.Text = orderDetail.ProductAddress;
                    lblproNum.Text = orderDetail.proNum.ToString();
                    txtproType.Text = orderDetail.proType;
                    //if (orderDetail.withWorkNo != "")
                    //{
                    //    txtwithWorkNo.Text = orderDetail.withWorkNo;
                    //}
                    //else
                    //{
                    //    txtwithWorkNo.Text = DateTime.Now.ToString("yyyyMMddhhmmss");
                    //}
                    //随工单号
                    string date = DateTime.Now.ToString("yyyyMM");
                    string str = "";
                    if (SGDRecordBLL.GetSuigondanMax(date) != null)
                    {
                        str = SGDRecordBLL.GetSuigondanMax(date).ToString();
                    }
                    if (str == "")
                    {
                        txtwithWorkNo.Text = DateTime.Now.ToString("yyyyMMdd") + "-1";
                    }
                    else
                    {
                        txtwithWorkNo.Text = DateTime.Now.ToString("yyyyMMdd") + "-" + (Convert.ToInt32(str.Split('-')[1]) + 1);
                    }
                    //加载订单基本信息
                    orderMod = ProOrdersBLL.GetModel(orderDetail.orderNum);
                    if (orderMod != null)
                    {
                        txtcustomManager.Text = orderMod.customManager;
                        txtcustomNum.Text = orderMod.customNum;
                        txtcustomOrderNum.Text = orderMod.customOrderNum;
                        txtcustomWLBH.Text = orderMod.customWLBH;
                        txtheTongNum.Text = orderMod.heTongNum;
                        txtorderNum.Text = orderMod.orderNum;
                        txtremark.Text = orderMod.remark;

                    }

                }
            }
        }
    }
    /// <summary>
    /// 保存
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Save_Click(object sender, EventArgs e)
    {
        bool real = true;
        //修改订单基本信息
        if (Request.QueryString["id"] != null && Request.QueryString["id"].ToString() != "")
        {
            string orderNum = Request.QueryString["id"].ToString();
            //加载订单基本信息
            orderMod = ProOrdersBLL.GetModel(orderNum);
            orderMod.customManager = txtcustomManager.Text.Trim();
            orderMod.customOrderNum = txtcustomOrderNum.Text.Trim();
            orderMod.customWLBH = txtcustomWLBH.Text.Trim();
            orderMod.heTongNum = txtheTongNum.Text.Trim();
            orderMod.remark = txtremark.Text.Trim();
            orderMod.UpdateTime = DateTime.Now;
            if (txtYijiekuanMoney.Text.Trim() != "")
            {
                orderMod.YijiekuanMoney = Convert.ToDecimal(txtYijiekuanMoney.Text.Trim());
            }
            else
            {
                orderMod.YijiekuanMoney = 0;
            }
            if (txtYikaipiaoMoney.Text.Trim() != "")
            {
                orderMod.YikaipiaoMoney = Convert.ToDecimal(txtYikaipiaoMoney.Text.Trim());
            }
            else
            {
                orderMod.YikaipiaoMoney = 0;
            }
            ProOrdersBLL.Update(orderMod);
        }
        //修改订单详情

        string[] xinghao = Request.Params.GetValues("proType");
        string[] shuliang = Request.Params.GetValues("proNum");
        string[] danjia = Request.Params.GetValues("ProPrice");

        string xianyouyongpin = "";

        //原有产品的增加和修改
        for (int i = 0; i < rptYongpin.Items.Count; i++)
        {
            Label lblProType = this.rptYongpin.Items[i].FindControl("lblProType") as Label;
            TextBox txtProNum = this.rptYongpin.Items[i].FindControl("txtProNum") as TextBox;
            Label lblProPrice = this.rptYongpin.Items[i].FindControl("lblProPrice") as Label;
            HiddenField hdborderDetailId = this.rptYongpin.Items[i].FindControl("hdborderDetailId") as HiddenField;
            xianyouyongpin += lblProType.Text.Trim() + ",";

            if (txtProNum != null && txtProNum.Text.Trim() != "" && int.Parse(txtProNum.Text.Trim()) != 0)
            {
                //修改产品数量
                int Updcount = ProOrdersDetailBLL.Update(Convert.ToInt32(hdborderDetailId.Value), Convert.ToInt32(txtProNum.Text));
                if (!(Updcount > 0))
                {
                    real = false;
                }
            }
            else
            {
                //删除产品型号
                ProOrdersDetailBLL.Delete(Convert.ToInt32(hdborderDetailId.Value));
            }
        }
        //新增产品
        if (xinghao != null && xinghao.Length > 0)
        {
            for (int i = 0; i < xinghao.Length; i++)
            {
                if (shuliang[i].ToString().Trim() != "" && int.Parse(shuliang[i].ToString().Trim()) != 0)
                {
                    string xinYongpin = xinghao[i].ToString().Trim();
                    int num = 0;
                    int osid = 0;
                    if (xianyouyongpin.Contains(xinYongpin))   //如果新增产品已经存在于原有的产品中,则数量合并
                    {
                        DataSet ds = ProOrdersDetailBLL.GetList(" and proType='" + xinghao[i].Trim() + "' and orderNum='" + txtorderNum.Text.Trim() + "'");
                        if (ds != null && ds.Tables[0].Rows.Count > 0)
                        {
                            num = Convert.ToInt32(ds.Tables[0].Rows[0]["proNum"].ToString());
                            osid = Convert.ToInt32(ds.Tables[0].Rows[0]["orderDetailId"].ToString());
                            int newNUM = num + Convert.ToInt32(shuliang[i].Trim());
                            //修改产品数量
                            int Updcount = ProOrdersDetailBLL.Update(osid, newNUM);
                            if (!(Updcount > 0))
                            {
                                real = false;
                            }
                        }
                        else
                        {
                            orderDetail = new ProOrdersDetailMOD();
                            orderDetail.orderNum = txtorderNum.Text.Trim();
                            orderDetail.proNum = Convert.ToInt32(shuliang[i].Trim());
                            orderDetail.ProPrice = Convert.ToDecimal(danjia[i].Trim());
                            orderDetail.proType = xinghao[i].Trim();
                            int Addcounts = ProOrdersDetailBLL.Add(orderDetail);
                            if (!(Addcounts > 0))
                            {
                                real = false;
                            }
                        }
                    }
                    else   //直接添加
                    {
                        orderDetail = new ProOrdersDetailMOD();
                        orderDetail.orderNum = txtorderNum.Text.Trim();
                        orderDetail.proNum = Convert.ToInt32(shuliang[i].Trim());
                        orderDetail.ProPrice = Convert.ToDecimal(danjia[i].Trim());
                        orderDetail.proType = xinghao[i].Trim();
                        int Addcounts = ProOrdersDetailBLL.Add(orderDetail);
                        if (!(Addcounts > 0))
                        {
                            real = false;
                        }
                    }
                }
            }
        }
        if (real)
        {
            ScriptManager.RegisterStartupScript(Page, typeof(Page), "BGYPSQLB", "DetailsPageControl.CloseBox();alert('提交成功!');DetailsPageControl.ReflushList('orderManage/OrderManage.aspx');", true);
        }
        else
        {
            ScriptManager.RegisterStartupScript(Page, typeof(Page), "BGYPSQLB", "alert('提交失败!')", true);
        }
    }
    /// <summary>
    /// 添加
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Save_Click(object sender, ImageClickEventArgs e)
    {
        int num = 0;

        if (Int32.Parse(SqlHelper.GetSingle(string.Format("select count(1) from proOrders where orderNum='{0}'", txtcustomOrderNum.Text)).ToString()) > 0)
        {
            ScriptManager.RegisterStartupScript(Page, typeof(Page), "ListArea", "alert('" + "订单号已存在!');DetailsPageControl.CloseBox();DetailsPageControl.ReflushList('orderManage/OrderManage.aspx');", true);
            return;
        }

        if (Request.QueryString["id"] != "" && Request.QueryString["id"] != null)
        {
            int id = Convert.ToInt32(Request.QueryString["id"]);

            // num = ProductParamBLL.Updatemod(mod);
        }
        else
        {
            orderMod = new ProOrdersMOD();
            orderDetailMOD = new ProOrdersDetailMOD();
            try
            {
                //订单基本信息
                orderMod.customManager = txtcustomManager.Text.Trim();
                orderMod.customNum = txtcustomNum.Text.Trim();
                orderMod.customOrderNum = txtcustomOrderNum.Text.Trim();
                orderMod.customWLBH = "";// txtcustomWLBH.Text.Trim();
                orderMod.editTime = DateTime.Now;
                orderMod.heTongNum = txtheTongNum.Text.Trim();
                orderMod.orderNum = txtorderNum.Text.Trim();
                orderMod.remark = txtremark.Text.Trim();
                orderMod.ShuChuXianchang = "";// txtshuChuXianchang.Text.Trim();
                orderMod.ShuRuXianchang = "";// txtshuRuXianchang.Text.Trim();

                //添加订单详细

                string[] xinghao = Request.Params.GetValues("proType");
                string[] shuliang = Request.Params.GetValues("proNum");
                string[] danjia = Request.Params.GetValues("ProPrice");
                string[] wuliaobian = Request.Params.GetValues("wuliaobian");
                string errmsg = "";
                int errorCount = 0;
                //判断是否有填写产品信息
                if (xinghao.Length < 0)
                {
                    ScriptManager.RegisterStartupScript(Page, typeof(Page), "DDGL", "alert('您还没有填写产品信息!')", true);
                }
                else
                {
                    int flag = ProOrdersBLL.Add(orderMod);
                    if (flag > 0)
                    {
                        bool flag2 = true;

                        for (int i = 0; i < xinghao.Length; i++)
                        {
                            orderDetailMOD.orderNum = txtorderNum.Text.Trim();
                            if (Convert.ToInt32(shuliang[i]) > 0)
                            {
                                ProductParamMOD paramMod = ProductParamBLL.GetmodByid(txtcustomNum.Text.Trim(), xinghao[i].Trim());
                                if (paramMod != null)
                                {
                                    orderDetailMOD.proNum = Convert.ToInt32(shuliang[i].Trim());
                                    orderDetailMOD.ProPrice = Convert.ToDecimal(danjia[i].Trim());
                                    orderDetailMOD.proType = xinghao[i].Trim();
                                    //orderDetailMOD.Wuliaobian = wuliaobian[i].Trim();
                                    if (!(ProOrdersDetailBLL.Add(orderDetailMOD) > 0))
                                    {
                                        flag2 = false;
                                        break;
                                    }
                                }
                                else
                                {
                                    errmsg += xinghao[i].Trim() + ",";
                                    errorCount++;
                                }
                            }
                            else
                            {

                            }
                        }
                        if (flag2)
                        {
                            string isShow = "";
                            if (xinghao.Length - errorCount > 0)
                            {
                                DataSet ds = CustomerManageBLL.GetcustomerAll(" and customerNo='" + txtcustomNum.Text.Trim() + "'");
                                if (ds != null && ds.Tables[0].Rows.Count > 0)
                                {
                                    isShow = ds.Tables[0].Rows[0]["isFanben"].ToString();
                                }
                                if (isShow != "0")
                                {
                                    //ScriptManager.RegisterStartupScript(Page, typeof(Page), "ListArea", "DetailsPageControl.CloseBox();alert('提交成功');DetailsPageControl.ReflushList('orderManage/OrderManage.aspx');print();", true);
                                    if (errmsg == "")
                                    {
                                        ScriptManager.RegisterStartupScript(Page, typeof(Page), "ListArea", "DetailsPageControl.ReflushList('orderManage/OrderManage.aspx');", true);
                                        Response.Redirect("Contract.aspx?customerNo=" + txtcustomNum.Text.Trim() + "&orderNum=" + txtorderNum.Text.Trim());
                                    }
                                    else
                                    {
                                        ScriptManager.RegisterStartupScript(Page, typeof(Page), "ListArea", "alert('" + errmsg + "没有维护产品参数提交失败,其余添加成功!');DetailsPageControl.ReflushList('orderManage/OrderManage.aspx');print();", true);
                                        //  Response.Redirect("Contract.aspx?customerNo=" + txtcustomNum.Text.Trim() + "&orderNum=" + txtorderNum.Text.Trim());
                                    }
                                }
                                else
                                {
                                    if (errmsg == "")
                                    {
                                        ScriptManager.RegisterStartupScript(Page, typeof(Page), "ListArea", "DetailsPageControl.CloseBox();alert('提交成功');DetailsPageControl.ReflushList('orderManage/OrderManage.aspx');", true);
                                    }
                                    else
                                    {
                                        ScriptManager.RegisterStartupScript(Page, typeof(Page), "ListArea", "alert('" + errmsg + "没有维护产品参数提交失败,其余添加成功!');DetailsPageControl.CloseBox();DetailsPageControl.ReflushList('orderManage/OrderManage.aspx');", true);
                                    }
                                }
                            }
                            else
                            {
                                ProOrdersDetailBLL.Delete(txtorderNum.Text.Trim());
                                ProOrdersBLL.Delete(txtorderNum.Text.Trim());
                                ScriptManager.RegisterStartupScript(Page, typeof(Page), "BGYPSQLB", "alert('您没有要添加的型号,添加失败!')", true);
                            }
                        }
                        else
                        {
                            ProOrdersDetailBLL.Delete(txtorderNum.Text.Trim());
                            ProOrdersBLL.Delete(txtorderNum.Text.Trim());
                            ScriptManager.RegisterStartupScript(Page, typeof(Page), "BGYPSQLB", "alert('添加失败!')", true);
                        }
                    }
                    else
                    {
                        ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "BGYPSQLB", "alert('添加失败!')", true);
                    }
                }
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(Page, typeof(Page), "BGYPSQLB", "alert('添加失败!')", true);
            }
        }
    }
    /// <summary>
    /// 添加
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Save_Click(object sender, ImageClickEventArgs e)
    {
        int num = 0;

        if (Request.QueryString["id"] != "" && Request.QueryString["id"] != null)
        {
            int id = Convert.ToInt32(Request.QueryString["id"]);

            // num = ProductParamBLL.Updatemod(mod);
        }
        else
        {
            orderMod = new ProOrdersMOD();
            orderDetailMOD = new ProOrdersDetailMOD();
            try
            {
                //订单基本信息
                orderMod.customManager = txtcustomManager.Text.Trim();
                orderMod.customNum = txtcustomNum.Text.Trim();
                orderMod.customOrderNum = txtcustomOrderNum.Text.Trim();
                orderMod.customWLBH = txtcustomWLBH.Text.Trim();
                orderMod.editTime = DateTime.Now;
                orderMod.heTongNum = txtheTongNum.Text.Trim();
                orderMod.orderNum = txtorderNum.Text.Trim();
                orderMod.remark = txtremark.Text.Trim();

                //添加订单详细

                string[] xinghao = Request.Params.GetValues("proType");
                string[] shuliang = Request.Params.GetValues("proNum");
                string[] danjia = Request.Params.GetValues("ProPrice");

                //判断是否有填写产品信息
                if (xinghao.Length < 0)
                {
                    ScriptManager.RegisterStartupScript(Page, typeof(Page), "DDGL", "alert('您还没有填写产品信息!')", true);
                }
                else
                {
                    int flag = ProOrdersBLL.Add(orderMod);
                    if (flag > 0)
                    {
                        bool flag2 = true;

                        for (int i = 0; i < xinghao.Length; i++)
                        {
                            orderDetailMOD.orderNum = txtorderNum.Text.Trim();
                            if (Convert.ToInt32(shuliang[i]) > 0)
                            {
                                orderDetailMOD.proNum = Convert.ToInt32(shuliang[i].Trim());
                                orderDetailMOD.ProPrice = Convert.ToDecimal(danjia[i].Trim());
                                orderDetailMOD.proType = xinghao[i].Trim();
                                if (!(ProOrdersDetailBLL.Add(orderDetailMOD) > 0))
                                {
                                    flag2 = false;
                                    break;
                                }
                            }
                        }
                        if (flag2)
                        {
                            ScriptManager.RegisterStartupScript(Page, typeof(Page), "ListArea", "DetailsPageControl.CloseBox();alert('提交成功');DetailsPageControl.ReflushList('orderManage/OrderManage.aspx');", true);
                        }
                        else
                        {
                            ProOrdersDetailBLL.Delete(txtorderNum.Text.Trim());
                            ProOrdersBLL.Delete(txtorderNum.Text.Trim());
                            ScriptManager.RegisterStartupScript(Page, typeof(Page), "BGYPSQLB", "alert('添加失败!')", true);
                        }
                    }
                    else
                    {
                        ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "BGYPSQLB", "alert('添加失败!')", true);
                    }
                }
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(Page, typeof(Page), "BGYPSQLB", "alert('添加失败!')", true);
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {

            if (Request.QueryString["id"] != null && Request.QueryString["id"].ToString() != "")
            {
                orderDetailId = Request.QueryString["id"].ToString();
                orderDetail = ProOrdersDetailBLL.GetModel(Convert.ToInt32(orderDetailId));
                if (orderDetail != null)
                {
                    txtpiHao.Text = orderDetail.PiHao;
                    if (Convert.ToDateTime(orderDetail.PlanSendTime).ToString("yyyy-MM-dd") != "0001-01-01")
                    {
                        txtplanSendTime.Text = Convert.ToDateTime(orderDetail.PlanSendTime).ToString("yyyy-MM-dd");
                    }
                    txtproductAddress.Text = orderDetail.ProductAddress;
                    txtproNum.Text = orderDetail.proNum.ToString();
                    txtproType.Text = orderDetail.proType;
                    if (orderDetail.withWorkNo != "")
                    {
                        txtwithWorkNo.Text = orderDetail.withWorkNo;
                    }
                    else
                    {
                        txtwithWorkNo.Text = DateTime.Now.ToString("yyyyMMddhhmmss");
                    }
                    //加载订单基本信息
                    orderMod = ProOrdersBLL.GetModel(orderDetail.orderNum);
                    if (orderMod != null)
                    {
                        txtcustomManager.Text = orderMod.customManager;
                        txtcustomNum.Text = orderMod.customNum;
                        txtcustomOrderNum.Text = orderMod.customOrderNum;
                        txtcustomWLBH.Text = orderMod.customWLBH;
                        txtheTongNum.Text = orderMod.heTongNum;
                        txtorderNum.Text = orderMod.orderNum;
                        txtremark.Text = orderMod.remark;
                    }
                }
            }
        }
    }
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Save_Click(object sender, EventArgs e)
        {
            try
            {
                int num = 0;
                //修改订单基本信息
                if (Request.QueryString["id"] != null && Request.QueryString["id"].ToString() != "")
                {
                    string orderNum = Request.QueryString["id"].ToString();
                    //加载订单基本信息
                    orderMod = ProOrdersBLL.GetModel(orderNum);
                    orderMod.customManager = txtcustomManager.Text.Trim();
                    orderMod.customOrderNum = txtcustomOrderNum.Text.Trim();
                    orderMod.customWLBH = txtcustomWLBH.Text.Trim();
                    orderMod.heTongNum = txtheTongNum.Text.Trim();
                    orderMod.remark = txtremark.Text.Trim();
                    orderMod.UpdateTime = DateTime.Now;
                    orderMod.FaPiaoDanhao = txtFapiaoDanhao.Text.Trim();
                    orderMod.ChengShuiHao = txtChengduihao.Text.Trim();
                    orderMod.Remark1 = txtRemark1.Text.Trim();
                    if (txtYijiekuanMoney.Text.Trim() != "")
                    {
                        orderMod.YijiekuanMoney = Convert.ToDecimal(txtYijiekuanMoney.Text.Trim());
                    }
                    else
                    {
                        orderMod.YijiekuanMoney = 0;
                    }
                    if (txtYikaipiaoMoney.Text.Trim() != "")
                    {
                        orderMod.YikaipiaoMoney = Convert.ToDecimal(txtYikaipiaoMoney.Text.Trim());
                    }
                    else
                    {
                        orderMod.YikaipiaoMoney = 0;
                    }
                    num = ProOrdersBLL.Update(orderMod);
                }

                if (num > 0)
                {
                    ScriptManager.RegisterStartupScript(Page, typeof(Page), "BGYPSQLB", "DetailsPageControl.CloseBox();alert('提交成功!');DetailsPageControl.ReflushList('orderManage/OrderKaiPiaoManage.aspx');", true);
                }
                else
                {
                    ScriptManager.RegisterStartupScript(Page, typeof(Page), "BGYPSQLB", "alert('提交失败!')", true);
                }
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(Page, typeof(Page), "BGYPSQLB", "alert('提交失败,您输入的信息有误!')", true);
            }
        }
    /// <summary>
    /// 保存
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Save_Click(object sender, EventArgs e)
    {
        try
        {

            bool real = true;
            //修改订单基本信息
            if (Request.QueryString["id"] != null && Request.QueryString["id"].ToString() != "")
            {
                string orderNum = Request.QueryString["id"].ToString();
                //加载订单基本信息
                orderMod = ProOrdersBLL.GetModel(orderNum);
                orderMod.customManager = txtcustomManager.Text.Trim();
                orderMod.customOrderNum = txtcustomOrderNum.Text.Trim();
                orderMod.customWLBH = "";// txtcustomWLBH.Text.Trim();
                orderMod.heTongNum = txtheTongNum.Text.Trim();
                orderMod.remark = txtremark.Text.Trim();
                orderMod.UpdateTime = DateTime.Now;
                orderMod.FaPiaoDanhao = "";
                orderMod.ChengShuiHao = "";
                orderMod.Remark1 = "";
                orderMod.EditUser = UserInfo.UserId;
                orderMod.IsTiXing = 0;
                orderMod.ShuRuXianchang = "";// txtshuRuXianchang.Text.Trim();
                orderMod.ShuChuXianchang = "";// txtshuChuXianchang.Text.Trim();
                //if (txtYijiekuanMoney.Text.Trim() != "")
                //{
                //    orderMod.YijiekuanMoney = Convert.ToDecimal(txtYijiekuanMoney.Text.Trim());
                //}
                //else
                //{
                //    orderMod.YijiekuanMoney = 0;
                //}
                //if (txtYikaipiaoMoney.Text.Trim() != "")
                //{
                //    orderMod.YikaipiaoMoney = Convert.ToDecimal(txtYikaipiaoMoney.Text.Trim());
                //}
                //else
                //{
                //    orderMod.YikaipiaoMoney = 0;
                //}
                ProOrdersBLL.Update(orderMod);
            }
            //修改订单详情

            string[] xinghao = Request.Params.GetValues("proType");
            string[] shuliang = Request.Params.GetValues("proNum");
            string[] danjia = Request.Params.GetValues("ProPrice");
            string[] wuliaobian = Request.Params.GetValues("wuliaobian");

            string xianyouyongpin = "";
            string errmsg = "";
            //原有产品的增加和修改
            for (int i = 0; i < rptYongpin.Items.Count; i++)
            {
                Label lblProType = this.rptYongpin.Items[i].FindControl("lblProType") as Label;
                TextBox txtProNum = this.rptYongpin.Items[i].FindControl("txtProNum") as TextBox;
                Label lblProPrice = this.rptYongpin.Items[i].FindControl("lblProPrice") as Label;
                Label lblWuliaobian = this.rptYongpin.Items[i].FindControl("lblWuliaobian") as Label;
                HiddenField hdborderDetailId = this.rptYongpin.Items[i].FindControl("hdborderDetailId") as HiddenField;
                xianyouyongpin += lblProType.Text.Trim() + ",";

                if (txtProNum != null && txtProNum.Text.Trim() != "" && int.Parse(txtProNum.Text.Trim()) != 0)
                {
                    //修改产品数量
                    int Updcount = ProOrdersDetailBLL.Update(Convert.ToInt32(hdborderDetailId.Value), Convert.ToInt32(txtProNum.Text));
                    if (!(Updcount > 0))
                    {
                        real = false;
                    }
                }
                else
                {
                    //删除产品型号
                    ProOrdersDetailBLL.Delete(Convert.ToInt32(hdborderDetailId.Value));
                }
            }
            //新增产品

            if (xinghao != null && xinghao.Length > 0)
            {
                for (int i = 0; i < xinghao.Length; i++)
                {
                    if (shuliang[i].ToString().Trim() != "" && int.Parse(shuliang[i].ToString().Trim()) != 0)
                    {
                        ProductParamMOD paramMod = ProductParamBLL.GetmodByid(txtcustomNum.Text.Trim(), xinghao[i].Trim());
                        if (paramMod != null)
                        {
                            string xinYongpin = xinghao[i].ToString().Trim();
                            int num = 0;
                            int osid = 0;
                            if (xianyouyongpin.Contains(xinYongpin))   //如果新增产品已经存在于原有的产品中,则数量合并
                            {
                                DataSet ds = ProOrdersDetailBLL.GetList(" and proType='" + xinghao[i].Trim() + "' and orderNum='" + txtorderNum.Text.Trim() + "'");
                                if (ds != null && ds.Tables[0].Rows.Count > 0)
                                {
                                    num = Convert.ToInt32(ds.Tables[0].Rows[0]["proNum"].ToString());
                                    osid = Convert.ToInt32(ds.Tables[0].Rows[0]["orderDetailId"].ToString());
                                    int newNUM = num + Convert.ToInt32(shuliang[i].Trim());
                                    //修改产品数量
                                    int Updcount = ProOrdersDetailBLL.Update(osid, newNUM);
                                    if (!(Updcount > 0))
                                    {
                                        real = false;
                                    }
                                }
                                else
                                {
                                    orderDetail = new ProOrdersDetailMOD();
                                    orderDetail.orderNum = txtorderNum.Text.Trim();
                                    orderDetail.proNum = Convert.ToInt32(shuliang[i].Trim());
                                    orderDetail.ProPrice = Convert.ToDecimal(danjia[i].Trim());
                                    orderDetail.proType = xinghao[i].Trim();
                                    int Addcounts = ProOrdersDetailBLL.Add(orderDetail);
                                    if (!(Addcounts > 0))
                                    {
                                        real = false;
                                    }
                                }
                            }
                            else   //直接添加
                            {
                                orderDetail = new ProOrdersDetailMOD();
                                orderDetail.orderNum = txtorderNum.Text.Trim();
                                orderDetail.proNum = Convert.ToInt32(shuliang[i].Trim());
                                orderDetail.ProPrice = Convert.ToDecimal(danjia[i].Trim());
                                orderDetail.proType = xinghao[i].Trim();
                                //orderDetail.Wuliaobian = wuliaobian[i].Trim();
                                int Addcounts = ProOrdersDetailBLL.Add(orderDetail);
                                if (!(Addcounts > 0))
                                {
                                    real = false;
                                }
                            }
                        }
                        else
                        {
                            errmsg += xinghao[i] + ",";
                        }
                    }

                }
            }
            if (real)
            {
                if (errmsg == "")
                {
                    ScriptManager.RegisterStartupScript(Page, typeof(Page), "ListArea", "DetailsPageControl.ReflushList('orderManage/OrderManage.aspx');", true);

                    //   ScriptManager.RegisterStartupScript(Page, typeof(Page), "ListArea", "DetailsPageControl.ReflushList('orderManage/OrderManage.aspx');print();DetailsPageControl.CloseBox();", true);
                    Response.Redirect("Contract.aspx?customerNo=" + txtcustomNum.Text.Trim() + "&orderNum=" + txtorderNum.Text.Trim());
                }
                else
                {
                    //  ScriptManager.RegisterStartupScript(Page, typeof(Page), "ListArea", "alert(" + errmsg + "'没有维护单价提交失败,其余提交成功');", true);
                    ScriptManager.RegisterStartupScript(Page, typeof(Page), "ListArea", "alert('" + errmsg + "没有维护产品参数提交失败,其余提交成功');DetailsPageControl.ReflushList('orderManage/OrderManage.aspx');", true);
                    Response.Redirect("Contract.aspx?customerNo=" + txtcustomNum.Text.Trim() + "&orderNum=" + txtorderNum.Text.Trim());
                }
                //  ScriptManager.RegisterStartupScript(Page, typeof(Page), "BGYPSQLB", "DetailsPageControl.CloseBox();alert('提交成功!');DetailsPageControl.ReflushList('orderManage/OrderManage.aspx');", true);
            }
            else
            {
                ScriptManager.RegisterStartupScript(Page, typeof(Page), "BGYPSQLB", "alert('提交失败!')", true);
            }
        }
        catch (Exception ex)
        {
            ScriptManager.RegisterStartupScript(Page, typeof(Page), "BGYPSQLB", "alert('提交失败,您输入的信息有误!')", true);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {

            if (Request.QueryString["id"] != null && Request.QueryString["id"].ToString() != "")
            {
                string orderNum = Request.QueryString["id"].ToString();
                int id;
                if (Int32.TryParse(Request.QueryString["id"], out id))
                {
                    var db=new Web.Model.OrderPrintEntities();
                    orderNum = db.proOrders.Where(r => r.orderId == id).FirstOrDefault().orderNum;
                }

                //加载订单基本信息
                orderMod = ProOrdersBLL.GetModel(orderNum);
                if (orderMod != null)
                {
                    txtcustomManager.Text = orderMod.customManager;
                    txtcustomNum.Text = orderMod.customNum;
                    txtcustomOrderNum.Text = orderMod.customOrderNum;
                    //  txtcustomWLBH.Text = orderMod.customWLBH;
                    txtheTongNum.Text = orderMod.heTongNum;
                    txtorderNum.Text = orderMod.orderNum;
                    txtremark.Text = orderMod.remark;
                    //txtshuChuXianchang.Text = orderMod.ShuChuXianchang;
                    //txtshuRuXianchang.Text = orderMod.ShuRuXianchang;
                    //txtYijiekuanMoney.Text = orderMod.YijiekuanMoney.ToString();
                    //txtYikaipiaoMoney.Text = orderMod.YikaipiaoMoney.ToString();

                    var db = new Web.Model.OrderPrintEntities();
                    var intorderDetailId = id;
                    var gt_order = db.proOrders.FirstOrDefault(r => r.orderId == orderMod.orderId);
                    if (!string.IsNullOrEmpty(gt_order.发货状态))
                    {
                        rbl发货状态.SelectedValue = gt_order.发货状态;
                    }

                }
                //加载订单产品
                string strWhere = " and orderNum='" + orderNum + "'";
                DataSet ds = ProOrdersDetailBLL.GetList(strWhere);
                if (ds != null && ds.Tables[0].Rows.Count > 0)
                {
                    rptYongpin.DataSource = ds;
                    rptYongpin.DataBind();
                    txtTRLastIndex.Value = ds.Tables[0].Rows.Count.ToString();
                }
                else
                {
                    txtTRLastIndex.Value = "0";
                }
                //查看客户是否客户提供合同范本,如客户提供,打印合同按钮隐藏
                customer = CustomerManageBLL.GetcustomerByid(orderMod.customNum);
                if (customer != null)
                {
                    if (customer.IsFanben == 0)
                    {
                        tishi.InnerText = "本客户自己提供合同模板,请使用签订客户合同";
                        IBtn_Print.Visible = false;
                    }
                    else
                    {
                        IBtn_Print.Visible = true;
                    }
                }
                else
                {
                    IBtn_Print.Visible = true;
                }
                //订单号、客户编号不允许修改
                txtorderNum.Enabled = false;
                txtcustomNum.Enabled = false;
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //计划发货时间
            if (Request.QueryString["planTime"] != null && Request.QueryString["planTime"].ToString() != "")
            {
                lblPlanTime.Text = Request.QueryString["planTime"].ToString();
            }
            //订单号
            if (Request.QueryString["orderNum"] != null && Request.QueryString["orderNum"].ToString() != "")
            {
                 orderNum = Request.QueryString["orderNum"].ToString();
                lblOrderNUM.Text = orderNum;
                //客户特殊要求
                ordermod = ProOrdersBLL.GetModel(orderNum);
                if (ordermod != null)
                {
                    lblTeshuYaoqiu.Text = ordermod.remark;
                }
            }
            //产品型号
            if (Request.QueryString["proType"] != null && Request.QueryString["proType"].ToString() != "")
            {
                 proType = Request.QueryString["proType"].ToString();
                lblproType.Text = proType;
                if (Request.QueryString["customNum"] != null && Request.QueryString["customNum"].ToString() != "")
                {
                    //客户参数要求
                    string customNum = Request.QueryString["customNum"].ToString();
                    ProductParamMOD MOD = ProductParamBLL.GetmodByid(customNum, proType);
                    if (MOD != null)
                    {
                        lblCanshuYaoqiu.Text = MOD.ParamContent;
                    }
                }
                //绑定产品基本信息
                ProductsMOD mod = ProductsBLL.GetModel(proType);
                if (mod != null)
                {
                    txtbaoHeDian.Text = mod.baoHeDian;
                    txtbianbi.Text = mod.bian;
                    txtbiaoShiAddress.Text = mod.biaoShiAddress;
                    txtbiaoShiNo.Text = mod.biaoShiNo;
                    // imgbiaoShiPicture.ImageUrl = mod.biaoShiPicture;
                    imgWaiXingTZ.ImageUrl = mod.waiXingTZ;

                    txtcaiLiao.Text = mod.caiLiao;
                    txtchajianNo.Text = mod.chajianNo;
                    txtchujRaoXianZD.Text = mod.chujRaoXianZD;
                    txtchujTongMD.Text = mod.chujTongMD;
                    txtchujXianJing.Text = mod.chujXianJing;
                    txtchujXianTouCD.Text = mod.chujXianTouCD;
                    txtchujXiantouCL.Text = mod.chujXiantouCL;
                    txtchujZaShu.Text = mod.chujZaShu;
                    txtchuLiMethod.Text = mod.chuLiMethod;
                    txtcijRaoXianZD.Text = mod.cijRaoXianZD;
                    txtcijTongMD.Text = mod.cijTongMD;
                    txtcijXianJing.Text = mod.cijXianJing;
                    txtcijXianTouCD.Text = mod.cijXianTouCD;
                    txtcijXianTouCL.Text = mod.cijXianTouCL;
                    txtcijZaShu.Text = mod.cijZaShu;
                    txtcpjccsEquip.Text = mod.cpjccsEquip;
                    txtcpjccsFuZai.Text = mod.cpjccsFuZai;
                    txtCpjccsJiaoChaBH.Text = mod.CpjccsJiaoChaBH;
                    txtcpjccsNaiYa.Text = mod.cpjccsNaiYa;
                    txtcpjccsShuChuState.Text = mod.cpjccsShuChuState;
                    txtcpjccsShuRuState.Text = mod.cpjccsShuRuState;
                    txtcpjccsTongMD.Text = mod.cpjccsTongMD;
                    txteDingJC.Text = mod.eDingJC;
                    txtguanJiaoZhenLX.Text = mod.guanJiaoZhenLX;
                    txtguanJiaoZhenLXTOW.Text = mod.guanJiaoZhenLXTOW;
                    txtguiGe.Text = mod.guiGe;
                    txtjingDu.Text = mod.jingDu;
                    txtpeiXianSC.Text = mod.peiXianSC;
                    txtpeiXianSR.Text = mod.peiXianSR;
                    txtremark.Text = mod.remark;
                    txtshuChu.Text = mod.shuChu;
                    txtshuRu.Text = mod.shuRu;
                    txtwaiKeNo.Text = mod.waiKeNo;
                    txtxianXingdu.Text = mod.xianXingdu;
                    txtxingNeng.Text = mod.xingNeng;
                    txtxqjcyqEquip.Text = mod.xqjcyqEquip;
                    txtxqjcyqFuZai.Text = mod.xqjcyqFuZai;
                    txtxqjcyqJiaoCha.Text = mod.xqjcyqJiaoCha;
                    txtxqjcyqShuChuState.Text = mod.xqjcyqShuChuState;
                    txtxqjcyqShuRuState.Text = mod.xqjcyqShuRuState;
                    txtyongJiaoCS.Text = mod.yongJiaoCS;

                    //如果在“客户特殊要求”填写的内容里边检索到“输入线长”,“输出线长”,需要将输入线长,输出线长单元格原有的内容清除
                    if (ordermod != null)
                    {
                        if (ordermod.remark.Contains("输入线长"))
                        {
                            txtshuRuXC.Text = "";
                        }
                        else
                        {
                            txtshuRuXC.Text = mod.shuRuXC;
                        }
                        if (ordermod.remark.Contains("输出线长"))
                        {
                            txtshuChuXC.Text = "";
                        }
                        else
                        {
                            txtshuChuXC.Text = mod.shuChuXC;
                        }
                    }
                    else
                    {
                        txtshuRuXC.Text = mod.shuRuXC;
                        txtshuChuXC.Text = mod.shuChuXC;
                    }

                    //数量不打印
                    //txttieXiCount.Text = mod.tieXiCount.ToString();
                    //txtxianQuanCount.Text = mod.xianQuanCount.ToString();
                    //txtwaiKeCount.Text = mod.waiKeCount.ToString();
                    //txtchajianCount.Text = mod.chajianCount.ToString();
                    //txtpeiXianSCCount.Text = mod.peiXianSCCount.ToString();
                    //txtpeiXianSRCount.Text = mod.peiXianSRCount.ToString();
                    //txtguanJiaoZhenLXTOWCount.Text = mod.guanJiaoZhenLXTOWCount.ToString();
                    //txtguanJIaoZhenLXCount.Text = mod.guanJIaoZhenLXCount.ToString();
                }
            }
            //产品数量
            if (Request.QueryString["proNum"] != null && Request.QueryString["proNum"].ToString() != "")
            {
                string proNum = Request.QueryString["proNum"].ToString();
                lblProNUM.Text = proNum;
            }
            //批号
            if (Request.QueryString["pihao"] != null && Request.QueryString["pihao"].ToString() != "")
            {
                string pihao = Request.QueryString["pihao"].ToString();
                lblPihao.Text = pihao;
            }
        }
    }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
            //这里是判断是否已经登陆 (先加一个测试一下)
            var authCookie = Request.Cookies[ FormsAuthentication.FormsCookieName];
            if (authCookie == null)
            {  //Cookie中不存在,表示没有登陆,需要跳转到登陆页面
                Response.Redirect("/Login.aspx");
                return;
            }

            if (Request.QueryString["id"] != null && Request.QueryString["id"].ToString() != "")
            {
                orderDetailId = Request.QueryString["id"].ToString();
                orderDetail = ProOrdersDetailBLL.GetModel(Convert.ToInt32(orderDetailId));

                if (Request.QueryString["opr"] == "print")
                {
                    //
                    // 点击了“打印”
                    //
                    //
                    txtproNum.Text = Request.QueryString["txtproNum"];
                    orderDetail.PiHao = Request.QueryString["txtpiHao"];
                    try
                    {
                        orderDetail.PlanSendTime = Convert.ToDateTime(Request.QueryString["txtplanSendTime"].Trim());
                    }
                    catch (Exception) { }
                    orderDetail.ProductAddress = Request.QueryString["txtproductAddress"];
                }

                if (orderDetail != null)
                {
                    txtpiHao.Text = orderDetail.PiHao;
                    try
                    {
                        if (orderDetail.PlanSendTime != null && Convert.ToDateTime(orderDetail.PlanSendTime).ToString("yyyy-MM-dd") != "0001-01-01")
                        {
                            txtplanSendTime.Text = Convert.ToDateTime(orderDetail.PlanSendTime).ToString("yyyy-MM-dd");
                        }
                    }
                    catch (Exception) { }
                    txtproductAddress.Text = orderDetail.ProductAddress;
                    lblproNum.Text = orderDetail.proNum.ToString();
                    txtproType.Text = orderDetail.proType;

                    #region 生成随工单号

                    //随工单号
                    string date = DateTime.Now.ToString("yyyyMM");
                    string str = "";
                    if (SGDRecordBLL.GetSuigondanMax(date) != null)
                    {
                        str = SGDRecordBLL.GetSuigondanMax(date).ToString();
                    }
                    if (str == "")
                    {
                        txtwithWorkNo.Text = DateTime.Now.ToString("yyyyMMdd") + "-1-" + DateTime.Now.ToString("ffff");
                    }
                    else
                    {
                        try
                        {
                            txtwithWorkNo.Text = DateTime.Now.ToString("yyyyMMdd") + "-" + (Convert.ToInt32(str.Split('-')[1]) + 1) + "-" + DateTime.Now.ToString("ffff");
                        }
                        catch (Exception ex)
                        {
                            throw new Exception("错误的字串:" + str);
                        }
                    }
                    #endregion

                    //加载订单内容信息
                    orderMod = ProOrdersBLL.GetModel(orderDetail.orderNum);
                    if (orderMod != null)
                    {
                        txtcustomManager.Text = orderMod.customManager;
                        txtcustomNum.Text = orderMod.customNum;
                        txtcustomOrderNum.Text = orderMod.customOrderNum;
                        txtcustomWLBH.Text = orderMod.customWLBH;
                        txtheTongNum.Text = orderMod.heTongNum;
                        txtorderNum.Text = orderMod.orderNum;
                        txtremark.Text = orderMod.remark;

                        var db = new Web.Model.OrderPrintEntities();
                        var intorderDetailId = Int32.Parse(orderDetailId);
                        var gt_order = db.proOrders.FirstOrDefault(r => r.orderId == orderMod.orderId);
                        if (!string.IsNullOrEmpty(gt_order.发货状态))//发货状态显示判断
                        {
                            lbl发货状态.Text = gt_order.发货状态;
                        }
                    }

                }
            }
            }
        }