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

            strSql.Append("select count(1) from brakepumpresult");
            strSql.Append(" where tid=@tid");
            SQLiteParameter[] parameters =
            {
                new SQLiteParameter("@tid", tid)
            };
            return(SQLiteHelper.Exists(strSql.ToString(), parameters));
        }
コード例 #2
0
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(long TID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select count(1) from materialfield");
            strSql.Append(" where TID=@TID");
            SQLiteParameter[] parameters =
            {
                new SQLiteParameter("@TID", TID)
            };
            return(SQLiteHelper.Exists(strSql.ToString(), parameters));
        }
コード例 #3
0
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(string code)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select count(1) from productsort");
            strSql.Append(" where productcode=@productcode");
            SQLiteParameter[] parameters =
            {
                new SQLiteParameter("@productcode", code)
            };

            return(SQLiteHelper.Exists(strSql.ToString(), parameters));
        }
コード例 #4
0
        public bool DeleteServer(string id)
        {
            string sql = @"delete from t_host where id = @id";

            SQLiteParameter[] parameters =
            {
                new SQLiteParameter("@id", id),
            };
            try
            {
                return(SQLiteHelper.Exists(sql, parameters));
            }
            catch (Exception)
            {
                throw;
            }
        }