Esempio n. 1
0
        /// <summary>
        /// Exports the accounts.
        /// </summary>
        public static void ExportFinancialAccounts()
        {
            try
            {
                var funds = GetFunds(false, null, null);

                /*
                 * XDocument xdoc = XDocument.Parse( response.Content );
                 *
                 * if ( PCOApi.DumpResponseToXmlFile )
                 * {
                 *  xdoc.Save( Path.Combine( ImportPackage.PackageDirectory, $"API_FINANCIAL_ACCOUNTS_ResponseLog.xml" ) );
                 * }
                 */

                // process accounts
                foreach (var fund in funds)
                {
                    var importFund = PCOImportFund.Translate(fund);

                    if (importFund != null)
                    {
                        ImportPackage.WriteToPackage(importFund);
                    }
                }
            }
            catch (Exception ex)
            {
                ErrorMessage = ex.Message;
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Exports the accounts.
        /// </summary>
        public static void ExportFinancialAccounts()
        {
            try
            {
                var funds = GetFunds();

                foreach (var fund in funds)
                {
                    var importFund = PCOImportFund.Translate(fund);
                    if (importFund != null)
                    {
                        ImportPackage.WriteToPackage(importFund);
                    }
                }
            }
            catch (Exception ex)
            {
                ErrorMessage = ex.Message;
            }
        }