using System; using System.Collections; using System.Data; using BP.DA; using BP.Web; using BP.En; namespace BP.GPM { /// /// 管理员与系统权限 /// public class EmpAppAttr { /// /// 操作员 /// public const string FK_Emp = "FK_Emp"; /// /// 系统 /// public const string FK_App = "FK_App"; } /// /// 管理员与系统权限 /// public class EmpApp : EntityMyPK { #region 属性 public string FK_Emp { get { return this.GetValStringByKey(EmpAppAttr.FK_Emp); } set { this.SetValByKey(EmpAppAttr.FK_Emp, value); } } public string FK_App { get { return this.GetValStringByKey(EmpAppAttr.FK_App); } set { this.SetValByKey(EmpAppAttr.FK_App, value); } } public string Name { get { return this.GetValStringByKey(AppAttr.Name); } set { this.SetValByKey(AppAttr.Name, value); } } public int Idx { get { return this.GetValIntByKey(AppAttr.Idx); } set { this.SetValByKey(AppAttr.Idx, value); } } /// /// 图片 /// public string Img { get { string s = this.GetValStringByKey("WebPath"); if (DataType.IsNullOrEmpty(s)) { return "../../DataUser/BP.GPM.STem/laptop.png"; } else { return s; } } } /// /// 超链接 /// public string UrlExt { get { return this.GetValStringByKey(AppAttr.UrlExt); } set { this.SetValByKey(AppAttr.UrlExt, value); } } #endregion #region 构造方法 /// /// 管理员与系统权限 /// public EmpApp() { } /// /// 管理员与系统权限 /// public override Map EnMap { get { if (this._enMap != null) return this._enMap; Map map = new Map("GPM_EmpApp", "管理员与系统权限"); map.setEnType(EnType.App); map.AddMyPK(); map.AddTBString(EmpAppAttr.FK_Emp, null, "操作员", true, false, 0, 50, 20); map.AddTBString(EmpAppAttr.FK_App, null, "系统", true, false, 0, 50, 20); map.AddTBString(AppAttr.Name, null, "系统-名称", true, false, 0, 3900, 20); map.AddTBString(AppAttr.UrlExt, null, "连接", true, false, 0, 3900, 20, true); map.AddMyFile("图标"); this._enMap = map; return this._enMap; } } #endregion } /// /// 管理员与系统权限s /// public class EmpApps : EntitiesMyPK { #region 构造 /// /// 系统s /// public EmpApps() { } /// /// 得到它的 Entity /// public override Entity GetNewEntity { get { return new EmpApp(); } } #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((EmpApp)this[i]); } return list; } #endregion 为了适应自动翻译成java的需要,把实体转换成List. } }