Exemplo n.º 1
0
 public DataSet QueryDataSet(string cmdText, string tblName)
 {
     try
     {
         DataSet ds = new DataSet();
         if (tblName != string.Empty)
         {
             ds = _AdoTemplate.DataSetCreate(CommandType.Text, cmdText, new string[] { tblName });
         }
         else
         {
             ds = _AdoTemplate.DataSetCreate(CommandType.Text, cmdText);
         }
         return(ds);
     }
     catch (Exception e)
     {
         dsExceptionHandler.HandleException(e);
         ReConnection(e);
         throw e;// new Goodway.CommonModel.Exception.DbException(DbResult.SqlError, e.Message ?? "" + Environment.NewLine + e.StackTrace ?? "", cmdText);
     }
 }
Exemplo n.º 2
0
 public DataSet Get(string name)
 {
     return(AdoTemplate.DataSetCreate(CommandType.Text,
                                      string.Format("SELECT * FROM UserTable WHERE UserName = '******'", name)));
 }
Exemplo n.º 3
0
 public DataSet GetCustomers(string dataSetName)
 {
     return(AdoTemplate.DataSetCreate(CommandType.Text, selectAll, new string[] { dataSetName }));
 }
Exemplo n.º 4
0
 /// <summary>
 /// 执行sql语句
 /// </summary>
 /// <param name="cType">执行类型</param>
 /// <param name="sql">sql语句</param>
 /// <returns>结果集DataSet</returns>
 public DataSet ExecteSqlGetDataSet(CommandType cType, string sql)
 {
     return(AdoTemplate.DataSetCreate(CommandType.Text, sql));
 }
Exemplo n.º 5
0
 public DataSet GetCustomers()
 {
     return(AdoTemplate.DataSetCreate(CommandType.Text, selectAll));
 }