several static functions to get the exchange rates from the database
More...
|
static decimal | GetDailyExchangeRate (string ACurrencyFrom, string ACurrencyTo, DateTime ADateEffective) |
| Gets daily exchange rate for the given currencies and date. There is no limit on how 'old' the rate can be. If more than one rate exists on or before the specified date the latest one is returned. This might be old or it might be one of several on the same day. TODO: might even collect the latest exchange rate from the web More...
|
|
static decimal | GetDailyExchangeRate (string ACurrencyFrom, string ACurrencyTo, DateTime ADateEffective, int APriorDaysAllowed, Boolean AEnforceUniqueRate) |
| Gets daily exchange rate for the given currencies and date. The APriorDaysAllwed parameter limits how 'old' the rate can be. The unique rate parameter can ensure that a rate is only returned if there is only one to choose from. TODO: might even collect the latest exchange rate from the web More...
|
|
static decimal | GetCorporateExchangeRate (string ACurrencyFrom, string ACurrencyTo, DateTime AStartDate, DateTime AEndDate) |
| get corporate exchange rate for the given currencies and date; More...
|
|
static bool | GetCorporateExchangeRate (string ACurrencyFrom, string ACurrencyTo, DateTime AStartDate, DateTime AEndDate, out decimal AExchangeRateToFind, TDataBase ADataBase=null) |
| get corporate exchange rate for the given currencies and date; More...
|
|
static bool | CheckCurrencyExists (string ACurrencyCode, TDBTransaction ADBTransaction) |
| Checks whether or not a given currency exists in the Currency table More...
|
|
several static functions to get the exchange rates from the database
◆ CheckCurrencyExists()
static bool Ict.Petra.Server.MFinance.Common.TExchangeRateTools.CheckCurrencyExists |
( |
string |
ACurrencyCode, |
|
|
TDBTransaction |
ADBTransaction |
|
) |
| |
|
inlinestatic |
Checks whether or not a given currency exists in the Currency table
- Parameters
-
ACurrencyCode | The currency code to look for |
ADBTransaction | The current transaction |
- Returns
- True if exists, else false
◆ GetCorporateExchangeRate() [1/2]
static decimal Ict.Petra.Server.MFinance.Common.TExchangeRateTools.GetCorporateExchangeRate |
( |
string |
ACurrencyFrom, |
|
|
string |
ACurrencyTo, |
|
|
DateTime |
AStartDate, |
|
|
DateTime |
AEndDate |
|
) |
| |
|
inlinestatic |
get corporate exchange rate for the given currencies and date;
- Parameters
-
ACurrencyFrom | |
ACurrencyTo | |
AStartDate | |
AEndDate | |
- Returns
◆ GetCorporateExchangeRate() [2/2]
static bool Ict.Petra.Server.MFinance.Common.TExchangeRateTools.GetCorporateExchangeRate |
( |
string |
ACurrencyFrom, |
|
|
string |
ACurrencyTo, |
|
|
DateTime |
AStartDate, |
|
|
DateTime |
AEndDate, |
|
|
out decimal |
AExchangeRateToFind, |
|
|
TDataBase |
ADataBase = null |
|
) |
| |
|
inlinestatic |
get corporate exchange rate for the given currencies and date;
- Parameters
-
ACurrencyFrom | |
ACurrencyTo | |
AStartDate | |
AEndDate | |
AExchangeRateToFind | |
ADataBase | |
- Returns
- true if a exchange rate was found for the date. Otherwise false
◆ GetDailyExchangeRate() [1/2]
static decimal Ict.Petra.Server.MFinance.Common.TExchangeRateTools.GetDailyExchangeRate |
( |
string |
ACurrencyFrom, |
|
|
string |
ACurrencyTo, |
|
|
DateTime |
ADateEffective |
|
) |
| |
|
inlinestatic |
Gets daily exchange rate for the given currencies and date. There is no limit on how 'old' the rate can be. If more than one rate exists on or before the specified date the latest one is returned. This might be old or it might be one of several on the same day. TODO: might even collect the latest exchange rate from the web
- Parameters
-
ACurrencyFrom | |
ACurrencyTo | |
ADateEffective | |
- Returns
- Zero if no exchange rate found
◆ GetDailyExchangeRate() [2/2]
static decimal Ict.Petra.Server.MFinance.Common.TExchangeRateTools.GetDailyExchangeRate |
( |
string |
ACurrencyFrom, |
|
|
string |
ACurrencyTo, |
|
|
DateTime |
ADateEffective, |
|
|
int |
APriorDaysAllowed, |
|
|
Boolean |
AEnforceUniqueRate |
|
) |
| |
|
inlinestatic |
Gets daily exchange rate for the given currencies and date. The APriorDaysAllwed parameter limits how 'old' the rate can be. The unique rate parameter can ensure that a rate is only returned if there is only one to choose from. TODO: might even collect the latest exchange rate from the web
- Parameters
-
ACurrencyFrom | |
ACurrencyTo | |
ADateEffective | |
APriorDaysAllowed | Sets a limit on how many days prior to ADateEffective to search. Use -1 for no limit, 0 to imply that the rate must match for the specified date, 1 for the date and the day before and so on. |
AEnforceUniqueRate | If true the method will only return a value if there is one unique rate in the date range. Otherwise it returns the latest rate. |
- Returns
- Zero if no exchange rate found
The documentation for this class was generated from the following file: