public OguDataCollection<IUser> GetUsersFromSOARole(SOARolePropertiesQueryParamCollection qps) { SOARolePropertyRowCollection rows = null; OguDataCollection<IUser> users = new OguDataCollection<IUser>(); var schemaRoleID = txtSchemaRoleID.Text; var roleRows = AU.Adapters.AUMatrixHelper.LoadSchemaRolePropertyRows(schemaRoleID); if (qps != null) { rows = roleRows.Query(qps); } foreach (SOARolePropertyRowUsers rowUsers in rows.GenerateRowsUsers()) { foreach (IUser user in rowUsers.Users) { if (users.Contains(user) == false) { users.Add(user); } } } return users; }
protected internal override void FillUsers(OguDataCollection <IUser> users) { SOARoleContext.DoAction(this.PropertyDefinitions, this.ProcessInstance, (context) => { SOARolePropertyRowCollection matchedRows = this.Rows.QueryWithoutCondition(context.QueryParams); matchedRows = matchedRows.ExtractMatrixRows(); matchedRows = this.MergeExternalMatrix(matchedRows, context.QueryParams); matchedRows = matchedRows.FilterByConditionColumn(); foreach (SOARolePropertyRowUsers rowUsers in matchedRows.GenerateRowsUsers()) { foreach (IUser user in rowUsers.Users) { if (users.Contains(user) == false) { users.Add(user); } } } }); }
public OguDataCollection <IUser> GetUsersFromSOARole(SOARolePropertiesQueryParamCollection qps) { SOARolePropertyRowCollection rows = null; OguDataCollection <IUser> users = new OguDataCollection <IUser>(); var schemaRoleID = txtSchemaRoleID.Text; var roleRows = AU.Adapters.AUMatrixHelper.LoadSchemaRolePropertyRows(schemaRoleID); if (qps != null) { rows = roleRows.Query(qps); } foreach (SOARolePropertyRowUsers rowUsers in rows.GenerateRowsUsers()) { foreach (IUser user in rowUsers.Users) { if (users.Contains(user) == false) { users.Add(user); } } } return(users); }
/// <summary> /// 从矩阵中获得对象。这主要取决于上下文中的参数 /// </summary> /// <returns></returns> public OguDataCollection<IOguObject> GetObjectsFromMatrix() { OguDataCollection<IOguObject> result = new OguDataCollection<IOguObject>(); SOARoleContext context = SOARoleContext.Current; if (context != null && context.QueryParams.Count > 0) { SOARolePropertyRowCollection matchedRows = this.Rows.Query(context.QueryParams); matchedRows = matchedRows.ExtractMatrixRows(); foreach (SOARolePropertyRowUsers rowUsers in matchedRows.GenerateRowsUsers()) { foreach (IUser user in rowUsers.Users) { if (result.Contains(user) == false) result.Add(user); } } } return result; }
protected internal override void FillUsers(OguDataCollection<IUser> users) { SOARoleContext.DoAction(this.PropertyDefinitions, this.ProcessInstance, (context) => { SOARolePropertyRowCollection matchedRows = this.Rows.QueryWithoutCondition(context.QueryParams); matchedRows = matchedRows.ExtractMatrixRows(); matchedRows = this.MergeExternalMatrix(matchedRows, context.QueryParams); matchedRows = matchedRows.FilterByConditionColumn(); foreach (SOARolePropertyRowUsers rowUsers in matchedRows.GenerateRowsUsers()) { foreach (IUser user in rowUsers.Users) { if (users.Contains(user) == false) users.Add(user); } } }); }