Ejemplo n.º 1
0
        public static DataTable GetDataTable(string sql)
        {
            DataTable      table     = new DataTable();
            DirectDbManger dbManager = new DirectDbManger();

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

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

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

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

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

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

            action(dbManager);
        }