Exemplo n.º 1
0
        private XeroIntegrationError pResumeAppWithCredentials(Credentials inCredentials)
        {
            XeroIntegrationError result = XeroIntegrationError.NoError;

            result = XeroIntegrationApplicationRunnerManager.Instance.ResumeAppWithCredentials(inCredentials);
            return(result);
        }
Exemplo n.º 2
0
        public bool stopXero()
        {
            bool result;

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

            if (_appID.Trim() != @"")
            {
                XeroIntegrationError error = XeroIntegrationManager.Instance.StopAppWithID(_appID);

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

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

            return(result);
        }
Exemplo n.º 3
0
        protected bool runXero()
        {
            bool result;

            _appID = InitXeroIntegration();

            if (_appID.Trim() != @"")
            {
                XeroIntegrationError error = XeroIntegrationManager.Instance.RunAppWithID(_appID);

                if (error == XeroIntegrationError.NoError)
                {
                    result = true;
                }
                else
                {
                    ServiceLogger.Log(XeroIntegrationManager.Instance.ErrorMessage);
                    result = false;
                }
            }
            else
            {
                ServiceLogger.Log(string.Format(@"Invalid app ID: {0}", _appID));
                result = false;
            }
            return(result);
        }
        public XeroIntegrationError ResumeAppWithCredentials(Credentials inCredentials)
        {
            XeroIntegrationError result = XeroIntegrationError.AppAlreadyRunning;

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

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

            ClearErrMsg();

            if (!AppAlreadyRunning(inCredentials))
            {
                result = AddRunningApp(inCredentials);
            }
            return(result);
        }
Exemplo n.º 7
0
        public XeroIntegrationError RunAppWithID(string inAppID)
        {
            XeroIntegrationError result = XeroIntegrationError.NotInitialized;

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

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