using BP.DA;
using BP.Web;
using BP.En;
namespace BP.CCOA.WorkLog
{
///
/// 日志审核 属性
///
public class WorkCheckerAttr : EntityMyPKAttr
{
///
/// 内容
///
public const string Doc = "Doc";
///
/// 分数
///
public const string Cent = "Cent";
///
/// 提醒时间
///
public const string RefPK = "RefPK";
///
/// 组织编号
///
public const string OrgNo = "OrgNo";
///
/// 记录人
///
public const string Rec = "Rec";
///
/// 记录人名字
///
public const string RecName = "RecName";
///
/// 记录日期
///
public const string RDT = "RDT";
}
///
/// 日志审核
///
public class WorkChecker : EntityMyPK
{
#region 基本属性
///
/// 组织编号
///
public string OrgNo
{
get { return this.GetValStrByKey(WorkCheckerAttr.OrgNo); }
set { this.SetValByKey(WorkCheckerAttr.OrgNo, value); }
}
public string Rec
{
get { return this.GetValStrByKey(WorkCheckerAttr.Rec); }
set { this.SetValByKey(WorkCheckerAttr.Rec, value); }
}
public string RDT
{
get { return this.GetValStrByKey(WorkCheckerAttr.RDT); }
set { this.SetValByKey(WorkCheckerAttr.RDT, value); }
}
public string RecName
{
get { return this.GetValStrByKey(WorkCheckerAttr.RecName); }
set { this.SetValByKey(WorkCheckerAttr.RecName, value); }
}
#endregion
#region 构造方法
///
/// 权限控制
///
public override UAC HisUAC
{
get
{
UAC uac = new UAC();
if (WebUser.IsAdmin)
{
uac.IsUpdate = true;
return uac;
}
return base.HisUAC;
}
}
///
/// 日志审核
///
public WorkChecker()
{
}
public WorkChecker(string mypk)
{
this.setMyPK(mypk);
this.Retrieve();
}
///
/// 重写基类方法
///
public override Map EnMap
{
get
{
if (this._enMap != null)
return this._enMap;
Map map = new Map("OA_WorkChecker", "日志审核");
map.AddMyPK();
map.AddTBString(WorkCheckerAttr.RefPK, null, "RefPK", false, false, 0, 100, 10);
map.AddTBString(WorkCheckerAttr.Doc, null, "Doc", false, false, 0, 999, 10);
map.AddTBInt(WorkCheckerAttr.Cent, 0, "评分", false, false);
map.AddTBString(WorkCheckerAttr.OrgNo, null, "OrgNo", false, false, 0, 100, 10);
map.AddTBString(WorkCheckerAttr.Rec, null, "记录人", false, false, 0, 100, 10, true);
map.AddTBString(WorkCheckerAttr.RecName, null, "记录人", false, false, 0, 100, 10, true);
map.AddTBDateTime(WorkCheckerAttr.RDT, null, "记录时间", false, false);
this._enMap = map;
return this._enMap;
}
}
#endregion
protected override bool beforeInsert()
{
this.setMyPK(DBAccess.GenerGUID());
this.Rec = WebUser.No;
this.RecName = WebUser.Name;
this.OrgNo = WebUser.OrgNo;
this.RDT = DataType.CurrentDateTime;
return base.beforeInsert();
}
}
///
/// 日志审核 s
///
public class WorkCheckers : EntitiesMyPK
{
///
/// 日志审核
///
public WorkCheckers() { }
///
/// 得到它的 Entity
///
public override Entity GetNewEntity
{
get
{
return new WorkChecker();
}
}
#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((WorkChecker)this[i]);
}
return list;
}
#endregion 为了适应自动翻译成java的需要,把实体转换成List.
}
}