//= System.Configuration.ConfigurationManager.ConnectionStrings["db"].ConnectionString; private SqlConnection GetConnection(CONNECTION_MODULE module, string con) { if (con != "") { SqlDb sqlDb = new SqlDb(); sqlDb.connStringServer = con; return(new SqlConnection(con)); } else if (module == CONNECTION_MODULE.REGULAR) { return(new SqlConnection(connStringServer)); } return(new SqlConnection(connStringServer)); }
public DataSet GetDataSetQueryText(string sqlQuery, SqlParameter[] param, CONNECTION_MODULE module, int Querytimeout = 120) { return(GetDataSet(sqlQuery, param, CommandType.Text, GetConnection(module, ""), Querytimeout)); }
public DataSet GetDataSetSP(string sqlSP, SqlParameter[] param, CONNECTION_MODULE module, int Querytimeout = 120) { return(GetDataSet(sqlSP, param, CommandType.StoredProcedure, GetConnection(module, ""), Querytimeout)); }
public object ExecuteScalarQuery(string sqlQuery, SqlParameter[] param, CONNECTION_MODULE module, int Querytimeout = 120) { return(ExecuteScalar(sqlQuery, param, CommandType.Text, GetConnection(module, ""), Querytimeout)); }
public object ExecuteScalarSP(string sqlSP, SqlParameter[] param, CONNECTION_MODULE module, int Querytimeout = 120) { return(ExecuteScalar(sqlSP, param, CommandType.StoredProcedure, GetConnection(module, ""), Querytimeout)); }
public SqlDataReader GetDataReaderQuery(string sqlQuery, CONNECTION_MODULE module, int Querytimeout = 120) { SqlDb sqlDb = new SqlDb(); return(sqlDb.GetDataReader(sqlQuery, null, CommandType.Text, sqlDb.GetConnection(module, ""), Querytimeout)); }
public SqlDataReader GetDataReaderSP(string sqlSP, CONNECTION_MODULE module, int Querytimeout = 120) { return(GetDataReader(sqlSP, null, CommandType.StoredProcedure, GetConnection(module, ""), Querytimeout)); }
public SqlDataReader GetDataReaderSP(string sqlSP, SqlParameter[] param, CONNECTION_MODULE module, int Querytimeout = 120) { SqlDb sqlDb = new SqlDb(); return(sqlDb.GetDataReader(sqlSP, param, CommandType.StoredProcedure, sqlDb.GetConnection(module, ""), Querytimeout)); }