示例#1
0
		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);
                        }
                    }
                }
            });
        }
示例#3
0
        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);
        }
示例#4
0
        /// <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);
                    }
                }
            });
        }