Skip to content

ERPConnect.Queries.QueryHelper.QueryHelper

Namespace: ERPConnect.Queries.QueryHelper
Assembly: ERPConnectStandard20.dll

This class provides several search functions for queries (e.g. variants...)

public class QueryHelper

Inheritance

objectQueryHelper

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

QueryHelper(R3Connection)

Constructs a QueryHelper object

public QueryHelper(R3Connection Con)

Parameters

Con R3Connection

A valid R3Connection object

Properties

Connection

Get / Sets an R3Connection object

public R3Connection Connection { get; set; }

Property Value

R3Connection

Methods

SearchForQueries(WorkSpace, string, string, string)

Searches for queries by using the given search patterns

public SearchResultQueryDataTable SearchForQueries(WorkSpace WorkSpace, string SearchPatternUserGroup, string SearchPatternQueryName, string SearchPatternFunctionAreaName)

Parameters

WorkSpace WorkSpace

Workspace local / global

SearchPatternUserGroup string

Search pattern for the user group (you can use *)

SearchPatternQueryName string

Search pattern for the query name (you can use *)

SearchPatternFunctionAreaName string

Search pattern for the function area (you can use *)

Returns

SearchResultQueryDataTable

A DataTable which contains the search result set

SearchForUserGroups(WorkSpace, string)

Searches for user groups

public SearchResultUserGroupsDataTable SearchForUserGroups(WorkSpace WorkSpace, string UserGroupSearchPattern)

Parameters

WorkSpace WorkSpace

Workspace local / global

UserGroupSearchPattern string

Search string for user groupy (you can use * as well)

Returns

SearchResultUserGroupsDataTable

SearchResultUserGroupsDataTable which contains the result set

Examples

The example below shows how to retrieve every user group in the system (search pattern *)

R3Connection con = new R3Connection("hamlet",11,"Theobald","pw","EN","800");

con.Open();

QueryHelper qh = new QueryHelper(con);
SearchResultUserGroupsDataTable ret =  qh.SearchForUserGroups(WorkSpace.GlobalArea,"*");

Form1 f1 = new Form1();
f1.dataGrid1.DataSource = ret;
f1.ShowDialog();

SearchForVariants(WorkSpace, string, string)

Searches for variants to a given query

public SearchResultVariantsDataTable SearchForVariants(WorkSpace WorkSpace, string UserGroupName, string QueryName)

Parameters

WorkSpace WorkSpace

Workspace local / global

UserGroupName string

Name of the user group

QueryName string

Name of the query

Returns

SearchResultVariantsDataTable

SearchResultVariantsDataTable which contains the result set

Examples

[ C# ]

R3Connection con = new R3Connection( ... );

con.Open();

QueryHelper qh = new QueryHelper(con);
SearchResultVariantsDataTable ret =  qh.SearchForVariants(WorkSpace.GlobalArea,"/SAPQUERY/MB","MEBESTWERTAN");

Form1 f1 = new Form1();
f1.dataGrid1.DataSource = ret;
f1.ShowDialog();

Last update: January 4, 2024