内嵌网页 --表单构建插件
金蝶云社区-assassinl10
assassinl10
5人赞赏了该文章 3,318次浏览 未经作者许可,禁止转载编辑于2017年07月14日 16:24:15

python 语言:


import clr
clr.AddReference('Kingdee.BOS')
clr.AddReference('Kingdee.BOS.Core')
clr.AddReference('Kingdee.BOS.DataEntity')
from Kingdee.BOS.Util import *
from Kingdee.BOS import LocaleValue
from Kingdee.BOS.Core.Metadata import *
from Kingdee.BOS.Core.Bill.PlugIn import *
from Kingdee.BOS.Orm.DataEntity import *
from System import *

def CreateControl (e) :
if (e.ControlAppearance.Key.Equals("FWebPanel"),StringComparison.InvariantCultureIgnoreCase):
e.Control["xtype"] = "kdwebbrowser";
e.Control["source"] ="https://123.sogou.com/";





C#


[Description("表单构建插件: 页面嵌入网页")]
public class DynamicWebFormBuilderPlugin: AbstractDynamicWebFormBuilderPlugIn
{
public override void CreateControl(CreateControlEventArgs e)
{
base.CreateControl(e);
if (e.ControlAppearance.Key.EqualsIgnoreCase("FWebPanel"))
{
//需要嵌入网页的容器
e.Control["xtype"] = "kdwebbrowser";
string url = "https://123.sogou.com/";
e.Control["source"] = url;
}
}
}