Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="conditon"></param>
        /// <param name="conn"></param>
        /// <returns></returns>
        public int GetFileTypeSetCount(IEnumerable <SearchCondition> conditon, OdbcConnection conn)
        {
            string sql = @"SELECT count(id) as count FROM fileTypeSet";

            if (conditon.Count() > 0)
            {
                string con = DBTool.GetSqlcon(conditon);
                sql += " where " + con;
            }
            OdbcParameter[] spvalues = DBTool.GetOdbcParam(conditon);
            int             count    = (int)OdbcHelper.ExecuteScalar(conn, CommandType.Text, sql, spvalues);

            return(count);
        }