using BP.En; namespace BP.WF.Data { /// /// 属性 /// public class MyDeptEmpAttr : BP.En.EntityNoNameAttr { /// /// 流程编号 /// public const string FK_Dept = "FK_Dept"; } /// /// 报表 /// public class MyDeptEmp : BP.En.EntityNoName { #region attrs - attrs public string RptName = null; public override Map EnMap { get { if (this._enMap != null) return this._enMap; Map map = new Map("Port_Emp", "流程数据"); map.setEnType(EnType.View); map.AddTBStringPK(MyDeptEmpAttr.No, null, "编号", false, false, 0, 100, 100); map.AddTBString(MyDeptEmpAttr.Name, null, "名称", false, false, 0, 100, 100); map.AddTBString(MyDeptEmpAttr.FK_Dept, null, "部门", false, false, 0, 100, 100); this._enMap = map; return this._enMap; } } #endregion attrs } /// /// 报表集合 /// public class MyDeptEmps : BP.En.EntitiesNoName { /// /// 报表集合 /// public MyDeptEmps() { } public override Entity GetNewEntity { get { return new MyDeptEmp(); } } public override int RetrieveAll() { QueryObject qo = new QueryObject(this); qo.AddWhere(MyDeptEmpAttr.FK_Dept, BP.Web.WebUser.FK_Dept); return qo.DoQuery(); } #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((MyDeptEmp)this[i]); } return list; } #endregion 为了适应自动翻译成java的需要,把实体转换成List. } }