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 class TeacherAttr:EntityNoNameAttr
{
#region 个人基本信息字段
///
/// 身份证号
///
public static string IDCars = "IDCars";
///
/// 政治面貌
///
public static string ZZMM = "ZZMM";
///
/// 教师类别
///
public static string TeachersType = "TeachersType";
///
/// 联系电话
///
public static string Tel = "Tel";
///
/// 其他联系方式
///
public static string OtherTel = "OtherTel";
///
/// 联系地址
///
public static string Address = "Address";
#endregion 个人基本信息字段
#region 教室业务基本信息字段
///
/// 最高学历
///
public static string ZGXL = "ZGXL";
///
/// 所学专业类别
///
public static string SXZY = "SXZY";
///
/// 所学专业名称
///
public static string ZYMC = "ZYMC";
///
/// 毕业院校
///
public static string BYYX = "BYYX";
///
/// 毕业时间
///
public static string BYSJ = "BYSJ";
///
/// 最高学位
///
public static string ZZXW = "ZZXW";
///
/// 学位类别
///
public static string XWLB = "XWLB";
///
/// 学位专业
///
public static string XWZY = "XWZY";
///
/// 学位院校
///
public static string XWYX = "XWYX";
///
/// 取得学位时间
///
public static string QDXWSJ = "QDXWSJ";
///
/// 现任职称
///
public static string XRZC = "XRZC";
///
/// 职称系列
///
public static string ZCXL= "ZCXL";
///
/// 聘任时间
///
public static string PRSJ = "PRSJ";
///
/// 现任行政职务
///
public static string XRXZZW = "XRXZZW";
///
/// 职务级别
///
public static string ZWJB = "ZWJB";
///
/// 职务任职时间
///
public static string ZWRZSJ = "ZWRZSJ";
///
/// 参加工作时间
///
public static string CJGZSJ = "CJGZSJ";
///
/// 从事教育时间
///
public static string CSJYSJ = "CSJYSJ";
///
/// 任教课程分类
///
public static string RJKCFL = "RJKCFL";
///
/// 任教课程名称
///
public static string RJKCMC = "RJKCMC";
#endregion 教室业务基本信息字段
}
public class Teacher : EntityNoName
{
#region 属性
///
/// 身份证号
///
public string IDCars
{
get
{
return this.GetValStrByKey(TeacherAttr.IDCars);
}
}
///
/// 政治面貌
///
public string ZZMM
{
get
{
return this.GetValStrByKey(TeacherAttr.ZZMM);
}
}
///
/// 教师类别
///
public string TeachersType
{
get
{
return this.GetValStrByKey(TeacherAttr.TeachersType);
}
}
///
/// 联系电话
///
public string Tel
{
get
{
return this.GetValStrByKey(TeacherAttr.Tel);
}
}
///
/// 其他联系方式
///
public string OtherTel
{
get
{
return this.GetValStrByKey(TeacherAttr.OtherTel);
}
}
///
/// 联系地址
///
public string Address
{
get
{
return this.GetValStrByKey(TeacherAttr.Address);
}
}
///
/// 最高学历
///
public string ZGXL
{
get
{
return this.GetValStrByKey(TeacherAttr.ZGXL);
}
}
///
/// 所学专业类别
///
public string SXZY
{
get
{
return this.GetValStrByKey(TeacherAttr.SXZY);
}
}
///
/// 所学专业名称
///
public string ZYMC
{
get
{
return this.GetValStrByKey(TeacherAttr.ZYMC);
}
}
///
/// 毕业院校
///
public string BYYX
{
get
{
return this.GetValStrByKey(TeacherAttr.BYYX);
}
}
///
/// 毕业时间
///
public string BYSJ
{
get
{
return this.GetValStrByKey(TeacherAttr.BYSJ);
}
}
///
/// 最好学位
///
public string ZZXW
{
get
{
return this.GetValStrByKey(TeacherAttr.ZZXW);
}
}
///
///学位类别
///
public string XWLB
{
get
{
return this.GetValStrByKey(TeacherAttr.XWLB);
}
}
///
/// 学位专业
///
public string XWZY
{
get
{
return this.GetValStrByKey(TeacherAttr.XWZY);
}
}
///
/// 学位院校
///
public string XWYX
{
get
{
return this.GetValStrByKey(TeacherAttr.XWYX);
}
}
///
/// 取得学位时间
///
public string QDXWSJ
{
get
{
return this.GetValStrByKey(TeacherAttr.QDXWSJ);
}
}
///
/// 现任职称
///
public string XRZC
{
get
{
return this.GetValStrByKey(TeacherAttr.XRZC);
}
}
///
/// 职称系列
///
public string ZCXL
{
get
{
return this.GetValStrByKey(TeacherAttr.ZCXL);
}
}
///
/// 聘任时间
///
public string PRSJ
{
get
{
return this.GetValStrByKey(TeacherAttr.PRSJ);
}
}
///
/// 现任行政职务
///
public string XRXZZW
{
get
{
return this.GetValStrByKey(TeacherAttr.XRXZZW);
}
}
///
/// 职务级别
///
public string ZWJB
{
get
{
return this.GetValStrByKey(TeacherAttr.ZWJB);
}
}
///
/// 任职时间
///
public string ZWRZSJ
{
get
{
return this.GetValStrByKey(TeacherAttr.ZWRZSJ);
}
}
///
/// 参加工作时间
///
public string CJGZSJ
{
get
{
return this.GetValStrByKey(TeacherAttr.CJGZSJ);
}
}
///
/// 从事教育时间
///
public string CSJYSJ
{
get
{
return this.GetValStrByKey(TeacherAttr.CSJYSJ);
}
}
///
/// 任教课程分类
///
public string RJKCFL
{
get
{
return this.GetValStrByKey(TeacherAttr.RJKCFL);
}
}
///
/// 任教课程名称
///
public string RJKCMC
{
get
{
return this.GetValStrByKey(TeacherAttr.RJKCMC);
}
}
#endregion
#region 按钮权限控制
public override UAC HisUAC
{
get
{
UAC uac = new UAC();
uac.OpenAll();
return uac;
}
}
#endregion
#region 构造方法
///
/// 权限中心
///
public Teacher()
{
}
///
/// 权限中心
///
///
public Teacher(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_Teacher");
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(TeacherAttr.IDCars, null, "身份证号", true, false, 0, 300, 200);
map.AddDDLEntities(TeacherAttr.ZZMM, null, "政治面貌", new ZZMMs(), true);
map.AddDDLSysEnum(TeacherAttr.TeachersType, 0, "教师类别", true, true, TeacherAttr.TeachersType, "@0=兼职@1=非兼职", true);
map.AddTBString(TeacherAttr.Tel, null, "联系电话", true, false, 0, 300, 200);
map.AddTBString(TeacherAttr.OtherTel, null, "其他联系方式", true, false, 0, 300, 200);
map.AddTBString(TeacherAttr.Address, null, "联系地址", true, false, 0, 300, 200);
map.AddDDLEntities(TeacherAttr.ZGXL, null, "最高学历", new Educations(), true);
map.AddDDLEntities(TeacherAttr.SXZY, null, "所学专业类别", new MajorCategorys(), true);
map.AddTBString(TeacherAttr.ZYMC, null, "所学专业名称", true, false, 0, 300, 200);
map.AddTBString(TeacherAttr.BYYX, null, "毕业院校", true, false, 0, 300, 200);
map.AddTBDate(TeacherAttr.BYSJ, "毕业时间", true, false);
map.AddDDLSysEnum(TeacherAttr.ZZXW, 0, "最高学位", true, true, TeacherAttr.ZZXW, "@0=无@1=学士@2=硕士@3=博士", true);
map.AddDDLEntities(TeacherAttr.XWLB, null, "学位类别", new DegreeCategorys(), true);
map.AddTBString(TeacherAttr.XWZY, null, "学位专业", true, false, 0, 300, 200);
map.AddTBString(TeacherAttr.XWYX, null, "学位院校", true, false, 0, 300, 200);
map.AddTBDate(TeacherAttr.QDXWSJ, "取得学位时间", true, false);
map.AddDDLEntities(TeacherAttr.XRZC, null, "现任职称", new TechnicalTitles(), true);
map.AddDDLEntities(TeacherAttr.ZCXL, null, "职称系列", new TitelTypes(), true);
map.AddTBDate(TeacherAttr.PRSJ, "聘任时间", true, false);
map.AddTBString(TeacherAttr.XRXZZW, null, "现任行政职务", true, false, 0, 300, 200);
map.AddDDLEntities(TeacherAttr.ZWJB, null, "职务级别", new JobLevels(), true);
map.AddTBDate(TeacherAttr.ZWRZSJ, "任职时间", true, false);
map.AddTBDate(TeacherAttr.CJGZSJ, "参加工作时间", true, false);
map.AddTBDate(TeacherAttr.CSJYSJ, "从事教育时间", true, false);
map.AddDDLEntities(TeacherAttr.RJKCFL, null, "任教课程分类", new Classifications(), true);
map.AddTBString(TeacherAttr.RJKCMC, null, "任教课程名称", true, false, 0, 300, 200);
this._enMap = map;
return this._enMap;
}
}
#endregion
}
public class Teachers : EntitiesNoName
{
#region 构造方法
///
/// 得到它的 Entity
///
public override Entity GetNewEntity
{
get
{
return new Teacher();
}
}
///
/// 教师s
///
public Teachers()
{
}
///
/// 教师s
///
public Teachers(string no)
{
this.Retrieve(TeacherAttr.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((Teacher)this[i]);
}
return list;
}
#endregion 为了适应自动翻译成java的需要,把实体转换成List.
}
}