public bool HSM_SetMementoForUser(Memento memento) { if (memento == null) { return(false); } if (String.IsNullOrEmpty(memento.Alias)) { return(false); } //if (String.IsNullOrEmpty(memento.Dominio)) // return false; DocsPaWR.InfoUtente infoUt = SAAdminTool.UserManager.getInfoUtente(); SAAdminTool.DocsPaWR.DocsPaWebService ws = ProxyManager.getWS(); try { return(ws.HSM_SetMementoForUser(infoUt, memento.Dominio, memento.Alias)); } catch (System.Exception ex) { //UIManager.AdministrationManager.DiagnosticError(ex); return(false); } }
/// <summary> /// Creazione oggetto "FileRequest" relativamente all'allegato del documento /// </summary> /// <returns></returns> private SAAdminTool.DocsPaWR.FileRequest GetFileRequestAllegato() { SAAdminTool.DocsPaWR.Allegato retValue = new SAAdminTool.DocsPaWR.Allegato(); retValue.numeroPagine = 0; retValue.descrizione = string.Empty; ProtocollazioneIngresso.Protocollo.ProtocolloMng protocolloMng = new ProtocollazioneIngresso.Protocollo.ProtocolloMng(this._page); retValue.docNumber = protocolloMng.GetDocumentoCorrente().docNumber; SAAdminTool.DocsPaWR.DocsPaWebService ws = new SAAdminTool.DocsPaWR.DocsPaWebService(); ProtocollazioneIngresso.Login.LoginMng loginMng = new ProtocollazioneIngresso.Login.LoginMng(this._page); retValue = ws.DocumentoAggiungiAllegato(loginMng.GetInfoUtente(), retValue); retValue.version = "0"; loginMng = null; ws = null; // Impostazione della descrizione dell'allegato retValue.descrizione = "Allegato " + retValue.versionLabel; // Inserimento del file request nella scheda documento this.AppendFileRequestAllegati(protocolloMng.GetDocumentoCorrente(), retValue); return(retValue); }
public string HSM_RequestCertificateJson(String AliasCertificato, String DominioCertificato) { SAAdminTool.DocsPaWR.DocsPaWebService ws = ProxyManager.getWS(); try { return(ws.HSM_RequestCertificateJson(AliasCertificato, DominioCertificato)); } catch (Exception e) { // loggiamo un errore ?!?!?!? return(null); } }
/// <summary> /// /// </summary> protected void WriteContatoreStampeEffettuate() { SAAdminTool.DocsPaWR.SchedaDocumento schedaDocumento = DocumentManager.getDocumentoInLavorazione(); SAAdminTool.DocsPaWR.DocsPaWebService ws = ProxyManager.getWS(); ws.updateStampeDocumentoEffettuate(UserManager.getInfoUtente(), this.NumeroStampeEffettuate, this.NumeroStampeDaEffettuare, schedaDocumento.systemId); string numStampe = (this.NumeroStampeEffettuate + this.NumeroStampeDaEffettuare).ToString(); schedaDocumento.protocollo.stampeEffettuate = numStampe; }
public DocsPaWR.FirmaResult[] HSM_SignMultiSignSession(SAAdminTool.DocsPaWR.FileRequest[] fileRequestList, string MultiSignToken, String AliasCertificato, String DominioCertificato, String OtpFirma, String PinCertificato) { DocsPaWR.InfoUtente infoUt = SAAdminTool.UserManager.getInfoUtente(); SAAdminTool.DocsPaWR.DocsPaWebService ws = ProxyManager.getWS(); try { return(ws.HSM_SignMultiSignSession(infoUt, fileRequestList, MultiSignToken, AliasCertificato, DominioCertificato, OtpFirma, PinCertificato)); } catch (Exception e) { // loggiamo un errore ?!?!?!? // return false; return(null); } }
public string HSM_OpenMultiSignSession(SAAdminTool.DocsPaWR.FileRequest[] fileRequestList, bool cofirma, bool timestamp, tipoFirma TipoFirma) { DocsPaWR.InfoUtente infoUt = SAAdminTool.UserManager.getInfoUtente(); SAAdminTool.DocsPaWR.DocsPaWebService ws = ProxyManager.getWS(); try { string tipoFirmaSTR = TipoFirma.ToString(); return(ws.HSM_OpenMultiSignSession(infoUt, fileRequestList, cofirma, timestamp, tipoFirmaSTR)); } catch (Exception e) { // loggiamo un errore ?!?!?!? return(null); } }
private void GetLettereProtocolli() { SAAdminTool.DocsPaWR.DocsPaWebService wws = new SAAdminTool.DocsPaWR.DocsPaWebService(); SAAdminTool.DocsPaWR.InfoUtente user = new InfoUtente(); this.etichette = wws.getEtichetteDocumenti(user, IdAmministrazione.ToString()); this.chk_Arr.Text = etichette[0].Etichetta; //Valore A this.chk_Part.Text = etichette[1].Etichetta; //Valore P this.chk_Int.Text = etichette[2].Etichetta; this.chk_Grigio.Text = etichette[3].Etichetta; if (!wws.IsInternalProtocolEnabled(IdAmministrazione.ToString())) { this.chkList.Items.Remove(this.chkList.Items[2]); } }
/// <summary> /// Creazione oggetto "FileRequest" relativamente ad una nuova versione del documento /// </summary> /// <returns></returns> private SAAdminTool.DocsPaWR.Documento GetFileRequestVersione() { SAAdminTool.DocsPaWR.Documento retValue = new SAAdminTool.DocsPaWR.Documento(); retValue.descrizione = string.Empty; ProtocollazioneIngresso.Protocollo.ProtocolloMng protocolloMng = new ProtocollazioneIngresso.Protocollo.ProtocolloMng(this._page); SAAdminTool.DocsPaWR.SchedaDocumento schedaDocumento = protocolloMng.GetDocumentoCorrente(); retValue.docNumber = schedaDocumento.docNumber; SAAdminTool.DocsPaWR.DocsPaWebService ws = new SAAdminTool.DocsPaWR.DocsPaWebService(); ProtocollazioneIngresso.Login.LoginMng loginMng = new ProtocollazioneIngresso.Login.LoginMng(this._page); retValue = (SAAdminTool.DocsPaWR.Documento)ws.DocumentoAggiungiVersione(retValue, loginMng.GetInfoUtente()); loginMng = null; ws = null; // Inserimento del file request nella scheda documento this.AppendFileRequestDocumenti(schedaDocumento, retValue); return(retValue); }
/// <summary> /// /// </summary> private void setDataArchivioCartaceo() { DocsPaWR.FiltroRicerca[] filtri = FascicolazioneCartacea.SessionManager.Filtri; if (filtri != null && filtri.Length > 0) { DocsPaWR.ExportDataFormatEnum format = DocsPaWR.ExportDataFormatEnum.Pdf; if (this._tipologiaExport.ToUpper().Equals("XLS")) { format = SAAdminTool.DocsPaWR.ExportDataFormatEnum.Excel; } DocsPaWR.DocsPaWebService ws = new SAAdminTool.DocsPaWR.DocsPaWebService(); this._file = ws.FascCartaceaExportListFilters(UserManager.getInfoUtente(), format, filtri, this._titolo); if (this._file != null) { exportDatiSessionManager session = new exportDatiSessionManager(); session.SetSessionExportFile(this._file); } } }
public Memento HSM_GetMementoForUser() { DocsPaWR.InfoUtente infoUt = SAAdminTool.UserManager.getInfoUtente(); SAAdminTool.DocsPaWR.DocsPaWebService ws = ProxyManager.getWS(); try { Memento retval = new Memento(); string[] resp = ws.HSM_GetMementoForUser(infoUt); if (resp.Length == 2) { retval.Dominio = resp[0]; retval.Alias = resp[1]; } return(retval); } catch (System.Exception ex) { //UIManager.AdministrationManager.DiagnosticError(ex); return(null); } }
public bool HSM_RequestOTP(String AliasCertificato, String DominioCertificato) { if (string.IsNullOrEmpty(AliasCertificato)) { return(false); } if (string.IsNullOrEmpty(DominioCertificato)) { return(false); } SAAdminTool.DocsPaWR.DocsPaWebService ws = new SAAdminTool.DocsPaWR.DocsPaWebService(); try { return(ws.HSM_RequestOTP(AliasCertificato, DominioCertificato)); } catch (System.Exception ex) { //UIManager.AdministrationManager.DiagnosticError(ex); return(false); } }
/// <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); }