using System;
using System.Data;
using BP.DA;
using BP.En;
using BP.WF.Template;
using System.Collections;
using BP.Port;
namespace BP.WF.Template
{
///
/// 标签属性
///
public class LabNoteAttr:BP.En.EntityMyPKAttr
{
#region 基本属性
///
/// 流程
///
public const string FK_Flow = "FK_Flow";
///
/// x
///
public const string X = "X";
///
/// y
///
public const string Y = "Y";
#endregion
}
///
/// 标签.
///
public class LabNote : EntityMyPK
{
#region 基本属性
///
/// UI界面上的访问控制
///
public override UAC HisUAC
{
get
{
UAC uac = new UAC();
uac.IsUpdate = true;
return uac;
}
}
///
/// x
///
public int X
{
get
{
return this.GetValIntByKey(NodeAttr.X);
}
set
{
this.SetValByKey(NodeAttr.X, value);
}
}
///
/// y
///
public int Y
{
get
{
return this.GetValIntByKey(NodeAttr.Y);
}
set
{
this.SetValByKey(NodeAttr.Y, value);
}
}
///
/// 标签的事务编号
///
public string FlowNo
{
get
{
return this.GetValStringByKey(NodeAttr.FK_Flow);
}
set
{
SetValByKey(NodeAttr.FK_Flow, value);
}
}
public string Name
{
get
{
return this.GetValStringByKey(NodeAttr.Name);
}
set
{
SetValByKey(NodeAttr.Name, value);
}
}
#endregion
#region 构造函数
///
/// 标签
///
public LabNote() { }
///
/// 标签
///
/// 标签ID
public LabNote(string mypk)
{
this.setMyPK(mypk);
this.Retrieve();
}
///
/// 重写基类方法
///
public override Map EnMap
{
get
{
if (this._enMap != null)
return this._enMap;
Map map = new Map("WF_LabNote", "标签");
map.IndexField = NodeAttr.FK_Flow;
map.AddMyPK();
map.AddTBString(NodeAttr.Name, null, null, true, false, 0, 400, 10, true);
map.AddTBString(NodeAttr.FK_Flow, null, "流程", false, true, 0, 10, 10);
map.AddTBInt(NodeAttr.X, 0, "X坐标", false, false);
map.AddTBInt(NodeAttr.Y, 0, "Y坐标", false, false);
this._enMap = map;
return this._enMap;
}
}
#endregion
protected override bool beforeInsert()
{
this.setMyPK(DBAccess.GenerOID().ToString());
return base.beforeInsert();
}
}
///
/// 标签集合
///
public class LabNotes : Entities
{
#region 方法
///
/// 得到它的 Entity
///
public override Entity GetNewEntity
{
get
{
return new LabNote();
}
}
#endregion
#region 构造方法
///
/// 标签集合
///
public LabNotes()
{
}
///
/// 标签集合.
///
///
public LabNotes(string fk_flow)
{
this.Retrieve(NodeAttr.FK_Flow, fk_flow);
}
#endregion
#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((LabNote)this[i]);
}
return list;
}
#endregion 为了适应自动翻译成java的需要,把实体转换成List.
}
}