Esempio n. 1
0
        /// <summary>
        /// Deletes an subscription note
        /// </summary>
        /// <param name="subscriptionNote">The subscription note</param>
        public virtual void DeleteSubscriptionNote(SubscriptionNote subscriptionNote)
        {
            if (subscriptionNote == null)
            {
                throw new ArgumentNullException("subscriptionNote");
            }

            _subscriptionNoteRepository.Delete(subscriptionNote);

            //event notification
            _eventPublisher.EntityDeleted(subscriptionNote);
        }
Esempio n. 2
0
        /// <summary>
        /// Formats the subscription note text
        /// </summary>
        /// <param name="subscriptionNote">Subscription note</param>
        /// <returns>Formatted text</returns>
        public static string FormatSubscriptionNoteText(this SubscriptionNote subscriptionNote)
        {
            if (subscriptionNote == null)
            {
                throw new ArgumentNullException("subscriptionNote");
            }

            string text = subscriptionNote.Note;

            if (String.IsNullOrEmpty(text))
            {
                return(string.Empty);
            }

            text = HtmlHelper.FormatText(text, false, true, false, false, false, false);

            return(text);
        }