/// <summary>
        /// 得到一个视图model
        /// </summary>
        /// <param name="id">主键值</param>
        /// <returns>model</returns>
        public vLWareLocatorData GetVModel(int id)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append(@"select id,wareLocatorNo,wareLocatorNm,wareNo,isDel,isrtEmpId,isrtDt,updtEmpId,updtDt,isrtEmpNm,updtEmpNm,
                            wareNm,isUsing,wareType,wareSortNo,maxBoxNum,isBoard,workPlatformId,isBoardDesc,workPlatformNm,downWareLocatorNo,
                            returnWareLocatorNo,downWareLocatorNm,returnWareLocatorNm,materialNo,materialDesc,U_CodeNo,wareSortNm,orderIndex from vLWareLocator");
            strSql.Append(" where id = @id ");
            SqlParameter[] parameters = {
                    new SqlParameter("@id", SqlDbType.Int)
                };
            parameters[0].Value = id;

            vLWareLocatorData model = new vLWareLocatorData();
            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["wareLocatorNo"] != DBNull.Value)
                {
                    model.wareLocatorNo = Convert.ToString(row["wareLocatorNo"]);
                }
                if (row["wareLocatorNm"] != DBNull.Value)
                {
                    model.wareLocatorNm = Convert.ToString(row["wareLocatorNm"]);
                }
                if (row["wareNo"] != DBNull.Value)
                {
                    model.wareNo = Convert.ToString(row["wareNo"]);
                }
                if (row["isDel"] != DBNull.Value)
                {
                    model.isDel = Convert.ToBoolean(row["isDel"]);
                }
                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["isrtEmpNm"] != DBNull.Value)
                {
                    model.isrtEmpNm = Convert.ToString(row["isrtEmpNm"]);
                }
                if (row["updtEmpNm"] != DBNull.Value)
                {
                    model.updtEmpNm = Convert.ToString(row["updtEmpNm"]);
                }
                if (row["wareNm"] != DBNull.Value)
                {
                    model.wareNm = Convert.ToString(row["wareNm"]);
                }
                if (row["isUsing"] != DBNull.Value)
                {
                    model.isUsing = Convert.ToBoolean(row["isUsing"]);
                }
                if (row["wareType"] != DBNull.Value)
                {
                    model.wareType = Convert.ToString(row["wareType"]);
                }
                if (row["wareSortNo"] != DBNull.Value)
                {
                    model.wareSortNo = Convert.ToString(row["wareSortNo"]);
                }
                if (row["maxBoxNum"] != DBNull.Value)
                {
                    model.maxBoxNum = Convert.ToInt32(row["maxBoxNum"]);
                }
                if (row["isBoard"] != DBNull.Value)
                {
                    model.isBoard = Convert.ToBoolean(row["isBoard"]);
                }
                if (row["workPlatformId"] != DBNull.Value)
                {
                    model.workPlatformId = Convert.ToInt32(row["workPlatformId"]);
                }
                if (row["isBoardDesc"] != DBNull.Value)
                {
                    model.isBoardDesc = Convert.ToString(row["isBoardDesc"]);
                }
                if (row["workPlatformNm"] != DBNull.Value)
                {
                    model.workPlatformNm = Convert.ToString(row["workPlatformNm"]);
                }
                if (row["downWareLocatorNo"] != DBNull.Value)
                {
                    model.downWareLocatorNo = Convert.ToString(row["downWareLocatorNo"]);
                }
                if (row["returnWareLocatorNo"] != DBNull.Value)
                {
                    model.returnWareLocatorNo = Convert.ToString(row["returnWareLocatorNo"]);
                }
                if (row["downWareLocatorNm"] != DBNull.Value)
                {
                    model.downWareLocatorNm = Convert.ToString(row["downWareLocatorNm"]);
                }
                if (row["returnWareLocatorNm"] != DBNull.Value)
                {
                    model.returnWareLocatorNm = Convert.ToString(row["returnWareLocatorNm"]);
                }
                if (row["materialNo"] != DBNull.Value)
                {
                    model.materialNo = Convert.ToString(row["materialNo"]);
                }
                if (row["materialDesc"] != DBNull.Value)
                {
                    model.materialDesc = Convert.ToString(row["materialDesc"]);
                }
                if (row["U_CodeNo"] != DBNull.Value)
                {
                    model.U_CodeNo = Convert.ToString(row["U_CodeNo"]);
                }
                if (row["wareSortNm"] != DBNull.Value)
                {
                    model.wareSortNm = Convert.ToString(row["wareSortNm"]);
                }
                if (row["orderIndex"] != DBNull.Value)
                {
                    model.orderIndex = Convert.ToInt32(row["orderIndex"]);
                }
                return model;
            }
            else
            {
                return null;
            }
        }
    /// <summary>
    /// 展示数据
    /// </summary>
    /// <param name="id">记录Id</param>
    private void ShowInfo(int id)
    {
        LWareLocatorBB wareLocatorBB = new LWareLocatorBB();
        vLWareLocatorData model = new vLWareLocatorData();
        try
        {
            model = wareLocatorBB.GetVModel(id);
            this.tbWareLocatorNo.Text = model.wareLocatorNo;
            this.tbWareLocatorNm.Text = model.wareLocatorNm;
            this.ddlWare.SelectedValue = model.wareNo;
            this.ddlIsBoard.SelectedValue = model.isBoard.ToString();

            if (model.maxBoxNum != 0)
            {
                this.tbMaxBoxNum.Text = model.maxBoxNum.ToString();
            }

            this.ddlDownWareLocator.SelectedValue = model.downWareLocatorNo;
            this.ddlReturnWareLocator.SelectedValue = model.returnWareLocatorNo;
            this.hidMaterialNo.Value = model.materialNo;
            this.textMaterialDesc.Value = model.materialDesc;
        }
        finally
        {
            wareLocatorBB.Dispose();
        }
    }