using BP.En;
namespace BP.CCFast.CCMenu
{
///
/// 权限组菜单
///
public class GroupMenuAttr
{
///
/// 菜单
///
public const string FK_Menu = "FK_Menu";
///
/// 权限组
///
public const string FK_Group = "FK_Group";
///
/// 是否选中.
///
public const string IsChecked = "IsChecked";
}
///
/// 权限组菜单
///
public class GroupMenu : EntityMyPK
{
#region 属性
///
/// 菜单
///
public string FK_Menu
{
get
{
return this.GetValStringByKey(GroupMenuAttr.FK_Menu);
}
set
{
this.SetValByKey(GroupMenuAttr.FK_Menu, value);
}
}
///
/// 权限组
///
public string FK_Group
{
get
{
return this.GetValStringByKey(GroupMenuAttr.FK_Group);
}
set
{
this.SetValByKey(GroupMenuAttr.FK_Group, value);
}
}
///
/// 是否选中
///
public string IsChecked
{
get
{
return this.GetValStringByKey(GroupMenuAttr.IsChecked);
}
set
{
this.SetValByKey(GroupMenuAttr.IsChecked, value);
}
}
#endregion
#region 构造方法
///
/// 权限组菜单
///
public GroupMenu()
{
}
///
/// 权限组菜单
///
public override Map EnMap
{
get
{
if (this._enMap != null)
return this._enMap;
Map map = new Map("GPM_GroupMenu", "权限组菜单");
map.setEnType(EnType.Sys);
map.AddMyPK();
map.AddTBString(GroupMenuAttr.FK_Group, null, "权限组", false, false, 0, 50, 20);
map.AddTBString(GroupMenuAttr.FK_Menu, null, "菜单", false, false, 0, 50, 20);
map.AddBoolean(GroupMenuAttr.IsChecked, true, "是否选中", true, true);
this._enMap = map;
return this._enMap;
}
}
#endregion
protected override bool beforeInsert()
{
//@wwh
this.MyPK = this.FK_Menu + "_" + this.FK_Group;
return base.beforeInsert();
}
}
///
/// 权限组菜单s
///
public class GroupMenus : EntitiesMyPK
{
#region 构造
///
/// 权限组s
///
public GroupMenus()
{
}
///
/// 得到它的 Entity
///
public override Entity GetNewEntity
{
get
{
return new GroupMenu();
}
}
#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((GroupMenu)this[i]);
}
return list;
}
#endregion 为了适应自动翻译成java的需要,把实体转换成List.
}
}