public Greenway.PrimeSuite.DataContracts.Document.DocumentGetResponse GetDocumentListFromSearch(Greenway.PrimeSuite.DataContracts.Document.DocumentGetRequest DocumentSearchRequest, String sIP)
        {
            PrimeSuiteServiceClient oClient = null;
            try
            {
                oClient = AutomatedFax.HelperFiles.HelperClass.GetServiceClient(sIP);
                Greenway.PrimeSuite.DataContracts.Document.DocumentGetResponse oResponse = new Greenway.PrimeSuite.DataContracts.Document.DocumentGetResponse();
                oResponse = oClient.DocumentGet(DocumentSearchRequest);

                return oResponse;

            }
            catch (Exception ex)
            {

                throw ex;
            }
            finally
            {
                AutomatedFax.HelperFiles.HelperClass.CloseServiceClient(oClient);
            }
        }
        private static void GetDocumentFromGreenway(int documentID)
        {
            ContractBuilderDocumentGet oBuilderDocumentGet = new ContractBuilderDocumentGet();
            Greenway.PrimeSuite.DataContracts.Document.DocumentGetRequest documentGetRequest = new Greenway.PrimeSuite.DataContracts.Document.DocumentGetRequest();
            Greenway.PrimeSuite.DataContracts.Document.DocumentGetResponse documentGetResponse = new Greenway.PrimeSuite.DataContracts.Document.DocumentGetResponse();
            documentGetRequest = oBuilderDocumentGet.BuildDocumentGethRequest(documentID);
            AutomatedFax.SearchDocumentGet ocallGetDocument = new SearchDocumentGet();
            documentGetResponse = ocallGetDocument.GetDocumentListFromSearch(documentGetRequest, "192.168.192.11");

            byte[] _base64PDFFile = Convert.FromBase64String(documentGetResponse.Data);
            File.WriteAllBytes(ConfigurationValues.CreatePdfPath, _base64PDFFile);

        }
        private static bool GetDocumentFromGreenway(int documentID)
        {
            try
            {
                ContractBuilderDocumentGet oBuilderDocumentGet = new ContractBuilderDocumentGet();
                Greenway.PrimeSuite.DataContracts.Document.DocumentGetRequest documentGetRequest = new Greenway.PrimeSuite.DataContracts.Document.DocumentGetRequest();
                Greenway.PrimeSuite.DataContracts.Document.DocumentGetResponse documentGetResponse = new Greenway.PrimeSuite.DataContracts.Document.DocumentGetResponse();
                documentGetRequest = oBuilderDocumentGet.BuildDocumentGethRequest(documentID);
                AutomatedFax.SearchDocumentGet ocallGetDocument = new SearchDocumentGet();
                documentGetResponse = ocallGetDocument.GetDocumentListFromSearch(documentGetRequest, "192.168.192.11");

                byte[] _base64PDFFile = Convert.FromBase64String(documentGetResponse.Data);
                File.WriteAllBytes(ConfigurationValues.CreatePdfPath, _base64PDFFile);
                return true;
            }
            catch (Exception er)
            {
                Logging.LogErrors(ConfigurationValues.ErrorLogPath, er.ToString());
                return false;
            }
        }