/// <summary>
    /// 显示销售备货单信息
    /// </summary>
    private void ShowStockUpBillInfo()
    {
        CStockUpBillBB stockUpBillBB = new CStockUpBillBB();
        CStockUpDetailBB stockUpDetailBB = new CStockUpDetailBB();
        CSaleDetailBB saleDetailBB = new CSaleDetailBB();

        try
        {
            vCStockUpBillData stockUpBillModel = stockUpBillBB.GetVModel(this.IdValue);
            string strSaleBillNos = "", strAbsEntrys = "", strLineNums = "", strWhere = "1=1";
            DataSet ds = new DataSet();

            this.stockUpBillNo.Text = stockUpBillModel.stockUpBillNo;
            this.shippingMarkNo.Text = stockUpBillModel.shippingMarkNo;
            this.hidCustNo.Value = stockUpBillModel.custNo;//客户编号
            this.lblCustNm.Text = stockUpBillModel.custNm;
            this.invoiceNo.Text = stockUpBillModel.invoiceNo;
            this.empNm.Text = stockUpBillModel.stockUpEmpNm;
            this.mark.Text = stockUpBillModel.mark;
            this.outBillDate.Text = Convert.ToDateTime(stockUpBillModel.outStockDt).ToString("yyyy-MM-dd");

            strSaleBillNos = "'" + stockUpBillModel.saleBillNos.Replace(",", "','") + "'";//销售订单编号组合
            strAbsEntrys = "'" + stockUpBillModel.absEntrys.Replace(",", "','") + "'";//提货单编号组合
            strLineNums = "'" + stockUpBillModel.lineNums.Replace(",", "','") + "'";//行号组合

            //绑定销售订单明细列表
            string[] saleBillNoArray = strSaleBillNos.Split(',');
            string[] absEntryArray = strAbsEntrys.Split(',');
            string[] lineNumArray = strLineNums.Split(',');

            strWhere += " and (";

            for (int i = 0; i < saleBillNoArray.Length; i++)
            {
                if (i == 0)
                {
                    strWhere += " (absEntry=" + absEntryArray[i] + " and saleBillNo=" + saleBillNoArray[i]
                        + " and lineNum=" + lineNumArray[i] + ")";
                }
                else
                {
                    strWhere += " or (absEntry=" + absEntryArray[i] + " and saleBillNo=" + saleBillNoArray[i]
                        + " and lineNum=" + lineNumArray[i] + ")";
                }
            }

            strWhere += ")";

            ds = saleDetailBB.GetVList(strWhere);

            this.gridSaleBill.DataSource = ds;
            this.gridSaleBill.DataBind();

            //绑定备货单明细列表
            ds = stockUpDetailBB.GetVList("stockUpBillNo='" + stockUpBillModel.stockUpBillNo + "'");
            this.gridStockUpDetail.DataSource = ds;
            this.gridStockUpDetail.DataBind();
        }
        finally
        {
            stockUpBillBB.Dispose();
            stockUpDetailBB.Dispose();
            saleDetailBB.Dispose();
        }
    }
    /// <summary>
    /// 显示备货单信息
    /// </summary>
    private void ShowInfo()
    {
        CStockUpBillBB stockUpBillBB = new CStockUpBillBB();
        LCustBB custBB = new LCustBB();
        CSaleDetailBB saleDetailBB = new CSaleDetailBB();

        try
        {
            string strCustNo = Request.QueryString["custNo"];
            string strSaleBillNos = Request.QueryString["saleBillNos"];//销售订单号
            string strAbsEntrys = Request.QueryString["absEntrys"];//提货单号
            string strFinanceBillNos = Request.QueryString["financeBillNos"];//采购合同号组合
            string strLineNums = Request.QueryString["lineNums"];//行号组合
            string strWhere = "1=1";
            DataSet ds = new DataSet();

            if (Request.Params["id"] != null && Request.Params["id"] != "")
            {
                this.IdValue = Convert.ToInt32(Request.Params["id"]);
                vCStockUpBillData stockUpBillModel = stockUpBillBB.GetVModel(this.IdValue);

                this.StockBillNo = stockUpBillModel.stockUpBillNo;
                this.stockUpBillNo.Text = stockUpBillModel.stockUpBillNo;
                this.shippingMarkNo.Text = stockUpBillModel.shippingMarkNo;
                this.lblCustNm.Text = stockUpBillModel.custNm;
                this.invoiceNo.Text = stockUpBillModel.invoiceNo;
                this.txtstockEmpNm.Text = stockUpBillModel.stockUpEmpNm;
                this.empId.Value = stockUpBillModel.stockUpEmpId.ToString();

                strSaleBillNos = "'" + stockUpBillModel.saleBillNos.Replace(",", "','") + "'";//销售订单编号组合
                strAbsEntrys = "'" + stockUpBillModel.absEntrys.Replace(",", "','") + "'";//提货单编号组合
                strLineNums = "'" + stockUpBillModel.lineNums.Replace(",", "','") + "'";//行号组合

                if (stockUpBillModel.financeBillNos != "")//采购合同号组合
                {
                    strFinanceBillNos = "'" + stockUpBillModel.financeBillNos.Replace(",", "','") + "'";
                }

                this.mark.Text = stockUpBillModel.mark;
                this.outStockDt.Text = Convert.ToDateTime(stockUpBillModel.outStockDt).ToString("yyyy-MM-dd");
            }
            else
            {
                if (strCustNo == null || strCustNo == "")
                {
                    return;
                }

                DataSet dsCust = custBB.GetList(" custNo ='" + strCustNo.Trim() + "'");

                if (dsCust != null && dsCust.Tables[0] != null && dsCust.Tables[0].Rows.Count > 0)
                {
                    this.stockUpBillNo.Text = stockUpBillBB.GetCurrentInBillNoByStockUpBillNo();
                    this.StockBillNo = this.stockUpBillNo.Text;
                    this.CustomNo = strCustNo;
                    this.shippingMarkNo.Text = dsCust.Tables[0].Rows[0]["shippingMark"].ToString();
                    this.lblCustNm.Text = dsCust.Tables[0].Rows[0]["custNm"].ToString();
                }
            }

            //绑定销售订单明细列表
            string[] saleBillNoArray = strSaleBillNos.Split(',');
            string[] absEntryArray = strAbsEntrys.Split(',');
            string[] lineNumArray = strLineNums.Split(',');

            strWhere += " and (";

            for (int i = 0; i < saleBillNoArray.Length; i++)
            {
                if (i == 0)
                {
                    strWhere += " (absEntry=" + absEntryArray[i] + " and saleBillNo=" + saleBillNoArray[i]
                        + " and lineNum=" + lineNumArray[i] + ")";
                }
                else
                {
                    strWhere += " or (absEntry=" + absEntryArray[i] + " and saleBillNo=" + saleBillNoArray[i]
                        + " and lineNum=" + lineNumArray[i] + ")";
                }
            }

            strWhere += ")";

            ds = saleDetailBB.GetVList(strWhere);

            //ds = saleDetailBB.GetVList(" saleBillNo in (" + strSaleBillNos
            //    + ") and absEntry in (" + strAbsEntrys + ") and lineNum in (" + strLineNums + ")");

            this.DtSaleList = ds.Tables[0];
        }
        finally
        {
            stockUpBillBB.Dispose();
            custBB.Dispose();
            saleDetailBB.Dispose();
        }
    }