Show / Hide Table of Contents

Class FadTags

Template tag supplier for fad0 - fadq address block variables

Inheritance
Object
TagContainer
FadTags
Inherited Members
TagContainer._bInitiated
TagContainer.AddData(Object[])
TagContainer.GetData()
TagContainer.ClearData()
TagContainer.GetValue(String)
TagContainer.SetValue(String, String)
TagContainer.RemoveCustomValue(String)
TagContainer.IsTagLegal(String)
TagContainer.IsTagInContext(String)
TagContainer.CurrentUiCulture
TagContainer.Data
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: SuperOffice.CRM.Globalization
Assembly: SoDataBase.dll
Syntax
public class FadTags : TagContainer
Remarks

The fad variables are formatted according to format strings that refer to other template variables, as well as containing a special syntax for inserting conditional or hard spaces, line feeds and other formatting.

Format strings reside in the addressformat table. Which one is used depends on the home country of the sender and the country of the receiver, and whether a person or company address is used.
Note that according to the C++ code we seek to imitate, it's the database owner contact.country_id that is the 'sender', and not the current principal (which you might think more logical, but tell that to the C++ code... in rdb/AddressFormatManager.cpp line 231).

The formatting code is directly converted from the C++ version with minimal changes. The C++ functionality for retrieving ONLY the address part (and not the name) is not implemented, as it is used only from Reporter.

Constructors

FadTags(IPersonInfo2, IContactInfo2, TagContainer)

Construct the class, decide which format to use, and generate the data for all the lines

Declaration
public FadTags(IPersonInfo2 personInfo, IContactInfo2 contactInfo, TagContainer parent)
Parameters
Type Name Description
IPersonInfo2 personInfo

Person information to use

IContactInfo2 contactInfo

Contact information to use

TagContainer parent

Parent, used to get hold of inner tag values

Fields

_contactInfo

Declaration
protected IContactInfo2 _contactInfo
Field Value
Type Description
IContactInfo2

_parentVariables

Declaration
protected TagContainer _parentVariables
Field Value
Type Description
TagContainer

Properties

Fad1

Declaration
[TemplateTag("fad1")]
public string Fad1 { get; }
Property Value
Type Description
String

Fad2

Declaration
[TemplateTag("fad2")]
public string Fad2 { get; }
Property Value
Type Description
String

Fad3

Declaration
[TemplateTag("fad3")]
public string Fad3 { get; }
Property Value
Type Description
String

Fad4

Declaration
[TemplateTag("fad4")]
public string Fad4 { get; }
Property Value
Type Description
String

Fad5

Declaration
[TemplateTag("fad5")]
public string Fad5 { get; }
Property Value
Type Description
String

Fad6

Declaration
[TemplateTag("fad6")]
public string Fad6 { get; }
Property Value
Type Description
String

Fad7

Declaration
[TemplateTag("fad7")]
public string Fad7 { get; }
Property Value
Type Description
String

Fad8

Declaration
[TemplateTag("fad8")]
public string Fad8 { get; }
Property Value
Type Description
String

Fad9

Declaration
[TemplateTag("fad9")]
public string Fad9 { get; }
Property Value
Type Description
String

Fada

Declaration
[TemplateTag("fada")]
public string Fada { get; }
Property Value
Type Description
String

Fadb

Declaration
[TemplateTag("fadb")]
public string Fadb { get; }
Property Value
Type Description
String

Fadc

Declaration
[TemplateTag("fadc")]
public string Fadc { get; }
Property Value
Type Description
String

Fadd

Declaration
[TemplateTag("fadd")]
public string Fadd { get; }
Property Value
Type Description
String

Fade

Declaration
[TemplateTag("fade")]
public string Fade { get; }
Property Value
Type Description
String

Fadf

Declaration
[TemplateTag("fadf")]
public string Fadf { get; }
Property Value
Type Description
String

Fadg

Declaration
[TemplateTag("fadg")]
public string Fadg { get; }
Property Value
Type Description
String

Fadh

Declaration
[TemplateTag("fadh")]
public string Fadh { get; }
Property Value
Type Description
String

Fadi

Declaration
[TemplateTag("fadi")]
public string Fadi { get; }
Property Value
Type Description
String

Fadj

Declaration
[TemplateTag("fadj")]
public string Fadj { get; }
Property Value
Type Description
String

Fadk

Declaration
[TemplateTag("fadk")]
public string Fadk { get; }
Property Value
Type Description
String

Fadl

Declaration
[TemplateTag("fadl")]
public string Fadl { get; }
Property Value
Type Description
String

Fadm

Declaration
[TemplateTag("fadm")]
public string Fadm { get; }
Property Value
Type Description
String

Fadn

Declaration
[TemplateTag("fadn")]
public string Fadn { get; }
Property Value
Type Description
String

Fado

Declaration
[TemplateTag("fado")]
public string Fado { get; }
Property Value
Type Description
String

Fadp

Declaration
[TemplateTag("fadp")]
public string Fadp { get; }
Property Value
Type Description
String

Fadq

Declaration
[TemplateTag("fadq")]
public string Fadq { get; }
Property Value
Type Description
String

Id

Declaration
public override int Id { get; }
Property Value
Type Description
Int32
Overrides
TagContainer.Id

IsValid

Declaration
protected virtual bool IsValid { get; }
Property Value
Type Description
Boolean

Methods

DetermineFormat()

Analyze the given person and contact data to determine which address format we should use Address format depends on what kind of address we have (street, postal, person); whether it's foreign or domestic; and what layouts have been set for each of these combinations for the recipients' country

Declaration
protected virtual void DetermineFormat()

GenerateFads()

Generate the FAD data block by doing a recursive tag substitution followed by parsing of conditional elements

Declaration
protected virtual void GenerateFads()

GetAddressLayout(Int32)

Declaration
protected virtual AddressLayout GetAddressLayout(int addressType)
Parameters
Type Name Description
Int32 addressType
Returns
Type Description
AddressLayout

GetAddressType()

Declaration
protected virtual int GetAddressType()
Returns
Type Description
Int32

GetRecipientCountryId(Int32)

Declaration
protected virtual int GetRecipientCountryId(int addressType)
Parameters
Type Name Description
Int32 addressType
Returns
Type Description
Int32

Init()

Declaration
protected override void Init()
Overrides
TagContainer.Init()

UseForeign(Int32)

Declaration
protected virtual bool UseForeign(int addressType)
Parameters
Type Name Description
Int32 addressType
Returns
Type Description
Boolean

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top