using System;
using System.Data;
using BP.DA;
using BP.En;
using BP.Port;
namespace BP.TA
{
///
/// 工作人员属性
///
public class WorkerListAttr : EntityMyPKAttr
{
#region 基本属性
///
/// 标题
///
public const string TaskID = "TaskID";
///
/// 父任务ID
///
public const string PTaskID = "PTaskID";
///
/// 工作人员内容
///
public const string PrjNo = "PrjNo";
///
/// 按表单字段工作人员
///
public const string EmpNo = "EmpNo";
///
/// 表单字段
///
public const string EmpName = "EmpName";
///
/// 是否工作人员到部门
///
public const string Docs = "Docs";
///
/// 是否工作人员到人员
///
public const string RDT = "RDT";
public const string ADT = "ADT";
#endregion
public const string PrjSta = "PrjSta";
public const string PRI = "PRI";
public const string WCL = "WCL";
public const string IsPass = "IsPass";
public const string IsRead = "IsRead";
public const string TaskDoc = "TaskDoc";
public const string Title = "Title";
public const string TaskDesc = "TaskDesc";
public const string SenderNo = "SenderNo";
public const string SenderName = "SenderName";
public const string PrjName = "PrjName";
public const string StarterNo = "StarterNo";
public const string StarterName = "StarterName";
}
///
/// 工作人员
///
public class WorkerList : EntityMyPK
{
#region 属性
public int TaskID
{
get
{
return this.GetValIntByKey(WorkerListAttr.TaskID);
}
set
{
this.SetValByKey(WorkerListAttr.TaskID, value);
}
}
public int PTaskID
{
get
{
return this.GetValIntByKey(WorkerListAttr.PTaskID);
}
set
{
this.SetValByKey(WorkerListAttr.PTaskID, value);
}
}
public string PrjNo
{
get
{
return this.GetValStringByKey(WorkerListAttr.PrjNo);
}
set
{
this.SetValByKey(WorkerListAttr.PrjNo, value);
}
}
public string PrjName
{
get
{
return this.GetValStringByKey(WorkerListAttr.PrjName);
}
set
{
this.SetValByKey(WorkerListAttr.PrjName, value);
}
}
public string EmpNo
{
get
{
return this.GetValStringByKey(WorkerListAttr.EmpNo);
}
set
{
this.SetValByKey(WorkerListAttr.EmpNo, value);
}
}
public string EmpName
{
get
{
return this.GetValStringByKey(WorkerListAttr.EmpName);
}
set
{
this.SetValByKey(WorkerListAttr.EmpName, value);
}
}
public string SenderName
{
get
{
return this.GetValStringByKey(WorkerListAttr.SenderName);
}
set
{
this.SetValByKey(WorkerListAttr.SenderName, value);
}
}
public string SenderNo
{
get
{
return this.GetValStringByKey(WorkerListAttr.SenderNo);
}
set
{
this.SetValByKey(WorkerListAttr.SenderNo, value);
}
}
public string Docs
{
get
{
return this.GetValStringByKey(WorkerListAttr.Docs);
}
set
{
this.SetValByKey(WorkerListAttr.Docs, value);
}
}
public string RDT
{
get
{
return this.GetValStringByKey(WorkerListAttr.RDT);
}
set
{
this.SetValByKey(WorkerListAttr.RDT, value);
}
}
public string ADT
{
get
{
return this.GetValStringByKey(WorkerListAttr.ADT);
}
set
{
this.SetValByKey(WorkerListAttr.ADT, value);
}
}
#endregion 属性
#region 构造函数
///
/// 工作人员
///
public WorkerList()
{
}
///
/// 工作人员
///
///
public WorkerList(string mypk)
{
this.setMyPK(mypk);
this.Retrieve();
}
///
/// 重写基类方法
///
public override Map EnMap
{
get
{
if (this._enMap != null)
return this._enMap;
Map map = new Map("TA_WorkerList", "工作人员");
map.AddGroupAttr("工作信息");
map.AddMyPK(); //TaskID+"_"+EmpNo
map.AddTBInt(WorkerListAttr.TaskID, 0, "任务ID", true, true);
map.AddTBString(WorkerListAttr.EmpNo, null, "处理人", true, false, 0, 50, 300);
map.AddTBString(WorkerListAttr.EmpName, null, "处理人", true, false, 0, 50, 300);
map.AddTBInt(WorkerListAttr.IsPass, 0, "是否完成?", true, true);
map.AddTBInt(WorkerListAttr.IsRead, 0, "是否读取?", true, true);
map.AddTBInt(WorkerListAttr.WCL, 0, "完成率", true, true);
map.AddTBString(WorkerListAttr.TaskDoc, null, "工作内容", true, false, 0, 50, 300);
map.AddGroupAttr("任务信息");
map.AddTBString(WorkerListAttr.Title, null, "标题", true, false, 0, 50, 300);
map.AddTBString(WorkerListAttr.TaskDesc, null, "任务描述", true, false, 0, 50, 300);
map.AddTBString(WorkerListAttr.SenderNo, null, "发起人编号", true, false, 0, 50, 300);
map.AddTBString(WorkerListAttr.SenderName, null, "发起人名称", true, false, 0, 50, 300);
map.AddTBDateTime(WorkerListAttr.RDT, null, "记录日期", true, true);
map.AddTBDateTime(WorkerListAttr.ADT, null, "活动日期", true, true);
map.AddTBInt(WorkerListAttr.PTaskID, 0, "P任务ID", true, true);
map.AddGroupAttr("项目信息");
map.AddTBString(WorkerListAttr.PrjNo, null, "项目编号", true, false, 0, 50, 300);
map.AddTBString(WorkerListAttr.PrjName, null, "名称", true, false, 0, 50, 300);
map.AddTBString(WorkerListAttr.StarterNo, null, "发起人编号", true, false, 0, 50, 300);
map.AddTBString(WorkerListAttr.StarterName, null, "发起人名称", true, false, 0, 50, 300);
map.AddTBInt(WorkerListAttr.PRI, 0, "优先级", true, true);
this._enMap = map;
return this._enMap;
}
}
#endregion
}
///
/// 工作人员s
///
public class WorkerLists : EntitiesMyPK
{
#region 方法
///
/// 得到它的 Entity
///
public override Entity GetNewEntity
{
get
{
return new WorkerList();
}
}
///
/// 工作人员
///
public WorkerLists() { }
#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((WorkerList)this[i]);
}
return list;
}
#endregion 为了适应自动翻译成java的需要,把实体转换成List.
}
}