示例#1
0
 /// <summary>
 /// retrieve cacheable Common table
 /// </summary>
 /// <param name="ACacheableTable">enum that defines Common table to be returned</param>
 /// <returns></returns>
 public static DataTable GetCacheableCommonTable(TCacheableCommonTablesEnum ACacheableTable)
 {
     if (FDelegateGetCacheableCommonTable != null)
     {
         return FDelegateGetCacheableCommonTable(ACacheableTable);
     }
     else
     {
         throw new InvalidOperationException("Delegate 'TGetCacheableCommonTable' must be initialised before calling this Method");
     }
 }
示例#2
0
 /// <summary>
 /// retrieve cacheable Common table
 /// </summary>
 /// <param name="ACacheableTable">enum that defines Common table to be returned</param>
 /// <returns></returns>
 public static DataTable GetCacheableCommonTable(TCacheableCommonTablesEnum ACacheableTable)
 {
     if (FDelegateGetCacheableCommonTable != null)
     {
         return(FDelegateGetCacheableCommonTable(ACacheableTable));
     }
     else
     {
         throw new InvalidOperationException("Delegate 'TGetCacheableCommonTable' must be initialised before calling this Method");
     }
 }
示例#3
0
            /// <summary>
            /// Refreshes the internal cached DataTable from the DataCache.
            /// </summary>
            /// <remarks>Called by TDataCache if the DataTable was
            /// refreshed on the Serverside.</remarks>
            /// <param name="ACacheableTable"></param>
            public static void RefreshCacheableCommonTable(TCacheableCommonTablesEnum ACacheableTable)
            {
                switch (ACacheableTable)
                {
                    case TCacheableCommonTablesEnum.CountryList:
                        FCountryListDataCacheDT = TDataCache.TMCommon.GetCacheableCommonTable(TCacheableCommonTablesEnum.CountryList);

                        break;

                    case TCacheableCommonTablesEnum.LanguageCodeList:
                        FLanguageListDataCacheDT = TDataCache.TMCommon.GetCacheableCommonTable(TCacheableCommonTablesEnum.LanguageCodeList);

                        break;
                }
            }
示例#4
0
            /// <summary>
            /// Refreshes the internal cached DataTable from the DataCache.
            /// </summary>
            /// <remarks>Called by TDataCache if the DataTable was
            /// refreshed on the Serverside.</remarks>
            /// <param name="ACacheableTable"></param>
            public static void RefreshCacheableCommonTable(TCacheableCommonTablesEnum ACacheableTable)
            {
                switch (ACacheableTable)
                {
                case TCacheableCommonTablesEnum.CountryList:
                    FCountryListDataCacheDT = TDataCache.TMCommon.GetCacheableCommonTable(TCacheableCommonTablesEnum.CountryList);

                    break;

                case TCacheableCommonTablesEnum.LanguageCodeList:
                    FLanguageListDataCacheDT = TDataCache.TMCommon.GetCacheableCommonTable(TCacheableCommonTablesEnum.LanguageCodeList);

                    break;
                }
            }
示例#5
0
 /// <summary>
 /// Returns a certain cachable DataTable that contains all columns and all
 /// rows of a specified table.
 ///
 /// @comment Wrapper for other GetCacheableTable method
 /// </summary>
 ///
 /// <param name="ACacheableTable">Tells what cacheable DataTable should be returned.</param>
 /// <returns>DataTable</returns>
 public DataTable GetCacheableTable(TCacheableCommonTablesEnum ACacheableTable)
 {
     System.Type TmpType;
     return(GetCacheableTable(ACacheableTable, "", false, out TmpType));
 }
 /// <summary>
 /// Returns a certain cachable DataTable that contains all columns and all
 /// rows of a specified table.
 ///
 /// @comment Wrapper for other GetCacheableTable method
 /// </summary>
 ///
 /// <param name="ACacheableTable">Tells what cacheable DataTable should be returned.</param>
 /// <returns>DataTable</returns>
 public DataTable GetCacheableTable(TCacheableCommonTablesEnum ACacheableTable)
 {
     System.Type TmpType;
     return GetCacheableTable(ACacheableTable, "", false, out TmpType);
 }
示例#7
0
            /**
             * Tells the PetraServer to reload the cacheable DataTable from the DB,
             * refreshes the DataTable in the client-side Cache and saves it to a file.
             *
             * @param ACacheableTable The cached DataTable that should be reloaded from DB.
             *
             */
            public static void RefreshCacheableCommonTable(TCacheableCommonTablesEnum ACacheableTable)
            {
                DataTable TmpDT;

                // Refresh the Cacheble DataTable on the Serverside and return it
                TmpDT = TRemote.MCommon.Cacheable.WebConnectors.RefreshCacheableTableAndGet(ACacheableTable);
                UCacheableTablesManager.AddOrRefreshCachedTable(TmpDT, -1);
                Cache_Lookup.TMCommon.RefreshCacheableCommonTable(ACacheableTable);

                // Update the cached DataTable file
                TDataCache.SaveCacheableDataTableToFile(TmpDT);
            }
示例#8
0
 /**
  * Returns the chosen DataTable for the Common Namespace from the Cache.
  *
  * If the DataTable is not available on the Client side, it is automatically
  * retrieved from the Petra Server.
  *
  * @param ACacheableTable The cached DataTable that should be returned in the
  * DataSet
  * @return Chosen DataTable
  *
  */
 public static DataTable GetCacheableCommonTable2(TCacheableCommonTablesEnum ACacheableTable, string ACustomTableName)
 {
     return TDataCache.GetCacheableDataTableFromCache2(ACacheableTable.ToString(), ACustomTableName);
 }
示例#9
0
 /**
  * Returns the chosen DataTable for the Common Namespace from the Cache.
  *
  * If the DataTable is not available on the Client side, it is automatically
  * retrieved from the Petra Server.
  *
  * @param ACacheableTable The cached DataTable that should be returned in the
  * DataSet
  * @return Chosen DataTable
  *
  */
 public static DataTable GetCacheableCommonTable(TCacheableCommonTablesEnum ACacheableTable)
 {
     return GetCacheableCommonTable2(ACacheableTable, String.Empty);
 }