예제 #1
0
        private bool SubmitToAUS(string eventName, Guid loanId, string caseId)
        {
            var user          = new UserAccount();
            var userAccountId = -1;

            user = Session[SessionHelper.UserData] != null && ((UserAccount)Session[SessionHelper.UserData]).Username == User.Identity.Name ?
                   (UserAccount)Session[SessionHelper.UserData] : UserAccountServiceFacade.GetUserByName(User.Identity.Name);

            if (user != null)
            {
                userAccountId = user.UserAccountId;
            }

            var impEvent = new Event(eventName, UserAccountServiceFacade.GetUserFullNameByUserAccountId(userAccountId), loanId);

            impEvent.RelatedData.Add("CaseId", caseId.Trim());
            return(EventsServiceFacade.CreateEvent(impEvent));
        }
예제 #2
0
        public bool TESTCreateServiceEvent(Guid loanId)
        {
            var eventContent = new EventContentTESTCreateService()
            {
                Party               = "Test Party",
                ServiceType         = "Test ServiceType",
                Product             = "Test Product",
                Status              = "Test Status",
                Vendor              = "Test Vendor",
                VendorTransactionId = null // If left empty or null, this will be filled with Loan Service ID
            };
            //var eventContentXml = SerializationHelper.SerializeToXml( eventContent );
            //var eventContentXml = DataContractSerializationHelper.Serialize( eventContent );
            var eventContentXml = Event.ContentObjectSerialize(eventContent);

            var impEvent = new Event("TEST.CreateService", User.Identity.Name, loanId, eventContentXml);

            return(EventsServiceFacade.CreateEvent(impEvent));
        }
예제 #3
0
        public bool RetryLoanServiceEvent(string loanServiceEventType, string loanServiceEventIdEncrypted)
        {
            string rawLoanServiceEventId = EncryptionHelper.DecryptRijndael(loanServiceEventIdEncrypted.Trim(), EncriptionKeys.Default);
            long   loanServiceEventId    = 0;

            if (!long.TryParse(rawLoanServiceEventId, out loanServiceEventId) || loanServiceEventId == 0)
            {
                throw new Exception("Valid Loan Service Event Id must be provided.");
            }

            switch (loanServiceEventType.ToLower())
            {
            case "event":
                return(EventsServiceFacade.RetryEvent(loanServiceEventId));

            case "integrationstep":
                return(IntegrationsServiceFacade.RetryIntegrationService(loanServiceEventId));

            default:
                return(false);
            }
        }
예제 #4
0
        public bool InitiateDisclosure(Guid loanId)
        {
            bool retVal = false;

            Int32       userAccountId = -1;
            UserAccount user          = new UserAccount();

            if (Session[SessionHelper.UserData] != null && (( UserAccount )Session[SessionHelper.UserData]).Username == User.Identity.Name)
            {
                user = ( UserAccount )Session[SessionHelper.UserData];
            }
            else
            {
                user = UserAccountServiceFacade.GetUserByName(User.Identity.Name);
            }

            if (user != null)
            {
                userAccountId = user.UserAccountId;
            }

            bool useDigitalDocsImpIntegration = GeneralSettingsServiceFacade.IsIMPIntegrationForDigitalDocsEnabled();

            DigitalDocsServiceFacade.RequestReDisclosuresPackage(loanId, userAccountId);

            if (useDigitalDocsImpIntegration)
            {
                var eventContentDisclosures = new EventContentDisclosures();
                eventContentDisclosures.UserAccountId = userAccountId;
                string contentXml = Event.ContentObjectSerialize(eventContentDisclosures);

                var impEvent = new Event("Event.Integration.Disclosures.ExecuteRules", User.Identity.Name, loanId, contentXml);
                retVal = EventsServiceFacade.CreateEvent(impEvent);
            }

            return(retVal);
        }