using System;
using System.Data;
using BP.DA;
using BP.En;
using BP.WF;
using BP.Port;
namespace BP.Demo
{
///
/// 简历 属性
///
public class ResumeAttr
{
#region 基本属性
///
/// 学生编号
///
public const string StudentNo = "StudentNo";
///
/// 工作单位
///
public const string GongZuoDanWei = "GongZuoDanWei";
///
/// 证明人
///
public const string ZhengMingRen = "ZhengMingRen";
///
/// 备注
///
public const string BeiZhu = "BeiZhu";
///
/// 年月
///
public const string NianYue = "NianYue";
#endregion
}
///
/// 简历
///
public class Resume : BP.En.EntityOID
{
#region 属性
///
/// 年月
///
public string NianYue
{
get
{
return this.GetValStringByKey(ResumeAttr.NianYue);
}
set
{
this.SetValByKey(ResumeAttr.NianYue, value);
}
}
///
/// 人员
///
public string StudentNo
{
get
{
return this.GetValStringByKey(ResumeAttr.StudentNo);
}
set
{
this.SetValByKey(ResumeAttr.StudentNo, value);
}
}
///
/// 工作单位
///
public string GongZuoDanWei
{
get
{
return this.GetValStringByKey(ResumeAttr.GongZuoDanWei);
}
set
{
this.SetValByKey(ResumeAttr.GongZuoDanWei, value);
}
}
///
/// 证明人
///
public string ZhengMingRen
{
get
{
return this.GetValStringByKey(ResumeAttr.ZhengMingRen);
}
set
{
this.SetValByKey(ResumeAttr.ZhengMingRen, value);
}
}
///
/// 备注
///
public string BeiZhu
{
get
{
return this.GetValStringByKey(ResumeAttr.BeiZhu);
}
set
{
this.SetValByKey(ResumeAttr.BeiZhu, value);
}
}
#endregion
#region 构造函数
///
/// 简历
///
public Resume()
{
}
///
/// 简历
///
/// 实体类
public Resume(int oid):base(oid)
{
}
///
/// 重写基类方法
///
public override Map EnMap
{
get
{
if (this._enMap != null)
return this._enMap;
Map map = new Map("Demo_Resume", "简历");
map.AddTBIntPKOID();
map.AddTBString(ResumeAttr.StudentNo, null, "学生编号", false, false, 0, 200, 10);
map.AddTBString(ResumeAttr.NianYue, null, "年月", true, false, 0, 200, 50);
map.AddTBString(ResumeAttr.GongZuoDanWei, null, "工作单位", true, false, 0, 200, 70);
map.AddTBString(ResumeAttr.ZhengMingRen, "", "证明人", true, false, 1, 200, 50);
map.AddTBString(ResumeAttr.BeiZhu, null, "备注", true, false, 0, 200, 150);
this._enMap = map;
return this._enMap;
}
}
#endregion
protected override bool beforeUpdateInsertAction()
{
if (this.ZhengMingRen.Length == 0)
throw new Exception("@证明人信息不能为空.");
return base.beforeUpdateInsertAction();
}
public override UAC HisUAC
{
get
{
UAC uac = new UAC();
uac.IsDelete = true;
uac.IsUpdate = true;
uac.IsInsert = true;
return uac;
}
}
}
///
/// 简历s
///
public class Resumes : BP.En.EntitiesOID
{
#region 方法
///
/// 得到它的 Entity
///
public override Entity GetNewEntity
{
get
{
return new Resume();
}
}
///
/// 简历s
///
public Resumes() { }
#endregion
}
}