示例#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));
 }
示例#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));
        }
示例#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));
        }
示例#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));
        }