示例#1
0
        public Hashtable FindHashtable(string tableName, StringBuilder WhereSql, DbParameter[] parameters)
        {
            StringBuilder builder = DatabaseCommon.SelectSql(tableName, 1);

            builder.Append(WhereSql);
            return(DatabaseReader.ReaderToHashtable(DbHelper.ExecuteReader(CommandType.Text, builder.ToString(), parameters)));
        }
示例#2
0
        public Hashtable FindHashtable(string tableName, string propertyName, object propertyValue)
        {
            StringBuilder builder = DatabaseCommon.SelectSql(tableName, 1);

            builder.Append(" AND ").Append(propertyName).Append("=").Append(DbHelper.DbParmChar + propertyName);
            IList <DbParameter> source = new List <DbParameter> {
                DbFactory.CreateDbParameter(DbHelper.DbParmChar + propertyName, propertyValue)
            };

            return(DatabaseReader.ReaderToHashtable(DbHelper.ExecuteReader(CommandType.Text, builder.ToString(), source.ToArray <DbParameter>())));
        }
示例#3
0
 public Hashtable FindHashtableBySql(string strSql, DbParameter[] parameters)
 {
     return(DatabaseReader.ReaderToHashtable(DbHelper.ExecuteReader(CommandType.Text, strSql.ToString(), parameters)));
 }