Пример #1
0
        public bool stopAccounting()   // todo StopAcounting
        {
            bool result;

            //...........................................

            if (_appID.Trim() != @"")
            {
                AccountingIntegrationError error = AccountingIntegrationManager.Instance.StopAppWithID(_appID);

                if (error == AccountingIntegrationError.NoError)
                {
                    result = true;
                }
                else
                {
                    ServiceLogger.Log(AccountingIntegrationManager.Instance.ErrorMessage);
                    result = false;
                }
            }
            else
            {
                ServiceLogger.Log(string.Format(@"Invalid app ID: {0}", _appID));
                result = false;
            }

            //...........................................

            return(result);
        }
Пример #2
0
        protected bool runAccounting()  // todo RunAccounting
        {
            bool result;

            _appID = InitAccountingIntegration();

            if (_appID.Trim() != @"")
            {
                AccountingIntegrationError error = AccountingIntegrationManager.Instance.RunAppWithID(_appID);

                if (error == AccountingIntegrationError.NoError)
                {
                    result = true;
                }
                else
                {
                    ServiceLogger.Log(AccountingIntegrationManager.Instance.ErrorMessage);
                    result = false;
                }
            }
            else
            {
                ServiceLogger.Log(string.Format(@"Invalid app ID: {0}", _appID));
                result = false;
            }
            return(result);
        }
Пример #3
0
        private AccountingIntegrationError pResumeAppWithCredentials(Credentials inCredentials)
        {
            AccountingIntegrationError result = AccountingIntegrationError.NoError;

            ExtractAppType(inCredentials);
            result = _iAccountingApllicationManager.ResumeAppWithCredentials(inCredentials);
            return(result);
        }
        public AccountingIntegrationError ResumeAppWithCredentials(Credentials inCredentials)
        {
            AccountingIntegrationError result = AccountingIntegrationError.AppAlreadyRunning;

            if (!AppAlreadyRunning(inCredentials))
            {
                result = ResumeApp(inCredentials);
            }
            return(result);
        }
        public AccountingIntegrationError StopAppWithCredentials(Credentials inCredentials)
        {
            AccountingIntegrationError result = AccountingIntegrationError.AppNotRunning;

            if (AppAlreadyRunning(inCredentials))
            {
                result = StopApp(inCredentials);
            }
            return(result);
        }
        public AccountingIntegrationError RunAppWithCredentials(Credentials inCredentials)
        {
            AccountingIntegrationError result = AccountingIntegrationError.AppAlreadyRunning;

            ClearErrMsg();

            if (!AppAlreadyRunning(inCredentials))
            {
                result = AddRunningApp(inCredentials);
            }
            return(result);
        }
Пример #7
0
        static void Main(string[] args)
        {
            string appID = InitXeroIntegration();

            if (appID.Trim() != @"")
            {
                AccountingIntegrationError error = AccountingIntegrationManager.Instance.RunAppWithID(appID);

                if (error == AccountingIntegrationError.NoError)
                {
                    Console.WriteLine(@"Xero Integration is running ...");
                    WaitForKey();
                }
                else
                {
                    Console.WriteLine(AccountingIntegrationManager.Instance.ErrorMessage);
                }
            }
        }
Пример #8
0
        public AccountingIntegrationError RunAppWithID(string inAppID)
        {
            AccountingIntegrationError result = AccountingIntegrationError.NotInitialized;

            if (_xiManagerInitialized)
            {
                var credentials = AccountingIntegrationConfigManager.Instance.GetByAppId(inAppID);

                if (credentials != null)
                {
                    result = RunAppWithCredentials(credentials);
                }
                else
                {
                    result = AccountingIntegrationError.UnknownApp;
                }
            }
            return(result);
        }