Click here to Skip to main content
15,916,600 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am trying to write an integration function to Encompass which will pass the Settlement service provider list with Fee Description and Provider details to Encompass. I will get the Provider list data easily but when I try to pass it to Encompass need to pass it with a proper index value where the provider list data should be added.

I am facing challenge to add data to existing data with correct index. I could not get any function which provide me the index of settlement service provider list. Is there any other way around to have my list added to existing settlement service provider data.

I need a simple C# code which can help me with this.

What I have tried:

Hi Have tried the below code:

C#
public static void SetSettlementServiceProviderList(Loan loan)
        {
            int index=1;
            
            List<settlementserviceproviderdata> Records = new List<settlementserviceproviderdata>();
            List<feedescriptiondata> listfee = new List<feedescriptiondata>();
            //Add data to listfee

            List<feedescriptiondata> listfee1 = new List<feedescriptiondata>();
            //Add data to listfee1

            List<feedescriptiondata> listfee2 = new List<feedescriptiondata>();
            //Add data to listfee2

           //Add Value to records

            foreach (SettlementServiceProviderData Record in Records)
            {
             //Assign values to Encompass Loan field   
             loan.Fields.GetFieldAt("SP01", index).Value = Record.ServiceCategory;
                
                int i = 17;
                foreach (FeeDescriptionData Data in Record.FeeData)
                {
                    loan.Fields.GetFieldAt(String.Format("SP{0}", i++), index).Value = Data.FeeDescription;
                    
                    loan.Fields.GetFieldAt(String.Format("SP{0}", i++), index).Value = Data.Amount; 
                }
                //index = loan.BorrowerEmployers.Add(true);
                index++;
            }


//Index Value I have put is 1 but it should be the already existing data +1 or is here any other way around.
Posted
Updated 20-Jul-16 6:10am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900