Class AddressFormatter
Format addresses from a Person or Contact. Use the FormatContact(int, AddressRow, AddressRow) or FormatPerson(PersonRow, AddressRow) to format the address.
Inherited Members
Namespace: SuperOffice.CRM.Globalization
Assembly: SoDataBase.dll
Syntax
public class AddressFormatter : FormattedAddress, IList, ICollection, IEnumerable
Properties
FormatterData
The Formatter's data
Declaration
public AddressFormatter.Data FormatterData { get; }
Property Value
Type | Description |
---|---|
AddressFormatter.Data |
Methods
FormatContact(Contact)
Get a FormattedAddress from a Contact.
Declaration
public static FormattedAddress FormatContact(Contact contact)
Parameters
Type | Name | Description |
---|---|---|
Contact | contact | Contact to get FormattedAddress for. |
Returns
Type | Description |
---|---|
FormattedAddress | The address formatted cortectly for the appropriate cluture. |
FormatContact(ContactRow, AddressRow, AddressRow)
Format a companies address from a CompanyRow widt the two corresponding AddressRows.
Declaration
public static FormattedAddress FormatContact(ContactRow contact, AddressRow postalAddress, AddressRow streetAddress)
Parameters
Type | Name | Description |
---|---|---|
ContactRow | contact | Contact that owns the streat and postal address |
AddressRow | postalAddress | Postal address for the contact. |
AddressRow | streetAddress | Street address for the contact |
Returns
Type | Description |
---|---|
FormattedAddress |
FormatContact(int, AddressRow, AddressRow)
Format a companies address using the country id and the two corresponding AddressRows.
Declaration
public static FormattedAddress FormatContact(int country_id, AddressRow postalAddress, AddressRow streetAddress)
Parameters
Type | Name | Description |
---|---|---|
int | country_id | Country to format address for |
AddressRow | postalAddress | Postal address for the contact. |
AddressRow | streetAddress | Street address for the contact |
Returns
Type | Description |
---|---|
FormattedAddress |
FormatPerson(Person)
Get a FormattedAddress from a Person.
Declaration
public static FormattedAddress FormatPerson(Person person)
Parameters
Type | Name | Description |
---|---|---|
Person | person | Person to get FormattedAddress for. |
Returns
Type | Description |
---|---|
FormattedAddress | The address formatted cortectly for the appropriate cluture. |
FormatPerson(PersonRow, AddressRow)
Format a persons address from a PersonRow and AddressRow.
Declaration
public static FormattedAddress FormatPerson(PersonRow person, AddressRow address)
Parameters
Type | Name | Description |
---|---|---|
PersonRow | person | Person |
AddressRow | address | The persons address |
Returns
Type | Description |
---|---|
FormattedAddress | A formatted address |
FormatQuote(int, AddressRow)
Format addresses from a Person or Contact. Use the FormatContact(int, AddressRow, AddressRow) or FormatPerson(PersonRow, AddressRow) to format the address.
Declaration
public static FormattedAddress FormatQuote(int country_id, AddressRow address)
Parameters
Type | Name | Description |
---|---|---|
int | country_id | |
AddressRow | address |
Returns
Type | Description |
---|---|
FormattedAddress |