Example #1
0
        public override void LogEntryChanged(object sender, LogEntryEventArgs e)
        {
            // if loan has 0 imported docs, do nothing
            if (ImportedDocsLoanCdo == null)
            {
                return;
            }

            var entry = e.LogEntry;

            // SP - after user opens an efolder doc that contains an imported doc, unhighlight it
            if (entry != null && (entry.EntryType.Equals(LogEntryType.TrackedDocument)))
            {
                Task.Factory.StartNew(() =>
                {
                    var trackedDocumemnt = (TrackedDocument)entry;


                    var matchingTrackedDocContainingDocImports =
                        ImportedDocsLoanCdo.Documents
                        .Where(x => string.IsNullOrEmpty(x.EncompassEfolderId) == false &&
                               x.EncompassEfolderId.Equals(trackedDocumemnt.ID) &&
                               x.EnableHighlighting).ToList();


                    // SP - if this tracked doc doesn't contain any imported docs, it is of no concern
                    if (matchingTrackedDocContainingDocImports.Any() == false)
                    {
                        return;
                    }


                    EncompassEFolderIdsToMarkAsViewed.Add(trackedDocumemnt.ID);

                    if (EfolderDocumentGrid != null && EfolderDocumentGrid.IsDisposed == false)
                    {
                        IDictionary <GVItem, DocumentLog> efolderDocDictionary =
                            GridViewHelper.GetAllEncompassGridViewItems <DocumentLog>(EfolderDocumentGrid);


                        var efolderGridViewDocument = GetTrackedDocumentGridViewItem(trackedDocumemnt.ID, efolderDocDictionary);

                        // if matching efolder is found (if not found, efolder has been deleted by end user)
                        if (efolderGridViewDocument.Key == null)
                        {
                            return;
                        }

                        var gridViewRow       = efolderGridViewDocument.Key;
                        gridViewRow.BackColor = Color.White;
                    }
                });
            }
        }
Example #2
0
        private void HighlightEfolderDocs(Form eFolderDialogForm)
        {
            EfolderDocumentGrid = eFolderDialogForm.Controls.Find("gvDocuments", true).FirstOrDefault() as GridView;

            if (EfolderDocumentGrid != null)
            {
                // SP - add column to efolder code below -- currently will exception out if a new column is added to dialog...
                #region Add Column to GV
                //GVColumn aiColumn = documentGrid.Columns.FirstOrDefault(x => x.Name.Equals("AI"));
                //if (aiColumn != null)
                //    documentGrid.Columns.Remove(aiColumn);
                //aiColumn = new GVColumn("AI");
                //documentGrid.Columns.Add(aiColumn);



                #endregion

                IDictionary <GVItem, DocumentLog> efolderDocDictionary =
                    GridViewHelper.GetAllEncompassGridViewItems <DocumentLog>(EfolderDocumentGrid);

                foreach (var importedDocument in ImportedDocsLoanCdo.Documents)
                {
                    // SP - we only need to highlight docs where enabled is set to T
                    if (importedDocument.EnableHighlighting == false)
                    {
                        continue;
                    }

                    // SP - can only highlight efolder if we have an encompass efolder ID
                    if (string.IsNullOrEmpty(importedDocument.EncompassEfolderId))
                    {
                        continue;
                    }

                    var efolderDocDetails = GetMatchingEfolderDocFromDataGridView(importedDocument, efolderDocDictionary);
                    if (efolderDocDetails.HighlightEfolderRow)
                    {
                        if (efolderDocDetails.EfolderDocumentDetails.DateAccessed < efolderDocDetails.EfolderDocumentDetails.DateReceived)
                        {
                            efolderDocDetails.EfolderGridViewRow.BackColor = efolderDocDetails.DocumentSource.NewDocumentColor;
                        }

                        #region SP - this is where you would set column
                        //// gridRow.SubItems[aiColumn.Index].Text = "Y";
                        // gridRow.SubItems[aiColumn.Name].Text = "Y";
                        #endregion
                    }
                }
            }
        }
Example #3
0
        private void HighlightFilesUnassigned(Form documentDialogForm)
        {
            var fileGrid = documentDialogForm.Controls.Find("gvUnassigned", true).FirstOrDefault() as GridView;

            if (fileGrid != null)
            {
                IDictionary <GVItem, ImageAttachment> attachmentDictionary =
                    GridViewHelper.GetAllEncompassGridViewItems <ImageAttachment>(fileGrid);

                var importedDocsUnassigned = ImportedDocsLoanCdo.Documents
                                             .Where(x => string.IsNullOrEmpty(x.EncompassEfolderId)).ToList();

                foreach (var importedDocument in importedDocsUnassigned)
                {
                    var attachmentDetails = GetMatchingFileUnassignedAttachmentFromUi(importedDocument, attachmentDictionary);
                    if (attachmentDetails.HighlightEfolderRow)
                    {
                        attachmentDetails.EfolderGridViewRow.BackColor =
                            attachmentDetails.DocumentSource.NewDocumentColor;
                    }
                }
            }
        }