using System; using System.Data; using System.Collections; using BP.DA; using BP.Web; using BP.En; using BP.Port; using BP.Sys; namespace BP.WF.Template { /// /// 权限模型属性 /// public class PowerModelAttr { /// /// 流程编号 /// public const string FlowNo = "FlowNo"; /// /// 节点 /// public const string NodeID = "NodeID"; /// /// 模块 /// public const string Model = "Model"; /// <权限标识> /// 权限标记 /// public const string PowerFlag = "PowerFlag"; /// /// 权限标记名称 /// public const string PowerFlagName = "PowerFlagName"; /// /// 控制类型 /// public const string PowerCtrlType = "PowerCtrlType"; /// /// 人员编号 ModelFlagName. /// public const string ModelFlagName = "ModelFlagName"; /// /// 人员编号 /// public const string EmpNo = "EmpNo"; /// /// 人员名称 /// public const string EmpName = "EmpName"; /// /// 角色编号 /// public const string StaNo = "StaNo"; /// /// 角色名称 /// public const string StaName = "StaName"; /// /// 表单ID /// public const string FrmID = "FrmID"; } /// /// 权限模型 /// public class PowerModel : EntityMyPK { #region 基本属性 /// /// 流程编号 /// public string FlowNo { get { return this.GetValStringByKey(PowerModelAttr.FlowNo); } set { this.SetValByKey(PowerModelAttr.FlowNo, value); } } /// /// 权限标记 /// public string PowerFlag { get { return this.GetValStringByKey(PowerModelAttr.PowerFlag); } set { this.SetValByKey(PowerModelAttr.PowerFlag, value); } } #endregion #region 构造方法 /// /// 权限模型 /// public PowerModel() { } /// /// 重写基类方法 /// public override Map EnMap { get { if (this._enMap != null) return this._enMap; Map map = new Map("WF_PowerModel", "权限模型"); map.AddMyPK(); //比如: FlowData , FrmData map.AddTBString(PowerModelAttr.Model, null, "模块", true, false, 0, 100, 10); //权限标记: FlowDataDelete map.AddTBString(PowerModelAttr.PowerFlag, null, "权限标识", true, false, 0, 100, 10); //权限名称: 流程删除 map.AddTBString(PowerModelAttr.PowerFlagName, null, "权限标记名称", true, false, 0, 100, 10); map.AddDDLSysEnum(PowerModelAttr.PowerCtrlType, 0, "控制类型", true, false, PowerModelAttr.PowerCtrlType, "@0=角色@1=人员"); map.AddTBString(PowerModelAttr.EmpNo, null, "人员编号", true, false, 0, 100, 10); map.AddTBString(PowerModelAttr.EmpName, null, "人员名称", true, false, 0, 100, 10); map.AddTBString(PowerModelAttr.StaNo, null, "角色编号", true, false, 0, 100, 10); map.AddTBString(PowerModelAttr.StaName, null, "角色名称", true, false, 0, 100, 10); //Model标记. map.AddTBString(PowerModelAttr.FlowNo, null, "流程编号", true, false, 0, 100, 10); // map.AddTBInt(PowerModelAttr.NodeID, 0, "节点", true, false); map.AddTBString(PowerModelAttr.FrmID, null, "表单ID", true, false, 0, 100, 10); this._enMap = map; return this._enMap; } } #endregion } /// /// 权限模型 /// public class PowerModels : EntitiesMyPK { /// /// 权限模型 /// public PowerModels() { } /// /// 得到它的 Entity /// public override Entity GetNewEntity { get { return new PowerModel(); } } #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((PowerModel)this[i]); } return list; } #endregion 为了适应自动翻译成java的需要,把实体转换成List. } }