Exemple #1
0
        private ImportedDocGridViewItem GetMatchingFileUnassignedAttachmentFromUi(ImportedDocument importedDocument,
                                                                                  IDictionary <GVItem, ImageAttachment> fileManagerAttachmentDictionary)
        {
            ImportedDocGridViewItem result = new ImportedDocGridViewItem();

            var matchingAttachment =
                fileManagerAttachmentDictionary
                .FirstOrDefault(x => x.Value.ID.Equals(importedDocument.EncompassAttachmentId, StringComparison.OrdinalIgnoreCase));

            // if matching file is found from loan cdo, highlight row!
            if (matchingAttachment.Key == null)
            {
                result.HighlightEfolderRow = false;
                return(result);
            }

            var externalSource =
                _externalSourcesDictionary.FirstOrDefault(x =>
                                                          x.Key.Equals(importedDocument.ExternalSourceId));

            if (externalSource.Value == null)
            {
                result.HighlightEfolderRow = false;
                return(result);
            }

            result.HighlightEfolderRow = true;
            result.DocumentSource      = externalSource.Value;
            result.EfolderGridViewRow  = matchingAttachment.Key;

            return(result);
        }
Exemple #2
0
        private ImportedDocGridViewItem GetMatchingEfolderDocFromDataGridView(ImportedDocument importedDocument,
                                                                              IDictionary <GVItem, DocumentLog> efolderDocDictionary)
        {
            ImportedDocGridViewItem result = new ImportedDocGridViewItem();

            var matchingEfolderDoc = GetTrackedDocumentGridViewItem(importedDocument.EncompassEfolderId, efolderDocDictionary);

            // if matching efolder is found (if not found, efolder has been deleted by end user)
            if (matchingEfolderDoc.Key == null)
            {
                result.HighlightEfolderRow = false;
                return(result);
            }
            result.EfolderDocumentDetails = matchingEfolderDoc.Value;
            result.EfolderGridViewRow     = matchingEfolderDoc.Key;


            var externalSource =
                _externalSourcesDictionary.FirstOrDefault(x =>
                                                          x.Key.Equals(importedDocument.ExternalSourceId));

            if (externalSource.Value == null)
            {
                result.HighlightEfolderRow = false;
                return(result);
            }

            result.HighlightEfolderRow = true;

            result.DocumentSource = externalSource.Value;


            return(result);
        }