OpenPetra
Free Administration Software for Non-Profits
Ict.Petra.Server.MPartner.Partner.ServerLookups.WebConnectors.TPartnerServerLookups Class Reference

Performs server-side lookups for the Client in the MPartner.ServerLookups sub-namespace. More...

Static Public Member Functions

static Boolean GetPartnerShortName (Int64 APartnerKey, out String APartnerShortName, out TPartnerClass APartnerClass, Boolean AMergedPartners=true)
 Gets the ShortName of a Partner. More...
 
static Int64 GetPartnerGiftDestination (Int64 APartnerKey, DateTime ? AGiftDate)
 Gets the Gift Destination of a Partner. More...
 
static Boolean VerifyPartner (Int64 APartnerKey, TPartnerClass[] AValidPartnerClasses, out bool APartnerExists, out String APartnerShortName, out TPartnerClass APartnerClass, out TStdPartnerStatusCode APartnerStatus)
 Verifies the existence of a Partner. More...
 
static Boolean PartnerHasActiveStatus (Int64 APartnerKey)
 Test whether a Partner is Active. More...
 
static Boolean PartnerIsLinkedToCC (Int64 APartnerKey)
 Is this the key of a valid Gift Recipient? More...
 
static Boolean PartnerOfTypeCCIsLinked (Int32 ALedgerNumber, Int64 APartnerKey)
 Is this Recipient, if of type CC, linked? More...
 
static Boolean PartnerHasCurrentGiftDestination (Int64 APartnerKey, DateTime ? AGiftDate)
 Does this Recipient have a valid current gift destination? More...
 
static Boolean VerifyPartnerAndGetDetails (Int64 APartnerKey, out String APartnerShortName, out TPartnerClass APartnerClass, out Boolean AIsMergedPartner, out Boolean AUserCanAccessPartner)
 Verifies the existence of a Partner and checks if the current user can modify it. More...
 
static Boolean VerifyPartner (Int64 APartnerKey)
 Verifies the existence of a Partner More...
 
static Boolean VerifyPartnerAtLocation (Int64 APartnerKey, TLocationPK ALocationKey, out bool AAddressIsCurrent, out bool AAddressIsMailing)
 Verifies the existence of a Partner at a given location More...
 
static Boolean MergedPartnerDetails (Int64 AMergedPartnerPartnerKey, out String AMergedPartnerPartnerShortName, out TPartnerClass AMergedPartnerPartnerClass, out Int64 AMergedIntoPartnerKey, out String AMergedIntoPartnerShortName, out TPartnerClass AMergedIntoPartnerClass, out String AMergedBy, out DateTime AMergeDate)
 Returns information about a Partner that was Merged and about the Partner it was merged into. More...
 
static Boolean PartnerInfo (Int64 APartnerKey, TPartnerInfoScopeEnum APartnerInfoScope, out PartnerInfoTDS APartnerInfoDS)
 Retrieves information about a Partner. More...
 
static Boolean PartnerInfo (Int64 APartnerKey, TLocationPK ALocationKey, TPartnerInfoScopeEnum APartnerInfoScope, out PartnerInfoTDS APartnerInfoDS)
 Retrieves information about a Partner. More...
 
static bool GetPartnerReceiptingInfo (Int64 APartnerKey, out bool AReceiptEachGift, out String AReceiptLetterFrequency, out bool AEmailGiftStatement, out bool AAnonymousDonor)
 Retrieves receipting fields from a partner key. More...
 
static Boolean GetExtractDescription (String AExtractName, out String AExtractDescription)
 Retrieves the description of an extract. More...
 
static Boolean GetPartnerFoundationStatus (Int64 APartnerKey, out Boolean AIsFoundation)
 Gets the foundation status of the partner. This function should only be called for partners of type organisation. More...
 
static Boolean GetRecentlyUsedPartners (int AMaxPartnersCount, ArrayList APartnerClasses, out Dictionary< long, string >ARecentlyUsedPartners)
 Get a list of the last used partners from the current user. More...
 
static Int64 GetFamilyKeyForPerson (Int64 APersonKey)
 Gets the family partner key of a person record. This function should only be called for partners of type person. More...
 
static string GetCountryCodeFromSiteLedger ()
 
static bool GetUnitNameAndCountryCodeFromPartnerKey (Int64 APartnerKey, out string AUnitName, out string ACountryCode)
 Can be used to recover basic p_unit information More...
 

Detailed Description

Performs server-side lookups for the Client in the MPartner.ServerLookups sub-namespace.

Member Function Documentation

◆ GetCountryCodeFromSiteLedger()

static string Ict.Petra.Server.MPartner.Partner.ServerLookups.WebConnectors.TPartnerServerLookups.GetCountryCodeFromSiteLedger ( )
inlinestatic

Returns
the country code for this installation of OpenPetra.

◆ GetExtractDescription()

static Boolean Ict.Petra.Server.MPartner.Partner.ServerLookups.WebConnectors.TPartnerServerLookups.GetExtractDescription ( String  AExtractName,
out String  AExtractDescription 
)
inlinestatic

Retrieves the description of an extract.

Parameters
AExtractNameThe name which identifies the extract
AExtractDescriptionThe description of the extract
Returns
true if the extract was found and the description was retrieved

◆ GetFamilyKeyForPerson()

static Int64 Ict.Petra.Server.MPartner.Partner.ServerLookups.WebConnectors.TPartnerServerLookups.GetFamilyKeyForPerson ( Int64  APersonKey)
inlinestatic

Gets the family partner key of a person record. This function should only be called for partners of type person.

Parameters
APersonKeyPartner key of the person to retrieve the family key for Partner must be a person.
Returns
Family partner key of the person. A Person must always have a family that it is related to. False, if there is no partner with the partner key or the partner is not an organisation

EOPAppException if we don't find a partner or if the partner is not an organisation

◆ GetPartnerFoundationStatus()

static Boolean Ict.Petra.Server.MPartner.Partner.ServerLookups.WebConnectors.TPartnerServerLookups.GetPartnerFoundationStatus ( Int64  APartnerKey,
out Boolean  AIsFoundation 
)
inlinestatic

Gets the foundation status of the partner. This function should only be called for partners of type organisation.

Parameters
APartnerKeyPartner key of the partner to retrieve the foundation status. Partner must be an organisation.
AIsFoundationtrue if the partner (organisation) is a foundation. Otherwise false
Returns
True, if an entry of the partner was found in table p_organisation. False, if there is no partner with the partner key or the partner is not an organisation

EOPAppException if we don't find a partner or if the partner is not an organisation

◆ GetPartnerGiftDestination()

static Int64 Ict.Petra.Server.MPartner.Partner.ServerLookups.WebConnectors.TPartnerServerLookups.GetPartnerGiftDestination ( Int64  APartnerKey,
DateTime ?  AGiftDate 
)
inlinestatic

Gets the Gift Destination of a Partner.

Parameters
APartnerKey
AGiftDate
Returns

◆ GetPartnerReceiptingInfo()

static bool Ict.Petra.Server.MPartner.Partner.ServerLookups.WebConnectors.TPartnerServerLookups.GetPartnerReceiptingInfo ( Int64  APartnerKey,
out bool  AReceiptEachGift,
out String  AReceiptLetterFrequency,
out bool  AEmailGiftStatement,
out bool  AAnonymousDonor 
)
inlinestatic

Retrieves receipting fields from a partner key.

Parameters
APartnerKey
AReceiptEachGift
AReceiptLetterFrequency
AEmailGiftStatement
AAnonymousDonor

◆ GetPartnerShortName()

static Boolean Ict.Petra.Server.MPartner.Partner.ServerLookups.WebConnectors.TPartnerServerLookups.GetPartnerShortName ( Int64  APartnerKey,
out String  APartnerShortName,
out TPartnerClass  APartnerClass,
Boolean  AMergedPartners = true 
)
inlinestatic

Gets the ShortName of a Partner.

Parameters
APartnerKeyPartnerKey of Partner to find the short name for
APartnerShortNameShortName for the found Partner ('' if Partner doesn't exist or PartnerKey is 0)
APartnerClassPartner Class of the found Partner (FAMILY if Partner doesn't exist or PartnerKey is 0)
AMergedPartnersSet to false if the function should return 'false' if the Partner' Partner Status is MERGED
Returns
true if Partner was found in DB (except if AMergedPartners is false and Partner is MERGED) or PartnerKey is 0, otherwise false

◆ GetRecentlyUsedPartners()

static Boolean Ict.Petra.Server.MPartner.Partner.ServerLookups.WebConnectors.TPartnerServerLookups.GetRecentlyUsedPartners ( int  AMaxPartnersCount,
ArrayList  APartnerClasses,
out Dictionary< long, string >  ARecentlyUsedPartners 
)
inlinestatic

Get a list of the last used partners from the current user.

Parameters
AMaxPartnersCountMaxinum numbers of Partners to return
APartnerClassesList of partner classes which kind of partners the result should contain. If it contains "*" then all recent partners will be returned otherwise only the partners whose partner class is in APartnerClasses.
ARecentlyUsedPartnersList of the last used partner names and partner keys
Returns
true if call was successfull

◆ GetUnitNameAndCountryCodeFromPartnerKey()

static bool Ict.Petra.Server.MPartner.Partner.ServerLookups.WebConnectors.TPartnerServerLookups.GetUnitNameAndCountryCodeFromPartnerKey ( Int64  APartnerKey,
out string  AUnitName,
out string  ACountryCode 
)
inlinestatic

Can be used to recover basic p_unit information

Parameters
APartnerKeyThe Partner Key of the UNIT
AUnitNameReturns the Unit short name
ACountryCodeReturns the country code stored for this unit. It may be 99.
Returns

◆ MergedPartnerDetails()

static Boolean Ict.Petra.Server.MPartner.Partner.ServerLookups.WebConnectors.TPartnerServerLookups.MergedPartnerDetails ( Int64  AMergedPartnerPartnerKey,
out String  AMergedPartnerPartnerShortName,
out TPartnerClass  AMergedPartnerPartnerClass,
out Int64  AMergedIntoPartnerKey,
out String  AMergedIntoPartnerShortName,
out TPartnerClass  AMergedIntoPartnerClass,
out String  AMergedBy,
out DateTime  AMergeDate 
)
inlinestatic

Returns information about a Partner that was Merged and about the Partner it was merged into.

Parameters
AMergedPartnerPartnerKeyPartnerKey of Merged Partner.
AMergedPartnerPartnerShortNameShortName of Merged Partner.
AMergedPartnerPartnerClassPartner Class of Merged Partner.
AMergedIntoPartnerKeyPartnerKey of Merged-Into Partner. (Only populated if that information is available.)
AMergedIntoPartnerShortNameShortName of Merged-Into Partner. (Only populated if that information is available.)
AMergedIntoPartnerClassPartnerClass of Merged-Into Partner. (Only populated if that information is available.)
AMergedByUser who performed the Partner Merge operation. (Only populated if that information is available.)
AMergeDateDate on which the Partner Merge operation was done. (Only populated if that information is available.)
Returns
True if (1) Merged Partner exists and (2) its Status is MERGED, otherwise false.

◆ PartnerHasActiveStatus()

static Boolean Ict.Petra.Server.MPartner.Partner.ServerLookups.WebConnectors.TPartnerServerLookups.PartnerHasActiveStatus ( Int64  APartnerKey)
inlinestatic

Test whether a Partner is Active.

Returns
True if this Status is listed as being active

◆ PartnerHasCurrentGiftDestination()

static Boolean Ict.Petra.Server.MPartner.Partner.ServerLookups.WebConnectors.TPartnerServerLookups.PartnerHasCurrentGiftDestination ( Int64  APartnerKey,
DateTime ?  AGiftDate 
)
inlinestatic

Does this Recipient have a valid current gift destination?

Parameters
APartnerKey
AGiftDate
Returns
True if this is partner has a valid gift destination that is linked (in the specified ledger)

◆ PartnerInfo() [1/2]

static Boolean Ict.Petra.Server.MPartner.Partner.ServerLookups.WebConnectors.TPartnerServerLookups.PartnerInfo ( Int64  APartnerKey,
TLocationPK  ALocationKey,
TPartnerInfoScopeEnum  APartnerInfoScope,
out PartnerInfoTDS  APartnerInfoDS 
)
inlinestatic

Retrieves information about a Partner.

The information returned can be of different scope. Scope refers to the amount/detail of information that is returned. The scope is defined with the APartnerInfoScope parameter. Larger scope means longer time is needed for the retrieval of the data and a larger DataSet to transfer to the Client (if this Method is called from the Client)!

Parameters
APartnerKeyPartnerKey of Partner to find the short name for
ALocationKeyLocation Key of the Location that the information should be retrieved for.
APartnerInfoScopeDefines the scope of data that should be returned for the Partner.
APartnerInfoDSTyped DataSet of Type PartnerInfoTDS that contains the Partner Information that was requested for the Partner.
Returns
True if Partner was found in DB, otherwise false.

◆ PartnerInfo() [2/2]

static Boolean Ict.Petra.Server.MPartner.Partner.ServerLookups.WebConnectors.TPartnerServerLookups.PartnerInfo ( Int64  APartnerKey,
TPartnerInfoScopeEnum  APartnerInfoScope,
out PartnerInfoTDS  APartnerInfoDS 
)
inlinestatic

Retrieves information about a Partner.

The information returned can be of different scope. Scope refers to the amount/detail of information that is returned. The scope is defined with the APartnerInfoScope parameter. Larger scope means longer time is needed for the retrieval of the data and a larger DataSet to transfer to the Client (if this Method is called from the Client)!

Parameters
APartnerKeyPartnerKey of Partner to find the short name for
APartnerInfoScopeDefines the scope of data that should be returned for the Partner.
APartnerInfoDSTyped DataSet of Type PartnerInfoTDS that contains the Partner Information that was requested for the Partner.
Returns
True if Partner was found in DB, otherwise false.

◆ PartnerIsLinkedToCC()

static Boolean Ict.Petra.Server.MPartner.Partner.ServerLookups.WebConnectors.TPartnerServerLookups.PartnerIsLinkedToCC ( Int64  APartnerKey)
inlinestatic

Is this the key of a valid Gift Recipient?

Parameters
APartnerKey
Returns
True if this is a valid key to a partner that's linked to a Cost Centre (in any ledger) or if this is a local site key.

◆ PartnerOfTypeCCIsLinked()

static Boolean Ict.Petra.Server.MPartner.Partner.ServerLookups.WebConnectors.TPartnerServerLookups.PartnerOfTypeCCIsLinked ( Int32  ALedgerNumber,
Int64  APartnerKey 
)
inlinestatic

Is this Recipient, if of type CC, linked?

Parameters
ALedgerNumberThe ledger where the partner should be linked to a cost center. This can be overwritten by the parameter LedgerForPartnerCCLinks in the config file
APartnerKey
Returns
True if this is a valid key to a partner of type CC that is linked (in the specified ledger)

◆ VerifyPartner() [1/2]

static Boolean Ict.Petra.Server.MPartner.Partner.ServerLookups.WebConnectors.TPartnerServerLookups.VerifyPartner ( Int64  APartnerKey)
inlinestatic

Verifies the existence of a Partner

Parameters
APartnerKeyPartnerKey of Partner to find the short name for
Returns
true if Partner was found in DB or Partner key = 0, otherwise false

◆ VerifyPartner() [2/2]

static Boolean Ict.Petra.Server.MPartner.Partner.ServerLookups.WebConnectors.TPartnerServerLookups.VerifyPartner ( Int64  APartnerKey,
TPartnerClass[]  AValidPartnerClasses,
out bool  APartnerExists,
out String  APartnerShortName,
out TPartnerClass  APartnerClass,
out TStdPartnerStatusCode  APartnerStatus 
)
inlinestatic

Verifies the existence of a Partner.

Parameters
APartnerKeyPartnerKey of Partner to find the short name for.
AValidPartnerClassesPass in a array of valid PartnerClasses that the Partner is allowed to have (eg. [PERSON, FAMILY], or an empty array ( [] ).
APartnerExistsTrue if the Partner exists in the database or if PartnerKey is 0.
APartnerShortNameShortName for the found Partner ('' if Partner doesn't exist or PartnerKey is 0).
APartnerClassPartner Class of the found Partner (FAMILY if Partner doesn't exist or PartnerKey is 0).
APartnerStatusPartner Status
Returns
true if Partner was found in DB (except if AValidPartnerClasses isn't an empty array and the found Partner isn't of a PartnerClass that is in the Set) or PartnerKey is 0, otherwise false.

◆ VerifyPartnerAndGetDetails()

static Boolean Ict.Petra.Server.MPartner.Partner.ServerLookups.WebConnectors.TPartnerServerLookups.VerifyPartnerAndGetDetails ( Int64  APartnerKey,
out String  APartnerShortName,
out TPartnerClass  APartnerClass,
out Boolean  AIsMergedPartner,
out Boolean  AUserCanAccessPartner 
)
inlinestatic

Verifies the existence of a Partner and checks if the current user can modify it.

Parameters
APartnerKeyPartnerKey of Partner to find the short name for
APartnerShortNameShortName for the found Partner ('' if Partner doesn't exist or PartnerKey is 0)
APartnerClassPartner Class of the found Partner (FAMILY if Partner doesn't exist or PartnerKey is 0)
AIsMergedPartnertrue if the Partner' Partner Status is MERGED, otherwise false
AUserCanAccessPartnertrue if the current user has the rights to access this partner
Returns
true if Partner was found in DB or Partner key = 0, otherwise false

◆ VerifyPartnerAtLocation()

static Boolean Ict.Petra.Server.MPartner.Partner.ServerLookups.WebConnectors.TPartnerServerLookups.VerifyPartnerAtLocation ( Int64  APartnerKey,
TLocationPK  ALocationKey,
out bool  AAddressIsCurrent,
out bool  AAddressIsMailing 
)
inlinestatic

Verifies the existence of a Partner at a given location

Parameters
APartnerKeyPartnerKey of Partner to be verified
ALocationKeyLocation Key of Partner to be verified
AAddressIsCurrent
AAddressIsMailing
Returns
true if Partner was found in DB at given location, otherwise false

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