예제 #1
0
        /// <summary>
        /// Initialize the static variables.
        /// Set up Error Codes and Data Validation Delegates for a Web Request.
        /// This setting-up makes use of the fact that this Method is called only once,
        /// at the start of each Web Request in TOpenPetraOrgSessionManager.Init()
        /// </summary>
        public static void Init()
        {
            TSharedValidationHelper.SharedGetDataDelegate                           = @TCommonDataReader.GetData;
            TSharedPartnerValidationHelper.VerifyPartnerDelegate                    = @TPartnerServerLookups.VerifyPartner;
            TSharedPartnerValidationHelper.PartnerHasActiveStatusDelegate           = @TPartnerServerLookups.PartnerHasActiveStatus;
            TSharedPartnerValidationHelper.PartnerIsLinkedToCCDelegate              = @TPartnerServerLookups.PartnerIsLinkedToCC;
            TSharedPartnerValidationHelper.PartnerOfTypeCCIsLinkedDelegate          = @TPartnerServerLookups.PartnerOfTypeCCIsLinked;
            TSharedPartnerValidationHelper.PartnerHasCurrentGiftDestinationDelegate = @TPartnerServerLookups.PartnerHasCurrentGiftDestination;
            TSharedFinanceValidationHelper.GetValidPostingDateRangeDelegate         = @TFinanceServerLookupWebConnector.GetCurrentPostingRangeDates;
            TSharedFinanceValidationHelper.GetValidPeriodDatesDelegate              = @TAccountingPeriodsWebConnector.GetPeriodDates;
            TSharedFinanceValidationHelper.GetFirstDayOfAccountingPeriodDelegate    = @TAccountingPeriodsWebConnector.GetFirstDayOfAccountingPeriod;
            TMonthEnd.StewardshipCalculationDelegate = @TStewardshipCalculationWebConnector.PerformStewardshipCalculation;

            // Set up Delegates for retrieval of cacheable tables when called from Shared directories on server side
            CachePopulatorCommon        = new Ict.Petra.Server.MCommon.Cacheable.TCacheable();
            CachePopulatorConference    = new Ict.Petra.Server.MConference.Cacheable.TCacheable();
            CachePopulatorFinance       = new Ict.Petra.Server.MFinance.Cacheable.TCacheable();
            CachePopulatorMailing       = new Ict.Petra.Server.MPartner.Mailing.Cacheable.TPartnerCacheable();
            CachePopulatorPartner       = new Ict.Petra.Server.MPartner.Partner.Cacheable.TPartnerCacheable();
            CachePopulatorSubscriptions = new Ict.Petra.Server.MPartner.Subscriptions.Cacheable.TPartnerCacheable();
            CachePopulatorPersonnel     = new Ict.Petra.Server.MPersonnel.Person.Cacheable.TPersonnelCacheable();
            CachePopulatorUnits         = new Ict.Petra.Server.MPersonnel.Unit.Cacheable.TPersonnelCacheable();
            CachePopulatorSysMan        = new Ict.Petra.Server.MSysMan.Cacheable.TCacheable();

            Ict.Petra.Server.MCommon.Cacheable.WebConnectors.TCommonCacheableWebConnector.Init();
            Ict.Petra.Server.MConference.Cacheable.WebConnectors.TConferenceCacheableWebConnector.Init();
            Ict.Petra.Server.MFinance.Cacheable.WebConnectors.TFinanceCacheableWebConnector.Init();
            Ict.Petra.Server.MPartner.Mailing.Cacheable.WebConnectors.TMailingCacheableWebConnector.Init();
            Ict.Petra.Server.MPartner.Partner.Cacheable.WebConnectors.TPartnerCacheableWebConnector.Init();
            Ict.Petra.Server.MPartner.Subscriptions.Cacheable.WebConnectors.TSubscriptionsCacheableWebConnector.Init();
            Ict.Petra.Server.MPersonnel.Person.Cacheable.WebConnectors.TPersonCacheableWebConnector.Init();
            Ict.Petra.Server.MPersonnel.Unit.Cacheable.WebConnectors.TUnitCacheableWebConnector.Init();
            Ict.Petra.Server.MSysMan.Cacheable.WebConnectors.TSysManCacheableWebConnector.Init();

            TSharedDataCache.TMCommon.GetCacheableCommonTableDelegate         = @CachePopulatorCommon.GetCacheableTable;
            TSharedDataCache.TMFinance.GetCacheableFinanceTableDelegate       = @CachePopulatorFinance.GetCacheableTable;
            TSharedDataCache.TMPartner.GetCacheablePartnerTableDelegate       = @CachePopulatorPartner.GetCacheableTable;
            TSharedDataCache.TMPartner.GetCacheableMailingTableDelegate       = @CachePopulatorMailing.GetCacheableTable;
            TSharedDataCache.TMPartner.GetCacheableSubscriptionsTableDelegate = @CachePopulatorSubscriptions.GetCacheableTable;
            TSharedDataCache.TMPersonnel.GetCacheablePersonnelTableDelegate   = @CachePopulatorPersonnel.GetCacheableTable;
            TSharedDataCache.TMPersonnel.GetCacheableUnitsTableDelegate       = @CachePopulatorUnits.GetCacheableTable;
            TSharedDataCache.TMConference.GetCacheableConferenceTableDelegate = @CachePopulatorConference.GetCacheableTable;
            TSharedDataCache.TMSysMan.GetCacheableSysManTableDelegate         = @CachePopulatorSysMan.GetCacheableTable;

            TSharedDataCache.TMPartner.GetPartnerCalculationsSystemCategoryAttributeTypesDelegate =
                @Ict.Petra.Shared.MPartner.Calculations.DetermineSystemCategoryAttributeTypes;
            TSharedDataCache.TMPartner.GetPartnerCalculationsPartnerContactDetailAttributeTypesDelegate =
                @Ict.Petra.Shared.MPartner.Calculations.DeterminePartnerContactDetailAttributeTypes;
            TSharedDataCache.TMPartner.GetPartnerCalculationsEmailPartnerAttributeTypesDelegate =
                @Ict.Petra.Shared.MPartner.Calculations.DetermineEmailPartnerAttributeTypes;
            TSharedDataCache.TMPartner.GetPartnerCalculationsPhonePartnerAttributeTypesDelegate =
                @Ict.Petra.Shared.MPartner.Calculations.DeterminePhonePartnerAttributeTypes;

            TCacheableTablesManager.Init();
            TCacheableTablesManager.GCacheableTablesManager = new TCacheableTablesManager(new TDelegateSendClientTask(TClientManager.QueueClientTask));

            TSmtpSender.GetSmtpSettings = @TSmtpSender.GetSmtpSettingsFromAppSettings;
        }
예제 #2
0
        /// <summary>
        /// init the static variables
        /// </summary>
        public static void Init()
        {
            // Set up Error Codes and Data Validation Delegates for a Client's AppDomain.
            // This setting-up makes use of the fact that this Method is called only once,
            // namely directly after the Client logged in successfully.
            ErrorCodeInventory.RegisteredTypes.Add(new Ict.Petra.Shared.PetraErrorCodes().GetType());

            TSharedValidationHelper.SharedGetDataDelegate                           = @TCommonDataReader.GetData;
            TSharedPartnerValidationHelper.VerifyPartnerDelegate                    = @TPartnerServerLookups.VerifyPartner;
            TSharedPartnerValidationHelper.PartnerHasActiveStatusDelegate           = @TPartnerServerLookups.PartnerHasActiveStatus;
            TSharedPartnerValidationHelper.PartnerIsLinkedToCCDelegate              = @TPartnerServerLookups.PartnerIsLinkedToCC;
            TSharedPartnerValidationHelper.PartnerOfTypeCCIsLinkedDelegate          = @TPartnerServerLookups.PartnerOfTypeCCIsLinked;
            TSharedPartnerValidationHelper.PartnerHasCurrentGiftDestinationDelegate = @TPartnerServerLookups.PartnerHasCurrentGiftDestination;
            TSharedFinanceValidationHelper.GetValidPostingDateRangeDelegate         = @TFinanceServerLookupWebConnector.GetCurrentPostingRangeDates;
            TSharedFinanceValidationHelper.GetFirstDayOfAccountingPeriodDelegate    = @TAccountingPeriodsWebConnector.GetFirstDayOfAccountingPeriod;
            TMonthEnd.StewardshipCalculationDelegate = @TStewardshipCalculationWebConnector.PerformStewardshipCalculation;
            TGLPosting.PrintReportOnClientDelegate   = @TReportingWebConnector.GenerateReportOnClient;

            // Set up Delegates for retrieval of cacheable tables when called from Shared directories on server side
            CachePopulatorCommon        = new Ict.Petra.Server.MCommon.Cacheable.TCacheable();
            CachePopulatorConference    = new Ict.Petra.Server.MConference.Cacheable.TCacheable();
            CachePopulatorFinance       = new Ict.Petra.Server.MFinance.Cacheable.TCacheable();
            CachePopulatorMailing       = new Ict.Petra.Server.MPartner.Mailing.Cacheable.TPartnerCacheable();
            CachePopulatorPartner       = new Ict.Petra.Server.MPartner.Partner.Cacheable.TPartnerCacheable();
            CachePopulatorSubscriptions = new Ict.Petra.Server.MPartner.Subscriptions.Cacheable.TPartnerCacheable();
            CachePopulatorPersonnel     = new Ict.Petra.Server.MPersonnel.Person.Cacheable.TPersonnelCacheable();
            CachePopulatorUnits         = new Ict.Petra.Server.MPersonnel.Unit.Cacheable.TPersonnelCacheable();
            CachePopulatorSysMan        = new Ict.Petra.Server.MSysMan.Cacheable.TCacheable();

            TSharedDataCache.TMCommon.GetCacheableCommonTableDelegate = @CachePopulatorCommon.GetCacheableTable;

            TSharedDataCache.TMFinance.GetCacheableFinanceTableDelegate = @CachePopulatorFinance.GetCacheableTable;

            TSharedDataCache.TMPartner.GetCacheablePartnerTableDelegate       = @CachePopulatorPartner.GetCacheableTable;
            TSharedDataCache.TMPartner.GetCacheableMailingTableDelegate       = @CachePopulatorMailing.GetCacheableTable;
            TSharedDataCache.TMPartner.GetCacheableSubscriptionsTableDelegate = @CachePopulatorSubscriptions.GetCacheableTable;
            TSharedDataCache.TMPartner.GetPartnerCalculationsSystemCategoryAttributeTypesDelegate =
                @Ict.Petra.Shared.MPartner.Calculations.DetermineSystemCategoryAttributeTypes;
            TSharedDataCache.TMPartner.GetPartnerCalculationsPartnerContactDetailAttributeTypesDelegate =
                @Ict.Petra.Shared.MPartner.Calculations.DeterminePartnerContactDetailAttributeTypes;
            TSharedDataCache.TMPartner.GetPartnerCalculationsEmailPartnerAttributeTypesDelegate =
                @Ict.Petra.Shared.MPartner.Calculations.DetermineEmailPartnerAttributeTypes;
            TSharedDataCache.TMPartner.GetPartnerCalculationsPhonePartnerAttributeTypesDelegate =
                @Ict.Petra.Shared.MPartner.Calculations.DeterminePhonePartnerAttributeTypes;

            TSharedDataCache.TMPersonnel.GetCacheablePersonnelTableDelegate = @CachePopulatorPersonnel.GetCacheableTable;
            TSharedDataCache.TMPersonnel.GetCacheableUnitsTableDelegate     = @CachePopulatorUnits.GetCacheableTable;

            TSharedDataCache.TMConference.GetCacheableConferenceTableDelegate = @CachePopulatorConference.GetCacheableTable;

            TSharedDataCache.TMSysMan.GetCacheableSysManTableDelegate = @CachePopulatorSysMan.GetCacheableTable;

            TSmtpSender.GetSmtpSettings = @TSmtpSender.GetSmtpSettingsFromAppSettings;
        }
예제 #3
0
        /// <summary>
        /// Constructor.
        /// </summary>
        static TCallForwarding()
        {
            // Set up Error Codes and Data Validation Delegates for a Client's AppDomain.
            // This setting-up makes use of the fact that this Method is called only once,
            // namely directly after the Client logged in successfully.
            ErrorCodeInventory.RegisteredTypes.Add(new Ict.Petra.Shared.PetraErrorCodes().GetType());

            TSharedValidationHelper.SharedGetDataDelegate                   = @TCommonDataReader.GetData;
            TSharedPartnerValidationHelper.VerifyPartnerDelegate            = @TPartnerServerLookups.VerifyPartner;
            TSharedFinanceValidationHelper.GetValidPostingDateRangeDelegate = @TFinanceServerLookups.GetCurrentPostingRangeDates;
            TMonthEnd.StewardshipCalculationDelegate = @TStewardshipCalculationWebConnector.PerformStewardshipCalculation;
            TGLPosting.PrintReportOnClientDelegate   = @TReportingWebConnector.GenerateReportOnClient;

            // Set up Delegates for retrieval of cacheable tables when called from Shared directories on server side
            CachePopulatorCommon        = new Ict.Petra.Server.MCommon.Cacheable.TCacheable();
            CachePopulatorConference    = new Ict.Petra.Server.MConference.Cacheable.TCacheable();
            CachePopulatorFinance       = new Ict.Petra.Server.MFinance.Cacheable.TCacheable();
            CachePopulatorMailing       = new Ict.Petra.Server.MPartner.Mailing.Cacheable.TPartnerCacheable();
            CachePopulatorPartner       = new Ict.Petra.Server.MPartner.Partner.Cacheable.TPartnerCacheable();
            CachePopulatorSubscriptions = new Ict.Petra.Server.MPartner.Subscriptions.Cacheable.TPartnerCacheable();
            CachePopulatorPersonnel     = new Ict.Petra.Server.MPersonnel.Person.Cacheable.TPersonnelCacheable();
            CachePopulatorUnits         = new Ict.Petra.Server.MPersonnel.Unit.Cacheable.TPersonnelCacheable();
            CachePopulatorSysMan        = new Ict.Petra.Server.MSysMan.Cacheable.TCacheable();

            TSharedDataCache.TMCommon.GetCacheableCommonTableDelegate = @CachePopulatorCommon.GetCacheableTable;

            TSharedDataCache.TMFinance.GetCacheableFinanceTableDelegate = @CachePopulatorFinance.GetCacheableTable;

            TSharedDataCache.TMPartner.GetCacheablePartnerTableDelegate       = @CachePopulatorPartner.GetCacheableTable;
            TSharedDataCache.TMPartner.GetCacheableMailingTableDelegate       = @CachePopulatorMailing.GetCacheableTable;
            TSharedDataCache.TMPartner.GetCacheableSubscriptionsTableDelegate = @CachePopulatorSubscriptions.GetCacheableTable;

            TSharedDataCache.TMPersonnel.GetCacheablePersonnelTableDelegate = @CachePopulatorPersonnel.GetCacheableTable;
            TSharedDataCache.TMPersonnel.GetCacheableUnitsTableDelegate     = @CachePopulatorUnits.GetCacheableTable;

            TSharedDataCache.TMConference.GetCacheableConferenceTableDelegate = @CachePopulatorConference.GetCacheableTable;

            TSharedDataCache.TMSysMan.GetCacheableSysManTableDelegate = @CachePopulatorSysMan.GetCacheableTable;
        }
예제 #4
0
        /// <summary>
        /// Constructor.
        /// </summary>
        static TCallForwarding()
        {
            // Set up Error Codes and Data Validation Delegates for a Client's AppDomain.
            // This setting-up makes use of the fact that this Method is called only once,
            // namely directly after the Client logged in successfully.
            ErrorCodeInventory.RegisteredTypes.Add(new Ict.Petra.Shared.PetraErrorCodes().GetType());

            TSharedValidationHelper.SharedGetDataDelegate = @TCommonDataReader.GetData;
            TSharedPartnerValidationHelper.VerifyPartnerDelegate = @TPartnerServerLookups.VerifyPartner;
            TSharedFinanceValidationHelper.GetValidPostingDateRangeDelegate = @TFinanceServerLookups.GetCurrentPostingRangeDates;
            TMonthEnd.StewardshipCalculationDelegate = @TStewardshipCalculationWebConnector.PerformStewardshipCalculation;
            TGLPosting.PrintReportOnClientDelegate = @TReportingWebConnector.GenerateReportOnClient;

            // Set up Delegates for retrieval of cacheable tables when called from Shared directories on server side
            CachePopulatorCommon = new Ict.Petra.Server.MCommon.Cacheable.TCacheable();
            CachePopulatorConference = new Ict.Petra.Server.MConference.Cacheable.TCacheable();
            CachePopulatorFinance = new Ict.Petra.Server.MFinance.Cacheable.TCacheable();
            CachePopulatorMailing = new Ict.Petra.Server.MPartner.Mailing.Cacheable.TPartnerCacheable();
            CachePopulatorPartner = new Ict.Petra.Server.MPartner.Partner.Cacheable.TPartnerCacheable();
            CachePopulatorSubscriptions = new Ict.Petra.Server.MPartner.Subscriptions.Cacheable.TPartnerCacheable();
            CachePopulatorPersonnel = new Ict.Petra.Server.MPersonnel.Person.Cacheable.TPersonnelCacheable();
            CachePopulatorUnits = new Ict.Petra.Server.MPersonnel.Unit.Cacheable.TPersonnelCacheable();
            CachePopulatorSysMan = new Ict.Petra.Server.MSysMan.Cacheable.TCacheable();

            TSharedDataCache.TMCommon.GetCacheableCommonTableDelegate = @CachePopulatorCommon.GetCacheableTable;

            TSharedDataCache.TMFinance.GetCacheableFinanceTableDelegate = @CachePopulatorFinance.GetCacheableTable;

            TSharedDataCache.TMPartner.GetCacheablePartnerTableDelegate = @CachePopulatorPartner.GetCacheableTable;
            TSharedDataCache.TMPartner.GetCacheableMailingTableDelegate = @CachePopulatorMailing.GetCacheableTable;
            TSharedDataCache.TMPartner.GetCacheableSubscriptionsTableDelegate = @CachePopulatorSubscriptions.GetCacheableTable;

            TSharedDataCache.TMPersonnel.GetCacheablePersonnelTableDelegate = @CachePopulatorPersonnel.GetCacheableTable;
            TSharedDataCache.TMPersonnel.GetCacheableUnitsTableDelegate = @CachePopulatorUnits.GetCacheableTable;

            TSharedDataCache.TMConference.GetCacheableConferenceTableDelegate = @CachePopulatorConference.GetCacheableTable;

            TSharedDataCache.TMSysMan.GetCacheableSysManTableDelegate = @CachePopulatorSysMan.GetCacheableTable;
        }