Beispiel #1
0
        public ResultsObject ProcessContact1Requests(CONTACT1ChangeTracking_Result ctResult)
        {
            ResultsObject ro = new ResultsObject();

            ro.Responses = new List <ResponseDetails>();
            ro           = _gm_repo.GetReferenceNumberFromAccountno(ctResult.ACCOUNTNO, ro);
            ro.Accountno = ctResult.ACCOUNTNO;
            if (ctResult.key5Changed_bool)
            {
                string changedValue = _gm_repo.GetKey5(ctResult.ACCOUNTNO);
                ro = _apiClient.SendUpdatePersonRequest(Enums.SendRequest.KEY5, ro, changedValue);
            }
            if (ctResult.contactChanged_bool)
            {
                string changedValue = _gm_repo.GetContact(ctResult.ACCOUNTNO);
                ro = _apiClient.SendUpdatePersonRequest(Enums.SendRequest.CONTACT, ro, changedValue);
            }
            if (ctResult.secrChanged_bool)
            {
                string changedValue = _gm_repo.GetSecr(ctResult.ACCOUNTNO);
                ro = _apiClient.SendUpdatePersonRequest(Enums.SendRequest.SECR, ro, changedValue);
            }
            if (ctResult.LastnameChanged_bool)
            {
                string changedValue = _gm_repo.GetLastname(ctResult.ACCOUNTNO);
                ro = _apiClient.SendUpdatePersonRequest(Enums.SendRequest.LASTNAME, ro, changedValue);
            }
            if (ctResult.phone1Changed_bool)
            {
                string changedValue = _gm_repo.GetPhone1(ctResult.ACCOUNTNO);
                ro = _apiClient.SendUpdatePhoneNumberRequest(Enums.SendRequest.PHONE1, ro, changedValue);
            }
            if (ctResult.phone2Changed_bool)
            {
                string changedValue = _gm_repo.GetPhone2(ctResult.ACCOUNTNO);
                ro = _apiClient.SendUpdatePhoneNumberRequest(Enums.SendRequest.PHONE2, ro, changedValue);
            }
            if (ctResult.phone3Changed_bool)
            {
                string changedValue = _gm_repo.GetPhone3(ctResult.ACCOUNTNO);
                ro = _apiClient.SendUpdatePhoneNumberRequest(Enums.SendRequest.PHONE3, ro, changedValue);
            }
            if (ctResult.key3Changed_bool)
            {
                //NINO
                string changedValue = _gm_repo.GetKey3(ctResult.ACCOUNTNO);
                ro = _apiClient.SendUpdateNINORequest(ro, changedValue);
            }
            if (ctResult.key4Changed_bool)
            {
                //UTR
                string changedValue = _gm_repo.GetKey4(ctResult.ACCOUNTNO);
                ro = _apiClient.SendUpdateUTRRequest(ro, changedValue);
            }
            if (ctResult.address1Changed_bool || ctResult.address2Changed_bool || ctResult.cityChanged_bool ||
                ctResult.countryChanged_bool || ctResult.stateChanged_bool || ctResult.zipChanged_bool)
            {
                Address address = _gm_repo.GetAddress(ctResult.ACCOUNTNO);
                DoAddressUpdate(address, ro, ctResult);
            }



            _applicationLogging.Log(ro);
            return(ro);
        }