Class MenuBean
This class is useful for retrieving and recording html menu data from DB.
Inheritance
Inherited Members
Namespace: SDBCS.bean
Assembly: SDBCS.dll
Syntax
public class MenuBean
Remarks
Author Mehmet Hayati KINAŞ
Version 1.0
Constructors
MenuBean(RunDB, String[], String, String[], String)
The constructor use runDB, tableName, keyField, unqField, menuField parameters for recording and retrieving menu data from DB.
Declaration
public MenuBean(RunDB runDB, string[] tableNames, string keyField, string[] unqField, string menuField)
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 | menuField | Menu 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. |
getMenu(String, Boolean, String[])
This method is for retrieving menu data from DB.
Declaration
public string getMenu(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 | Menu data string value. |
getMulti()
For getting isMulti.
Declaration
public bool getMulti()
Returns
Type | Description |
---|---|
System.Boolean | isMulti |
setMenu(String, Boolean, String[], String)
This method is for recording menu data to DB.
Declaration
public bool setMenu(string keyData, bool isKey, string[] unqData, string menuData)
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 | menuData | Menu data string value. |
Returns
Type | Description |
---|---|
System.Boolean | If recording is successful return true, else false. |
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 |