/// <summary> /// 是否存在该记录 /// </summary> public static bool Exists(string seaTitle, int userId) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from SearchKeyWord"); strSql.Append(" where seaTitle=@seaTitle and addUser = "******"@seaTitle", SqlDbType.VarChar, 334) }; parameters[0].Value = seaTitle; return(DBHelperSQL.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(int id) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from AddPrice"); strSql.Append(" where id=@id"); SqlParameter[] parameters = { new SqlParameter("@id", SqlDbType.Int, 4) }; parameters[0].Value = id; return(DBHelperSQL.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public static bool Exists(int productId, int addUser) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from CartTemp"); strSql.Append(" where productId=@productId and addUser = "******"@productId", SqlDbType.Int, 4) }; parameters[0].Value = productId; return(DBHelperSQL.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public static bool Exists(Model.Reply model) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from Reply"); strSql.Append(" where commentId=@commentId and addUser = "******"@commentId", SqlDbType.Int, 4) }; parameters[0].Value = model.commentId; return(DBHelperSQL.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public static bool Exists(int addUser) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from UserBussState"); strSql.Append(" where addUser=@addUser"); SqlParameter[] parameters = { new SqlParameter("@addUser", SqlDbType.Int, 4) }; parameters[0].Value = addUser; return(DBHelperSQL.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public static bool Exists(Model.TypeInfo model) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from TypeInfo"); strSql.Append(" where infoType=@infoType and typeName=@typeName"); SqlParameter[] parameters = { new SqlParameter("@infoType", SqlDbType.Int, 4), new SqlParameter("@typeName", SqlDbType.VarChar, 54) }; parameters[0].Value = model.infoType; parameters[1].Value = model.typeName; return(DBHelperSQL.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public static bool Exists(string orderNo, int num, string trade_no) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from OnLinePayStatus"); if (num == 2 || num == 4) { strSql.Append(" where orderNo=@orderNo and payStatus=0"); SqlParameter[] parameters = { new SqlParameter("@orderNo", SqlDbType.VarChar, 50) }; parameters[0].Value = orderNo; return(DBHelperSQL.Exists(strSql.ToString(), parameters)); } else if (num == 1) { strSql.Append(" where orderNo=@orderNo and payStatus=0 and remark='" + trade_no + "'"); SqlParameter[] parameters = { new SqlParameter("@orderNo", SqlDbType.VarChar, 50) }; parameters[0].Value = orderNo; return(DBHelperSQL.Exists(strSql.ToString(), parameters)); } else if (num == 5) { strSql.Append(" where orderNo=@orderNo"); SqlParameter[] parameters = { new SqlParameter("@orderNo", SqlDbType.VarChar, 50) }; parameters[0].Value = orderNo; return(DBHelperSQL.Exists(strSql.ToString(), parameters)); } else { return(true); } }