예제 #1
0
        public static DataTable GetDataTable(string sql)
        {
            DataTable      table     = new DataTable();
            DirectDbManger dbManager = new DirectDbManger();

            return(dbManager.FillData(sql));
        }
예제 #2
0
        public static DataTable GetUserAccessToken_QT(string sql)
        {
            DataTable      table     = new DataTable();
            DirectDbManger dbManager = new DirectDbManger();

            using (System.Data.SqlClient.SqlConnection connection = new System.Data.SqlClient.SqlConnection("USER ID=sa;PASSWORD=Bs201409;INITIAL CATALOG=BSERP3_ZB_1130CJ;DATA SOURCE=120.24.63.214,1433;CONNECT TIMEOUT=30"))
            {
                System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand(sql, connection);
                command.CommandTimeout = 6000;
                System.Data.SqlClient.SqlDataAdapter adapter = new System.Data.SqlClient.SqlDataAdapter(command);
                adapter.Fill(table);
            }
            return(table);
        }
예제 #3
0
        public static object ExecuteScalar(string sql)
        {
            DirectDbManger dbManager = new DirectDbManger();

            return(dbManager.ExecuteScalar(sql));
        }
예제 #4
0
        public static string ExecuteBatchNonQuery(out bool flag, string masterSql, string[] sqlList)
        {
            DirectDbManger dbManager = new DirectDbManger();

            return(dbManager.ExecuteBatchQuery(out flag, masterSql, sqlList));
        }
예제 #5
0
        public static string ExecuteBatchNonQuery(string[] sqlList)
        {
            DirectDbManger dbManager = new DirectDbManger();

            return(dbManager.ExecuteBatchQuery(sqlList));
        }
예제 #6
0
        public DataTable ExecProcedure(string procName, DataTable dtParms)
        {
            DirectDbManger dbManager = new DirectDbManger();

            return(dbManager.ExecProcedure(procName, dtParms));
        }
예제 #7
0
        public static bool ExecuteNonQuery(string sql)
        {
            DirectDbManger dbManager = new DirectDbManger();

            return(dbManager.ExecuteNonQuery(sql));
        }
예제 #8
0
        public static void DoAction(Action <DirectDbManger> action)
        {
            DirectDbManger dbManager = new DirectDbManger();

            action(dbManager);
        }