Class PageBean
This class is useful for retrieving and recording html page data from DB.
Inheritance
Inherited Members
Namespace: SDBCS.bean
Assembly: SDBCS.dll
Syntax
public class PageBean
Remarks
Author Mehmet Hayati KINAŞ
Version 1.0
Constructors
PageBean(RunDB, String[], String, String[], String)
The constructor use runDB, tableName, keyField, unqField, pageField parameters for recording and retrieving page data from DB.
Declaration
public PageBean(RunDB runDB, string[] tableNames, string keyField, string[] unqField, string pageField)
Parameters
Type | Name | Description |
---|---|---|
RunDB | runDB | RunDB instance for DB processes. |
System.String[] | tableNames | Table names string array. |
System.String | keyField | Key field string value. |
System.String[] | unqField | Unique fields string array. |
System.String | pageField | Page field string value. |
Fields
isDebug
If this class open for debugging usage or not.
Declaration
public bool isDebug
Field Value
Type | Description |
---|---|
System.Boolean |
Methods
closeAll()
Firstly close local dataReader if it is open, then call runDB closeAll method.
Declaration
public void closeAll()
getErrorString()
For getting error string.
Declaration
public string getErrorString()
Returns
Type | Description |
---|---|
System.String | errorString |
getKeyData(String[])
If key data don't present unique data can be use for retrieving key data.
Declaration
public void getKeyData(string[] unqData)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | unqData | Unique data string array. |
getMulti()
For getting isMulti.
Declaration
public bool getMulti()
Returns
Type | Description |
---|---|
System.Boolean | isMulti |
getPage(String, Boolean, String[])
This method is for retrieving page data from DB.
Declaration
public string getPage(string keyData, bool isKey, string[] unqData)
Parameters
Type | Name | Description |
---|---|---|
System.String | keyData | Key data string value. |
System.Boolean | isKey | If is key value present then set true, else set false. |
System.String[] | unqData | Unique data string array. |
Returns
Type | Description |
---|---|
System.String | Page data string value. |
setMulti(Boolean)
If ther is multiple unique key then set true. Default is false.
Declaration
public void setMulti(bool isMulti)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isMulti |
setNameField(String)
For setting unique field name when there is only one unique key field.
Declaration
public void setNameField(string nameField)
Parameters
Type | Name | Description |
---|---|---|
System.String | nameField |
setPage(String, Boolean, String[], String)
This method is for recording page data to DB.
Declaration
public bool setPage(string keyData, bool isKey, string[] unqData, string pageData)
Parameters
Type | Name | Description |
---|---|---|
System.String | keyData | Key data string value. |
System.Boolean | isKey | If is key value present then set true, else set false. |
System.String[] | unqData | Unique data string array. |
System.String | pageData | Page data string value. |
Returns
Type | Description |
---|---|
System.Boolean | If recording is successful return true, else false. |