Beispiel #1
0
        /// connect to the server
        public static void Connect(string AConfigName)
        {
            TUnhandledThreadExceptionHandler UnhandledThreadExceptionHandler;

            // Set up Handlers for 'UnhandledException'
            // Note: BOTH handlers are needed for a WinForms Application!!!
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(ExceptionHandling.UnhandledExceptionHandler);
            UnhandledThreadExceptionHandler             = new TUnhandledThreadExceptionHandler();

            Application.ThreadException += new ThreadExceptionEventHandler(UnhandledThreadExceptionHandler.OnThreadException);

            new TAppSettingsManager(AConfigName);

            CommonNUnitFunctions.InitRootPath();

            Catalog.Init();
            TClientTasksQueue.ClientTasksInstanceType       = typeof(TClientTaskInstance);
            TConnectionManagementBase.ConnectorType         = typeof(TConnector);
            TConnectionManagementBase.GConnectionManagement = new TConnectionManagement();

            new TClientSettings();
            TClientInfo.InitializeUnit();
            TCacheableTablesManager.InitializeUnit();

            // Set up Data Validation Delegates
            TSharedValidationHelper.SharedGetDataDelegate                   = @TServerLookup.TMCommon.GetData;
            TSharedPartnerValidationHelper.VerifyPartnerDelegate            = @TServerLookup.TMPartner.VerifyPartner;
            TSharedFinanceValidationHelper.GetValidPostingDateRangeDelegate = @TServerLookup.TMFinance.GetCurrentPostingRangeDates;
            TSharedFinanceValidationHelper.GetValidPeriodDatesDelegate      = @TServerLookup.TMFinance.GetCurrentPeriodDates;

            Connect(TAppSettingsManager.GetValue("AutoLogin"), TAppSettingsManager.GetValue("AutoLoginPasswd"),
                    TAppSettingsManager.GetInt64("SiteKey"));
        }
Beispiel #2
0
        /// connect to the server
        public static eLoginEnum Connect(string AConfigName, bool AThrowExceptionOnLoginFailure = true)
        {
            TUnhandledThreadExceptionHandler UnhandledThreadExceptionHandler;

            // Set up Handlers for 'UnhandledException'
            // Note: BOTH handlers are needed for a WinForms Application!!!
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(ExceptionHandling.UnhandledExceptionHandler);
            UnhandledThreadExceptionHandler             = new TUnhandledThreadExceptionHandler();

            Application.ThreadException += new ThreadExceptionEventHandler(UnhandledThreadExceptionHandler.OnThreadException);

            new TAppSettingsManager(AConfigName);

            CommonNUnitFunctions.InitRootPath();

            Catalog.Init();
            TClientTasksQueue.ClientTasksInstanceType       = typeof(TClientTaskInstance);
            TConnectionManagementBase.GConnectionManagement = new TConnectionManagement();

            new TClientSettings();
            TClientInfo.InitializeUnit();
            TCacheableTablesManager.InitializeUnit();

            // Set up Data Validation Delegates
            TSharedValidationHelper.SharedGetDataDelegate                           = @TServerLookup.TMCommon.GetData;
            TSharedPartnerValidationHelper.VerifyPartnerDelegate                    = @TServerLookup.TMPartner.VerifyPartner;
            TSharedPartnerValidationHelper.PartnerIsLinkedToCCDelegate              = @TServerLookup.TMPartner.PartnerIsLinkedToCC;
            TSharedPartnerValidationHelper.PartnerOfTypeCCIsLinkedDelegate          = @TServerLookup.TMPartner.PartnerOfTypeCCIsLinked;
            TSharedPartnerValidationHelper.PartnerHasCurrentGiftDestinationDelegate = @TServerLookup.TMPartner.PartnerHasCurrentGiftDestination;
            TSharedFinanceValidationHelper.GetValidPostingDateRangeDelegate         = @TServerLookup.TMFinance.GetCurrentPostingRangeDates;
            TSharedFinanceValidationHelper.GetValidPeriodDatesDelegate              = @TServerLookup.TMFinance.GetCurrentPeriodDates;

            // Ensure we throw away the previous client session cookies!
            THTTPUtils.ResetSession();

            eLoginEnum Result = Connect(TAppSettingsManager.GetValue("AutoLogin"), TAppSettingsManager.GetValue("AutoLoginPasswd"),
                                        TAppSettingsManager.GetInt64("SiteKey"));

            if ((Result != eLoginEnum.eLoginSucceeded) && AThrowExceptionOnLoginFailure)
            {
                throw new Exception("login failed");
            }

            return(Result);
        }
Beispiel #3
0
        /// <summary>
        /// Perform necessary initializations of Classes
        /// </summary>
        /// <returns>void</returns>
        private static void InitialiseClasses()
        {
            TClientInfo.InitializeUnit();
            TCacheableTablesManager.InitializeUnit();
            new TIconCache();

            // Set up Delegates for forwarding of calls for security-related Exceptions
            ExceptionHandling.ProcessSecurityAccessDeniedException = TMessages.MsgSecurityException;
            TUnhandledThreadExceptionHandler.ProcessSecurityAccessDeniedException = TMessages.MsgSecurityException;

            // Set up Delegates for forwarding of calls to Screens in various Assemblies
            TCommonScreensForwarding.OpenPartnerFindScreen = @TPartnerFindScreenManager.OpenModalForm;
            TCommonScreensForwarding.OpenPartnerFindByBankDetailsScreen = @TPartnerFindScreenManager.OpenModalForm;
            TCommonScreensForwarding.OpenBankFindDialog              = @TBankFindDialogManager.OpenModalForm;
            TCommonScreensForwarding.OpenConferenceFindScreen        = @TConferenceFindScreenManager.OpenModalForm;
            TCommonScreensForwarding.OpenEventFindScreen             = @TEventFindScreenManager.OpenModalForm;
            TCommonScreensForwarding.OpenExtractFindScreen           = @TExtractFindScreenManager.OpenModalForm;
            TCommonScreensForwarding.OpenExtractMasterScreen         = @TExtractMasterScreenManager.OpenForm;
            TCommonScreensForwarding.OpenDonorRecipientHistoryScreen = @TDonorRecipientHistoryScreenManager.OpenForm;
            TCommonScreensForwarding.OpenPartnerEditScreen           = @TPartnerEditScreenManager.OpenForm;
            TCommonScreensForwarding.OpenExtractMasterScreenHidden   = @TExtractMasterScreenManager.OpenFormHidden;
            TCommonScreensForwarding.OpenRangeFindScreen             = @TPostcodeRangeSetupManager.OpenModalForm;
            TCommonScreensForwarding.OpenOccupationCodeFindScreen    = @TOccupationCodeSetupManager.OpenModalForm;
            TCommonScreensForwarding.OpenGetMergeDataDialog          = @TGetMergeDataManager.OpenModalForm;
            TCommonScreensForwarding.OpenPrintPartnerDialog          = @TPrintPartnerModal.OpenModalForm;

            // Set up Delegate for the opening of Forms from the Main Menu
            Ict.Common.Controls.TLstTasks.OpenNewOrExistingForm = @Ict.Petra.Client.CommonForms.TFormsList.OpenNewOrExistingForm;

            // Set up Delegate for the retrieval of the list of Currencies from the Cache
            Ict.Common.Controls.TTxtCurrencyTextBox.RetrieveCurrencyList = @Ict.Petra.Client.CommonControls.TControlExtensions.RetrieveCurrencyList;

            // Set up Delegate for the set-up of various Colours of all SourceGrid DataGrid instances from UserDefaults
            Ict.Common.Controls.TSgrdDataGrid.SetColourInformation = @SetDataGridColoursFromUserDefaults;

            // Set up Delegate for the set-up of various Colours of all Filter and Find instances from UserDefaults
            Ict.Petra.Client.CommonControls.TUcoFilterAndFind.SetColourInformation = @SetFilterFindColoursFromUserDefaults;

            // Set up Data Validation Delegates
            TSharedValidationHelper.SharedGetDataDelegate = @TServerLookup.TMCommon.GetData;
            TSharedValidationControlHelper.SharedGetDateVerificationResultDelegate = @TtxtPetraDate.GetDateVerificationResult;
            TSharedPartnerValidationHelper.VerifyPartnerDelegate            = @TServerLookup.TMPartner.VerifyPartner;
            TSharedFinanceValidationHelper.GetValidPostingDateRangeDelegate = @TServerLookup.TMFinance.GetCurrentPostingRangeDates;
            TSharedFinanceValidationHelper.GetValidPeriodDatesDelegate      = @TServerLookup.TMFinance.GetCurrentPeriodDates;

            // Set up Delegates for retrieval of cacheable tables when called from Shared directories on client side
            TSharedDataCache.TMCommon.GetCacheableCommonTableDelegate = @TDataCache.TMCommon.GetCacheableCommonTable;

            TSharedDataCache.TMFinance.GetCacheableFinanceTableDelegate = @TDataCache.TMFinance.GetCacheableFinanceTable;

            TSharedDataCache.TMPartner.GetCacheablePartnerTableDelegate       = @TDataCache.TMPartner.GetCacheablePartnerTable;
            TSharedDataCache.TMPartner.GetCacheableMailingTableDelegate       = @TDataCache.TMPartner.GetCacheableMailingTable;
            TSharedDataCache.TMPartner.GetCacheableSubscriptionsTableDelegate = @TDataCache.TMPartner.GetCacheableSubscriptionsTable;

            TSharedDataCache.TMPersonnel.GetCacheablePersonnelTableDelegate = @TDataCache.TMPersonnel.GetCacheablePersonnelTable;
            TSharedDataCache.TMPersonnel.GetCacheableUnitsTableDelegate     = @TDataCache.TMPersonnel.GetCacheableUnitsTable;

            TSharedDataCache.TMConference.GetCacheableConferenceTableDelegate = @TDataCache.TMConference.GetCacheableConferenceTable;

            TSharedDataCache.TMSysMan.GetCacheableSysManTableDelegate = @TDataCache.TMSysMan.GetCacheableSysManTable;

            // I18N: assign proper font which helps to read asian characters
            // this is the first place where it is called, and we need to initialize the TAppSettingsManager
            TAppSettingsManager.InitFontI18N();

            TCommonControlsHelper.SetInactiveIdentifier += delegate {
                return(SharedConstants.INACTIVE_VALUE_WITH_QUALIFIERS);
            };
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            new TLogging("../../log/TestRemotingClient.log");

            try
            {
                new TAppSettingsManager("../../etc/Client.config");

                TLogging.DebugLevel = Convert.ToInt32(TAppSettingsManager.GetValue("Client.DebugLevel", "0"));

                new TClientSettings();

                // initialize the client
                TConnectionManagementBase.ConnectorType         = typeof(TConnector);
                TConnectionManagementBase.GConnectionManagement = new TConnectionManagement();

                TClientInfo.InitializeUnit();

                Catalog.Init("en-GB", "en-GB");

                string error;
                ConnectToTestServer("DEMO", "DEMO", out error);

                IMyUIConnector MyUIConnector = TRemote.MyService.SubNamespace.MyUIConnector();
                TEnsureKeepAlive.Register(MyUIConnector);
                IMySubNamespace test = TRemote.MyService.SubNamespace;

                while (true)
                {
                    try
                    {
                        TLogging.Log(TRemote.MyService.HelloWorld("Hello World"));
                    }
                    catch (Exception e)
                    {
                        TLogging.Log("problem with MyService HelloWorld: " + Environment.NewLine + e.ToString());
                    }

                    try
                    {
                        TLogging.Log(test.HelloSubWorld("Hello SubWorld"));
                    }
                    catch (Exception e)
                    {
                        TLogging.Log("problem with sub namespace HelloSubWorld: " + Environment.NewLine + e.ToString());
                    }

                    try
                    {
                        TLogging.Log(MyUIConnector.HelloWorldUIConnector());
                    }
                    catch (Exception e)
                    {
                        TLogging.Log("problem with HelloWorldUIConnector: " + Environment.NewLine + e.ToString());
                    }

                    Console.WriteLine("Press ENTER to say Hello World again... ");
                    Console.WriteLine("Press CTRL-C to exit ...");
                    Console.ReadLine();
                }
            }
            catch (Exception e)
            {
                TLogging.Log(e.ToString());
                Console.ReadLine();
            }
        }
Beispiel #5
0
        static void Main(string[] args)
        {
            new TLogging("../../log/TestRemotingClient.log");

            try
            {
                new TAppSettingsManager("../../etc/Client.config");

                TLogging.DebugLevel = Convert.ToInt32(TAppSettingsManager.GetValue("Client.DebugLevel", "0"));

                new TClientSettings();

                // initialize the client
                new TRemoteTest();

                // need to call this as well to make the progress dialog work
                new TRemote();

                // allow self signed ssl certificate for test purposes
                ServicePointManager.ServerCertificateValidationCallback = delegate {
                    return(true);
                };

                THttpConnector.InitConnection(TAppSettingsManager.GetValue("OpenPetra.HTTPServer"));

                TClientInfo.InitializeUnit();

                Catalog.Init("en-GB", "en-GB");

                SortedList <string, object> Parameters = new SortedList <string, object>();
                Parameters.Add("username", "demo");
                Parameters.Add("password", "demo");
                Parameters.Add("version", TFileVersionInfo.GetApplicationVersion().ToString());

                List <object> ResultList = THttpConnector.CallWebConnector("SessionManager", "LoginClient", Parameters, "list");
                eLoginEnum    Result     = (eLoginEnum)ResultList[0];

                if (Result != eLoginEnum.eLoginSucceeded)
                {
                    // failed login
                    return;
                }

                IMyUIConnector MyUIConnector = TRemoteTest.MyService.SubNamespace.MyUIConnector();
                TRemoteTest.TMyService.TMySubNamespace test = TRemoteTest.MyService.SubNamespace;

                while (true)
                {
                    try
                    {
                        TLogging.Log("before call");
                        TLogging.Log(TRemoteTest.MyService.HelloWorld("Hello World"));
                        TLogging.Log("after call");
                    }
                    catch (Exception e)
                    {
                        TLogging.Log("problem with MyService HelloWorld: " + Environment.NewLine + e.ToString());
                    }

                    try
                    {
                        DateTime DateTomorrow;
                        TLogging.Log("should show today's date: " + TRemoteTest.MyService.TestDateTime(DateTime.Today,
                                                                                                       out DateTomorrow).ToShortDateString());
                        TLogging.Log("should show tomorrow's date: " + DateTomorrow.ToShortDateString());
                    }
                    catch (Exception e)
                    {
                        TLogging.Log("problem with TestDateTime: " + Environment.NewLine + e.ToString());
                    }

                    try
                    {
                        TLogging.Log(test.HelloSubWorld("Hello SubWorld"));
                    }
                    catch (Exception e)
                    {
                        TLogging.Log("problem with sub namespace HelloSubWorld: " + Environment.NewLine + e.ToString());
                    }

                    try
                    {
                        TLogging.Log(MyUIConnector.HelloWorldUIConnector());
                    }
                    catch (Exception e)
                    {
                        TLogging.Log("problem with HelloWorldUIConnector: " + Environment.NewLine + e.ToString());
                    }

                    // start long running job
                    Thread t = new Thread(() => TRemoteTest.MyService.LongRunningJob());

                    using (TProgressDialog dialog = new TProgressDialog(t))
                    {
                        if (dialog.ShowDialog() == DialogResult.Cancel)
                        {
                            return;
                        }
                    }

                    Console.WriteLine("Press ENTER to say Hello World again... ");
                    Console.WriteLine("Press CTRL-C to exit ...");
                    Console.ReadLine();
                }
            }
            catch (Exception e)
            {
                TLogging.Log(e.ToString());
                Console.ReadLine();
            }
        }
Beispiel #6
0
        /// <summary>
        /// Perform necessary initializations of Classes
        /// </summary>
        /// <returns>void</returns>
        private static void InitialiseClasses()
        {
            TClientInfo.InitializeUnit();
            TCacheableTablesManager.InitializeUnit();
            new TIconCache();

            // Set up Delegates for forwarding of calls for security-related Exceptions
            ExceptionHandling.ProcessSecurityAccessDeniedException = TMessages.MsgSecurityException;
            TUnhandledThreadExceptionHandler.ProcessSecurityAccessDeniedException   = TMessages.MsgSecurityException;
            Ict.Common.Controls.TCommonControlsSecurity.SecurityAccessDeniedMessage = TMessages.MsgSecurityException;

            // Delegate for an extended message box
            TClientTaskInstance.ShowExtendedMessageBox = @TFrmExtendedMessageBoxManager.Create;

            // Set up Delegates for forwarding of calls to Screens in various Assemblies
            TCommonScreensForwarding.OpenPartnerFindScreen = @TPartnerFindScreenManager.OpenModalForm;
            TCommonScreensForwarding.OpenPartnerFindByBankDetailsScreen = @TPartnerFindScreenManager.OpenModalForm;
            TCommonScreensForwarding.OpenBankFindDialog              = @TBankFindDialogManager.OpenModalForm;
            TCommonScreensForwarding.OpenConferenceFindScreen        = @TConferenceFindScreenManager.OpenModalForm;
            TCommonScreensForwarding.OpenEventFindScreen             = @TEventFindScreenManager.OpenModalForm;
            TCommonScreensForwarding.OpenExtractFindScreen           = @TExtractFindScreenManager.OpenModalForm;
            TCommonScreensForwarding.OpenExtractMasterScreen         = @TExtractMasterScreenManager.OpenForm;
            TCommonScreensForwarding.OpenDonorRecipientHistoryScreen = @TDonorRecipientHistoryScreenManager.OpenForm;
            TCommonScreensForwarding.OpenPartnerEditScreen           = @TPartnerEditScreenManager.OpenForm;
            TCommonScreensForwarding.OpenExtractMasterScreenHidden   = @TExtractMasterScreenManager.OpenFormHidden;
            TCommonScreensForwarding.OpenRangeFindScreen             = @TPostcodeRangeSetupManager.OpenModalForm;
            TCommonScreensForwarding.OpenOccupationCodeFindScreen    = @TOccupationCodeSetupManager.OpenModalForm;
            TCommonScreensForwarding.OpenGetMergeDataDialog          = @TGetMergeDataManager.OpenModalForm;
            TCommonScreensForwarding.OpenPrintPartnerDialog          = @TPrintPartnerModal.OpenModalForm;
            TCommonScreensForwarding.TaxDeductiblePctAdjust          = @TFrmGiftTaxDeductiblePctAdjustment.TaxDeductiblePctAdjustment;
            TCommonScreensForwarding.OpenPrintUnitHierarchy          = @TPrintUnitHierarchy.OpenModalForm;

            // Set up Delegate for the opening of Forms from the Main Menu
            Ict.Common.Controls.TLstTasks.OpenNewOrExistingForm = @Ict.Petra.Client.CommonForms.TFormsList.OpenNewOrExistingForm;

            // Set up Delegate for the retrieval of the list of Currencies from the Cache
            Ict.Common.Controls.TTxtCurrencyTextBox.RetrieveCurrencyList = @Ict.Petra.Client.CommonControls.TControlExtensions.RetrieveCurrencyList;

            // Set up Delegate for checking the real module access permissions (rather than the ones in the XML)
            Ict.Common.Controls.TCommonControlsSecurity.CheckUserModulePermissions =
                @Ict.Petra.Shared.Security.TSecurityChecks.CheckUserModulePermissions;

            // Set up Delegate for the retrieval of the user defaults
            Ict.Common.Controls.TTxtNumericTextBox.RetrieveUserDefaultBoolean =
                @Ict.Petra.Client.CommonControls.TControlExtensions.RetrieveUserDefaultBoolean;
            Ict.Common.TypeConverter.TCurrencyConverter.RetrieveUserDefaultBoolean =
                @Ict.Petra.Client.CommonControls.TControlExtensions.RetrieveUserDefaultBoolean;
            Ict.Common.TypeConverter.TDecimalConverter.RetrieveUserDefaultBoolean =
                @Ict.Petra.Client.CommonControls.TControlExtensions.RetrieveUserDefaultBoolean;
            Ict.Common.IO.TTextFileEncoding.RetrieveUserDefaultBoolean =
                @Ict.Petra.Client.CommonControls.TControlExtensions.RetrieveUserDefaultBoolean;

            // Set up Delegate for the set-up of various Colours of all SourceGrid DataGrid instances from UserDefaults
            Ict.Common.Controls.TSgrdDataGrid.SetColourInformation = @SetDataGridColoursFromUserDefaults;

            // Set up Delegate for the set-up of various Colours of all Filter and Find instances from UserDefaults
            Ict.Petra.Client.CommonControls.TUcoFilterAndFind.SetColourInformation = @SetFilterFindColoursFromUserDefaults;

            // Set up Data Validation Delegates
            TSharedValidationHelper.SharedGetDataDelegate = @TServerLookup.TMCommon.GetData;
            TSharedValidationControlHelper.SharedGetDateVerificationResultDelegate = @TtxtPetraDate.GetDateVerificationResult;
            TSharedPartnerValidationHelper.VerifyPartnerDelegate                    = @TServerLookup.TMPartner.VerifyPartner;
            TSharedPartnerValidationHelper.PartnerHasActiveStatusDelegate           = @TServerLookup.TMPartner.PartnerHasActiveStatus;
            TSharedPartnerValidationHelper.PartnerIsLinkedToCCDelegate              = @TServerLookup.TMPartner.PartnerIsLinkedToCC;
            TSharedPartnerValidationHelper.PartnerOfTypeCCIsLinkedDelegate          = @TServerLookup.TMPartner.PartnerOfTypeCCIsLinked;
            TSharedPartnerValidationHelper.PartnerHasCurrentGiftDestinationDelegate = @TServerLookup.TMPartner.PartnerHasCurrentGiftDestination;
            TSharedFinanceValidationHelper.GetValidPostingDateRangeDelegate         = @TServerLookup.TMFinance.GetCurrentPostingRangeDates;
            TSharedFinanceValidationHelper.GetValidPeriodDatesDelegate              = @TServerLookup.TMFinance.GetCurrentPeriodDates;

            // Set up Delegates for retrieval of cacheable tables when called from Shared directories on client side
            TSharedDataCache.TMCommon.GetCacheableCommonTableDelegate = @TDataCache.TMCommon.GetCacheableCommonTable;

            TSharedDataCache.TMFinance.GetCacheableFinanceTableDelegate = @TDataCache.TMFinance.GetCacheableFinanceTable;

            TSharedDataCache.TMPartner.GetCacheablePartnerTableDelegate       = @TDataCache.TMPartner.GetCacheablePartnerTable;
            TSharedDataCache.TMPartner.GetCacheableMailingTableDelegate       = @TDataCache.TMPartner.GetCacheableMailingTable;
            TSharedDataCache.TMPartner.GetCacheableSubscriptionsTableDelegate = @TDataCache.TMPartner.GetCacheableSubscriptionsTable;
            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 = @TDataCache.TMPersonnel.GetCacheablePersonnelTable;
            TSharedDataCache.TMPersonnel.GetCacheableUnitsTableDelegate     = @TDataCache.TMPersonnel.GetCacheableUnitsTable;

            TSharedDataCache.TMConference.GetCacheableConferenceTableDelegate = @TDataCache.TMConference.GetCacheableConferenceTable;

            TSharedDataCache.TMSysMan.GetCacheableSysManTableDelegate = @TDataCache.TMSysMan.GetCacheableSysManTable;

            // I18N: assign proper font which helps to read asian characters
            // this is the first place where it is called, and we need to initialize the TAppSettingsManager
            TAppSettingsManager.InitFontI18N();

            TCommonControlsHelper.SetInactiveIdentifier += delegate {
                return(SharedConstants.INACTIVE_VALUE_WITH_QUALIFIERS);
            };

            TSmtpSender.GetSmtpSettings = @TServerLookup.TMSysMan.GetServerSmtpSettings;
        }