using BP.En; namespace BP.CCFast.CCMenu { /// /// 人员菜单功能 /// public class EmpMenuAttr { /// /// 操作员 /// public const string FK_Emp = "FK_Emp"; /// /// 菜单功能 /// public const string FK_Menu = "FK_Menu"; /// /// 是否选中. /// public const string IsChecked = "IsChecked"; /// /// 系统 /// public const string FK_App = "FK_App"; } /// /// 人员菜单功能 /// public class EmpMenu : EntityMyPK { #region 属性 /// /// 人员 /// public string EmpNo { get { return this.GetValStringByKey(EmpMenuAttr.FK_Emp); } set { this.SetValByKey(EmpMenuAttr.FK_Emp, value); } } /// /// 菜单 /// public string FK_Menu { get { return this.GetValStringByKey(EmpMenuAttr.FK_Menu); } set { this.SetValByKey(EmpMenuAttr.FK_Menu, value); } } /// /// 是否选中 /// public bool ItIsChecked { get { return this.GetValBooleanByKey(EmpMenuAttr.IsChecked); } set { this.SetValByKey(EmpMenuAttr.IsChecked, value); } } #endregion #region 构造方法 /// /// 人员菜单功能 /// public EmpMenu() { } /// /// 人员菜单功能 /// public override Map EnMap { get { if (this._enMap != null) return this._enMap; Map map = new Map("GPM_EmpMenu", "人员菜单对应"); map.AddMyPK(); // map.AddTBStringPK(EmpMenuAttr.FK_Emp, null, "操作员", true, false, 0, 3900, 20); map.AddTBString(EmpMenuAttr.FK_Menu, null, "菜单", false, false, 0, 50, 20); map.AddDDLEntities(EmpMenuAttr.FK_Emp, null, "人员", new BP.Port.Emps(), true); map.AddTBString(EmpMenuAttr.FK_App, null, "系统编号", false, false, 0, 50, 20); map.AddBoolean(EmpMenuAttr.IsChecked, true, "是否选中", true, true); this._enMap = map; return this._enMap; } } #endregion protected override bool beforeInsert() { //@wwh,代码转换. this.MyPK = this.FK_Menu + "_" + this.EmpNo; return base.beforeInsert(); } } /// /// 人员菜单功能s /// public class EmpMenus : EntitiesMyPK { #region 构造 /// /// 菜单s /// public EmpMenus() { } /// /// 得到它的 Entity /// public override Entity GetNewEntity { get { return new EmpMenu(); } } #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((EmpMenu)this[i]); } return list; } #endregion 为了适应自动翻译成java的需要,把实体转换成List. } }