111,093
社区成员




/// <summary>
/// 是否存在该记录
/// </summary>
public bool Exists(int 学号)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("select count(1) from 学生信息");
strSql.Append(" where 学号=" + 学号 + " ");
return DbHelperSQL.Exists(strSql.ToString());
}
/// <summary>
/// 是否存在该查询记录
/// </summary>
/// <param name="strSql"></param>
/// <returns></returns>
public static bool Exists(string strSql)
{
object obj = DbHelperSQL.GetSingle(strSql);
int cmdresult;
if ((Object.Equals(obj, null)) || (Object.Equals(obj, System.DBNull.Value)))
{
cmdresult = 0;
}
else
{
cmdresult = int.Parse(obj.ToString());
}
if (cmdresult == 0)
{
return false;
}
else
{
return true;
}
}