/// <summary> /// 获取某参与者类型下的所有参与者 /// </summary> /// <param name="parentType">父参与者类型</param> /// <param name="parentID">父参与者ID</param> /// <returns></returns> public IList<Participantor> GetPersonParticipantors(ParticipantorType parentType, string parentID) { IDictionary<string, object> parameters = new Dictionary<string, object>(); parameters.SafeAdd("ID", "none"); if (parentType == ParticipantorType.Role) { parameters.SafeAdd("ID", new AgileEAP.Core.Data.Condition(string.Format("ID in (select b.ObjectID from OM_ObjectRole b where b.RoleID='{0}')", parentID))); } else if (parentType == ParticipantorType.Org) { parameters.SafeAdd("ID", new AgileEAP.Core.Data.Condition(string.Format("ID in (select b.EmployeeID from OM_EmployeeOrg b where b.OrgID='{0}')", parentID))); } int index = 0; return repository.FindAll<Employee>(parameters).Select(o => new Participantor() { ID = o.ID, Name = o.Name, ParticipantorType = ParticipantorType.Person, SortOrder = ++index, ParentID = parentID }).ToList(); }
/// <summary> /// 获取某参与者类型下的所有参与者 /// </summary> /// <param name="parentType">父参与者类型</param> /// <param name="parentID">父参与者ID</param> /// <returns></returns> public IList<Participantor> GetPersonParticipantors(ParticipantorType parentType, string parentID) { return workflowEngine.GetPersonParticipantors(parentType, parentID); }