コード例 #1
0
        public override string GetRecordResult(Dictionary <string, string> dictionaryColumnValues)
        {
            var id = dictionaryColumnValues["Id"];
            var notificationString = string.Empty;
            var notificationId     = dictionaryColumnValues["Id"];
            var createdById        = dictionaryColumnValues["CreatedById"];
            var createdOn          = dictionaryColumnValues["CreatedOn"];
            var createdByName      = dictionaryColumnValues["CreatedByName"];
            var photoId            = dictionaryColumnValues["PhotoId"];
            var typeName           = dictionaryColumnValues["TypeName"];
            var typeAction         = dictionaryColumnValues["TypeAction"];
            var messageId          = dictionaryColumnValues["MessageId"];
            var message            = dictionaryColumnValues["Message"];
            var entityId           = dictionaryColumnValues["EntityId"];
            var schemaName         = dictionaryColumnValues["SchemaName"];
            var clearString        = message.GetClearString();
            var dateTime           = GetDateEvent(createdOn);
            var popup = new PopupData()
            {
                Title            = GetTitle(typeName),
                Body             = createdByName + " " + typeAction + " \"" + clearString + "\" " + dateTime,
                ImageId          = photoId,
                EntityId         = entityId,
                EntitySchemaName = schemaName,
                MessageId        = messageId
            };
            var serializePopup = popup.Serialize();

            return(string.Format(template, notificationId, serializePopup));
        }
        public override string GetRecordResult(Dictionary <string, string> dictionaryColumnValues)
        {
            var titleTemplate  = UserConnection.GetLocalizableString("ForecastNotificationProvider", "TitleTemplate");
            var bodyTemplate   = UserConnection.GetLocalizableString("ForecastNotificationProvider", "BodyTemplate");
            var notificationId = dictionaryColumnValues["Id"];
            var createdById    = dictionaryColumnValues["CreatedById"];
            var body           = dictionaryColumnValues["Description"];
            var title          = dictionaryColumnValues["SubjectCaption"];
            var entityId       = dictionaryColumnValues["EntityId"];
            var schemaName     = dictionaryColumnValues["SchemaName"];
            var imageId        = dictionaryColumnValues["ImageId"];

            body  = string.Format(bodyTemplate, body);
            title = string.Format(titleTemplate, title);
            var popup = new PopupData()
            {
                Title            = title,
                Body             = body,
                ImageId          = imageId,
                EntityId         = entityId,
                EntitySchemaName = schemaName
            };
            var serializePopup = popup.Serialize();

            return(string.Format(template, notificationId, serializePopup));
        }
        /// <summary>
        /// Returns the record result.
        /// </summary>
        /// <param name="dictionaryColumnValues">A <see cref="Dictionary<string, string>"> column value.</param>
        /// <returns>A <see cref="Strng">.</returns>
        public override string GetRecordResult(Dictionary <string, string> dictionaryColumnValues)
        {
            string title      = dictionaryColumnValues["Description"];
            string id         = dictionaryColumnValues["Id"];
            string remindTime = dictionaryColumnValues["RemindTime"];
            string body       = dictionaryColumnValues["SubjectCaption"];
            string subjectId  = dictionaryColumnValues["SubjectId"];
            var    key        = id + "_" + remindTime;
            var    popup      = new PopupData()
            {
                Title            = title,
                Body             = body,
                EntityId         = subjectId,
                EntitySchemaName = "BulkEmail"
            };
            var serializePopup = popup.Serialize();

            return(string.Format("\"{0}\": {1}", key, serializePopup));
        }
        public override string GetRecordResult(Dictionary <string, string> dictionaryColumnValues)
        {
            var body           = GetBody(dictionaryColumnValues);
            var title          = UserConnection.GetLocalizableString("ContractVisaNotificationProvider", "TitleTemplate");
            var notificationId = dictionaryColumnValues["Id"];
            var entityId       = dictionaryColumnValues["VisaObjectId"];
            var schemaName     = dictionaryColumnValues["SchemaName"];
            var imageId        = dictionaryColumnValues["ImageId"];
            var popup          = new PopupData()
            {
                Title            = title,
                Body             = body,
                ImageId          = imageId,
                EntityId         = entityId,
                EntitySchemaName = schemaName
            };
            var serializePopup = popup.Serialize();

            return(string.Format(template, notificationId, serializePopup));
        }
コード例 #5
0
        public override string GetRecordResult(Dictionary <string, string> dictionaryColumnValues)
        {
            var    title      = UserConnection.GetLocalizableString("ActivityNotificationProvider", "Title");
            var    id         = dictionaryColumnValues["Id"];
            var    remindTime = dictionaryColumnValues["RemindTime"];
            var    activityId = dictionaryColumnValues["ActivityId"];
            var    imageId    = dictionaryColumnValues["ImageId"];
            string body       = GetBody(dictionaryColumnValues);
            var    key        = id + "_" + remindTime;
            var    popup      = new PopupData()
            {
                Title            = title,
                Body             = body,
                ImageId          = imageId,
                EntityId         = activityId,
                EntitySchemaName = "Activity"
            };
            var serializePopup = popup.Serialize();

            return(string.Format("\"{0}\": {1}", key, serializePopup));
        }
コード例 #6
0
        public override string GetRecordResult(Dictionary <string, string> dictionaryColumnValues)
        {
            var    remindTime       = dictionaryColumnValues["RemindTime"];
            var    entityId         = dictionaryColumnValues["EntityId"];
            var    entitySchemaName = dictionaryColumnValues["EntitySchemaName"];
            var    imageId          = dictionaryColumnValues["ImageId"];
            var    id    = entitySchemaName + entityId;
            string title = GetTitle(dictionaryColumnValues["ContactName"]);

            SetBody(dictionaryColumnValues);
            var popup = new PopupData()
            {
                Title            = title,
                Body             = _body,
                ImageId          = imageId,
                EntityId         = entityId,
                EntitySchemaName = entitySchemaName
            };
            var serialisedPopup = popup.Serialize();

            return(string.Format(template, id, serialisedPopup));
        }
コード例 #7
0
        /// <summary>
        /// Returns the record visa notification text.
        /// </summary>
        /// <param name="columnValues">Column values.</param>
        public override string GetRecordResult(Dictionary <string, string> columnValues)
        {
            string bodyTemplate   = UserConnection.GetLocalizableString(ResourceManagerName, "BodyTemplate");
            string titleTemplate  = UserConnection.GetLocalizableString(ResourceManagerName, "TitleTemplate");
            string notificationId = columnValues["Id"];
            string objective      = columnValues["Title"];
            string dateTime       = columnValues["Date"];
            string entityId       = columnValues["VisaObjectId"];
            string schemaName     = columnValues["SchemaName"];
            string schemaCaption  = columnValues["VisaSchemaCaption"];
            string body           = string.Format(bodyTemplate, schemaCaption, objective, FormatDate(dateTime));
            var    popup          = new PopupData()
            {
                Title            = titleTemplate,
                Body             = body,
                ImageId          = _vizaPopupIconPngId.ToString(),
                EntityId         = entityId,
                EntitySchemaName = schemaName
            };
            string serializePopup = popup.Serialize();

            return(string.Format(template, notificationId, serializePopup));
        }
コード例 #8
0
        public override string GetRecordResult(Dictionary <string, string> dictionaryColumnValues)
        {
            var bodyTemplate         = UserConnection.GetLocalizableString("OrderVisaNotificationProvider", "BodyTemplate");
            var titleTemplate        = UserConnection.GetLocalizableString("OrderVisaNotificationProvider", "TitleTemplate");
            var notificationId       = dictionaryColumnValues["Id"];
            var number               = dictionaryColumnValues["Title"];
            var dateTime             = dictionaryColumnValues["Date"];
            var account              = dictionaryColumnValues["Account"];
            var contact              = dictionaryColumnValues["Contact"];
            var entityId             = dictionaryColumnValues["VisaObjectId"];
            var schemaName           = dictionaryColumnValues["SchemaName"];
            var imageId              = dictionaryColumnValues["ImageId"];
            var date                 = GetDate(dateTime);
            var accountContactString = string.Format("{0}, {1}", account, contact);

            if (String.IsNullOrEmpty(account))
            {
                accountContactString = contact;
            }
            if (String.IsNullOrEmpty(contact))
            {
                accountContactString = account;
            }
            var body  = string.Format(bodyTemplate, number, date, accountContactString);
            var popup = new PopupData()
            {
                Title            = titleTemplate,
                Body             = body,
                ImageId          = imageId,
                EntityId         = entityId,
                EntitySchemaName = schemaName
            };
            var serializePopup = popup.Serialize();

            return(string.Format(template, notificationId, serializePopup));
        }