Esempio n. 1
0
        /// <summary>
        /// Process xml file picked up by the FileProcessor Service
        /// </summary>
        /// <param name="databaseName"></param>
        /// <param name="xmlFile"></param>
        /// <returns></returns>
        public Boolean ProcessPortalInvoiceXml(String databaseName, XDocument xmlFile, String filePath)
        {
            //Trace.WriteLine("", "ProcessFile");
            Boolean returnValue = true;

            try
            {
                String xmlFileName = Path.GetFileName(filePath);                // String.Format("{0}.xml", Guid.NewGuid().ToString());

                SAPConnector.SAPProcessor sapProcessor = new SAPConnector.SAPProcessor();
                returnValue = sapProcessor.ProcessInvoice(databaseName, xmlFile.ToString());
            }
            catch (Exception ex)
            {
                //Trace.WriteLine("", "ProcessFile");
                throw new Exception(ex.Message);
            }

            return(returnValue);
        }
Esempio n. 2
0
        /// <summary>
        /// Process xml file picked up by the FileProcessor Service
        /// </summary>
        /// <param name="databaseName"></param>
        /// <param name="xmlFile"></param>
        /// <returns></returns>
        public Boolean ProcessPortalInvoiceXml(String databaseName, XDocument xmlFile, String filePath)
        {
            //Trace.WriteLine("", "ProcessFile");
            Boolean returnValue = true;

            try
            {
                String xmlFileName = Path.GetFileName(filePath);// String.Format("{0}.xml", Guid.NewGuid().ToString());

                SAPConnector.SAPProcessor sapProcessor = new SAPConnector.SAPProcessor();
                returnValue = sapProcessor.ProcessInvoice(databaseName, xmlFile.ToString());
            }
            catch (Exception ex)
            {
                //Trace.WriteLine("", "ProcessFile");
                throw new Exception(ex.Message);
            }

            return returnValue;
        }