📄 按id取得品牌信息.config
字号:
<root>
<LabelType>品牌类</LabelType>
<LabelIntro>
</LabelIntro>
<OutType>sin</OutType>
<LabelDataType>sql_sysquery</LabelDataType>
<attributes>
<name>producerId</name>
<datatype>supersql</datatype>
<default>1</default>
<intro>品牌名称</intro>
</attributes>
<LabelSqlString>SELECT *
FROM
PE_Trademark CT
WHERE
CT.Passed = 1 AND
CT.ProducerID = @producerId</LabelSqlString>
<LabelTemplate><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pe="labelproc" exclude-result-prefixes="pe">
<xsl:param name="outputType" />
<xsl:output method="html" />
<xsl:template match="/NewDataSet/Table">
<xsl:choose>
<xsl:when test="$outputType = 1">
<xsl:value-of select="TrademarkID"/>
</xsl:when>
<xsl:when test="$outputType = 2">
<xsl:value-of select="TrademarkName"/>
</xsl:when>
<xsl:when test="$outputType = 3">
<xsl:value-of select="TrademarkPhoto"/>
</xsl:when>
<xsl:when test="$outputType = 4">
<xsl:value-of select="ProducerID"/>
</xsl:when>
<xsl:when test="$outputType = 5">
<xsl:value-of disable-output-escaping="yes" select="TrademarkIntro"/>
</xsl:when>
<xsl:when test="$outputType = 6">
<xsl:choose>
<xsl:when test="TrademarkType=1">大陆品牌</xsl:when>
<xsl:when test="TrademarkType=2">港台品牌</xsl:when>
<xsl:when test="TrademarkType=3">日韩品牌</xsl:when>
<xsl:when test="TrademarkType=4">欧美品牌</xsl:when>
<xsl:otherwise>其他品牌</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<font style="color:red">错误的参数,无法输出指定的字段值!</font>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:transform>]]></LabelTemplate>
<EnabelAjax>False</EnabelAjax>
<IsXsltSql>false</IsXsltSql>
<IsXsltCountSql>false</IsXsltCountSql>
<attributes>
<name>outputType</name>
<datatype>supersql</datatype>
<default>1</default>
<intro>输出字段类型{品牌ID:1,名称:2,图片:3,厂商ID:4,简介:5,类型:6}</intro>
</attributes>
</root>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -