using BP.Sys;
using BP.En;
namespace BP.WF.Template.Frm
{
///
/// CCFrm属性
///
public class CCFrmAttr : EntityNoNameAttr
{
///
/// 流程
///
public const string FK_Flow = "FK_Flow";
///
/// 运行类型
///
public const string FrmType = "FrmType";
///
/// URL
///
public const string URL = "URL";
///
/// 是否可以更新
///
public const string IsUpdate = "IsUpdate";
///
/// PTable
///
public const string PTable = "PTable";
///
/// DBURL
///
public const string DBURL = "DBURL";
}
///
/// 表单
///
public class CCFrm : EntityNoName
{
#region 基本属性
public FrmNode HisFrmNode = null;
public string PTable
{
get
{
return this.GetValStringByKey(CCFrmAttr.PTable);
}
set
{
this.SetValByKey(CCFrmAttr.PTable, value);
}
}
public string URL
{
get
{
return this.GetValStringByKey(CCFrmAttr.URL);
}
set
{
this.SetValByKey(CCFrmAttr.URL, value);
}
}
public FrmType HisFrmType
{
get
{
return (FrmType)this.GetValIntByKey(CCFrmAttr.FrmType);
}
set
{
this.SetValByKey(CCFrmAttr.FrmType, (int)value);
}
}
#endregion
#region 构造方法
///
/// CCFrm
///
public CCFrm()
{
}
///
/// CCFrm
///
///
public CCFrm(string no)
: base(no)
{
}
///
/// 重写基类方法
///
public override Map EnMap
{
get
{
if (this._enMap != null)
return this._enMap;
Map map = new Map("Sys_MapData", "表单");
map.CodeStruct = "4";
map.AddTBStringPK(CCFrmAttr.No, null, null, true, true, 1, 200, 4);
map.AddTBString(CCFrmAttr.Name, null, null, true, false, 0, 50, 10);
map.AddTBString(CCFrmAttr.FK_Flow, null, "独立表单属性:FK_Flow", true, false, 0, 4, 10);
// map.AddDDLSysEnum(CCFrmAttr.CCFrmType, 0, "独立表单属性:运行类型", true, false, CCFrmAttr.CCFrmType);
//表单的运行类型.
map.AddDDLSysEnum(CCFrmAttr.FrmType, (int)BP.Sys.FrmType.FoolForm, "表单类型",true, false, CCFrmAttr.FrmType);
map.AddTBString(CCFrmAttr.PTable, null, "物理表", true, false, 0, 50, 10);
map.AddTBInt(CCFrmAttr.DBURL, 0, "DBURL", true, false);
// 如果是个嵌入式表单.
map.AddTBString(CCFrmAttr.URL, null, "Url", true, false, 0, 50, 10);
//表单类别.
map.AddTBString(MapDataAttr.FK_FormTree, "01", "表单类别", true, false, 0, 500, 20);
map.AddTBInt(MapDataAttr.FrmW, 900, "表单宽度", true, false);
this._enMap = map;
return this._enMap;
}
}
public int FrmW
{
get
{
return this.GetValIntByKey(MapDataAttr.FrmW);
}
}
#endregion
}
///
/// 表单s
///
public class CCFrms : EntitiesNoName
{
///
/// CCFrm
///
public CCFrms()
{
}
///
/// CCFrm
///
///
public CCFrms(string fk_flow)
{
this.Retrieve(CCFrmAttr.FK_Flow, fk_flow);
}
public CCFrms(int fk_node)
{
QueryObject qo = new QueryObject(this);
qo.AddWhereInSQL(CCFrmAttr.No, "SELECT FK_CCFrm FROM WF_CCFrmNode WHERE FK_Node=" + fk_node);
qo.DoQuery();
}
///
/// 得到它的 Entity
///
public override Entity GetNewEntity
{
get
{
return new CCFrm();
}
}
#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((CCFrm)this[i]);
}
return list;
}
#endregion 为了适应自动翻译成java的需要,把实体转换成List.
}
}