示例#1
0
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int sr_id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select count(1) from sr_info");
            strSql.Append(" where sr_id=@sr_id ");
            MySqlParameter[] parameters =
            {
                new MySqlParameter("@sr_id", MySqlDbType.Int32, 32)
            };
            parameters[0].Value = sr_id;

            return(DbHelperMySQL.Exists(strSql.ToString(), parameters));
        }
示例#2
0
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int type_id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select count(1) from material_type");
            strSql.Append(" where type_id=@type_id ");
            MySqlParameter[] parameters =
            {
                new MySqlParameter("@type_id", MySqlDbType.Int32, 11)
            };
            parameters[0].Value = type_id;

            return(DbHelperMySQL.Exists(strSql.ToString(), parameters));
        }
示例#3
0
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int out_id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select count(1) from out_storage");
            strSql.Append(" where out_id=@out_id ");
            MySqlParameter[] parameters =
            {
                new MySqlParameter("@out_id", MySqlDbType.Int32, 128)
            };
            parameters[0].Value = out_id;

            return(DbHelperMySQL.Exists(strSql.ToString(), parameters));
        }
示例#4
0
        public bool Exists(int id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select count(1) from c_stock_code");
            strSql.Append(" where ");
            strSql.Append(" id = @id  ");
            MySqlParameter[] parameters =
            {
                new MySqlParameter("@id", MySqlDbType.Int32)
            };
            parameters[0].Value = id;

            return(DbHelperMySQL.Exists(strSql.ToString(), parameters));
        }
示例#5
0
        public bool Exists(string name)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select count(1) from User");
            strSql.Append(" where ");
            strSql.Append(" name = @name  ");
            MySqlParameter[] parameters =
            {
                new MySqlParameter("@name", MySqlDbType.VarChar, 255)
            };
            parameters[0].Value = name;

            return(DbHelperMySQL.Exists(strSql.ToString(), parameters));
        }
示例#6
0
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(string key)
        {
            string sSql = "SELECT COUNT(1) from UserMst WHERE Phone = '" + key + "' OR UserID='" + key + "'";

            return(DbHelperMySQL.Exists(sSql));
        }