using System;
using System.Collections;
using BP.DA;
using BP.En;
using BP.WF.Template;
using BP.WF;
using BP.Sys;
namespace BP.WF.Template
{
///
/// 轨迹图标组件控件状态
///
public enum FTCSta
{
///
/// 不可用
///
Disable,
///
/// 只读
///
ReadOnly,
///
/// 可以设置人员
///
SetWorkers
}
///
/// 流转自定义组件
///
public class FTCAttr : EntityNoNameAttr
{
///
/// 显示标签
///
public const string FTCLab = "FTCLab";
///
/// 状态
///
public const string FTCSta = "FTCSta";
///
/// 工作模式
///
public const string FTCWorkModel = "FTCWorkModel";
///
/// H
///
public const string FTC_H = "FTC_H";
}
///
/// 流转自定义组件
///
public class FrmTransferCustom : Entity
{
#region 属性
public string No
{
get
{
return "ND" + this.NodeID;
}
set
{
string nodeID = value.Replace("ND", "");
this.NodeID = int.Parse(nodeID);
}
}
///
/// 节点ID
///
public int NodeID
{
get
{
return this.GetValIntByKey(NodeAttr.NodeID);
}
set
{
this.SetValByKey(NodeAttr.NodeID, value);
}
}
///
/// 控件状态
///
public FTCSta FTCSta
{
get
{
return (FTCSta)this.GetValIntByKey(FTCAttr.FTCSta);
}
set
{
this.SetValByKey(FTCAttr.FTCSta, (int)value);
}
}
///
/// 工作模式
///
public int FTCWorkModel
{
get
{
return this.GetValIntByKey(FTCAttr.FTCWorkModel);
}
set
{
this.SetValByKey(FTCAttr.FTCWorkModel, value);
}
}
///
/// H
///
public float FTC_H
{
get
{
return this.GetValFloatByKey(FTCAttr.FTC_H);
}
set
{
this.SetValByKey(FTCAttr.FTC_H, value);
}
}
public string FTC_Hstr
{
get
{
if (this.FTC_H == 0)
return "100%";
return this.FTC_H + "px";
}
}
///
/// 节点名称.
///
public string Name
{
get
{
return this.GetValStringByKey("Name");
}
}
///
/// 显示标签
///
public string FTCLab
{
get
{
return this.GetValStrByKey(FTCAttr.FTCLab);
}
}
#endregion
#region 构造方法
///
/// 控制
///
public override UAC HisUAC
{
get
{
UAC uac = new UAC();
uac.OpenForSysAdmin();
uac.IsDelete = false;
uac.IsInsert = false;
return uac;
}
}
///
/// 重写主键
///
public override string PK
{
get
{
return "NodeID";
}
}
///
/// 流转自定义组件
///
public FrmTransferCustom()
{
}
///
/// 流转自定义组件
///
///
public FrmTransferCustom(string mapData)
{
if (mapData.Contains("ND") == false)
{
this.FTCSta = FTCSta.Disable;
return;
}
string mapdata = mapData.Replace("ND", "");
if (DataType.IsNumStr(mapdata) == false)
{
this.FTCSta = FTCSta.Disable;
return;
}
try
{
this.NodeID = int.Parse(mapdata);
}
catch
{
return;
}
this.Retrieve();
}
///
/// 流转自定义组件
///
///
public FrmTransferCustom(int nodeID)
{
this.NodeID = nodeID;
this.Retrieve();
}
///
/// EnMap
///
public override Map EnMap
{
get
{
if (this._enMap != null)
return this._enMap;
Map map = new Map("WF_Node", "流转自定义组件");
map.AddGroupAttr("流转自定义");
map.AddTBIntPK(NodeAttr.NodeID, 0, "节点ID", true, true);
map.AddTBString(NodeAttr.Name, null, "节点名称", true, true, 0, 100, 10);
map.AddTBString(FTCAttr.FTCLab, "流转自定义", "显示标签", true, false, 0, 50, 10, true);
#region 此处变更了 NodeSheet类中的,map 描述该部分也要变更.
map.AddDDLSysEnum(FTCAttr.FTCSta, (int)FTCSta.Disable, "组件状态",
true, true, FTCAttr.FTCSta, "@0=禁用@1=只读@2=可设置人员");
map.AddDDLSysEnum(FTCAttr.FTCWorkModel,0, "工作模式",
true, true, FTCAttr.FTCWorkModel, "@0=简洁模式@1=高级模式");
map.AddTBFloat(FTCAttr.FTC_H, 300, "高度", true, false);
#endregion 此处变更了 NodeSheet类中的,map 描述该部分也要变更.
this._enMap = map;
return this._enMap;
}
}
#endregion
}
///
/// 流转自定义组件s
///
public class FrmTransferCustoms : Entities
{
#region 构造
///
/// 流转自定义组件s
///
public FrmTransferCustoms()
{
}
///
/// 流转自定义组件s
///
/// s
public FrmTransferCustoms(string fk_mapdata)
{
if (BP.Difference.SystemConfig.isDebug)
this.Retrieve("No", fk_mapdata);
else
this.RetrieveFromCache("No", (object)fk_mapdata);
}
///
/// 得到它的 Entity
///
public override Entity GetNewEntity
{
get
{
return new FrmTransferCustom();
}
}
#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((FrmTransferCustom)this[i]);
}
return list;
}
#endregion 为了适应自动翻译成java的需要,把实体转换成List.
}
}