Exemplo n.º 1
0
        private FileDocumento GetSignedDocumentFromSession()
        {
            bool loadSignedDocFromSession = this.LoadSignedDocumentFromSession();

            DocsPaWR.FileDocumento signedDocument = null;

            if (!loadSignedDocFromSession)
            {
                // Reperimento documento firmato da backend
                DocumentManager.RemoveSignedDocument();

                DocsPaWR.FileRequest fileRequest = FileManager.getSelectedFile(this);

                if (fileRequest != null && fileRequest.fileName != null && fileRequest.fileName != "")
                {
                    DocsPaWR.InfoUtente infoUtente = UserManager.getInfoUtente(this);

                    DocsPaWR.DocsPaWebService docsPaWS = new DocsPAWA.DocsPaWR.DocsPaWebService();
                    signedDocument = docsPaWS.DocumentoGetFile(fileRequest, infoUtente);
                    docsPaWS       = null;

                    DocumentManager.SetSignedDocument(signedDocument);
                }
            }
            else
            {
                // Reperimento documento firmato da session
                signedDocument       = DocumentManager.GetSignedDocument();
                Session["docToSign"] = signedDocument;
            }

            return(signedDocument);
        }