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

            return(dbManager.FillData(sql));
        }
Exemple #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);
        }
Exemple #3
0
        public static object ExecuteScalar(string sql)
        {
            DirectDbManger dbManager = new DirectDbManger();

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

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

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

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

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

            action(dbManager);
        }