/// <summary>
    /// 展示数据
    /// </summary>
    /// <param name="id">记录Id</param>
    private void ShowInfo(int id)
    {
        BBackBillBB backBillBB = new BBackBillBB();
        vBBackBillData model = new vBBackBillData();

        try
        {
            model = backBillBB.GetVModel(id);

            this.lbBackBillNo.Text = model.backBillNo;
            this.lbFinanceBillNo.Text = model.financeBillNo;
            this.lbCustNo.Text = model.custNo;
            this.lbCustNm.Text = model.custNm;
            //2015-07-30 修改 物料显示的时候 放到箱子的后边
            //this.lbMaterialNo.Text = model.materialNo;
            //this.lbMaterialDesc.Text = model.materialDesc;
            this.lblcheckRemark.Text = model.checkRemark;
        }
        finally
        {
            backBillBB.Dispose();
        }
    }
    /// <summary>
    /// 展示数据
    /// </summary>
    /// <param name="id">记录Id</param>
    private void ShowInfo(int id)
    {
        BBackBillBB backBillBB = new BBackBillBB();
        vBBackBillData model = new vBBackBillData();

        try
        {
            model = backBillBB.GetVModel(id);

            this.lbBackBillNo.Text = model.backBillNo;
            this.lbFinanceBillNo.Text = model.financeBillNo;
            this.lbCustNo.Text = model.custNo;
            this.lbCustNm.Text = model.custNm;
            //this.lbMaterialNo.Text = model.materialNo;
            //this.lbMaterialDesc.Text = model.materialDesc;
            this.lblcheckRemark.Text = model.checkRemark;
            this.mark.Text = model.buyerRemark;
            //2015-07-31增加退货地址以及联系人信息
            DataTable dt = backBillBB.GetSupplierInfo("cardCode = '"+this.lbCustNo.Text.Trim()+"'");
            if (dt != null)
            {
                txtCustAddress.Text = dt.Rows[0]["CustAddress"].ToString();
                txtCustPerson.Text = dt.Rows[0]["CustLinkPerson"].ToString();
                txtPhone.Text = dt.Rows[0]["CustTel"].ToString();
                txtMobile.Text = dt.Rows[0]["CustMobile"].ToString();
            }
        }
        finally
        {
            backBillBB.Dispose();
        }
    }
示例#3
0
        /// <summary>
        /// 得到一个视图model
        /// </summary>
        /// <param name="id">主键值</param>
        /// <returns>model</returns>
        public vBBackBillData GetVModel(int id)
        {
            //2015-07-28 增加checkremark和buyerremark数据
            StringBuilder strSql = new StringBuilder();
            strSql.Append(@"select id,backBillNo,financeBillNo,custNo,materialNo,backDt,mark,isrtEmpId,isrtDt,updtEmpId,updtDt,
                            commitEmpId,commitDt,instantState,custNm,materialDesc,isrtEmpNM,updtEmpNm,commitEmpNm,instantStateDesc,checkRemark,buyerRemark from vBBackBill");
            strSql.Append(" where id = @id ");
            SqlParameter[] parameters = {
                    new SqlParameter("@id", SqlDbType.Int)
                };
            parameters[0].Value = id;

            vBBackBillData model = new vBBackBillData();
            DataSet ds = SqlHelper.ExecuteDataset(this.connection, this.transaction, CommandType.Text, strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DataRow row = ds.Tables[0].Rows[0];
                if (row["id"] != DBNull.Value)
                {
                    model.id = Convert.ToInt32(row["id"]);
                }
                if (row["backBillNo"] != DBNull.Value)
                {
                    model.backBillNo = Convert.ToString(row["backBillNo"]);
                }
                if (row["financeBillNo"] != DBNull.Value)
                {
                    model.financeBillNo = Convert.ToString(row["financeBillNo"]);
                }
                if (row["custNo"] != DBNull.Value)
                {
                    model.custNo = Convert.ToString(row["custNo"]);
                }
                if (row["materialNo"] != DBNull.Value)
                {
                    model.materialNo = Convert.ToString(row["materialNo"]);
                }
                if (row["backDt"] != DBNull.Value)
                {
                    model.backDt = Convert.ToString(row["backDt"]);
                }
                if (row["mark"] != DBNull.Value)
                {
                    model.mark = Convert.ToString(row["mark"]);
                }
                if (row["isrtEmpId"] != DBNull.Value)
                {
                    model.isrtEmpId = Convert.ToInt32(row["isrtEmpId"]);
                }
                if (row["isrtDt"] != DBNull.Value)
                {
                    model.isrtDt = Convert.ToString(row["isrtDt"]);
                }
                if (row["updtEmpId"] != DBNull.Value)
                {
                    model.updtEmpId = Convert.ToInt32(row["updtEmpId"]);
                }
                if (row["updtDt"] != DBNull.Value)
                {
                    model.updtDt = Convert.ToString(row["updtDt"]);
                }
                if (row["commitEmpId"] != DBNull.Value)
                {
                    model.commitEmpId = Convert.ToInt32(row["commitEmpId"]);
                }
                if (row["commitDt"] != DBNull.Value)
                {
                    model.commitDt = Convert.ToString(row["commitDt"]);
                }
                if (row["instantState"] != DBNull.Value)
                {
                    model.instantState = Convert.ToString(row["instantState"]);
                }
                if (row["custNm"] != DBNull.Value)
                {
                    model.custNm = Convert.ToString(row["custNm"]);
                }
                if (row["materialDesc"] != DBNull.Value)
                {
                    model.materialDesc = Convert.ToString(row["materialDesc"]);
                }
                if (row["isrtEmpNM"] != DBNull.Value)
                {
                    model.isrtEmpNM = Convert.ToString(row["isrtEmpNM"]);
                }
                if (row["updtEmpNm"] != DBNull.Value)
                {
                    model.updtEmpNm = Convert.ToString(row["updtEmpNm"]);
                }
                if (row["commitEmpNm"] != DBNull.Value)
                {
                    model.commitEmpNm = Convert.ToString(row["commitEmpNm"]);
                }
                if (row["instantStateDesc"] != DBNull.Value)
                {
                    model.instantStateDesc = Convert.ToString(row["instantStateDesc"]);
                }
                if (row["checkRemark"] != DBNull.Value)
                {
                    model.checkRemark = Convert.ToString(row["checkRemark"]);
                }
                if (row["buyerRemark"] != DBNull.Value)
                {
                    model.buyerRemark = Convert.ToString(row["buyerRemark"]);
                }
                return model;
            }
            else
            {
                return null;
            }
        }
    /// <summary>
    /// 展示数据
    /// </summary>
    /// <param name="id">记录Id</param>
    private void ShowInfo(int id)
    {
        BBackBillBB backBillBB = new BBackBillBB();
        vBBackBillData model = new vBBackBillData();

        try
        {
            model = backBillBB.GetVModel(id);

            this.lblBackBillNo.Text = model.backBillNo;
            this.lbFinanceBillNo.Text = model.financeBillNo;
            this.lblcheckRemark.Text = model.checkRemark;
            this.lblSupplier.Text = model.custNm;
            this.lblBuyerRemark.Text = model.buyerRemark;
            //获取相应的退货信息
            DataTable dt = backBillBB.GetSupplierInfo("cardCode = '" + model.custNo + "'");
            if (dt != null)
            {
                lblAddress.Text = dt.Rows[0]["CustAddress"].ToString();
                lblPerson.Text = dt.Rows[0]["CustLinkPerson"].ToString();
                lblPhone.Text = dt.Rows[0]["CustTel"].ToString();
                lblMobilePhone.Text = dt.Rows[0]["CustMobile"].ToString();
            }

            //获取相应的退货时间的信息

            DataTable dtBack = backBillBB.GetBackInfo("backBillNo = '"+model.backBillNo+"'");
            if (dtBack != null)
            {
                if (dtBack.Rows.Count > 0)
                {
                    txtDMCheckPerson.Text = dtBack.Rows[0]["madeby"].ToString();
                    txtDMWareHousePerson.Text = dtBack.Rows[0]["storeKeeper"].ToString();
                    tbStartDt.Text = dtBack.Rows[0]["backDt"].ToString();
                    txtTranportPerson.Text = dtBack.Rows[0]["driver"].ToString();
                    txtTransPortPhone.Text = dtBack.Rows[0]["driverphone"].ToString();
                    txtTransPortID.Text = dtBack.Rows[0]["vehicleNo"].ToString();
                }
            }
        }
        finally
        {
            backBillBB.Dispose();
        }
    }
示例#5
0
    /// <summary>
    /// 展示数据
    /// </summary>
    /// <param name="id">记录Id</param>
    private void ShowInfo(int id)
    {
        BBackBillBB backBillBB = new BBackBillBB();
        vBBackBillData model = new vBBackBillData();

        try
        {
            model = backBillBB.GetVModel(id);

            this.lbBackBillNo.Text = model.backBillNo;
            this.lbFinanceBillNo.Text = model.financeBillNo;
            this.lbCustNo.Text = model.custNo;
            this.lbCustNm.Text = model.custNm;
            //this.lbMaterialNo.Text = model.materialNo;
            //this.lbMaterialDesc.Text = model.materialDesc;
        }
        finally
        {
            backBillBB.Dispose();
        }
    }