using System; using System.Collections; using System.Data; using BP.DA; using BP.Web; using BP.En; namespace BP.GPM { /// /// 人员菜单功能 /// public class VGPMEmpMenuAttr { /// /// 操作员 /// public const string FK_Emp = "FK_Emp"; /// /// 菜单功能 /// public const string FK_Menu = "FK_Menu"; /// /// 系统 /// public const string FK_App = "FK_App"; } /// /// 人员菜单功能 /// public class VGPMEmpMenu : EntityMyPK { #region 属性 public string CtrlObjs { get { return this.GetValStringByKey(MenuAttr.CtrlObjs); } set { this.SetValByKey(MenuAttr.CtrlObjs, value); } } public string FK_Emp { get { return this.GetValStringByKey(VGPMEmpMenuAttr.FK_Emp); } set { this.SetValByKey(VGPMEmpMenuAttr.FK_Emp, value); } } public string FK_Menu { get { return this.GetValStringByKey(VGPMEmpMenuAttr.FK_Menu); } set { this.SetValByKey(VGPMEmpMenuAttr.FK_Menu, value); } } public string Name { get { return this.GetValStringByKey(MenuAttr.Name); } set { this.SetValByKey(MenuAttr.Name, value); } } /// /// 功能 /// public MenuType HisMenuType { get { return (MenuType)this.GetValIntByKey(MenuAttr.MenuType); } set { this.SetValByKey(MenuAttr.MenuType, (int)value); } } /// /// 是否是ccSytem /// public int MenuType { get { return this.GetValIntByKey(MenuAttr.MenuType); } set { this.SetValByKey(MenuAttr.MenuType, value); } } public int Idx { get { return this.GetValIntByKey(MenuAttr.Idx); } set { this.SetValByKey(MenuAttr.Idx, value); } } public string FK_App { get { return this.GetValStringByKey(MenuAttr.FK_App); } set { this.SetValByKey(MenuAttr.FK_App, value); } } public string Img { get { string s = this.GetValStringByKey("WebPath"); if (DataType.IsNullOrEmpty(s)) { if (this.HisMenuType == GPM.MenuType.Dir) return "../../Images/Btn/View.gif"; else return "../../Images/Btn/Go.gif"; } else { return s; } } } public string Url { get { return this.GetValStringByKey(MenuAttr.Url); } set { this.SetValByKey(MenuAttr.Url, value); } } #endregion #region 构造方法 /// /// 人员菜单功能 /// public VGPMEmpMenu() { } /// /// 人员菜单功能 /// public override Map EnMap { get { if (this._enMap != null) return this._enMap; Map map = new Map("V_GPM_EmpMenu", "人员菜单对应"); map.setEnType(EnType.View); map.AddMyPK(); map.AddTBString(VGPMEmpMenuAttr.FK_Emp, null, "操作员", true, false, 0, 30, 20); map.AddTBString(VGPMEmpMenuAttr.FK_Menu, null, "菜单功能", true, false, 0, 30, 20); map.AddTBString(MenuAttr.Name, null, "菜单功能-名称", true, false, 0, 3900, 20); map.AddTBString(MenuAttr.ParentNo, null, "ParentNo", true, false, 1, 30, 20); map.AddTBString(AppAttr.UrlExt, null, "连接", true, false, 0, 3900, 20, true); map.AddDDLSysEnum(MenuAttr.MenuType, 0, "菜单类型", true, true, MenuAttr.MenuType, "@3=目录@4=功能@5=功能控制点"); map.AddTBString(MenuAttr.FK_App, null, "系统", true, false, 0, 30, 20); map.AddMyFile("图标"); this._enMap = map; return this._enMap; } } #endregion } /// /// 人员菜单功能s /// public class VGPMEmpMenus : EntitiesMyPK { #region 构造 /// /// 菜单s /// public VGPMEmpMenus() { } /// /// 得到它的 Entity /// public override Entity GetNewEntity { get { return new VGPMEmpMenu(); } } #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((VGPMEmpMenu)this[i]); } return list; } #endregion 为了适应自动翻译成java的需要,把实体转换成List. } }