Example #1
0
 //= 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));
 }
Example #2
0
        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));
        }
Example #3
0
        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));
        }
Example #4
0
        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));
        }