public void setSessionFilePDF(SAAdminTool.DocsPaWR.FileDocumento filePdf) { if (System.Web.HttpContext.Current.Session["SESSION_PDF"] == null) { System.Web.HttpContext.Current.Session.Add("SESSION_PDF", filePdf); } }
public SAAdminTool.DocsPaWR.FileDocumento getSessionFilePDF() { SAAdminTool.DocsPaWR.FileDocumento filePdf = new SAAdminTool.DocsPaWR.FileDocumento(); if (System.Web.HttpContext.Current.Session["SESSION_PDF"] != null) { filePdf = (SAAdminTool.DocsPaWR.FileDocumento)System.Web.HttpContext.Current.Session["SESSION_PDF"]; } return(filePdf); }
/// <summary> /// setSelectedFileReport: imposta il file report /// </summary> /// <param name="page">Pagina da cui viene richiamato il metodo</param> /// <param name="fileDoc">file da impostare</param> /// <param name="initialPath">repository</param> public static void setSelectedFileReport(Page page, SAAdminTool.DocsPaWR.FileDocumento fileDoc, string initialPath) { page.Session["FileManager.selectedReport"] = fileDoc; string visReportPath = ""; if (initialPath != "") { visReportPath = initialPath + "/visualizzaReport.aspx"; } else { visReportPath = "ProspettiRiepilogativi_RF.aspx"; } //carica la new pg //string funct_dx2 = "top.principale.iFrame_dettagli.document.location='"+url+"'"; //page.Response.Write("<script> " + funct_dx2 + "</script>"); string funct_dx = "top.principale.iFrame_dettagli.document.location='" + visReportPath + "'"; //string funct_dx = " window.open('"+visReportPath+"','main')"; page.Response.Write("<script> " + funct_dx + "</script>"); }
/// <summary> /// Upload del documento /// </summary> /// <param name="fileDoc"></param> /// <param name="errorMessage"></param> /// <returns></returns> public bool Upload(SAAdminTool.DocsPaWR.FileDocumento fileDoc, bool conversionePDFServer, out string errorMessage) { bool retValue = false; errorMessage = string.Empty; try { ProtocollazioneIngressoLog.WriteLogEntry( string.Format("UploadDocumento (FileName: {0} - Dim: {1}", fileDoc.name, fileDoc.content.Length.ToString())); } catch { } SAAdminTool.DocsPaWR.FileRequest fileReq = this.GetFileRequest(fileDoc.name); // Booleano utilizzato per indicare se è necessario convertire in PDF in modalità Asincrona bool convertAsync = false; if (fileReq != null) { fileReq.cartaceo = fileDoc.cartaceo; ProtocollazioneIngresso.Login.LoginMng loginMng = new ProtocollazioneIngresso.Login.LoginMng(this._page); SAAdminTool.DocsPaWR.DocsPaWebService ws = new SAAdminTool.DocsPaWR.DocsPaWebService(); ws.Timeout = System.Threading.Timeout.Infinite; // Se è attiva la conversione PDF sincrona, si prova a convertire il file facendo vincere lei // se la conversione va a buon fine, viene associato il file pdf al documento altrimenti viene // acquisito il TIF e si prova ad eseguire la conversione asincrona if (Utils.IsEbabledConversionePdfLatoServerSincrona().ToLower() == "true") { FileDocumento convertedDoc = ws.GeneratePDFInSyncMod(fileDoc); if (convertedDoc == null) { convertAsync = true; } if (convertedDoc != null && convertedDoc.content.Length > 0) { fileDoc = convertedDoc; } } retValue = ws.DocumentoPutFileNoException(ref fileReq, fileDoc, loginMng.GetInfoUtente(), out errorMessage); } //Se abilitata la conversione lato server ed è necessario effettuare la conversione asincrona, // chiamo il webmethod che mette in coda il file da convertire if (retValue && conversionePDFServer && convertAsync) { SAAdminTool.DocsPaWR.SchedaDocumento documento = null; if (fileReq.GetType() == typeof(SAAdminTool.DocsPaWR.Allegato)) { // Il documento acquisito è un allegato: reperimento della scheda documento documento = DocumentManager.getDettaglioDocumento(this._page, fileReq.docNumber, fileReq.docNumber); } else { ProtocollazioneIngresso.Protocollo.ProtocolloMng protocolloMng = new ProtocollazioneIngresso.Protocollo.ProtocolloMng(this._page); documento = protocolloMng.GetDocumentoCorrente(); } FileManager.EnqueueServerPdfConversion(this._page, UserManager.getInfoUtente(this._page), fileDoc.content, fileDoc.name, documento); } return(retValue); }
private void AmmStampaOrganigramma(XmlDocument xmlDoc) { AmmUtils.WebServiceLink ws = new AmmUtils.WebServiceLink(); this._filePDF = ws.AmmStampaOrganigramma(xmlDoc); ws = null; }