using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BP.DA;
using BP.En;
namespace BP.Demo.HNZY
{
public enum XZ
{
///
/// 公办
///
GB=0,
///
/// 民办
///
MB=1,
///
/// 其他
///
QT=2
}
public class SchoolManagerAttr:EntityNoNameAttr
{
///
/// 学校简称
///
public static string PathName = "PathName";
///
/// 所属教育局
///
public static string Department = "Department";
///
/// 招生代码
///
public static string ZSDM = "ZSDM";
///
/// 性质
///
public static string XZ = "ZX";
///
/// 类别
///
public static string LB = "LB";
///
/// 评估类别
///
public static string PGLB = "PGLB";
///
/// 学校所在地
///
public static string SZD = "SZD";
///
/// 详细地址
///
public static string Address = "Address";
///
/// 邮政编码
///
public static string YZBM = "YZBM";
///
/// 联系电话
///
public static string Tel = "Tel";
///
/// 网址
///
public static string WZ = "WZ";
}
public class SchoolManager : EntityNoName
{
#region 属性
///
/// 简称
///
public string PathName
{
get
{
return this.GetValStrByKey(SchoolManagerAttr.PathName);
}
}
///
/// 属于教育局
///
public string Department
{
get
{
return this.GetValStrByKey(SchoolManagerAttr.Department);
}
}
///
/// 招生代码
///
public string ZSDM
{
get
{
return this.GetValStrByKey(SchoolManagerAttr.ZSDM);
}
}
///
/// 性质
///
public int XZ
{
get
{
return this.GetValIntByKey(SchoolManagerAttr.XZ);
}
}
///
/// 类别
///
public string LB
{
get
{
return this.GetValStrByKey(SchoolManagerAttr.LB);
}
}
///
/// 评估类别
///
public string PGLB
{
get
{
return this.GetValStrByKey(SchoolManagerAttr.PGLB);
}
}
///
/// 学校所在地
///
public string SZD
{
get
{
return this.GetValStrByKey(SchoolManagerAttr.SZD);
}
}
///
/// 详细地址
///
public string Address
{
get
{
return this.GetValStrByKey(SchoolManagerAttr.Address);
}
}
///
/// 邮政编码
///
public string YZBM
{
get
{
return this.GetValStrByKey(SchoolManagerAttr.YZBM);
}
}
///
/// 联系电话
///
public string Tel
{
get
{
return this.GetValStrByKey(SchoolManagerAttr.Tel);
}
}
///
/// 网址
///
public string WZ
{
get
{
return this.GetValStrByKey(SchoolManagerAttr.WZ);
}
}
#endregion
#region 按钮权限控制
public override UAC HisUAC
{
get
{
UAC uac = new UAC();
uac.OpenAll();
return uac;
}
}
#endregion
#region 构造方法
///
/// 权限中心
///
public SchoolManager()
{
}
///
/// 权限中心
///
///
public SchoolManager(string no)
{
this.No = no;
this.Retrieve();
}
///
/// EnMap
///
public override Map EnMap
{
get
{
if (this._enMap != null)
return this._enMap;
Map map = new Map("Demo_SchoolManager");
map.DepositaryOfEntity = Depositary.None;
map.EnDesc = "省属学校管理";
map.EnType = EnType.Sys;
map.AddTBStringPK(SchoolManagerAttr.No, null, "编码", true, true, 0, 100, 300);
map.AddTBString(SchoolManagerAttr.Name,null,"全称",true,false,0,100,300);
map.AddTBString(SchoolManagerAttr.PathName, null, "简称", true, false, 0, 300, 200);
map.AddDDLEntities(SchoolManagerAttr.Department, null, "主管教育局", new CityDepartments(), true);
map.AddTBString(SchoolManagerAttr.ZSDM, null, "招生代码", true, false, 0, 300, 200);
map.AddDDLSysEnum(SchoolManagerAttr.XZ, 0, "性质", true, true, SchoolManagerAttr.XZ, "@0=公办@1=民办@2=其他",true);
map.AddDDLSysEnum(SchoolManagerAttr.LB,0,"类别",true,true, SchoolManagerAttr.LB, "@0=普通中专@1=高等中专",true);
map.AddDDLSysEnum(SchoolManagerAttr.PGLB,0, "评估类型",true,true, SchoolManagerAttr.PGLB, "@0=未评估@1=普通中专@2=高等中专",true);
map.AddDDLEntities(SchoolManagerAttr.SZD, null, "学校所在地", new BP.CN.Citys(), true);
map.AddTBString(SchoolManagerAttr.Address, null, "详细地址", true, false, 0, 300, 300);
map.AddTBString(SchoolManagerAttr.YZBM, null, "邮政编码", true, false, 0, 100, 200);
map.AddTBString(SchoolManagerAttr.Tel, null, "联系电话", true, false, 0, 300, 100);
map.AddTBString(SchoolManagerAttr.WZ, null, "网址", true, false, 0, 100, 200);
this._enMap = map;
return this._enMap;
}
}
#endregion
}
public class SchoolManagers : EntitiesNoName
{
#region 构造方法
///
/// 得到它的 Entity
///
public override Entity GetNewEntity
{
get
{
return new SchoolManager();
}
}
///
/// 学校s
///
public SchoolManagers()
{
}
///
/// 学校s
///
public SchoolManagers(string no)
{
this.Retrieve(SchoolManagerAttr.No, no);
}
#endregion 构造方法
#region 重写查询,add by zhoupeng 2015.09.30 为了适应能够从 webservice 数据源查询数据.
///
/// 重写查询全部适应从WS取数据需要
///
///
public override int RetrieveAll()
{
//if (BP.Web.WebUser.No != "admin")
// throw new Exception("@您没有查询的权限.");
return base.RetrieveAll();
}
///
/// 重写重数据源查询全部适应从WS取数据需要
///
///
public override int RetrieveAllFromDBSource()
{
return base.RetrieveAllFromDBSource();
}
#endregion 重写查询.
#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((SchoolManager)this[i]);
}
return list;
}
#endregion 为了适应自动翻译成java的需要,把实体转换成List.
}
}