public static ACurrencyLanguageRow GetCurrencyLanguage(string ACurrencyCode) { ACurrencyLanguageRow ReturnValue = null; string Language = TUserDefaults.GetStringDefault(MSysManConstants.USERDEFAULT_UILANGUAGE); if (Language.Length > 2) { // need to get the two digit language code of p_language: de-DE => DE, en-EN => EN Language = Language.Substring(Language.Length - 2).ToUpper(); } TDBTransaction Transaction = new TDBTransaction(); TDataBase db = DBAccess.Connect("GetCurrencyLanguage"); db.ReadTransaction( ref Transaction, delegate { ACurrencyLanguageTable CurrencyLanguageTable = ACurrencyLanguageAccess.LoadByPrimaryKey(ACurrencyCode, Language, Transaction); if ((CurrencyLanguageTable != null) && (CurrencyLanguageTable.Rows.Count > 0)) { ReturnValue = CurrencyLanguageTable[0]; } }); db.CloseDBConnection(); return(ReturnValue); }
public static ACurrencyLanguageRow GetCurrencyLanguage(string ACurrencyCode) { ACurrencyLanguageRow ReturnValue = null; string Language = TUserDefaults.GetStringDefault(MSysManConstants.USERDEFAULT_UILANGUAGE); if (Language.Length > 2) { // need to get the two digit language code of p_language: de-DE => DE, en-EN => EN Language = Language.Substring(Language.Length - 2).ToUpper(); } TDBTransaction Transaction = null; DBAccess.GDBAccessObj.GetNewOrExistingAutoReadTransaction(IsolationLevel.ReadCommitted, TEnforceIsolationLevel.eilMinimum, ref Transaction, delegate { ACurrencyLanguageTable CurrencyLanguageTable = ACurrencyLanguageAccess.LoadByPrimaryKey(ACurrencyCode, Language, Transaction); if ((CurrencyLanguageTable != null) && (CurrencyLanguageTable.Rows.Count > 0)) { ReturnValue = CurrencyLanguageTable[0]; } }); return(ReturnValue); }
public static ACurrencyLanguageRow GetCurrencyLanguage(string ACurrencyCode) { ACurrencyLanguageRow ReturnValue = null; string Language = TUserDefaults.GetStringDefault(MSysManConstants.USERDEFAULT_UILANGUAGE); TDBTransaction Transaction = null; DBAccess.GDBAccessObj.GetNewOrExistingAutoReadTransaction(IsolationLevel.ReadCommitted, TEnforceIsolationLevel.eilMinimum, ref Transaction, delegate { ACurrencyLanguageTable CurrencyLanguageTable = ACurrencyLanguageAccess.LoadByPrimaryKey(ACurrencyCode, Language, Transaction); if ((CurrencyLanguageTable != null) && (CurrencyLanguageTable.Rows.Count > 0)) { ReturnValue = CurrencyLanguageTable[0]; } }); return(ReturnValue); }