using System; using System.Data; using BP.DA; using BP.En; namespace BP.Sys { public class EnVerDtlAttr { #region 基本属性 /// /// 关联外键 /// public const string RefPK = "RefPK"; /// /// 表单id /// public const string FrmID = "FrmID"; /// /// 关联主键 /// public const string EnPKValue = "EnPKValue"; /// /// 属性键值 /// public const string AttrKey = "AttrKey"; /// /// 字段名 /// public const string AttrName = "AttrName"; public const string MyVal = "MyVal"; public const string EnVer = "EnVer"; public const string RDT = "RDT"; public const string Rec = "Rec"; public const string RefVerMyPK = "RefVerMyPK"; public const string LGType = "LGType"; public const string BindKey = "BindKey"; #endregion } /// /// 部门角色对应 的摘要说明。 /// public class EnVerDtl : EntityMyPK { #region 基本属性 /// /// UI界面上的访问控制 /// public override UAC HisUAC { get { UAC uac = new UAC(); uac.OpenForSysAdmin(); return uac; } } public string RefPK { get { return this.GetValStringByKey(EnVerDtlAttr.RefPK); } set { SetValByKey(EnVerDtlAttr.RefPK, value); } } /// /// 实体名称 /// public string FrmID { get { return this.GetValStringByKey(EnVerDtlAttr.FrmID); } set { SetValByKey(EnVerDtlAttr.FrmID, value); } } public string EnPKValue { get { return this.GetValStringByKey(EnVerDtlAttr.EnPKValue); } set { SetValByKey(EnVerDtlAttr.EnPKValue, value); } } /// /// 字段 /// public string AttrKey { get { return this.GetValStringByKey(EnVerDtlAttr.AttrKey); } set { SetValByKey(EnVerDtlAttr.AttrKey, value); } } /// /// 版本主表PK /// public string BindKey { get { return this.GetValStringByKey(EnVerDtlAttr.BindKey); } set { SetValByKey(EnVerDtlAttr.BindKey, value); } } /// ///字段名 /// public string AttrName { get { return this.GetValStringByKey(EnVerDtlAttr.AttrName); } set { SetValByKey(EnVerDtlAttr.AttrName, value); } } public int LGType { get { return this.GetValIntByKey(EnVerDtlAttr.LGType); } set { SetValByKey(EnVerDtlAttr.LGType, value); } } /// /// 旧值 /// public string MyVal { get { return this.GetValStringByKey(EnVerDtlAttr.MyVal); } set { if (value == null) SetValByKey(EnVerDtlAttr.MyVal, ""); else SetValByKey(EnVerDtlAttr.MyVal, value); } } #endregion #region 扩展属性 #endregion #region 构造函数 /// /// 工作部门角色对应 /// public EnVerDtl() { } /// /// 重写基类方法 /// public override Map EnMap { get { if (this._enMap != null) return this._enMap; Map map = new Map("Sys_EnVerDtl", "版本明细"); map.setEnType(EnType.Dot2Dot); //实体类型,admin 系统管理员表,PowerAble 权限管理表,也是用户表,你要想把它加入权限管理里面请在这里设置。。 map.IndexField = EnVerDtlAttr.FrmID; map.AddMyPK(); map.AddTBString(EnVerDtlAttr.RefPK, null, "关联版本主键", true, false, 0, 50, 30); map.AddTBString(EnVerDtlAttr.FrmID, null, "FrmID", false, false, 0, 200, 1); map.AddTBString(EnVerDtlAttr.EnPKValue, null, "EnPKValue", true, false, 0, 50, 30); map.AddTBString(EnVerDtlAttr.AttrKey, null, "字段", false, false, 0, 200, 1); map.AddTBString(EnVerDtlAttr.AttrName, null, "字段名", true, false, 0, 200, 30); map.AddTBInt(EnVerDtlAttr.LGType, 0, "逻辑类型", true, false); map.AddTBString(EnVerDtlAttr.BindKey, null, "外部数据源", true, false, 0, 200, 30); map.AddTBString(EnVerDtlAttr.MyVal, null, "数据值", true, false, 0, 4000, 30); this._enMap = map; return this._enMap; } } #endregion } /// /// 部门角色对应 /// public class EnVerDtls : EntitiesMyPK { #region 构造 public EnVerDtls() { } #endregion #region 方法 /// /// 得到它的 Entity /// public override Entity GetNewEntity { get { return new EnVerDtl(); } } #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((EnVerDtl)this[i]); } return list; } #endregion 为了适应自动翻译成java的需要,把实体转换成List. } }