using System;
using System.IO;
using EllieMae.Encompass.Client;
using EllieMae.Encompass.BusinessObjects;
using EllieMae.Encompass.BusinessObjects.Contacts;
class ContactManager
{
public static void Main(string[] args)
{
// Open the session to the remote server
Session session = new Session();
session.Start(“myserver”, “mary”, “maryspwd”);
// Retrieve an existing contact from the server
BorrowerContact contact = (BorrowerContact) session.Contacts.Open(209, ContactType.Borrower);
// Retrieve the borrower’s Opportunity
ContactOpportunity opp = contact.Opportunities[0];
// Change the loan amount on the opportunity
opp.LoanAmount = opp.LoanAmount + 10000;
// Refresh the opportunity to restore the original values
opp.Refresh();
// Print the Loan Amount — it should reflect the value before we changed
// it with the code above
Console.WriteLine(opp.LoanAmount.ToString());
// End the session to gracefully disconnect from the server
session.End();
}
}