You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
219 lines
5.7 KiB
Plaintext
219 lines
5.7 KiB
Plaintext
11 months ago
|
using System;
|
||
|
using System.Data;
|
||
|
using BP.DA;
|
||
|
using BP.Sys;
|
||
|
using BP.En;
|
||
|
using System.Collections;
|
||
|
using BP.Port;
|
||
|
using BP.WF.Data;
|
||
|
using BP.WF.Template;
|
||
|
using BP.WF.Port;
|
||
|
using System.Collections.Generic;
|
||
|
|
||
|
namespace BP.WF.Template
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 这里存放每个节点的信息.
|
||
|
/// </summary>
|
||
|
public class NodeCond : Entity
|
||
|
{
|
||
|
#region 节点属性.
|
||
|
/// <summary>
|
||
|
/// 节点编号
|
||
|
/// </summary>
|
||
|
public int NodeID
|
||
|
{
|
||
|
get
|
||
|
{
|
||
|
return this.GetValIntByKey(NodeAttr.NodeID);
|
||
|
}
|
||
|
set
|
||
|
{
|
||
|
this.SetValByKey(NodeAttr.NodeID, value);
|
||
|
}
|
||
|
}
|
||
|
public DeliveryWay HisDeliveryWay
|
||
|
{
|
||
|
get
|
||
|
{
|
||
|
return (DeliveryWay)this.GetValIntByKey(NodeAttr.DeliveryWay);
|
||
|
}
|
||
|
set
|
||
|
{
|
||
|
this.SetValByKey(NodeAttr.DeliveryWay, value);
|
||
|
}
|
||
|
}
|
||
|
public string DeliveryParas
|
||
|
{
|
||
|
get
|
||
|
{
|
||
|
return this.GetValStringByKey(NodeAttr.DeliveryParas);
|
||
|
}
|
||
|
}
|
||
|
public string Name
|
||
|
{
|
||
|
get
|
||
|
{
|
||
|
return this.GetValStringByKey(NodeAttr.Name);
|
||
|
}
|
||
|
set
|
||
|
{
|
||
|
this.SetValByKey(NodeAttr.Name, value);
|
||
|
}
|
||
|
}
|
||
|
public float X
|
||
|
{
|
||
|
get
|
||
|
{
|
||
|
return this.GetValFloatByKey(NodeAttr.X);
|
||
|
}
|
||
|
set
|
||
|
{
|
||
|
this.SetValByKey(NodeAttr.X, value);
|
||
|
}
|
||
|
}
|
||
|
/// <summary>
|
||
|
/// y
|
||
|
/// </summary>
|
||
|
public float Y
|
||
|
{
|
||
|
get
|
||
|
{
|
||
|
return this.GetValFloatByKey(NodeAttr.Y);
|
||
|
}
|
||
|
set
|
||
|
{
|
||
|
this.SetValByKey(NodeAttr.Y, value);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public string HisToNDs
|
||
|
{
|
||
|
get
|
||
|
{
|
||
|
return this.GetValStrByKey(NodeAttr.HisToNDs);
|
||
|
}
|
||
|
set
|
||
|
{
|
||
|
this.SetValByKey(NodeAttr.HisToNDs, value);
|
||
|
}
|
||
|
}
|
||
|
public bool ItIsResetAccepter
|
||
|
{
|
||
|
get
|
||
|
{
|
||
|
return this.GetValBooleanByKey(NodeAttr.IsResetAccepter);
|
||
|
}
|
||
|
}
|
||
|
#endregion 节点属性.
|
||
|
|
||
|
#region 构造函数
|
||
|
/// <summary>
|
||
|
/// 节点
|
||
|
/// </summary>
|
||
|
public NodeCond() { }
|
||
|
/// <summary>
|
||
|
/// 节点
|
||
|
/// </summary>
|
||
|
/// <param name="_oid">节点ID</param>
|
||
|
public NodeCond(int nodeID)
|
||
|
{
|
||
|
this.NodeID = nodeID;
|
||
|
this.Retrieve();
|
||
|
}
|
||
|
/// <summary>
|
||
|
/// 重写基类方法
|
||
|
/// </summary>
|
||
|
public override Map EnMap
|
||
|
{
|
||
|
get
|
||
|
{
|
||
|
if (this._enMap != null)
|
||
|
return this._enMap;
|
||
|
|
||
|
Map map = new Map("WF_Node", "节点");
|
||
|
|
||
|
map.DepositaryOfEntity= Depositary.Application;
|
||
|
map.DepositaryOfMap = Depositary.Application;
|
||
|
|
||
|
#region 基本属性.
|
||
|
map.AddTBIntPK(NodeAttr.NodeID, 0, "节点ID", true, true);
|
||
|
map.AddTBString(NodeAttr.Name, null, "名称", true, false, 0, 150, 10);
|
||
|
map.AddTBString(NodeAttr.FK_Flow, null, "流程编号", true, false, 0, 5, 10);
|
||
|
|
||
|
map.AddTBInt(NodeAttr.DeliveryWay, 0, "运行模式", true, true);
|
||
|
map.AddTBString(NodeAttr.DeliveryParas, null, "参数", true, false, 0, 300, 10);
|
||
|
map.AddTBString(NodeAttr.HisToNDs, null, "转到的节点", false, false, 0, 50, 10);
|
||
|
map.AddBoolean(NodeAttr.IsResetAccepter, false, "可逆节点时重新计算接收人?", true, true, true);
|
||
|
#endregion 基本属性.
|
||
|
|
||
|
map.AddTBAtParas(500);
|
||
|
|
||
|
this._enMap = map;
|
||
|
return this._enMap;
|
||
|
}
|
||
|
}
|
||
|
#endregion
|
||
|
}
|
||
|
/// <summary>
|
||
|
/// 节点集合
|
||
|
/// </summary>
|
||
|
public class NodeConds : Entities
|
||
|
{
|
||
|
#region 方法
|
||
|
/// <summary>
|
||
|
/// 得到它的 Entity
|
||
|
/// </summary>
|
||
|
public override Entity GetNewEntity
|
||
|
{
|
||
|
get
|
||
|
{
|
||
|
return new NodeCond();
|
||
|
}
|
||
|
}
|
||
|
#endregion
|
||
|
|
||
|
#region 构造方法
|
||
|
/// <summary>
|
||
|
/// 节点集合
|
||
|
/// </summary>
|
||
|
public NodeConds()
|
||
|
{
|
||
|
}
|
||
|
/// <summary>
|
||
|
/// 节点集合.
|
||
|
/// </summary>
|
||
|
/// <param name="FlowNo"></param>
|
||
|
public NodeConds(string fk_flow)
|
||
|
{
|
||
|
this.Retrieve(NodeAttr.FK_Flow, fk_flow, NodeAttr.Step);
|
||
|
}
|
||
|
#endregion
|
||
|
|
||
|
#region 为了适应自动翻译成java的需要,把实体转换成List.
|
||
|
/// <summary>
|
||
|
/// 转化成 java list,C#不能调用.
|
||
|
/// </summary>
|
||
|
/// <returns>List</returns>
|
||
|
public System.Collections.Generic.IList<NodeCond> ToJavaList()
|
||
|
{
|
||
|
return (System.Collections.Generic.IList<NodeCond>)this;
|
||
|
}
|
||
|
/// <summary>
|
||
|
/// 转化成list 为了翻译成java的需要
|
||
|
/// </summary>
|
||
|
/// <returns>List</returns>
|
||
|
public List<BP.WF.Template.NodeCond> Tolist()
|
||
|
{
|
||
|
List<BP.WF.Template.NodeCond> list = new List<BP.WF.Template.NodeCond>();
|
||
|
for (int i = 0; i < this.Count; i++)
|
||
|
{
|
||
|
list.Add((BP.WF.Template.NodeCond)this[i]);
|
||
|
}
|
||
|
return list;
|
||
|
}
|
||
|
#endregion 为了适应自动翻译成java的需要,把实体转换成List.
|
||
|
|
||
|
}
|
||
|
}
|