C# Class avt.DynamicFlashRotator.Net.Data.AvtSqlHelper_Table

显示文件 Open project: dnnsharp/DynamicRotator Class Usage Examples

Public Methods

Method Description
Add ( object pKeys ) : int
AvtSqlHelper_Table ( string connString, string table, bool isIdentity, string idColumns ) : System
Delete ( object pKeys ) : void
Delete ( string whereCond ) : void
Edit ( object pKeys ) : void
EncodeSql ( object data ) : string
ExecuteNonQuery ( SqlConnection connection, CommandType commandType, string commandText ) : int
ExecuteNonQuery ( string connectionString, CommandType commandType, string commandText ) : int
ExecuteReader ( SqlConnection connection, SqlTransaction transaction, CommandType commandType, string commandText, SqlParameter commandParameters ) : System.Data.SqlClient.SqlDataReader
ExecuteReader ( string connectionString, CommandType commandType, string commandText ) : System.Data.SqlClient.SqlDataReader
ExecuteScalar ( SqlConnection connection, CommandType commandType, string commandText ) : object
ExecuteScalar ( string connectionString, CommandType commandType, string commandText ) : object
Get ( string appendSql ) : IDataReader
GetScalar ( string column, string appendSql ) : object
Update ( object pKeys ) : int
UpdateField ( string fieldName, object data, string whereCond ) : void

Private Methods

Method Description
JoinConditions ( string sep, string columns, object values ) : string
PrepareCommand ( SqlCommand command, SqlConnection connection, SqlTransaction transaction, CommandType commandType, string commandText, SqlParameter commandParameters, bool &mustCloseConnection ) : void
SqlAdd ( object pKeys ) : string
SqlEdit ( object pKeys ) : string

Method Details

Add() public method

public Add ( object pKeys ) : int
pKeys object
return int

AvtSqlHelper_Table() public method

public AvtSqlHelper_Table ( string connString, string table, bool isIdentity, string idColumns ) : System
connString string
table string
isIdentity bool
idColumns string
return System

Delete() public method

public Delete ( object pKeys ) : void
pKeys object
return void

Delete() public method

public Delete ( string whereCond ) : void
whereCond string
return void

Edit() public method

public Edit ( object pKeys ) : void
pKeys object
return void

EncodeSql() public static method

public static EncodeSql ( object data ) : string
data object
return string

ExecuteNonQuery() public static method

public static ExecuteNonQuery ( SqlConnection connection, CommandType commandType, string commandText ) : int
connection System.Data.SqlClient.SqlConnection
commandType CommandType
commandText string
return int

ExecuteNonQuery() public static method

public static ExecuteNonQuery ( string connectionString, CommandType commandType, string commandText ) : int
connectionString string
commandType CommandType
commandText string
return int

ExecuteReader() public static method

public static ExecuteReader ( SqlConnection connection, SqlTransaction transaction, CommandType commandType, string commandText, SqlParameter commandParameters ) : System.Data.SqlClient.SqlDataReader
connection System.Data.SqlClient.SqlConnection
transaction System.Data.SqlClient.SqlTransaction
commandType CommandType
commandText string
commandParameters System.Data.SqlClient.SqlParameter
return System.Data.SqlClient.SqlDataReader

ExecuteReader() public static method

public static ExecuteReader ( string connectionString, CommandType commandType, string commandText ) : System.Data.SqlClient.SqlDataReader
connectionString string
commandType CommandType
commandText string
return System.Data.SqlClient.SqlDataReader

ExecuteScalar() public static method

public static ExecuteScalar ( SqlConnection connection, CommandType commandType, string commandText ) : object
connection System.Data.SqlClient.SqlConnection
commandType CommandType
commandText string
return object

ExecuteScalar() public static method

public static ExecuteScalar ( string connectionString, CommandType commandType, string commandText ) : object
connectionString string
commandType CommandType
commandText string
return object

Get() public method

public Get ( string appendSql ) : IDataReader
appendSql string
return IDataReader

GetScalar() public method

public GetScalar ( string column, string appendSql ) : object
column string
appendSql string
return object

Update() public method

public Update ( object pKeys ) : int
pKeys object
return int

UpdateField() public method

public UpdateField ( string fieldName, object data, string whereCond ) : void
fieldName string
data object
whereCond string
return void