using System.Collections; using BP.DA; using BP.En; using BP.En; using BP.WF.Port; namespace BP.WF.Template { /// /// 流程对应组织属性 /// public class FlowOrgAttr { /// /// 流程 /// public const string FlowNo="FlowNo"; /// /// 组织 /// public const string OrgNo="OrgNo"; } /// /// 流程对应组织 /// public class FlowOrg :EntityMM { #region 基本属性 /// ///流程 /// public string FlowNo { get { return this.GetValStringByKey(FlowOrgAttr.FlowNo); } set { this.SetValByKey(FlowOrgAttr.FlowNo,value); } } /// /// 组织 /// public string OrgNo { get { return this.GetValStringByKey(FlowOrgAttr.OrgNo); } set { this.SetValByKey(FlowOrgAttr.OrgNo,value); } } public string OrgNoT { get { return this.GetValRefTextByKey(FlowOrgAttr.OrgNo); } } #endregion #region 构造方法 /// /// 流程对应组织 /// public FlowOrg() { } /// /// 重写基类方法 /// public override Map EnMap { get { if (this._enMap != null) return this._enMap; Map map = new Map("WF_FlowOrg", "流程对应组织"); map.IndexField = FlowOrgAttr.FlowNo; map.AddTBStringPK(FlowOrgAttr.FlowNo,null,"流程",true,true,1,100,100); map.AddDDLEntitiesPK(FlowOrgAttr.OrgNo, null, "到组织", new BP.WF.Port.Admin2Group.Orgs(), true); this._enMap = map; return this._enMap; } } #endregion } /// /// 流程对应组织 /// public class FlowOrgs : EntitiesMM { /// /// 流程对应组织 /// public FlowOrgs() { } /// /// 流程对应组织 /// /// orgNo public FlowOrgs(string orgNo) { QueryObject qo = new QueryObject(this); qo.AddWhere(FlowOrgAttr.OrgNo, orgNo); qo.DoQuery(); } /// /// 得到它的 Entity /// public override Entity GetNewEntity { get { return new FlowOrg(); } } #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((FlowOrg)this[i]); } return list; } #endregion 为了适应自动翻译成java的需要,把实体转换成List. } }