using System;
using System.Data;
using BP.DA;
using BP.En;
using BP.Port;
namespace BP.CN
{
///
/// 省份
///
public class SFAttr : EntityNoNameAttr
{
///
/// 片区
///
public const string FK_PQ = "FK_PQ";
///
/// 名称
///
public const string Names = "Names";
///
/// 级次
///
public const string JC = "JC";
}
///
/// 省份
///
public class SF : EntityNoName
{
#region 基本属性
///
/// 片区编号
///
public string FK_PQ
{
get
{
return this.GetValStrByKey(SFAttr.FK_PQ);
}
set
{
this.SetValByKey(SFAttr.FK_PQ, value);
}
}
///
/// 片区名称
///
public string FK_PQT
{
get
{
return this.GetValRefTextByKey(SFAttr.FK_PQ);
}
}
///
/// 小名称
///
public string Names
{
get
{
return this.GetValStrByKey(SFAttr.Names);
}
set
{
this.SetValByKey(SFAttr.Names, value);
}
}
///
/// 简称
///
public string JC
{
get
{
return this.GetValStrByKey(SFAttr.JC);
}
}
#endregion
#region 构造函数
///
/// 访问权限.
///
public override UAC HisUAC
{
get
{
UAC uac = new UAC();
uac.OpenForSysAdmin();
return uac;
}
}
///
/// 省份
///
public SF() { }
///
/// 省份
///
///
public SF(string no)
: base(no)
{
}
///
/// Map
///
public override Map EnMap
{
get
{
if (this._enMap != null)
return this._enMap;
Map map = new Map( "CN_SF", "省份");
#region 基本属性
map.EnDBUrl = new DBUrl(DBUrlType.AppCenterDSN);
map.DepositaryOfMap = Depositary.Application;
map.DepositaryOfEntity= Depositary.Application;
map.EnType = EnType.App;
map.CodeStruct = "4";
#endregion
#region 字段
map.AddTBStringPK(SFAttr.No, null, "编号", true, false, 2, 2, 2);
map.AddTBString(SFAttr.Name, null, "名称", true, false, 0, 50, 200);
map.AddTBString(SFAttr.Names, null, "小名称", true, false, 0, 50, 200);
map.AddTBString(SFAttr.JC, null, "简称", true, false, 0, 50, 200);
map.AddDDLEntities(SFAttr.FK_PQ, null, "片区", new PQs(), true);
#endregion
this._enMap = map;
return this._enMap;
}
}
#endregion
}
///
/// 省份s
///
public class SFs : EntitiesNoName
{
#region 省份.
///
/// 得到它的 Entity
///
public override Entity GetNewEntity
{
get
{
return new SF();
}
}
#endregion
#region 构造方法
///
/// 省份s
///
public SFs() { }
#endregion
}
}