Пример #1
0
        public ResultsObject ProcessContsuppRequests(CONTSUPPChangeTracking_Result ctResult)
        {
            ResultsObject ro = new ResultsObject();

            if (ro.Responses == null)
            {
                ro.Responses = new List <ResponseDetails>();
            }
            ;
            if (ctResult.contsuprefChanged_bool)
            {
                ro = _gm_repo.GetReferenceNumberFromRecid(ctResult.recid, ro);
                ro = _gm_repo.GetAccountnoFromRecid(ctResult.recid, ro);
                string changedValue = _gm_repo.GetContsupref(ctResult.recid);
                ro = _apiClient.SendUpdateEmailAddressRequest(Enums.SendRequest.CONTSUPREF, ro, changedValue);
            }
            _applicationLogging.Log(ro);
            return(ro);
        }
        private List <ResultsObject> SendContsuppChanges(List <CONTSUPPChangeTracking_Result> contsuppResults)
        {
            List <ResultsObject> results = new List <ResultsObject>();

            foreach (CONTSUPPChangeTracking_Result ctResult in contsuppResults)
            {
                ResultsObject ro = new ResultsObject();
                ro = _gmRepo.GetAccountnoFromRecid(ctResult.recid, ro);
                ro = _gmRepo.GetReferenceNumberFromAccountno(ro.Accountno, ro);
                if (!string.IsNullOrEmpty(_requestProcessor.ProcessPersonIdFetch(ro.ReferenceNumber)))
                {
                    ro = _requestProcessor.ProcessContsuppRequests(ctResult);
                }
                else
                {
                    ClientData clientData = new ClientData();
                    clientData = _gmRepo.GetClientData(ro.ReferenceNumber);
                    ro         = _requestProcessor.ProcessCreatePersonRequest(clientData);
                }
                results.Add(ro);
            }
            return(results);
        }