/// <summary>
        /// 读取数据
        /// </summary>
        /// <param name="statment"></param>
        /// <returns></returns>
        private DataTable ReadDataFromDB(string statment, string pars)
        {
            if (_db == null)
            {
                throw new DBNullException();
            }

            Dictionary <string, object> objPars = (Dictionary <string, object>)StringToSerialObject(pars);

            //判断是否包含select语句,如果不包含,则表示存储过程
            if (statment.ToUpper().IndexOf("SELECT") >= 0)
            {
                //执行查询语句
                return(_db.ExecuteSQL(statment, objPars));
            }
            else
            {
                //执行存储过程
                return(_db.ExecuteProcedureOneOutput(statment, objPars));
            }
        }
Beispiel #2
0
 public DataTable ExecuteProcOneOutput()
 {
     return(_dbHelper.ExecuteProcedureOneOutput(this));
 }