Class ExecTableWithRef
ExecuteTableAdvanced is the class that automates database operations. With this class, database queries are automatically generated and
the process is completed by executing queries.
For the creation of a sample;
p.execTableWithRef = new ExecTableWithRef(runDB, tableNames, fieldNames, fieldTypes, orderBy, selectFields, selectFTs,
dateFormatter, refTableNames, refFieldNames, refFieldMatchs, messageBean);
It is enough to write like this code.
Next action;
dbQuery = p.execTableWR.tableActionWR(p.action, p.formData, p.prepQueryWR);
if(dbQuery)
{
p.tableData = p.execTableWR.selectData(p.dataType);
}
else
p.tableData = null;
Inherited Members
Namespace: SDBCS.dbwork
Assembly: SDBCS.dll
Syntax
public class ExecTableWithRef : ExecuteTable
Remarks
Author Mehmet Hayati KINAŞ
Version 1.0
Constructors
ExecTableWithRef(RunDB, String[], String[], Int32[], String, String[], Int32[], DateFormatter, String[], String[], Int32[], MessageBean)
The basic variables of the constructor include database, table, form, and field information. In this way, the connection between the database and form is established and transactions are automated.
Declaration
public ExecTableWithRef(RunDB runDB, string[] tableNames, string[] fieldNames, int[] fieldTypes, string orderBy, string[] selectFields, int[] selectFTs, DateFormatter dateFormatter, string[] refTableNames, string[] refFieldNames, int[] refFieldMatchs, MessageBean messageBean)
Parameters
Type | Name | Description |
---|---|---|
RunDB | runDB | RunDB instance for DB processes. |
System.String[] | tableNames | Table names string array. |
System.String[] | fieldNames | Field names string array. |
System.Int32[] | fieldTypes | Field types integer array. |
System.String | orderBy | Order by string value. |
System.String[] | selectFields | Select fields string array. |
System.Int32[] | selectFTs | Select field types integer array. |
DateFormatter | dateFormatter | DateFormatter class instance for formatting dates. |
System.String[] | refTableNames | Reference table names string array. |
System.String[] | refFieldNames | Reference field names string array. |
System.Int32[] | refFieldMatchs | Reference field matchs integer array. |
MessageBean | messageBean | MessageBean instance for getting general messages. |
Methods
getRefData()
For getting reference data.
Declaration
public string[] getRefData()
Returns
Type | Description |
---|---|
System.String[] | refData |
getRefDataQuery()
For getting refDataQuery.
Declaration
public string[] getRefDataQuery()
Returns
Type | Description |
---|---|
System.String[] | refDataQuery |
getRefFieldMatchs()
For getting refFieldMatchs.
Declaration
public int[] getRefFieldMatchs()
Returns
Type | Description |
---|---|
System.Int32[] | refFieldMatchs |
getRefFieldNames()
For getting refFieldNames.
Declaration
public string[] getRefFieldNames()
Returns
Type | Description |
---|---|
System.String[] | refFieldNames |
getRefTableNames()
For getting refTableNames.
Declaration
public string[] getRefTableNames()
Returns
Type | Description |
---|---|
System.String[] | refTableNames |
selectRefData()
Returns the reference table data as a String type array. Error message (errorString) will occur if there is no data return.
Declaration
public string[] selectRefData()
Returns
Type | Description |
---|---|
System.String[] | Returns the object array in the String type. |
tableActionWR(String, String[], PrepQueryWithRef)
Perform table movements (select, insert, update, or delete) with reference data and return result data.
Declaration
public bool tableActionWR(string action, string[] formData, PrepQueryWithRef pqAdvanced)
Parameters
Type | Name | Description |
---|---|---|
System.String | action | The action variable determines which action will take. |
System.String[] | formData | Taken data from the form in String array. |
PrepQueryWithRef | pqAdvanced | Represent of The PrepQueryWithRef instance for setting queries. |
Returns
Type | Description |
---|---|
System.Boolean | If the DB action succeeds, it returns true, otherwise returns false. |