|
fitframework
|
Class DBBase, phụ trách tất cả các thao tác với cơ sở dữ liệu. Lớp này không được sử dụng trực tiếp mà sẽ được thực hiện qua các lớp *_BUS như trong BusinessController More...
Public Member Functions | |
| DBBase (string sConnectionString) | |
| Initializes a new instance of the DBBase class. | |
| DBBase (string server, string data, string user, string password) | |
| Initializes a new instance of the DBBase class. | |
| DBBase (string server, string data) | |
| Initializes a new instance of the DBBase class. | |
| void | setCommandTimeout (int _value) |
| Giá trị mặc định theo SQL, được tính theo đơn vị giây. | |
| void | setConnection (SqlConnection _conn) |
| Sets the connection. | |
| void | BuildConnectionString (string server, string data) |
| Builds the connection string. | |
| void | BuildConnectionString (string server, string data, string user, string password) |
| Builds the connection string. | |
| int | Open () |
| Opens this instance. | |
| void | Close () |
| Closes this instance. | |
| void | setTran (SqlTransaction pTran) |
| Gán transaction trong SQL cho đối tượng này để đảm bảo nhiều đối tượng có thể thực hiện được cùng một phiên dữ liệu. | |
| int | beginTran () |
| Create the transaction for current connection. | |
| int | commit () |
| Commits the current transaction. | |
| int | rollback () |
| Rollbace the current transaction. | |
| SqlTransaction | getTran () |
| get current transation | |
| int | doCommand (ref SqlCommand cm) |
| Does the command. | |
| int | doSQL (string SQL) |
| Does the SQL. | |
| int | getSQL (ref DataSet ds, string sTableName, string SQL) |
| Gets the SQL. | |
| SqlDataReader | getSQL (string SQL) |
| Gets the SQL. | |
| DataTable | getSQLTable (string SQL) |
| Gets the SQL. | |
| int | getCommand (ref System.Data.DataSet ds, string sTableName, SqlCommand cm) |
| Gets the command. | |
| SqlDataReader | getCommand (SqlCommand cm) |
| Gets the command. | |
| DataTable | getCommandTable (SqlCommand cm) |
| Gets the command table. | |
| int | getCommand (ref System.Data.DataSet ds, ref SqlCommand cm) |
| Gets the store procedure. | |
| int | getCommand (ref System.Data.DataSet ds, string sTableName, ref SqlCommand cm) |
| Gets the store procedure. | |
| SqlCommand | createCommand (string spName, SqlParameter pr, params SqlParameter[] para) |
| Tạo ra câu lệnh sql từ một stored procedure. | |
| SqlCommand | createCommand (string spName, params spParam[] para) |
| Creates the command. | |
| SqlCommand | createCommandSQL (string Sql, params spParam[] para) |
| create command from direct sql | |
| int | getCount (ref SqlCommand cm) |
| Get the count(*) in select and convert it to int. | |
| DataTable | getPage (string sql, int startRecord, int rowPerPage) |
| Gets the page. | |
| DataTable | getPage (ref SqlCommand cm, int startRecord, int rowPerPage) |
| Gets the page. | |
| int | getVersion () |
| Lấy phiên bản chính của sql server hiện tại. | |
| int | doStoreProcedure (string spName, params spParam[] para) |
| doStoreProcedure Does the store procedure. | |
| int | getStoreProcedure (ref DataSet ds, string tbName, string storePocedureName, params spParam[] para) |
| Gets the store procedure. | |
Public Attributes | |
| __error | _er = new __error() |
| Thông tin về lỗi cuối cùng được thực hiện bởi hệ thống. | |
Properties | |
| SqlConnection | Connection [get] |
| Gets the connection. | |
| string | ConnectionString [get, set] |
| Gets or sets the connection string. | |
| bool | Connected [get] |
| Gets a value indicating whether this DBBase is connected. | |
Class DBBase, phụ trách tất cả các thao tác với cơ sở dữ liệu. Lớp này không được sử dụng trực tiếp mà sẽ được thực hiện qua các lớp *_BUS như trong BusinessController
|
inline |
Initializes a new instance of the DBBase class.
| sConnectionString | The s connection string. |
|
inline |
Initializes a new instance of the DBBase class.
| server | The server. |
| data | The data. |
| user | The user. |
| password | The password. |
|
inline |
Initializes a new instance of the DBBase class.
| server | The server. |
| data | The data. |
|
inline |
Create the transaction for current connection.
|
inline |
Builds the connection string.
| server | The server. |
| data | The data. |
|
inline |
Builds the connection string.
| server | The server. |
| data | The data. |
| user | The user. |
| password | The password. |
|
inline |
Commits the current transaction.
|
inline |
Creates the command.
| spName | Name of the stored procedure. |
| para | stored procedure parameters |
|
inline |
Tạo ra câu lệnh sql từ một stored procedure.
| spName | Tên hàm |
| pr | Tham số |
| para | Các tham số khác |
|
inline |
create command from direct sql
| Sql | The SQL. |
| para | The para. |
|
inline |
Does the command.
| cm | The cm. |
|
inline |
Does the SQL.
| SQL | The SQL. |
|
inline |
doStoreProcedure Does the store procedure.
| spName | Name of the sp. |
| para | The para. |
|
inline |
Gets the store procedure.
| ds | The ds. |
| cm | The cm. |
|
inline |
Gets the store procedure.
| ds | The ds. |
| sTableName | Name of the s table. |
| cm | The cm. |
|
inline |
Gets the command.
| ds | The ds. |
| sTableName | Name of the s table. |
| cm | The cm. |
|
inline |
Gets the command.
| cm | The cm. |
|
inline |
Gets the command table.
| cm | The cm. |
|
inline |
Get the count(*) in select and convert it to int.
| cm | Sql command that contain the select count(*) |
|
inline |
Gets the page.
| cm | The cm. |
| startRecord | The start record. |
| rowPerPage | The row per page. |
|
inline |
Gets the page.
| sql | The SQL. |
| startRecord | The start record. |
| rowPerPage | The row per page. |
|
inline |
Gets the SQL.
| ds | The ds. |
| sTableName | Name of the s table. |
| SQL | The SQL. |
|
inline |
Gets the SQL.
| SQL | The SQL. |
|
inline |
Gets the SQL.
| SQL | The SQL. |
|
inline |
Gets the store procedure.
| ds | The ds. |
| tbName | Name of the tb. |
| storePocedureName | Name of the store pocedure. |
| para | The para. |
|
inline |
get current transation
|
inline |
Lấy phiên bản chính của sql server hiện tại.
|
inline |
Opens this instance.
|
inline |
Rollbace the current transaction.
|
inline |
Giá trị mặc định theo SQL, được tính theo đơn vị giây.
| _value |
|
inline |
Sets the connection.
| _conn | The _conn. |
|
inline |
Gán transaction trong SQL cho đối tượng này để đảm bảo nhiều đối tượng có thể thực hiện được cùng một phiên dữ liệu.
| pTran |
|
get |
Gets a value indicating whether this DBBase is connected.
true if connected; otherwise, false.
|
get |
Gets the connection.
The connection.
|
getset |
Gets or sets the connection string.
The connection string.