public int ExecuteNonQuery(CommandType commandType, string commandText) { this.idbCommand = DBManagerSingletonConnection.GetCommand(); PrepareCommand(idbCommand, this.Connection, this.Transaction, commandType, commandText, this.Parameters); int returnValue = idbCommand.ExecuteNonQuery(); idbCommand.Parameters.Clear(); return(returnValue); }
public IDataReader ExecuteReader(CommandType commandType, string commandText) { this.idbCommand = DBManagerSingletonConnection.GetCommand(); idbCommand.Connection = this.Connection; PrepareCommand(idbCommand, this.Connection, this.Transaction, commandType, commandText, this.Parameters); this.DataReader = idbCommand.ExecuteReader(); idbCommand.Parameters.Clear(); return(this.DataReader); }
public DataSet GetDataSet(CommandType commandType, string commandText) { this.idbCommand = DBManagerSingletonConnection.GetCommand(); PrepareCommand(idbCommand, this.Connection, this.Transaction, commandType, commandText, this.Parameters); IDbDataAdapter dataAdapter = DBManagerSingletonConnection.GetDataAdapter(); dataAdapter.SelectCommand = idbCommand; DataSet dataSet = new DataSet(); dataAdapter.Fill(dataSet); idbCommand.Parameters.Clear(); return(dataSet); }