public string GetTitle(EventEntity @event, NotificationType notificationType, bool isHtml)
        {
            var description = notificationType.GetDescription();
            var name        = GetEventName(@event, isHtml);

            var title = string.Format(description, name);

            return(title);
        }
示例#2
0
        public string GetDescription(EditionEntity edition, NotificationType notificationType)
        {
            var url = notificationType == NotificationType.EditionExistence
                ? _editionHelper.GetEditionListUrl(edition.Event, notificationType.GetAttribute <NotificationAttribute>().Fragment)
                : _editionHelper.GetEditionUrl(edition, notificationType.GetAttribute <NotificationAttribute>().Fragment);
            var name = _editionHelper.GetNameWithEditionNo(edition);
            var link = $"<a href=\"{url}\" target=\"_blank\"><b>{name}</b></a>";
            var desc = notificationType.GetDescription();

            return(string.Format(desc, link));
        }
        public string GetTitle(EditionEntity edition, NotificationType notificationType, bool isHtml)
        {
            var description    = notificationType.GetDescription();
            var name           = GetEditionName(edition, isHtml);
            var nameWithNumber = _editionHelper.GetNameWithEditionNo(edition.EditionNo, edition.EditionName);

            var title = edition.EditionNo > 0
                ? string.Format(description, nameWithNumber)
                : string.Format(description, name);

            return(title);
        }