예제 #1
0
 /// <summary>
 /// 返回DataTable
 /// </summary>
 /// <param name="commandText"></param>
 /// <param name="parameters">参数对象列表</param>
 /// <param name="cmdType"></param>
 /// <param name="type"></param>
 /// <param name="dbString">分库名</param>
 /// <returns></returns>
 public static DataTable Fill3(string commandText, IList <IDbDataParameter> parameters = null, CommandType cmdType = CommandType.Text, DbConntionType type = DbConntionType.OnlyRead, string dbString = null)
 {
     using (FluDataAdapter da = GetAdapter3(commandText, parameters, cmdType, type, dbString))
     {
         da.OpenConnection();
         DataTable dt = new DataTable();
         da.Fill(dt);
         da.CloseConnection();
         return(dt);
     }
 }
예제 #2
0
 /// <summary>
 /// 返回DataTable
 /// </summary>
 /// <param name="commandText"></param>
 /// <param name="cmdType"></param>
 /// <param name="paraName"></param>
 /// <param name="paraValue"></param>
 /// <param name="type"></param>
 /// <param name="dbString">分库名</param>
 /// <returns></returns>
 public static DataTable Fill(string commandText, CommandType cmdType = CommandType.Text, string[] paraName = null, object[] paraValue = null, DbConntionType type = DbConntionType.OnlyRead, string dbString = null)
 {
     using (FluDataAdapter da = GetAdapter(commandText, cmdType, paraName, paraValue, type, dbString))
     {
         da.OpenConnection();
         DataTable dt = new DataTable();
         da.Fill(dt);
         da.CloseConnection();
         return(dt);
     }
 }