Exemple #1
0
 /// <summary>
 /// retrieve cacheable Subscriptions table
 /// </summary>
 /// <param name="ACacheableTable">enum that defines Subscriptions table to be returned</param>
 /// <returns></returns>
 public static DataTable GetCacheableSubscriptionsTable(TCacheableSubscriptionsTablesEnum ACacheableTable)
 {
     if (GetCacheableSubscriptionsTableDelegate != null)
     {
         return(GetCacheableSubscriptionsTableDelegate(ACacheableTable));
     }
     else
     {
         throw new InvalidOperationException("Delegate 'TGetCacheableSubscriptionsTable' must be initialised before calling this Method");
     }
 }
 partial void AfterSaving(TCacheableSubscriptionsTablesEnum ACacheableTable)
 {
     // dependent tables: PublicationInfoList refers to same underlying table as PublicationList
     // and therefore needs to be updated as well when Publications are modified
     if (ACacheableTable == TCacheableSubscriptionsTablesEnum.PublicationList)
     {
         Type TmpType;
         GetCacheableTable(TCacheableSubscriptionsTablesEnum.PublicationInfoList,
                           String.Empty, true, 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(TCacheableSubscriptionsTablesEnum ACacheableTable)
 {
     System.Type TmpType;
     return(GetCacheableTable(ACacheableTable, "", false, out TmpType));
 }
Exemple #4
0
 /// <summary>
 /// retrieve cacheable Subscriptions table
 /// </summary>
 /// <param name="ACacheableTable">enum that defines Subscriptions table to be returned</param>
 /// <returns></returns>
 public static DataTable GetCacheableSubscriptionsTable(TCacheableSubscriptionsTablesEnum ACacheableTable)
 {
     if (FDelegateGetCacheableSubscriptionsTable != null)
     {
         return FDelegateGetCacheableSubscriptionsTable(ACacheableTable);
     }
     else
     {
         throw new InvalidOperationException("Delegate 'TGetCacheableSubscriptionsTable' must be initialised before calling this Method");
     }
 }
Exemple #5
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 RefreshCacheableSubscriptionsTable(TCacheableSubscriptionsTablesEnum ACacheableTable)
            {
                DataTable TmpDT;

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

                // Update the cached DataTable file
                TDataCache.SaveCacheableDataTableToFile(TmpDT);
            }
Exemple #6
0
 /**
  * Returns the chosen DataTable for the Petra Partner Module, Subscriptions
  * Sub-Module from the
  *
  * 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 GetCacheableSubscriptionsTable2(TCacheableSubscriptionsTablesEnum ACacheableTable, string ACustomTableName)
 {
     return TDataCache.GetCacheableDataTableFromCache2(Enum.GetName(typeof(TCacheableSubscriptionsTablesEnum),
             ACacheableTable), ACustomTableName);
 }
Exemple #7
0
 /**
  * Returns the chosen DataTable for the Petra Partner Module, Subscriptions
  * Sub-Module from the
  *
  * 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 GetCacheableSubscriptionsTable(TCacheableSubscriptionsTablesEnum ACacheableTable)
 {
     return GetCacheableSubscriptionsTable2(ACacheableTable, String.Empty);
 }