using BP.En; namespace BP.CCFast.CCMenu { /// /// 标签容器 /// public class Tab : EntityNoName { #region 属性 public override UAC HisUAC { get { UAC uac = new UAC(); if (BP.Web.WebUser.IsAdmin == true) { uac.IsDelete = true; uac.IsUpdate = true; uac.IsInsert = false; return uac; } else { uac.Readonly(); } return uac; } } #endregion #region 构造方法 /// /// 标签容器 /// public Tab() { } protected override bool beforeDelete() { return base.beforeDelete(); } /// /// EnMap /// public override Map EnMap { get { if (this._enMap != null) return this._enMap; Map map = new Map("GPM_Menu", "标签容器"); // 类的基本属性. map.setEnType(EnType.Sys); map.AddTBStringPK(MenuAttr.No, null, "编号", false, false, 1, 90, 50); map.AddTBString(MenuAttr.Name, null, "名称", true, false, 0, 300, 200, true); map.AddTBString(MenuAttr.Icon, null, "Icon", true, false, 0, 50, 50, true); //从表明细. map.AddDtl(new TabDtls(), TabDtlAttr.RefMenuNo); this._enMap = map; return this._enMap; } } #endregion protected override bool beforeUpdateInsertAction() { return base.beforeUpdateInsertAction(); } } /// /// 标签容器s /// public class Tabs : EntitiesNoName { #region 构造 /// /// 标签容器s /// public Tabs() { } /// /// 得到它的 Entity /// public override Entity GetNewEntity { get { return new Tab(); } } #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((Tab)this[i]); } return list; } #endregion 为了适应自动翻译成java的需要,把实体转换成List. } }