OpenPetra
Free Administration Software for Non-Profits
Ict.Petra.Server.MPartner.DataAggregates.TContactDetailsAggregate Class Reference

The TContactDetailsAggregate Class contains logic for working with Partner Contact Details. More...

Static Public Member Functions

static bool GetPrimaryPhoneNumber (TDBTransaction AReadTransaction, Int64 APartnerKey, out string APrimaryPhoneNumber)
 Gets the 'Primary Phone Number' of a Partner. More...
 
static bool GetPrimaryEmailAddress (TDBTransaction AReadTransaction, Int64 APartnerKey, out string APrimaryEmailAddress)
 Gets the 'Primary Email Address' of a Partner. More...
 
static bool GetPrimaryEmailAndPrimaryPhone (TDBTransaction AReadTransaction, Int64 APartnerKey, out string APrimaryPhoneNumber, out string APrimaryEmailAddress)
 Determines the 'Primary Phone Number' and the 'Primary E-mail Address' of a Partner. More...
 
static bool GetPrimaryEmailAndPrimaryPhoneAndFax (TDBTransaction AReadTransaction, Int64 APartnerKey, out string APrimaryPhoneNumber, out string APrimaryEmailAddress, out string AFaxNumber)
 Determines the 'Primary Phone Number', 'Primary E-mail Address' and the 'Fax Number' of a Partner. More...
 
static bool GetWithinOrganisationEmailAddress (TDBTransaction AReadTransaction, Int64 APartnerKey, out string AWithinOrganisationEmailAddress)
 Gets the 'Within Organisation Email Address' of a Partner. More...
 
static bool GetWithinOrganisationOrPrimaryEmailAddress (TDBTransaction AReadTransaction, Int64 APartnerKey, out string AEmailAddress, out String AEmailType)
 Return the 'within organisation' email, or if that's blank, return the primary email. More...
 
static Calculations.TPartnersOverallContactSettings GetPartnersOverallCS (TDBTransaction AReadTransaction, Int64 APartnerKey, Calculations.TOverallContSettingKind AOverallContSettingKind)
 Determines the 'Primary' and/or 'Within Organisation' setting(s) for a Partner. More...
 
static Calculations.TPartnersOverallContactSettings GetPartnersOverallCS (TDBTransaction AReadTransaction, Int64 APartnerKey, Calculations.TOverallContSettingKind AOverallContSettingKind, out PPartnerAttributeTable APartnerAttributeDT)
 Determines the 'Primary' and/or 'Within Organisation' setting(s) for a Partner. More...
 
static PPartnerAttributeTable GetPartnersContactDetailAttributes (Int64 APartnerKey)
 Gets the Contact Detail Attributes for a Partner. More...
 
static void GetPartnersAdditionalPhoneNumbers (TDBTransaction AReadTransaction, Int64 APartnerKey, out string AMobileNumbers, out string AAlternatePhoneNumbers)
 Gets additional mobile or landline numbers that are not the primary phone number. More...
 

Detailed Description

The TContactDetailsAggregate Class contains logic for working with Partner Contact Details.

Member Function Documentation

◆ GetPartnersAdditionalPhoneNumbers()

static void Ict.Petra.Server.MPartner.DataAggregates.TContactDetailsAggregate.GetPartnersAdditionalPhoneNumbers ( TDBTransaction  AReadTransaction,
Int64  APartnerKey,
out string  AMobileNumbers,
out string  AAlternatePhoneNumbers 
)
inlinestatic

Gets additional mobile or landline numbers that are not the primary phone number.

Parameters
AReadTransaction
APartnerKeyA partner key for which we are finding the additional information.
AMobileNumbersAdditional mobile numbers for the specified partner. Empty string if none.
AAlternatePhoneNumbersAdditional landline numbers for the specified partner. Empty string if none.

◆ GetPartnersContactDetailAttributes()

static PPartnerAttributeTable Ict.Petra.Server.MPartner.DataAggregates.TContactDetailsAggregate.GetPartnersContactDetailAttributes ( Int64  APartnerKey)
inlinestatic

Gets the Contact Detail Attributes for a Partner.

Parameters
APartnerKeyPartnerKey of the Partner.
Returns
An instance of PPartnerAttributeTable that holds the p_partner_attribute records for the Partner. Every Partner Attribute that is a Partner Contact Attribute is marked with 'true' in the special Column Ict.Petra.Server.MPartner.Common.Calculations.PARTNERATTRIBUTE_PARTNERCONTACTDETAIL_COLUMN!

◆ GetPartnersOverallCS() [1/2]

static Calculations.TPartnersOverallContactSettings Ict.Petra.Server.MPartner.DataAggregates.TContactDetailsAggregate.GetPartnersOverallCS ( TDBTransaction  AReadTransaction,
Int64  APartnerKey,
Calculations.TOverallContSettingKind  AOverallContSettingKind 
)
inlinestatic

Determines the 'Primary' and/or 'Within Organisation' setting(s) for a Partner.

Parameters
AReadTransaction
APartnerKeyPartnerKey of the Partner.
AOverallContSettingKindSpecify the kind of Overall Contact Setting(s) that you want returned. Combine multiple ones with the binary OR operator ( | ).
Returns
An instance of Calculations.TPartnersOverallContactSettings that holds the Calculations.TPartnersOverallContactSettings for the Partner. However, it returns null in case the Partner hasn't got any p_partner_attribute records, or when the Partner has no p_partner_attribute records that constitute Contact Detail records, or when the Partner has got only one p_partner_attribute record but this records' Current flag is false. It also returns null if no record was found that met what was asked for with AOverallContSettingKind !

◆ GetPartnersOverallCS() [2/2]

static Calculations.TPartnersOverallContactSettings Ict.Petra.Server.MPartner.DataAggregates.TContactDetailsAggregate.GetPartnersOverallCS ( TDBTransaction  AReadTransaction,
Int64  APartnerKey,
Calculations.TOverallContSettingKind  AOverallContSettingKind,
out PPartnerAttributeTable  APartnerAttributeDT 
)
inlinestatic

Determines the 'Primary' and/or 'Within Organisation' setting(s) for a Partner.

Parameters
AReadTransaction
APartnerKeyPartnerKey of the Partner.
AOverallContSettingKindSpecify the kind of Overall Contact Setting(s) that you want returned. Combine multiple ones with the binary OR operator ( | ).
APartnerAttributeDTContains the Partners' p_partner_attribute records. The ones that are 'Contact Details' have 'true' in the Column Calculations.PARTNERATTRIBUTE_PARTNERCONTACTDETAIL_COLUMN!
Returns
An instance of Calculations.TPartnersOverallContactSettings that holds the Calculations.TPartnersOverallContactSettings for the Partner. However, it returns null in case the Partner hasn't got any p_partner_attribute records, or when the Partner has no p_partner_attribute records that constitute Contact Detail records, or when the Partner has got only one p_partner_attribute record but this records' Current flag is false. It also returns null if no record was found that met what was asked for with AOverallContSettingKind !

◆ GetPrimaryEmailAddress()

static bool Ict.Petra.Server.MPartner.DataAggregates.TContactDetailsAggregate.GetPrimaryEmailAddress ( TDBTransaction  AReadTransaction,
Int64  APartnerKey,
out string  APrimaryEmailAddress 
)
inlinestatic

Gets the 'Primary Email Address' of a Partner.

Parameters
AReadTransaction
APartnerKeyPartnerKey of the Partner.
APrimaryEmailAddressThe 'Primary Email Address' if the Partner has got one, otherwise null.
Returns
True if the Partner has got a 'Primary Email Address', otherwise false.

◆ GetPrimaryEmailAndPrimaryPhone()

static bool Ict.Petra.Server.MPartner.DataAggregates.TContactDetailsAggregate.GetPrimaryEmailAndPrimaryPhone ( TDBTransaction  AReadTransaction,
Int64  APartnerKey,
out string  APrimaryPhoneNumber,
out string  APrimaryEmailAddress 
)
inlinestatic

Determines the 'Primary Phone Number' and the 'Primary E-mail Address' of a Partner.

Parameters
AReadTransaction
APartnerKeyPartnerKey of the Partner.
APrimaryPhoneNumberThe 'Primary Phone Number' if the Partner has got one, otherwise null.
APrimaryEmailAddressThe 'Primary E-mail Address' if the Partner has got one, otherwise null.
Returns
True if the Partner has got at least one of the 'Primary E-mail Address' and the 'Primary Phone Number' Contact Details, otherwise false.

◆ GetPrimaryEmailAndPrimaryPhoneAndFax()

static bool Ict.Petra.Server.MPartner.DataAggregates.TContactDetailsAggregate.GetPrimaryEmailAndPrimaryPhoneAndFax ( TDBTransaction  AReadTransaction,
Int64  APartnerKey,
out string  APrimaryPhoneNumber,
out string  APrimaryEmailAddress,
out string  AFaxNumber 
)
inlinestatic

Determines the 'Primary Phone Number', 'Primary E-mail Address' and the 'Fax Number' of a Partner.

Parameters
AReadTransaction
APartnerKeyPartnerKey of the Partner.
APrimaryPhoneNumberThe 'Primary Phone Number' if the Partner has got one, otherwise null.
APrimaryEmailAddressThe 'Primary E-mail Address' if the Partner has got one, otherwise null.
AFaxNumberThe (first) current 'Fax Number' if it was found, otherwise null. Should there be several current 'Fax Numbers' then the one that comes first (in the order as seen by the user) will get returned in this Argument.
Returns
True if the Partner has got at least one of the 'Primary E-mail Address' and the 'Primary Phone Number' Contact Details or a 'Fax Number', otherwise false.

◆ GetPrimaryPhoneNumber()

static bool Ict.Petra.Server.MPartner.DataAggregates.TContactDetailsAggregate.GetPrimaryPhoneNumber ( TDBTransaction  AReadTransaction,
Int64  APartnerKey,
out string  APrimaryPhoneNumber 
)
inlinestatic

Gets the 'Primary Phone Number' of a Partner.

Parameters
AReadTransaction
APartnerKeyPartnerKey of the Partner.
APrimaryPhoneNumberThe 'Primary Phone Number' if the Partner has got one, otherwise null.
Returns
True if the Partner has got a 'Primary Phone Number', otherwise false.

◆ GetWithinOrganisationEmailAddress()

static bool Ict.Petra.Server.MPartner.DataAggregates.TContactDetailsAggregate.GetWithinOrganisationEmailAddress ( TDBTransaction  AReadTransaction,
Int64  APartnerKey,
out string  AWithinOrganisationEmailAddress 
)
inlinestatic

Gets the 'Within Organisation Email Address' of a Partner.

Parameters
AReadTransaction
APartnerKeyPartnerKey of the Partner.
AWithinOrganisationEmailAddressThe 'Within Organisation Email Address' if the Partner has got one, otherwise null.
Returns
True if the Partner has got a 'Within Organisation Email Address', otherwise false.

◆ GetWithinOrganisationOrPrimaryEmailAddress()

static bool Ict.Petra.Server.MPartner.DataAggregates.TContactDetailsAggregate.GetWithinOrganisationOrPrimaryEmailAddress ( TDBTransaction  AReadTransaction,
Int64  APartnerKey,
out string  AEmailAddress,
out String  AEmailType 
)
inlinestatic

Return the 'within organisation' email, or if that's blank, return the primary email.

Parameters
AReadTransaction
APartnerKey
AEmailAddress
AEmailType
Returns
true if there seems to be one

The documentation for this class was generated from the following file: