using System; using System.Collections; using BP.DA; using BP.En; namespace BP.GPM { /// /// 用户组类型 /// public class GroupTypeAttr : EntityNoNameAttr { /// /// 排序字段 /// public const string Idx = "Idx"; } /// /// 用户组类型 /// public class GroupType : EntityNoName { #region 属性 #endregion #region 实现基本的方方法 public override UAC HisUAC { get { UAC uac = new UAC(); uac.OpenForSysAdmin(); return uac; } } #endregion #region 构造方法 /// /// 用户组类型 /// public GroupType() { } /// /// 用户组类型 /// /// public GroupType(string _No) : base(_No) { } #endregion /// /// 用户组类型Map /// public override Map EnMap { get { if (this._enMap != null) return this._enMap; Map map = new Map("GPM_GroupType", "用户组类型"); map.CodeStruct = "2"; map.DepositaryOfEntity= Depositary.Application; map.DepositaryOfMap = Depositary.Application; map.AddTBStringPK(GroupTypeAttr.No, null, "编号", true, true, 1, 5, 5); map.AddTBString(GroupTypeAttr.Name, null, "名称", true, false, 1, 50, 20); map.AddTBInt(GroupTypeAttr.Idx, 0, "顺序", true, false); this._enMap = map; return this._enMap; } } } /// /// 用户组类型 /// public class GroupTypes : EntitiesNoName { /// /// 用户组类型s /// public GroupTypes() { } /// /// 得到它的 Entity /// public override Entity GetNewEntity { get { return new GroupType(); } } #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((GroupType)this[i]); } return list; } #endregion 为了适应自动翻译成java的需要,把实体转换成List. } }