using System;
using System.Data;
using System.Collections;
using BP.DA;
using BP.En;
using BP.Port;
namespace BP.WF.Template
{
public class FlowFormTreeAttr : EntityTreeAttr
{
///
/// 流程
///
public const string FK_Flow = "FK_Flow";
///
/// 节点类型
///
public const string NodeType = "NodeType";
///
/// url
///
public const string Url = "Url";
}
///
/// 独立表单树-用于数据解构构造
///
public class FlowFormTree : EntityTree
{
#region 扩展属性,不做数据操作
///
/// 节点类型
///
public string NodeType { get; set; }
///
/// 是否可编辑
///
public string IsEdit { get; set; }
///
/// Url
///
public string Url { get; set; }
///
/// 打开时是否关闭其它的页面?
///
public string IsCloseEtcFrm { get; set; }
#endregion
#region 属性
public string FlowNo
{
get
{
return this.GetValStringByKey(FrmNodeAttr.FK_Flow);
}
set
{
this.SetValByKey(FrmNodeAttr.FK_Flow, value);
}
}
#endregion 属性
#region 构造方法
///
/// 独立表单树
///
public FlowFormTree()
{
}
///
/// 独立表单树
///
///
public FlowFormTree(string _No) : base(_No) { }
#endregion
///
/// 独立表单树Map
///
public override Map EnMap
{
get
{
if (this._enMap != null)
return this._enMap;
Map map = new Map("Sys_FormTree", "独立表单树-用于数据解构构造");
map.CodeStruct = "2";
map.DepositaryOfEntity= Depositary.Application;
map.AddTBStringPK(FlowFormTreeAttr.No, null, "编号", true, true, 1, 10, 40);
map.AddTBString(FlowFormTreeAttr.Name, null, "名称", true, false, 0, 100, 30);
map.AddTBString(FlowFormTreeAttr.ParentNo, null, "父节点No", false, false, 0, 100, 40);
map.AddTBInt(FlowFormTreeAttr.Idx, 0, "Idx", false, false);
// 隶属的流程编号.
map.AddTBString(FlowFormTreeAttr.FK_Flow, null, "流程编号", true, true, 1, 20, 20);
this._enMap = map;
return this._enMap;
}
}
}
///
/// 独立表单树
///
public class FlowFormTrees : EntitiesTree
{
///
/// 独立表单树s
///
public FlowFormTrees()
{
}
///
/// 独立表单树
///
public FlowFormTrees(string flowNo)
{
int i= this.Retrieve(FlowFormTreeAttr.FK_Flow, flowNo);
if (i == 0)
{
FlowFormTree tree = new FlowFormTree();
tree.No = "100";
tree.FlowNo = flowNo;
tree.Name = "根目录";
// tree.IsDir = false;
tree.ParentNo = "0";
tree.Insert();
//创建一个节点.
tree.DoCreateSubNode();
}
}
///
/// 得到它的 Entity
///
public override Entity GetNewEntity
{
get
{
return new FlowFormTree();
}
}
#region 为了适应自动翻译成java的需要,把实体转换成List.
///
/// 转化成 java list,C#不能调用.
///
/// List
public System.Collections.Generic.IList ToJavaList()
{
return (System.Collections.Generic.IList)this;
}
///
/// 转化成list
///
/// List
public System.Collections.Generic.List Tolist()
{
System.Collections.Generic.List list = new System.Collections.Generic.List();
for (int i = 0; i < this.Count; i++)
{
list.Add((FlowFormTree)this[i]);
}
return list;
}
#endregion 为了适应自动翻译成java的需要,把实体转换成List.
}
}