using System;
using System.Collections;
using BP.DA;
using BP.Sys;
using BP.En;
using BP.WF.Port;
namespace BP.WF.Template
{
///
/// 流程轨迹权限属性
///
public class TruckViewPowerAttr : EntityNoNameAttr
{
#region 权限组.
///
/// 发起人可看
///
public const string PStarter = "PStarter";
///
/// 参与人可看
///
public const string PWorker = "PWorker";
///
/// 被抄送人可看
///
public const string PCCer = "PCCer";
///
/// 任何人可见
///
public const string PAnyOne = "PAnyOne";
///
/// 本部门人可看
///
public const string PMyDept = "PMyDept";
///
/// 部门编号
///
public const string PSpecDeptExt = "PSpecDeptExt";
///
/// 直属上级部门可看
///
public const string PPMyDept = "PPMyDept";
///
/// 上级部门可看
///
public const string PPDept = "PPDept";
///
/// 平级部门可看
///
public const string PSameDept = "PSameDept";
///
/// 指定部门可看
///
public const string PSpecDept = "PSpecDept";
///
/// 指定的角色可看
///
public const string PSpecSta = "PSpecSta";
///
/// 角色编号
///
public const string PSpecStaExt = "PSpecStaExt";
///
/// 指定的权限组可看
///
public const string PSpecGroup = "PSpecGroup";
///
/// 指定的权限组编号
///
public const string PSpecGroupExt = "PSpecGroupExt";
///
/// 指定的人员可看
///
public const string PSpecEmp = "PSpecEmp";
///
/// 人员编号
///
public const string PSpecEmpExt = "PSpecEmpExt";
#endregion 权限组.
}
///
/// 流程轨迹权限
///
public class TruckViewPower : EntityNoName
{
#region 属性
///
/// 发起人可看
///
public bool PStarter
{
get
{
return this.GetValBooleanByKey(TruckViewPowerAttr.PStarter);
}
set
{
this.SetValByKey(TruckViewPowerAttr.PStarter, value);
}
}
///
/// 参与人可见
///
public bool PWorker
{
get
{
return this.GetValBooleanByKey(TruckViewPowerAttr.PWorker);
}
set
{
this.SetValByKey(TruckViewPowerAttr.PWorker, value);
}
}
///
/// 被抄送人可见
///
public bool PCCer
{
get
{
return this.GetValBooleanByKey(TruckViewPowerAttr.PCCer);
}
set
{
this.SetValByKey(TruckViewPowerAttr.PCCer, value);
}
}
///
/// 任何人都可见
///
public bool PAnyOne
{
get
{
return this.GetValBooleanByKey(TruckViewPowerAttr.PAnyOne);
}
set
{
this.SetValByKey(TruckViewPowerAttr.PAnyOne, value);
}
}
///
/// 本部门可见
///
public bool PMyDept
{
get
{
return this.GetValBooleanByKey(TruckViewPowerAttr.PMyDept);
}
set
{
this.SetValByKey(TruckViewPowerAttr.PMyDept, value);
}
}
///
/// 直属上级部门可见
///
public bool PPMyDept
{
get
{
return this.GetValBooleanByKey(TruckViewPowerAttr.PPMyDept);
}
set
{
this.SetValByKey(TruckViewPowerAttr.PPMyDept, value);
}
}
///
/// 上级部门可见
///
public bool PPDept
{
get
{
return this.GetValBooleanByKey(TruckViewPowerAttr.PPDept);
}
set
{
this.SetValByKey(TruckViewPowerAttr.PPDept, value);
}
}
///
/// 平级部门可见
///
public bool PSameDept
{
get
{
return this.GetValBooleanByKey(TruckViewPowerAttr.PSameDept);
}
set
{
this.SetValByKey(TruckViewPowerAttr.PSameDept, value);
}
}
///
/// 指定部门可见
///
public bool PSpecDept
{
get
{
return this.GetValBooleanByKey(TruckViewPowerAttr.PSpecDept);
}
set
{
this.SetValByKey(TruckViewPowerAttr.PSpecDept, value);
}
}
///
/// 部门编号
///
public string PSpecDeptExt
{
get
{
return this.GetValStrByKey(TruckViewPowerAttr.PSpecDeptExt);
}
set
{
this.SetValByKey(TruckViewPowerAttr.PSpecDeptExt, value);
}
}
///
/// 指定角色可见
///
public bool PSpecSta
{
get
{
return this.GetValBooleanByKey(TruckViewPowerAttr.PSpecSta);
}
set
{
this.SetValByKey(TruckViewPowerAttr.PSpecSta, value);
}
}
///
/// 角色编号
///
public string PSpecStaExt
{
get
{
return this.GetValStrByKey(TruckViewPowerAttr.PSpecStaExt);
}
set
{
this.SetValByKey(TruckViewPowerAttr.PSpecStaExt, value);
}
}
///
/// 权限组
///
public bool PSpecGroup
{
get
{
return this.GetValBooleanByKey(TruckViewPowerAttr.PSpecGroup);
}
set
{
this.SetValByKey(TruckViewPowerAttr.PSpecGroup, value);
}
}
///
/// 权限组编号
///
public string PSpecGroupExt
{
get
{
return this.GetValStrByKey(TruckViewPowerAttr.PSpecGroupExt);
}
set
{
this.SetValByKey(TruckViewPowerAttr.PSpecGroupExt, value);
}
}
///
/// 指定的人员
///
public bool PSpecEmp
{
get
{
return this.GetValBooleanByKey(TruckViewPowerAttr.PSpecEmp);
}
set
{
this.SetValByKey(TruckViewPowerAttr.PSpecEmp, value);
}
}
///
/// 指定编号
///
public string PSpecEmpExt
{
get
{
return this.GetValStrByKey(TruckViewPowerAttr.PSpecEmpExt);
}
set
{
this.SetValByKey(TruckViewPowerAttr.PSpecEmpExt, value);
}
}
#endregion
#region 构造方法
public override UAC HisUAC
{
get
{
UAC uac = new UAC();
uac.OpenForAppAdmin();
uac.IsDelete = false;
uac.IsInsert = false;
return uac;
}
}
///
/// 流程轨迹权限
///
public TruckViewPower()
{
}
public TruckViewPower(string no)
{
this.No = no;
this.Retrieve();
}
///
/// map
///
public override Map EnMap
{
get
{
if (this._enMap != null)
return this._enMap;
Map map = new Map("WF_Flow", "流程模版主表");
map.DepositaryOfEntity= Depositary.Application;
map.AddTBStringPK(TruckViewPowerAttr.No, null, "编号", true, true, 1, 10, 3);
map.AddTBString(TruckViewPowerAttr.Name, null, "名称", true, false, 0, 50, 10, true);
#region 基本控制.
map.AddBoolean(TruckViewPowerAttr.PStarter, true, "发起人可看(必选)", true, false, false);
map.AddBoolean(TruckViewPowerAttr.PWorker, true, "参与人可看(必选)", true, false, false);
map.AddBoolean(TruckViewPowerAttr.PCCer, true, "被抄送人可看(必选)", true, false, false);
map.AddBoolean(TruckViewPowerAttr.PAnyOne, false, "任何人可见", true, false, true);
#endregion 基本控制.
#region 按部门控制.
map.AddBoolean(TruckViewPowerAttr.PMyDept, true, "本部门人可看", true, true, false);
map.AddBoolean(TruckViewPowerAttr.PPMyDept, true, "直属上级部门可看", true, true, false);
map.AddBoolean(TruckViewPowerAttr.PPDept, true, "上级部门可看", true, true, false);
map.AddBoolean(TruckViewPowerAttr.PSameDept, true, "平级部门可看", true, true, false);
map.AddBoolean(TruckViewPowerAttr.PSpecDept, true, "指定部门可看", true, true, false);
map.AddTBString(TruckViewPowerAttr.PSpecDeptExt, null, "部门编号", true, false, 0, 200, 100, false);
#endregion 按部门控制.
#region 其他权限控制.
map.AddBoolean(TruckViewPowerAttr.PSpecSta, true, "指定的角色可看", true, true, false);
map.AddTBString(TruckViewPowerAttr.PSpecStaExt, null, "角色编号", true, false, 0, 200, 100, false);
map.AddBoolean(TruckViewPowerAttr.PSpecGroup, true, "指定的权限组可看", true, true, false);
map.AddTBString(TruckViewPowerAttr.PSpecGroupExt, null, "权限组", true, false, 0, 200, 100, false);
map.AddBoolean(TruckViewPowerAttr.PSpecEmp, true, "指定的人员可看", true, true, false);
map.AddTBString(TruckViewPowerAttr.PSpecEmpExt, null, "指定的人员编号", true, false, 0, 200, 100, false);
#endregion 其他权限控制.
this._enMap = map;
return this._enMap;
}
}
#endregion
#region 公用方法.
///
/// 检查指定的人员是否可以产看该轨迹图.
///
/// 流程ID
/// 操作员
///
public bool CheckICanView(Int64 workid, string userNo)
{
if (userNo == null)
userNo = BP.Web.WebUser.No;
return true;
}
#endregion
}
///
/// 流程轨迹权限s
///
public class TruckViewPowers : EntitiesNoName
{
///
/// 流程轨迹权限s
///
public TruckViewPowers()
{
}
///
/// 得到它的 Entity
///
public override Entity GetNewEntity
{
get
{
return new TruckViewPower();
}
}
#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((TruckViewPower)this[i]);
}
return list;
}
#endregion 为了适应自动翻译成java的需要,把实体转换成List.
}
}