/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(int id) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from " + PubConstant.date_prefix + "Role"); strSql.Append(" where id=@id "); SqlParameter[] parameters = { new SqlParameter("@id", SqlDbType.Int, 4) }; parameters[0].Value = id; return(DbHelpers.Exists(strSql.ToString(), parameters)); }