Пример #1
0
        public int DelArticleImageByID(int Id)
        {
            string    sql       = @"UPDATE ArticleImage SET IsDelete=@IsDelete WHERE Id=@Id";
            DbCommand dbCommand = CurrentDatabase.GetSqlStringCommand(sql);

            CurrentDatabase.AddInParameter(dbCommand, "@IsDelete", DbType.Int32, 1);
            CurrentDatabase.AddInParameter(dbCommand, "@Id", DbType.Int32, Id);
            return(CurrentDatabase.ExecuteNonQuery(dbCommand));
        }
Пример #2
0
        public int UpdateArticlePropertyIdByID(int articlePropertyId, int articleId)
        {
            string    sql       = @"UPDATE Article SET ArticlePropertyId=@articlePropertyId WHERE Id=@articleId";
            DbCommand dbCommand = CurrentDatabase.GetSqlStringCommand(sql);

            CurrentDatabase.AddInParameter(dbCommand, "@articlePropertyId", DbType.Int32, articlePropertyId);
            CurrentDatabase.AddInParameter(dbCommand, "@articleId", DbType.Int32, articleId);
            return(CurrentDatabase.ExecuteNonQuery(dbCommand));
        }