public static DataTable GetDataTable(string sql) { DataTable table = new DataTable(); DirectDbManger dbManager = new DirectDbManger(); return(dbManager.FillData(sql)); }
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); }
public static object ExecuteScalar(string sql) { DirectDbManger dbManager = new DirectDbManger(); return(dbManager.ExecuteScalar(sql)); }
public static string ExecuteBatchNonQuery(out bool flag, string masterSql, string[] sqlList) { DirectDbManger dbManager = new DirectDbManger(); return(dbManager.ExecuteBatchQuery(out flag, masterSql, sqlList)); }
public static string ExecuteBatchNonQuery(string[] sqlList) { DirectDbManger dbManager = new DirectDbManger(); return(dbManager.ExecuteBatchQuery(sqlList)); }
public DataTable ExecProcedure(string procName, DataTable dtParms) { DirectDbManger dbManager = new DirectDbManger(); return(dbManager.ExecProcedure(procName, dtParms)); }
public static bool ExecuteNonQuery(string sql) { DirectDbManger dbManager = new DirectDbManger(); return(dbManager.ExecuteNonQuery(sql)); }
public static void DoAction(Action <DirectDbManger> action) { DirectDbManger dbManager = new DirectDbManger(); action(dbManager); }