public bool Upload(string companyID, out string lastErrorMessage)
        {
            bool loop            = true;
            bool returnValue     = false;
            bool recordsUploaded = false;
            int  recordCount     = 0;
            int  successCount    = 0;
            int  errorCount      = 0;

            string errorMessage = "";

            paymentTerms = dal.GetAxPaymentTerms(companyID);
            //Require payment terms before starting
            if (paymentTerms.Count() > 0)
            {
                do
                {
                    returnValue = Upload(companyID, out errorMessage, out recordsUploaded, out recordCount);
                    if (recordsUploaded == false)
                    {
                        loop = false;
                    }
                    if (returnValue == true)
                    {
                        successCount += recordCount;
                        errorMessage  = "";
                    }
                    else
                    {
                        errorCount += recordCount;
                    }
                    //Create an event
                    eventMessage = string.Format("Sales Journals - Success:{1} - Error:{2} {3}", DateTime.Now.ToString(), successCount.ToString(), errorCount.ToString(), errorMessage);
                    OnChanged(EventArgs.Empty);
                } while (loop == true);
            }
            lastErrorMessage = errorMessage;
            return(returnValue);
        }