using System;
using System.Collections;
using BP.DA;
using BP.En;
using BP.Sys.XML;
using BP.Sys;
namespace BP.WF.XML
{
///
/// 管理员
///
public class AdminMenu : XmlEn
{
#region 属性
///
/// 菜单编号
///
public string No
{
get
{
return this.GetValStringByKey("No");
}
set
{
this.SetVal("No", value);
}
}
///
/// 分组编号
///
public string GroupNo
{
get
{
return this.GetValStringByKey("GroupNo");
}
set
{
this.SetVal("GroupNo", value);
}
}
///
/// 名称
///
public string Name
{
get
{
return this.GetValStringByKey("Name");
}
set
{
this.SetVal("Name", value);
}
}
///
/// 应用范围
///
public string For
{
get
{
return this.GetValStringByKey("For");
}
set
{
this.SetVal("For", value);
}
}
///
/// Url菜单
///
public string Url
{
get
{
return this.GetValStringByKey("Url");
}
set
{
this.SetVal("Url", value);
}
}
#endregion
#region 构造
///
/// 节点扩展信息
///
public AdminMenu()
{
}
///
/// 获取一个实例
///
public override XmlEns GetNewEntities
{
get
{
return new AdminMenus();
}
}
#endregion
///
/// 是否可以使用?
///
/// 操作员编号
///
public bool IsCanUse(string no)
{
return true;
}
}
///
///
///
public class AdminMenus : XmlEns
{
#region 构造
///
/// 考核率的数据元素
///
public AdminMenus() { }
#endregion
#region 重写基类属性或方法。
///
/// 得到它的 Entity
///
public override XmlEn GetNewEntity
{
get
{
return new AdminMenu();
}
}
public override string File
{
get
{
if (BP.Difference.SystemConfig.CCBPMRunModel == CCBPMRunModel.Single)
return BP.Difference.SystemConfig.PathOfWebApp + "DataUser/XML/AdminMenu.xml";
if (BP.Difference.SystemConfig.CCBPMRunModel == CCBPMRunModel.SAAS)
{
if (BP.Web.WebUser.No.Equals("admin") == true)
return BP.Difference.SystemConfig.PathOfWebApp + "DataUser/XML/AdminMenuSAAS.xml";
else
return BP.Difference.SystemConfig.PathOfWebApp + "DataUser/XML/Admin2MenuSAAS.xml";
}
if (BP.Difference.SystemConfig.CCBPMRunModel == CCBPMRunModel.GroupInc)
{
if (BP.Web.WebUser.No.Equals("admin") == true)
return BP.Difference.SystemConfig.PathOfWebApp + "DataUser/XML/AdminMenuGroup.xml";
else
return BP.Difference.SystemConfig.PathOfWebApp + "DataUser/XML/Admin2MenuGroup.xml";
}
throw new Exception("err@系统错误....");
}
}
///
/// 物理表名
///
public override string TableName
{
get
{
return "Item";
}
}
public override Entities RefEns
{
get
{
return null; //new BP.ZF1.AdminAdminMenus();
}
}
#endregion
}
}