using System;
using System.Collections;
using BP.DA;
using BP.En;
using BP.En;
using BP.WF.Port;
namespace BP.WF.Template
{
///
/// 方向与工作角色对应属性
///
public class DirectionStationAttr
{
///
/// 节点
///
public const string FK_Direction = "FK_Direction";
///
/// 工作角色
///
public const string FK_Station = "FK_Station";
}
///
/// 方向与工作角色对应
/// 节点的工作角色有两部分组成.
/// 记录了从一个节点到其他的多个节点.
/// 也记录了到这个节点的其他的节点.
///
public class DirectionStation : EntityMM
{
#region 基本属性
///
/// UI界面上的访问控制
///
public override UAC HisUAC
{
get
{
UAC uac = new UAC();
uac.OpenAll();
return uac;
}
}
///
///节点
///
public int FK_Direction
{
get
{
return this.GetValIntByKey(DirectionStationAttr.FK_Direction);
}
set
{
this.SetValByKey(DirectionStationAttr.FK_Direction, value);
}
}
public string FK_StationT
{
get
{
return this.GetValRefTextByKey(DirectionStationAttr.FK_Station);
}
}
///
/// 工作角色
///
public string FK_Station
{
get
{
return this.GetValStringByKey(DirectionStationAttr.FK_Station);
}
set
{
this.SetValByKey(DirectionStationAttr.FK_Station, value);
}
}
#endregion
#region 构造方法
///
/// 方向与工作角色对应
///
public DirectionStation() { }
///
/// 重写基类方法
///
public override Map EnMap
{
get
{
if (this._enMap != null)
return this._enMap;
Map map = new Map("WF_DirectionStation", "节点角色");
map.AddTBIntPK(DirectionStationAttr.FK_Direction, 0,"节点", false,false);
// #warning ,这里为了方便用户选择,让分组都统一采用了枚举类型. edit zhoupeng. 2015.04.28. 注意jflow也要修改.
map.AddDDLEntitiesPK(DirectionStationAttr.FK_Station, null, "工作角色",
new BP.Port.Stations(), true);
this._enMap = map;
return this._enMap;
}
}
#endregion
}
///
/// 方向与工作角色对应
///
public class DirectionStations : EntitiesMM
{
///
/// 方向与工作角色对应
///
public DirectionStations() { }
///
/// 得到它的 Entity
///
public override Entity GetNewEntity
{
get
{
return new DirectionStation();
}
}
#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((DirectionStation)this[i]);
}
return list;
}
#endregion 为了适应自动翻译成java的需要,把实体转换成List.
}
}