using System;
using System.Data;
using BP.DA;
using BP.En;
using BP.Port;
namespace BP.Demo.BPFramework
{
///
/// 员工考核得分 属性
///
public class EmpCentAttr : EntityNoNameAttr
{
#region 基本属性
///
/// 员工
///
public const string FK_Emp = "FK_Emp";
///
/// 得分
///
public const string Cent = "Cent";
///
/// 年月
///
public const string FK_NY = "FK_NY";
///
/// 部门
///
public const string FK_Dept = "FK_Dept";
#endregion
}
///
/// 员工考核得分
///
public class EmpCent : EntityMyPK
{
#region 属性
///
/// 员工
///
public string FK_Emp
{
get
{
return this.GetValStringByKey(EmpCentAttr.FK_Emp);
}
set
{
this.SetValByKey(EmpCentAttr.FK_Emp, value);
}
}
///
/// 得分
///
public float Cent
{
get
{
return this.GetValFloatByKey(EmpCentAttr.Cent);
}
set
{
this.SetValByKey(EmpCentAttr.Cent, value);
}
}
///
/// 年月
///
public string FK_NY
{
get
{
return this.GetValStringByKey(EmpCentAttr.FK_NY);
}
set
{
this.SetValByKey(EmpCentAttr.FK_NY, value);
}
}
///
/// 部门
///
public string FK_Dept
{
get
{
return this.GetValStringByKey(EmpCentAttr.FK_Dept);
}
set
{
this.SetValByKey(EmpCentAttr.FK_Dept, value);
}
}
#endregion
#region 构造函数
///
/// 员工考核得分
///
public EmpCent()
{
}
///
/// 员工考核得分
///
///
public EmpCent(string mypk):base(mypk)
{
}
///
/// 重写基类方法
///
public override Map EnMap
{
get
{
if (this._enMap != null)
return this._enMap;
Map map = new Map("Demo_EmpCent", "员工考核得分");
// 普通字段
map.AddMyPK();
map.AddTBString(EmpCentAttr.FK_Emp, null, "员工", true, false, 0, 200, 10);
map.AddTBString(EmpCentAttr.FK_Dept, null, "隶属部门(冗余列)", true, false, 0, 200, 10);
map.AddTBString(EmpCentAttr.FK_NY, null, "月份", true, false, 0, 200, 10);
map.AddTBFloat(EmpCentAttr.Cent, 0, "得分", true, false);
this._enMap = map;
return this._enMap;
}
}
#endregion
///
/// 重写基类的方法.
///
///
protected override bool beforeInsert()
{
return base.beforeInsert();
}
}
///
/// 员工考核得分s
///
public class EmpCents : EntitiesMyPK
{
#region 方法
///
/// 得到它的 Entity
///
public override Entity GetNewEntity
{
get
{
return new EmpCent();
}
}
///
/// 员工考核得分s
///
public EmpCents() { }
#endregion
}
}