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
{
///
/// 授权方式
///
public enum AuthorWay
{
///
/// 不授权
///
None=0,
///
/// 全部授权
///
All=1,
///
/// 指定流程授权
///
SpecFlows=2
}
///
/// 授权属性
///
public class AuthAttr
{
///
/// 流程编号
///
public const string MyPK = "MyPK";
///
/// 类型(0=全部流程1=指定流程)
///
public const string AuthType = "AuthType";
///
/// 授权人
///
public const string Auther = "Auther";
///
/// 流程编号
///
public const string FlowNo = "FlowNo";
///
/// 流程名称
///
public const string FlowName = "FlowName";
///
/// 取回日期
///
public const string TakeBackDT = "TakeBackDT";
///
/// 人员编号.
///
public const string AutherToEmpNo = "AutherToEmpNo";
///
/// 人员名称
///
public const string AutherToEmpName = "AutherToEmpName";
///
/// 记录日期
///
public const string RDT = "RDT";
}
///
/// 授权
///
public class Auth : EntityMyPK
{
#region 基本属性
///
/// 流程编号
///
public string FlowNo
{
get
{
return this.GetValStringByKey(AuthAttr.FlowNo);
}
set
{
this.SetValByKey(AuthAttr.FlowNo, value);
}
}
///
/// 取回日期
///
public string TakeBackDT
{
get
{
return this.GetValStringByKey(AuthAttr.TakeBackDT);
}
set
{
this.SetValByKey(AuthAttr.TakeBackDT, value);
}
}
public string Auther
{
get
{
return this.GetValStringByKey(AuthAttr.Auther);
}
set
{
this.SetValByKey(AuthAttr.Auther, value);
}
}
public string AutherToEmpNo
{
get
{
return this.GetValStringByKey(AuthAttr.AutherToEmpNo);
}
set
{
this.SetValByKey(AuthAttr.AutherToEmpNo, value);
}
}
public string AutherToEmpName
{
get
{
return this.GetValStringByKey(AuthAttr.AutherToEmpName);
}
set
{
this.SetValByKey(AuthAttr.AutherToEmpName, value);
}
}
///
/// 授权类型
///
public AuthorWay AuthType
{
get
{
return (AuthorWay)this.GetValIntByKey(AuthAttr.AuthType);
}
set
{
this.SetValByKey(AuthAttr.AuthType, (int)value);
}
}
#endregion
#region 构造方法
///
/// 授权
///
public Auth()
{
}
///
/// 重写基类方法
///
public override Map EnMap
{
get
{
if (this._enMap != null)
return this._enMap;
Map map = new Map("WF_Auth", "授权");
map.AddMyPK();
map.AddTBString(AuthAttr.Auther, null, "授权人", true, false, 0, 100, 10);
map.AddTBInt(AuthAttr.AuthType, 0, "类型(0=全部流程1=指定流程2=取消)", true, false);
map.AddTBString(AuthAttr.AutherToEmpNo, null, "授权给谁?", true, false, 0, 100, 10);
map.AddTBString(AuthAttr.AutherToEmpName, null, "授权给谁?", true, false, 0, 100, 10);
map.AddTBString(AuthAttr.FlowNo, null, "流程编号", true, false, 0, 100, 10);
map.AddTBString(AuthAttr.FlowName, null, "流程名称", true, false, 0, 100, 10);
map.AddTBDate(AuthAttr.TakeBackDT, null, "取回日期", true, false);
map.AddTBDate(AuthAttr.RDT, null, "记录日期", true, false);
this._enMap = map;
return this._enMap;
}
}
#endregion
}
///
/// 授权
///
public class Auths : EntitiesMyPK
{
///
/// 授权
///
public Auths() { }
///
/// 得到它的 Entity
///
public override Entity GetNewEntity
{
get
{
return new Auth();
}
}
#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((Auth)this[i]);
}
return list;
}
#endregion 为了适应自动翻译成java的需要,把实体转换成List.
}
}