//= 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 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)); }
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, int Querytimeout = 120) { SqlDb sqlDb = new SqlDb(); return(sqlDb.GetDataReader(sqlSP, null, CommandType.StoredProcedure, sqlDb.GetConnection(CONNECTION_MODULE.REGULAR, ""), Querytimeout = 120)); }