/// <summary> /// 获得节点事件实体 /// </summary> /// <param name="enName">实例名称</param> /// <returns>获得节点事件实体,如果没有就返回为空.</returns> public static FormEventBase GetFormEventBaseByEnName(string enName) { if (Htable_FormFEE == null) { Htable_FormFEE = new Hashtable(); ArrayList al = BP.En.ClassFactory.GetObjects("BP.Sys.FormEventBase"); Htable_FormFEE.Clear(); foreach (FormEventBase en in al) { Htable_FormFEE.Add(en.FormMark, en); } } foreach (string key in Htable_FormFEE.Keys) { FormEventBase fee = Htable_FormFEE[key] as FormEventBase; if (key.Contains(",")) { if (key.IndexOf(enName + ",") >= 0 || key.Length == key.IndexOf("," + enName) + enName.Length + 1) { return(fee); } } if (key == enName) { return(fee); } } return(null); }
protected override bool beforeUpdate() { //注册事件表单实体. BP.Sys.FormEventBase feb = BP.Sys.Glo.GetFormEventBaseByEnName(this.No); if (feb == null) { this.FromEventEntity = ""; } else { this.FromEventEntity = feb.ToString(); } return(base.beforeUpdate()); }