ERPConnect.Queries.QueryHelper.QueryHelper
Namespace: ERPConnect.Queries.QueryHelper
Assembly: ERPConnectStandard20.dll
This class provides several search functions for queries (e.g. variants...)
Inheritance
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
Parameters
Con
R3Connection
A valid R3Connection object
Properties
Connection
Get / Sets an R3Connection object
Property Value
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
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 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();