using BP.En;
using BP.Port;
namespace BP.WF.Rpt
{
///
/// 报表人员
///
public class RptEmpAttr
{
#region 基本属性
///
/// 报表ID
///
public const string FK_Rpt = "FK_Rpt";
///
/// 人员
///
public const string FK_Emp = "FK_Emp";
#endregion
}
///
/// RptEmp 的摘要说明。
///
public class RptEmp : Entity
{
public override UAC HisUAC
{
get
{
UAC uac = new UAC();
if (BP.Web.WebUser.No.Equals("admin")==true)
{
uac.IsView = true;
uac.IsDelete = true;
uac.IsInsert = true;
uac.IsUpdate = true;
uac.IsAdjunct = true;
}
return uac;
}
}
#region 基本属性
///
/// 报表ID
///
public string FK_Rpt
{
get
{
return this.GetValStringByKey(RptEmpAttr.FK_Rpt);
}
set
{
SetValByKey(RptEmpAttr.FK_Rpt, value);
}
}
public string EmpName
{
get
{
return this.GetValRefTextByKey(RptEmpAttr.FK_Emp);
}
}
///
///人员
///
public string EmpNo
{
get
{
return this.GetValStringByKey(RptEmpAttr.FK_Emp);
}
set
{
SetValByKey(RptEmpAttr.FK_Emp, value);
}
}
#endregion
#region 扩展属性
#endregion
#region 构造函数
///
/// 报表人员
///
public RptEmp() { }
///
/// 报表人员对应
///
/// 报表ID
/// 人员编号
public RptEmp(string _empoid, string wsNo)
{
this.FK_Rpt = _empoid;
this.EmpNo = wsNo;
if (this.Retrieve() == 0)
this.Insert();
}
///
/// 重写基类方法
///
public override Map EnMap
{
get
{
if (this._enMap != null)
return this._enMap;
Map map = new Map("Sys_RptEmp", "报表人员对应信息");
map.setEnType(EnType.Dot2Dot);
map.AddTBStringPK(RptEmpAttr.FK_Rpt, null, "报表", false, false, 1, 15, 1);
map.AddDDLEntitiesPK(RptEmpAttr.FK_Emp, null, "人员", new Emps(), true);
this._enMap = map;
return this._enMap;
}
}
#endregion
}
///
/// 报表人员
///
public class RptEmps : Entities
{
#region 构造
///
/// 报表与人员集合
///
public RptEmps() { }
#endregion
#region 方法
///
/// 得到它的 Entity
///
public override Entity GetNewEntity
{
get
{
return new RptEmp();
}
}
#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((RptEmp)this[i]);
}
return list;
}
#endregion 为了适应自动翻译成java的需要,把实体转换成List.
}
}