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

            strSql.Append("select count(1) from SysParamInfo");
            strSql.Append(" where RecordID=@RecordID");
            SQLiteParameter[] parameters =
            {
                new SQLiteParameter("@RecordID", DbType.Int32, 4)
            };
            parameters[0].Value = RecordID;

            return(DbHelperSQLite.Exists(strSql.ToString(), parameters));
        }
コード例 #2
0
ファイル: Agent.cs プロジェクト: jzxyouok/YYHouse
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select count(1) from Agent");
            strSql.Append(" where ID=@ID ");
            SQLiteParameter[] parameters =
            {
                new SQLiteParameter("@ID", DbType.Int32, 8)
            };
            parameters[0].Value = ID;

            return(DbHelperSQLite.Exists(strSql.ToString(), parameters));
        }