|
|
|
|
using BP.DA;
|
|
|
|
|
using BP.En;
|
|
|
|
|
|
|
|
|
|
namespace BP.Demo
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ע<><D7A2><EFBFBD>û<EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class BPUserAttr : EntityNoNameAttr
|
|
|
|
|
{
|
|
|
|
|
#region <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public const string Pass = "Pass";
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>Ա<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public const string XB = "XB";
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><>ַ
|
|
|
|
|
/// </summary>
|
|
|
|
|
public const string Addr = "Addr";
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public const string FK_NY = "FK_NY";
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public const string Age = "Age";
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>ʼ<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public const string Email = "Email";
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>绰
|
|
|
|
|
/// </summary>
|
|
|
|
|
public const string Tel = "Tel";
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ע<><D7A2>ʱ<EFBFBD><CAB1>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public const string RegDate = "RegDate";
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ע<><D7A2><EFBFBD>û<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class BPUser : EntityNoName
|
|
|
|
|
{
|
|
|
|
|
#region <20><><EFBFBD><EFBFBD>
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string Pass
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return this.GetValStringByKey(BPUserAttr.Pass);
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
this.SetValByKey(BPUserAttr.Pass, value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int Age
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return this.GetValIntByKey(BPUserAttr.Age);
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
this.SetValByKey(BPUserAttr.Age, value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>Ա<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int XB
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return this.GetValIntByKey(BPUserAttr.XB);
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
this.SetValByKey(BPUserAttr.XB, value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string XBText
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return this.GetValRefTextByKey(BPUserAttr.XB);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><>ַ
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string Addr
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return this.GetValStringByKey(BPUserAttr.Addr);
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
this.SetValByKey(BPUserAttr.Addr, value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ע<><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string FK_NY
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return this.GetValStringByKey(BPUserAttr.FK_NY);
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
this.SetValByKey(BPUserAttr.FK_NY, value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>ʼ<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string Email
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return this.GetValStringByKey(BPUserAttr.Email);
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
this.SetValByKey(BPUserAttr.Email, value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>绰
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string Tel
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return this.GetValStringByKey(BPUserAttr.Tel);
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
this.SetValByKey(BPUserAttr.Tel, value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ע<><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string RegDate
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return this.GetValStringByKey(BPUserAttr.RegDate);
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
this.SetValByKey(BPUserAttr.RegDate, value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region <20><><EFBFBD>캯<EFBFBD><ECBAAF>
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ע<><D7A2><EFBFBD>û<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public BPUser()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><>д<EFBFBD><D0B4><EFBFBD><EFBFBD><E0B7BD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public override Map EnMap
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (this._enMap != null)
|
|
|
|
|
return this._enMap;
|
|
|
|
|
Map map = new Map("Demo_BPUser", "ע<><D7A2><EFBFBD>û<EFBFBD>");
|
|
|
|
|
|
|
|
|
|
// <20><>ͨ<EFBFBD>ֶ<EFBFBD>
|
|
|
|
|
map.AddTBStringPK(BPUserAttr.No, null, "<22>û<EFBFBD><C3BB><EFBFBD>", true, false, 1, 100, 100);
|
|
|
|
|
map.AddTBString(BPUserAttr.Pass, null, "<22><><EFBFBD><EFBFBD>", true, false, 0, 200, 10);
|
|
|
|
|
map.AddTBString(BPUserAttr.Name, null, "<22><><EFBFBD><EFBFBD>", true, false, 0, 200, 10);
|
|
|
|
|
map.AddTBInt(BPUserAttr.Age, 0, "<22><><EFBFBD><EFBFBD>", true, false);
|
|
|
|
|
map.AddTBString(BPUserAttr.Addr, null, "<22><>ַ", true, false, 0, 200, 10);
|
|
|
|
|
map.AddTBString(BPUserAttr.Tel, null, "<22>绰", true, false, 0, 200, 10);
|
|
|
|
|
map.AddTBString(BPUserAttr.Email, null, "<22>ʼ<EFBFBD>", true, false, 0, 200, 10);
|
|
|
|
|
map.AddTBDateTime(BPUserAttr.RegDate, null, "ע<><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", true, true);
|
|
|
|
|
|
|
|
|
|
//ö<><C3B6><EFBFBD>ֶ<EFBFBD>
|
|
|
|
|
map.AddDDLSysEnum(BPUserAttr.XB, 0,"<22>Ա<EFBFBD>", false, true, BPUserAttr.XB, "@0=Ů@1=<3D><>");
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>.
|
|
|
|
|
// map.AddDDLEntities(BPUserAttr.FK_NY, null, "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", new BP.Pub.NYs(),true);
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD>ò<EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
map.AddSearchAttr(BPUserAttr.XB);
|
|
|
|
|
// map.AddSearchAttr(BPUserAttr.FK_NY);
|
|
|
|
|
|
|
|
|
|
this._enMap = map;
|
|
|
|
|
return this._enMap;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD><C4B7><EFBFBD>.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
protected override bool beforeInsert()
|
|
|
|
|
{
|
|
|
|
|
//<2F>ڲ<EFBFBD><DAB2><EFBFBD>֮ǰ<D6AE><C7B0><EFBFBD><EFBFBD>ע<EFBFBD><D7A2>ʱ<EFBFBD><CAB1>.
|
|
|
|
|
this.RegDate = DataType.CurrentDateTime;
|
|
|
|
|
|
|
|
|
|
return base.beforeInsert();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ע<><D7A2><EFBFBD>û<EFBFBD>s
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class BPUsers : EntitiesNoName
|
|
|
|
|
{
|
|
|
|
|
#region <20><><EFBFBD><EFBFBD>
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD> Entity
|
|
|
|
|
/// </summary>
|
|
|
|
|
public override Entity GetNewEntity
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return new BPUser();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ע<><D7A2><EFBFBD>û<EFBFBD>s
|
|
|
|
|
/// </summary>
|
|
|
|
|
public BPUsers() { }
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|