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

Contains functions to be used by the Server that perform certain calculations - specific for the Partner Module. More...

Static Public Member Functions

static TLocationPK DetermineBestAddress (Int64 APartnerKey)
 Determines which address is the 'Best Address' of a Partner. More...
 
static TLocationPK DetermineBestAddress (Int64 APartnerKey, out PPartnerLocationRow APartnerLocationDR, TDataBase ADataBase=null)
 Determines which address is the 'Best Address' of a Partner, and returns the PPartnerLocation record which is the 'Best Address'. More...
 
static TLocationPK DetermineBestAddress (Int64 APartnerKey, out PLocationRow ALocationDR)
 Determines which address is the 'Best Address' of a Partner, and returns the PLocation record which the 'Best Address' is pointing to. More...
 
static TLocationPK DetermineBestAddress (Int64 APartnerKey, out PPartnerLocationRow APartnerLocationDR, out PLocationRow ALocationDR, TDataBase ADataBase=null)
 Determines which address is the 'Best Address' of a Partner, and returns the PLocation record which the 'Best Address' is pointing to. More...
 

Detailed Description

Contains functions to be used by the Server that perform certain calculations - specific for the Partner Module.

Member Function Documentation

◆ DetermineBestAddress() [1/4]

static TLocationPK Ict.Petra.Server.MPartner.Common.ServerCalculations.DetermineBestAddress ( Int64  APartnerKey)
inlinestatic

Determines which address is the 'Best Address' of a Partner.

There are two similar shared Methods in Namespace Ict.Petra.Server.MPartner.Common.Calculations, both called 'DetermineBestAddress' which work by passing in the PartnerLocations of a Partner in an Argument and which return a TLocationPK. As those Methods don't access the database, these Methods can be used client-side as well!

Parameters
APartnerKeyPartnerKey of the Partner whose addresses should be checked.
Returns
A TLocationPK which points to the 'Best Address'. If no 'Best Address' was found, SiteKey and LocationKey of this instance will be both -1.

◆ DetermineBestAddress() [2/4]

static TLocationPK Ict.Petra.Server.MPartner.Common.ServerCalculations.DetermineBestAddress ( Int64  APartnerKey,
out PLocationRow  ALocationDR 
)
inlinestatic

Determines which address is the 'Best Address' of a Partner, and returns the PLocation record which the 'Best Address' is pointing to.

There are two similar shared Methods in Namespace Ict.Petra.Server.MPartner.Common.Calculations, both called 'DetermineBestAddress' which work by passing in the PartnerLocations of a Partner in an Argument and which return a TLocationPK. As those Methods don't access the database, these Methods can be used client-side as well!

Parameters
APartnerKeyPartnerKey of the Partner whose addresses should be checked.
ALocationDRPLocation Record that the 'Best Address' is pointing to.
Returns
A TLocationPK which points to the 'Best Address'. If no 'Best Address' was found, SiteKey and LocationKey of this instance will be both -1.

◆ DetermineBestAddress() [3/4]

static TLocationPK Ict.Petra.Server.MPartner.Common.ServerCalculations.DetermineBestAddress ( Int64  APartnerKey,
out PPartnerLocationRow  APartnerLocationDR,
out PLocationRow  ALocationDR,
TDataBase  ADataBase = null 
)
inlinestatic

Determines which address is the 'Best Address' of a Partner, and returns the PLocation record which the 'Best Address' is pointing to.

There are two similar shared Methods in Namespace Ict.Petra.Server.MPartner.Common.Calculations, both called 'DetermineBestAddress' which work by passing in the PartnerLocations of a Partner in an Argument and which return a TLocationPK. As those Methods don't access the database, these Methods can be used client-side as well!

Parameters
APartnerKeyPartnerKey of the Partner whose addresses should be checked.
APartnerLocationDRPPartnerLocation Record that is the record that is the Location of the 'Best Address'.
ALocationDRPLocation Record that the 'Best Address' is pointing to.
ADataBaseAn instantiated TDataBase object, or null (default = null). If null gets passed then the Method executes DB commands with a new Database connection
Returns
A TLocationPK which points to the 'Best Address'. If no 'Best Address' was found, SiteKey and LocationKey of this instance will be both -1.

◆ DetermineBestAddress() [4/4]

static TLocationPK Ict.Petra.Server.MPartner.Common.ServerCalculations.DetermineBestAddress ( Int64  APartnerKey,
out PPartnerLocationRow  APartnerLocationDR,
TDataBase  ADataBase = null 
)
inlinestatic

Determines which address is the 'Best Address' of a Partner, and returns the PPartnerLocation record which is the 'Best Address'.

There are two similar shared Methods in Namespace Ict.Petra.Server.MPartner.Common.Calculations, both called 'DetermineBestAddress' which work by passing in the PartnerLocations of a Partner in an Argument and which return a TLocationPK. As those Methods don't access the database, these Methods can be used client-side as well!

Parameters
APartnerKeyPartnerKey of the Partner whose addresses should be checked.
APartnerLocationDRPPartnerLocation Record that is the record that is the Location of the 'Best Address'.
ADataBaseAn instantiated TDataBase object, or null (default = null). If null gets passed then the Method executes DB commands with a new Database connection
Returns
A TLocationPK which points to the 'Best Address'. If no 'Best Address' was found, SiteKey and LocationKey of this instance will be both -1.

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