|
|
|
|
using BP.En;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace BP.CCFast.Portal.WindowExt
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 信息块
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class HtmlVar : EntityNoName
|
|
|
|
|
{
|
|
|
|
|
#region 权限控制.
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 控制权限
|
|
|
|
|
/// </summary>
|
|
|
|
|
public override UAC HisUAC
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
UAC uac = new UAC();
|
|
|
|
|
if (BP.Web.WebUser.IsAdmin == true)
|
|
|
|
|
uac.OpenAll();
|
|
|
|
|
else
|
|
|
|
|
uac.IsView = false;
|
|
|
|
|
|
|
|
|
|
uac.IsInsert = false;
|
|
|
|
|
uac.IsDelete = false;
|
|
|
|
|
|
|
|
|
|
return uac;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion 权限控制.
|
|
|
|
|
|
|
|
|
|
#region 属性
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 跨度
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int ColSpan
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return this.GetValIntByKey(WindowTemplateAttr.ColSpan);
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
this.SetValByKey(WindowTemplateAttr.ColSpan,value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 页面ID
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string PageID
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return this.GetValStringByKey(WindowTemplateAttr.PageID);
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
this.SetValByKey(WindowTemplateAttr.PageID, value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion 属性
|
|
|
|
|
|
|
|
|
|
#region 构造方法
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 信息块
|
|
|
|
|
/// </summary>
|
|
|
|
|
public HtmlVar()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 信息块
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="no"></param>
|
|
|
|
|
public HtmlVar(string no)
|
|
|
|
|
{
|
|
|
|
|
this.No = no;
|
|
|
|
|
this.Retrieve();
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// EnMap
|
|
|
|
|
/// </summary>
|
|
|
|
|
public override Map EnMap
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (this._enMap != null)
|
|
|
|
|
return this._enMap;
|
|
|
|
|
|
|
|
|
|
Map map = new Map("GPM_WindowTemplate", "HtmlVar信息块");
|
|
|
|
|
|
|
|
|
|
#region 基本信息.
|
|
|
|
|
map.AddTBStringPK(WindowTemplateAttr.No, null, "编号", true, true, 1, 40, 200);
|
|
|
|
|
map.AddTBInt(WindowTemplateAttr.ColSpan, 1, "占的列数", true, false);
|
|
|
|
|
map.SetHelperAlert(WindowTemplateAttr.ColSpan, "画布按照4列划分布局,输入的输在在1=4之间.");
|
|
|
|
|
map.AddTBString(WindowTemplateAttr.Name, null, "标题", true, false, 0, 300, 20, true);
|
|
|
|
|
map.AddTBString(WindowTemplateAttr.Icon, null, "Icon", true, false, 0, 100, 20, true);
|
|
|
|
|
#endregion 基本信息.
|
|
|
|
|
|
|
|
|
|
#region 更多链接.
|
|
|
|
|
map.AddTBString(WindowTemplateAttr.MoreUrl, null, "更多链接", true, false, 0, 300, 20, true);
|
|
|
|
|
map.AddDDLSysEnum(WindowTemplateAttr.MoreLinkModel, 0, "打开方式", true, true, WindowTemplateAttr.MoreLinkModel,
|
|
|
|
|
"@0=新窗口@1=本窗口@2=覆盖新窗口");
|
|
|
|
|
map.AddTBString(WindowTemplateAttr.MoreLab, null, "更多标签", true, false, 0, 300, 20);
|
|
|
|
|
#endregion 更多链接.
|
|
|
|
|
|
|
|
|
|
map.AddDtl(new HtmlVarDtls(), DtlAttr.RefPK);
|
|
|
|
|
|
|
|
|
|
RefMethod rm = new RefMethod();
|
|
|
|
|
rm.Title = "样例";
|
|
|
|
|
rm.RefMethodType = RefMethodType.RightFrameOpen;
|
|
|
|
|
rm.ClassMethodName = this.ToString() + ".AddTemplate()";
|
|
|
|
|
map.AddRefMethod(rm);
|
|
|
|
|
|
|
|
|
|
rm = new RefMethod();
|
|
|
|
|
rm.Title = "数据源";
|
|
|
|
|
rm.RefMethodType = RefMethodType.RightFrameOpen;
|
|
|
|
|
rm.ClassMethodName = this.ToString() + ".AddDBSrc()";
|
|
|
|
|
map.AddRefMethod(rm);
|
|
|
|
|
|
|
|
|
|
rm = new RefMethod();
|
|
|
|
|
rm.Title = "数据源参考";
|
|
|
|
|
rm.RefMethodType = RefMethodType.RightFrameOpen;
|
|
|
|
|
rm.ClassMethodName = this.ToString() + ".RefSQL()";
|
|
|
|
|
map.AddRefMethod(rm);
|
|
|
|
|
|
|
|
|
|
this._enMap = map;
|
|
|
|
|
return this._enMap;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 方法.
|
|
|
|
|
public string AddTemplate()
|
|
|
|
|
{
|
|
|
|
|
return "../../GPM/Window/HtmlVar.png";
|
|
|
|
|
}
|
|
|
|
|
public string RefSQL()
|
|
|
|
|
{
|
|
|
|
|
return "../../GPM/Window/RefSQL.htm";
|
|
|
|
|
}
|
|
|
|
|
public string AddDBSrc()
|
|
|
|
|
{
|
|
|
|
|
return "../../Comm/Search.htm?EnsName=BP.Sys.SFDBSrcs";
|
|
|
|
|
}
|
|
|
|
|
#endregion 方法.
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 信息块s
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class HtmlVars : EntitiesNoName
|
|
|
|
|
{
|
|
|
|
|
#region 构造
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 信息块s
|
|
|
|
|
/// </summary>
|
|
|
|
|
public HtmlVars()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 得到它的 Entity
|
|
|
|
|
/// </summary>
|
|
|
|
|
public override Entity GetNewEntity
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return new HtmlVar();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 为了适应自动翻译成java的需要,把实体转换成List.
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 转化成 java list,C#不能调用.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>List</returns>
|
|
|
|
|
public System.Collections.Generic.IList<HtmlVar> ToJavaList()
|
|
|
|
|
{
|
|
|
|
|
return (System.Collections.Generic.IList<HtmlVar>)this;
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 转化成list
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>List</returns>
|
|
|
|
|
public System.Collections.Generic.List<HtmlVar> Tolist()
|
|
|
|
|
{
|
|
|
|
|
System.Collections.Generic.List<HtmlVar> list = new System.Collections.Generic.List<HtmlVar>();
|
|
|
|
|
for (int i = 0; i < this.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
list.Add((HtmlVar)this[i]);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
#endregion 为了适应自动翻译成java的需要,把实体转换成List.
|
|
|
|
|
}
|
|
|
|
|
}
|