这里会显示出您选择的修订版和当前版本之间的差别。
| 两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
|
faq:license2-description [2018/03/07 03:04] admin [ERP如何从新License中读取到旧的License?] |
faq:license2-description [2018/03/07 03:04] (当前版本) admin [ERP如何从新License中读取到旧的License?] |
||
|---|---|---|---|
| 行 19: | 行 19: | ||
| 1、从WebConfig的AppSettings节点中读取到属性ERP-License-ProductVersion的值。 | 1、从WebConfig的AppSettings节点中读取到属性ERP-License-ProductVersion的值。 | ||
| | | ||
| - | <code xml> | + | <code> |
| - | System.Configuration.ConfigurationManager.AppSettings["ERP-License-ProductVersion"] | + | System.Configuration.ConfigurationManager.AppSettings["ERP-License-ProductVersion"] |
| - | </code> | + | </code> |
| | | ||
| 2、在XML中使用XPath检索 | 2、在XML中使用XPath检索 | ||
| | | ||
| - | <code xml> | + | <code> |
| - | xmlDocument.SelectSingleNode("/licenseArray/licenses/license[@productVersion=\"" + ProductVersion + "\"]") | + | xmlDocument.SelectSingleNode("/licenseArray/licenses/license[@productVersion=\"" + ProductVersion + "\"]") |
| - | </code> | + | </code> |
| | | ||
| 3、上述节点的查询结果的OuterXml就是旧License的内容. | 3、上述节点的查询结果的OuterXml就是旧License的内容. | ||