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