OpenPetra
Free Administration Software for Non-Profits
Ict.Petra.Server.MPartner.Common.TMailing Class Reference

Contains Partner Module Partner (Mailing) - Subnamespace Business Logic. More...

Static Public Member Functions

static bool GetPartnerLocations (Int64 APartnerKey, bool AMailingAddressesOnly, bool AIncludeCurrentAddresses, bool AIncludeFutureAddresses, bool AIncludeExpiredAddresses, out PPartnerLocationTable APartnerLocations, TDataBase ADataBase=null)
 Creates a list of locations for a given Partner. More...
 
static bool GetPartnersBestLocationData (Int64 APartnerKey, out TLocationPK ABestAddressPK, out PLocationRow ALocationDR, out PPartnerLocationRow APartnerLocationDR, TDataBase ADataBase=null)
 Returns the Primary Key of the Location and the Location and PartnerLocation DataRows of the 'Best Address' of a Partner. More...
 
static TLocationPK GetPartnersBestLocation (Int64 APartnerKey)
 Returns the Primary Key of the Location of the 'Best Address' of a Partner. More...
 
static string GetBestEmailAddress (Int64 APartnerKey)
 Gets the 'Primary Email Address'. More...
 
static string GetBestEmailAddressWithDetails (Int64 APartnerKey, out PLocationTable AAddress, out string ACountryNameLocal)
 Gets the 'Primary Email Address' and some location details of the 'Best Address'. More...
 

Detailed Description

Contains Partner Module Partner (Mailing) - Subnamespace Business Logic.

'Business Logic' refers to any logic that retrieves data in a specific way, checks the validity of modifications of data, or perform certain changes on data in a specific way.

Member Function Documentation

◆ GetBestEmailAddress()

static string Ict.Petra.Server.MPartner.Common.TMailing.GetBestEmailAddress ( Int64  APartnerKey)
inlinestatic

Gets the 'Primary Email Address'.

Returns
The 'Primary Email Address', or String.Empty in case the Partner hasn't got one.

◆ GetBestEmailAddressWithDetails()

static string Ict.Petra.Server.MPartner.Common.TMailing.GetBestEmailAddressWithDetails ( Int64  APartnerKey,
out PLocationTable  AAddress,
out string  ACountryNameLocal 
)
inlinestatic

Gets the 'Primary Email Address' and some location details of the 'Best Address'.

Returns
The 'Primary Email Address', or String.Empty in case the Partner hasn't got one.

◆ GetPartnerLocations()

static bool Ict.Petra.Server.MPartner.Common.TMailing.GetPartnerLocations ( Int64  APartnerKey,
bool  AMailingAddressesOnly,
bool  AIncludeCurrentAddresses,
bool  AIncludeFutureAddresses,
bool  AIncludeExpiredAddresses,
out PPartnerLocationTable  APartnerLocations,
TDataBase  ADataBase = null 
)
inlinestatic

Creates a list of locations for a given Partner.

Corresponds in parts with with Progress 4GL Method 'GetPartnerLocations' in partner/maillib.p.

Parameters
APartnerKeyPartnerKey of the Partner being processed.
AMailingAddressesOnlyIf true: only include addresses with mailing flag set.
AIncludeCurrentAddressesIf true: include current addresses.
AIncludeFutureAddressesIf true: include future addresses.
AIncludeExpiredAddressesIf true: include expired addresses.
APartnerLocationsThe Locations of the Partner being processed.
ADataBaseAn instantiated TDataBase object, or null (default = null). If null gets passed then the Method executes DB commands with a new Database connection
Returns
False if an invalid PartnerKey was passed in or if Petra Security denied access to the Partner, otherwise true.

◆ GetPartnersBestLocation()

static TLocationPK Ict.Petra.Server.MPartner.Common.TMailing.GetPartnersBestLocation ( Int64  APartnerKey)
inlinestatic

Returns the Primary Key of the Location of the 'Best Address' of a Partner.

Parameters
APartnerKeyPartneKey of the Partner for which the 'Best Address' should be loaded for.
Returns
TLocationPK(-1,-1) if an invalid PartnerKey was passed in or if Petra Security denied access to the Partner or if Location/PartnerLocation Data could not be loaded for the Partner, otherwise the Primary Key of the Location of the 'Best Address' of the Partner.

◆ GetPartnersBestLocationData()

static bool Ict.Petra.Server.MPartner.Common.TMailing.GetPartnersBestLocationData ( Int64  APartnerKey,
out TLocationPK  ABestAddressPK,
out PLocationRow  ALocationDR,
out PPartnerLocationRow  APartnerLocationDR,
TDataBase  ADataBase = null 
)
inlinestatic

Returns the Primary Key of the Location and the Location and PartnerLocation DataRows of the 'Best Address' of a Partner.

Parameters
APartnerKeyPartnerKey of the Partner for which the 'Best Address' should be loaded for.
ABestAddressPKPrimary Key of the 'Best Address' Location
ALocationDRDataRow containing the 'Best Address' Location
APartnerLocationDRDataRow containing the 'Best Address' PartnerLocation
ADataBaseAn instantiated TDataBase object, or null (default = null). If null gets passed then the Method executes DB commands with a new Database connection
Returns
False if an invalid PartnerKey was passed in or if Petra Security denied access to the Partner or if Location/PartnerLocation Data could not be loaded for the Partner, otherwise true.

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