/// <summary>
        /// Helper method to update the tag log in database
        /// </summary>
        /// <param name="bulkTagRecord"></param>
        private void UpdateTagStatistics(BulkTagRecord bulkTagRecord)
        {
            var taglog = new TagLogBEO
            {
                DatasetId   = Convert.ToInt32(bulkTagRecord.DatasetId),
                JobId       = WorkAssignment.JobId,
                AlreadyTag  = _documentsAlreadyTagged,
                FailedTag   = _documentsFailed,
                DocumentTag = _documentsTagged
            };

            RVWTagBO.UpdateTagLog(taglog);
        }
        /// <summary>
        /// Helper method to update the tag log in database
        /// </summary>
        /// <param name="bulkTagRecord"></param>
        private void UpdateTagStatistics(BulkTagRecord bulkTagRecord)
        {
            var taglog = new TagLogBEO
                                       {
                                           DatasetId = Convert.ToInt32(bulkTagRecord.DatasetId),
                                           JobId = WorkAssignment.JobId,
                                           AlreadyTag = _documentsAlreadyTagged,
                                           FailedTag = _documentsFailed,
                                           DocumentTag = _documentsTagged
                                       };

            RVWTagBO.UpdateTagLog(taglog);
        }
Example #3
0
        private static string ConstructNotificationBodyForReviewerBulkTag
            (ActiveJob activeJob, BulkTagJobBusinessEntity bulkTagJobBeo, TagLogBEO tagLogBeo, JobBusinessEntity jobBeo)
        {
            //Add notification message to be sent
            var notificationMessage = new StringBuilder();

            notificationMessage.Append(Table);

            if (bulkTagJobBeo.IsOperationTagging)
            {
                notificationMessage.Append(Row);
                notificationMessage.Append(Header);
                notificationMessage.Append(HttpUtility.HtmlEncode(NotificationMessageHeadingForTagging));
                notificationMessage.Append(CloseHeader);
                notificationMessage.Append(CloseRow);
                notificationMessage.Append(Row);
                notificationMessage.Append(Column);
                notificationMessage.Append(HttpUtility.HtmlEncode(NotificationMessageForTagging));
                notificationMessage.Append(CloseColumn);
                notificationMessage.Append(CloseRow);

                GenerateGeneralNotificationDetailsForReviewerBulkTagJob(activeJob, bulkTagJobBeo, notificationMessage, jobBeo);

                notificationMessage.Append(Row);
                notificationMessage.Append(Column);
                notificationMessage.Append(HtmlBold);
                notificationMessage.Append(HttpUtility.HtmlEncode(NotificationMessageForTaggingDocumentsTagged));
                notificationMessage.Append(HtmlCloseBold);
                notificationMessage.Append(
                    HttpUtility.HtmlEncode(tagLogBeo.DocumentTag.ToString(CultureInfo.InvariantCulture)));
                notificationMessage.Append(CloseColumn);
                notificationMessage.Append(CloseRow);
                notificationMessage.Append(Row);
                notificationMessage.Append(Column);
                notificationMessage.Append(HtmlBold);
                notificationMessage.Append(HttpUtility.HtmlEncode(NotificationMessageForTaggingDocumentsAlreadyTagged));
                notificationMessage.Append(HtmlCloseBold);
                notificationMessage.Append(
                    HttpUtility.HtmlEncode(tagLogBeo.AlreadyTag.ToString(CultureInfo.InvariantCulture)));
                notificationMessage.Append(CloseColumn);
                notificationMessage.Append(CloseRow);
                notificationMessage.Append(Row);
                notificationMessage.Append(Column);
                notificationMessage.Append(HtmlBold);
                notificationMessage.Append(HttpUtility.HtmlEncode(NotificationMessageForTaggingDocumentsFailed));
                notificationMessage.Append(HtmlCloseBold);
                notificationMessage.Append(
                    HttpUtility.HtmlEncode(tagLogBeo.FailedTag.ToString(CultureInfo.InvariantCulture)));
                notificationMessage.Append(CloseColumn);
                notificationMessage.Append(CloseRow);
            }
            else
            {
                notificationMessage.Append(Row);
                notificationMessage.Append(Header);
                notificationMessage.Append(HttpUtility.HtmlEncode(NotificationMessageHeadingForUntagging));
                notificationMessage.Append(CloseHeader);
                notificationMessage.Append(CloseRow);
                notificationMessage.Append(Row);
                notificationMessage.Append(Column);
                notificationMessage.Append(HttpUtility.HtmlEncode(NotificationMessageForUntagging));
                notificationMessage.Append(CloseColumn);
                notificationMessage.Append(CloseRow);

                GenerateGeneralNotificationDetailsForReviewerBulkTagJob(activeJob, bulkTagJobBeo, notificationMessage, jobBeo);

                notificationMessage.Append(Row);
                notificationMessage.Append(Column);
                notificationMessage.Append(HtmlBold);
                notificationMessage.Append(HttpUtility.HtmlEncode(NotificationMessageForUntaggingDocumentsUnTagged));
                notificationMessage.Append(HtmlCloseBold);
                notificationMessage.Append(
                    HttpUtility.HtmlEncode(tagLogBeo.DocumentTag.ToString(CultureInfo.InvariantCulture)));
                notificationMessage.Append(CloseColumn);
                notificationMessage.Append(CloseRow);
                notificationMessage.Append(Row);
                notificationMessage.Append(Column);
                notificationMessage.Append(HtmlBold);
                notificationMessage.Append(HttpUtility.HtmlEncode(NotificationMessageForUntaggingDocumentsNotUntagged));
                notificationMessage.Append(HtmlCloseBold);
                notificationMessage.Append(
                    HttpUtility.HtmlEncode(
                        (tagLogBeo.FailedTag + tagLogBeo.AlreadyTag).ToString(CultureInfo.InvariantCulture)));
                notificationMessage.Append(CloseColumn);
                notificationMessage.Append(CloseRow);
            }

            notificationMessage.Append(CloseTable);
            return(notificationMessage.ToString());
        }
      private static string ConstructNotificationBodyForReviewerBulkTag
          (ActiveJob activeJob, BulkTagJobBusinessEntity bulkTagJobBeo, TagLogBEO tagLogBeo, JobBusinessEntity jobBeo)
        {
            //Add notification message to be sent
            var notificationMessage = new StringBuilder();
            notificationMessage.Append(Table);

            if (bulkTagJobBeo.IsOperationTagging)
            {
                notificationMessage.Append(Row);
                notificationMessage.Append(Header);
                notificationMessage.Append(HttpUtility.HtmlEncode(NotificationMessageHeadingForTagging));
                notificationMessage.Append(CloseHeader);
                notificationMessage.Append(CloseRow);
                notificationMessage.Append(Row);
                notificationMessage.Append(Column);
                notificationMessage.Append(HttpUtility.HtmlEncode(NotificationMessageForTagging));
                notificationMessage.Append(CloseColumn);
                notificationMessage.Append(CloseRow);

                GenerateGeneralNotificationDetailsForReviewerBulkTagJob(activeJob, bulkTagJobBeo, notificationMessage, jobBeo);

                notificationMessage.Append(Row);
                notificationMessage.Append(Column);
                notificationMessage.Append(HtmlBold);
                notificationMessage.Append(HttpUtility.HtmlEncode(NotificationMessageForTaggingDocumentsTagged));
                notificationMessage.Append(HtmlCloseBold);
                notificationMessage.Append(
                    HttpUtility.HtmlEncode(tagLogBeo.DocumentTag.ToString(CultureInfo.InvariantCulture)));
                notificationMessage.Append(CloseColumn);
                notificationMessage.Append(CloseRow);
                notificationMessage.Append(Row);
                notificationMessage.Append(Column);
                notificationMessage.Append(HtmlBold);
                notificationMessage.Append(HttpUtility.HtmlEncode(NotificationMessageForTaggingDocumentsAlreadyTagged));
                notificationMessage.Append(HtmlCloseBold);
                notificationMessage.Append(
                    HttpUtility.HtmlEncode(tagLogBeo.AlreadyTag.ToString(CultureInfo.InvariantCulture)));
                notificationMessage.Append(CloseColumn);
                notificationMessage.Append(CloseRow);
                notificationMessage.Append(Row);
                notificationMessage.Append(Column);
                notificationMessage.Append(HtmlBold);
                notificationMessage.Append(HttpUtility.HtmlEncode(NotificationMessageForTaggingDocumentsFailed));
                notificationMessage.Append(HtmlCloseBold);
                notificationMessage.Append(
                    HttpUtility.HtmlEncode(tagLogBeo.FailedTag.ToString(CultureInfo.InvariantCulture)));
                notificationMessage.Append(CloseColumn);
                notificationMessage.Append(CloseRow);
            }
            else
            {
                notificationMessage.Append(Row);
                notificationMessage.Append(Header);
                notificationMessage.Append(HttpUtility.HtmlEncode(NotificationMessageHeadingForUntagging));
                notificationMessage.Append(CloseHeader);
                notificationMessage.Append(CloseRow);
                notificationMessage.Append(Row);
                notificationMessage.Append(Column);
                notificationMessage.Append(HttpUtility.HtmlEncode(NotificationMessageForUntagging));
                notificationMessage.Append(CloseColumn);
                notificationMessage.Append(CloseRow);

                GenerateGeneralNotificationDetailsForReviewerBulkTagJob(activeJob, bulkTagJobBeo, notificationMessage, jobBeo);

                notificationMessage.Append(Row);
                notificationMessage.Append(Column);
                notificationMessage.Append(HtmlBold);
                notificationMessage.Append(HttpUtility.HtmlEncode(NotificationMessageForUntaggingDocumentsUnTagged));
                notificationMessage.Append(HtmlCloseBold);
                notificationMessage.Append(
                    HttpUtility.HtmlEncode(tagLogBeo.DocumentTag.ToString(CultureInfo.InvariantCulture)));
                notificationMessage.Append(CloseColumn);
                notificationMessage.Append(CloseRow);
                notificationMessage.Append(Row);
                notificationMessage.Append(Column);
                notificationMessage.Append(HtmlBold);
                notificationMessage.Append(HttpUtility.HtmlEncode(NotificationMessageForUntaggingDocumentsNotUntagged));
                notificationMessage.Append(HtmlCloseBold);
                notificationMessage.Append(
                    HttpUtility.HtmlEncode(
                        (tagLogBeo.FailedTag + tagLogBeo.AlreadyTag).ToString(CultureInfo.InvariantCulture)));
                notificationMessage.Append(CloseColumn);
                notificationMessage.Append(CloseRow);
            }

            notificationMessage.Append(CloseTable);
            return notificationMessage.ToString();
        }