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