private void AddCustomerContacts(DomainContacts contacts) { if (contacts != null) { foreach (string key in contacts.Keys) { DomainContact contact = contacts[key]; string contactKey = key; if (key == "Billing") { contactKey = "AuxBilling"; } AddParam(contactKey + "EmailAddress", contact["Email"]); AddParam(contactKey + "Fax", contact["Fax"]); AddParam(contactKey + "Phone", contact["Phone"]); AddParam(contactKey + "Country", contact["Country"]); AddParam(contactKey + "PostalCode", contact["Zip"]); // add state if (contact.HasKey("State")) { AddParam(contactKey + "StateProvinceChoice", "S"); AddParam(contactKey + "StateProvince", contact["State"]); } // add province else if (contact.HasKey("Province")) { AddParam(contactKey + "StateProvinceChoice", "Province"); AddParam(contactKey + "StateProvince", contact["Province"]); } // add blank else { AddParam(contactKey + "StateProvinceChoice", "Blank"); AddParam(contactKey + "StateProvince", ""); } AddParam(contactKey + "City", contact["City"]); AddParam(contactKey + "Address1", contact["Address"]); AddParam(contactKey + "Address2", contact["Address1"]); AddParam(contactKey + "LastName", contact["LastName"]); AddParam(contactKey + "FirstName", contact["FirstName"]); AddParam(contactKey + "JobTitle", contact["JobTitle"]); AddParam(contactKey + "OrganizationName", contact["Company"]); } } }
public DomainContact this[string contactType] { get { DomainContact contact = (DomainContact)BaseGet(contactType); if (contact == null) { contact = new DomainContact(); BaseSet(contactType, contact); } return(contact); } }
public DomainContact this[string contactType] { get { DomainContact contact = (DomainContact)BaseGet(contactType); if (contact == null) { contact = new DomainContact(); BaseSet(contactType, contact); } return contact; } }