Ejemplo 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);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Reperimento tipologie di modelli di documento disponibili
        /// </summary>
        /// <returns></returns>
        private string[] GetDocumentModelTypes()
        {
            string[] retValue = null;

            // Verifica se il file è già stato acquisito
            bool isFileAcquired = (Request["fileName"] != null &&
                                   Request["fileName"] != string.Empty);

            if (isFileAcquired)
            {
                // Se il file è già stato acquisito, viene proposta
                // l'estensione del file fornito in querystring
                FileInfo fileInfo = new FileInfo(Request["fileName"]);
                retValue = new string[1] {
                    fileInfo.Extension.Replace(".", "")
                };
            }
            else
            {
                if (Request["fileType"] != null && Request["fileType"] != string.Empty)
                {
                    // Vengono forniti i modelli eventualmente forniti in querystring
                    retValue = Request["fileType"].Split('|');
                }
                else
                {
                    // Vengono forniti i modelli disponibili nel sistema
                    DocsPaWR.DocsPaWebService ws = new DocsPAWA.DocsPaWR.DocsPaWebService();
                    int idAdmin = Convert.ToInt32(UserManager.getUtente().idAmministrazione);
                    retValue = ws.GetCheckOutDocumentModelTypes(idAdmin);
                }
            }

            return(retValue);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Creazione oggetto "FileRequest" relativamente all'allegato del documento
        /// </summary>
        /// <returns></returns>
        private DocsPAWA.DocsPaWR.FileRequest GetFileRequestAllegato()
        {
            DocsPAWA.DocsPaWR.Allegato retValue = new DocsPAWA.DocsPaWR.Allegato();
            retValue.numeroPagine = 0;
            retValue.descrizione  = string.Empty;

            ProtocollazioneIngresso.Protocollo.ProtocolloMng protocolloMng = new ProtocollazioneIngresso.Protocollo.ProtocolloMng(this._page);
            retValue.docNumber = protocolloMng.GetDocumentoCorrente().docNumber;

            DocsPAWA.DocsPaWR.DocsPaWebService     ws       = new DocsPAWA.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);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Verifica se il documento contiene trasmissioni
        /// </summary>
        /// <returns></returns>
        private bool ContainsTrasmissioni()
        {
            bool retValue = false;
            int  idProject;

            DocsPAWA.DocsPaWR.Fascicolo project;

            project = FascicoliManager.getFascicoloSelezionato(this);

            if (project != null)
            {
                try
                {
                    idProject = Convert.ToInt32(project.systemID);

                    if (idProject != 0)
                    {
                        DocsPaWR.DocsPaWebService ws = new DocsPAWA.DocsPaWR.DocsPaWebService();
                        retValue = (ws.FascicoloGetCountTrasmissioniFascicolo(idProject) > 0);
                    }
                }
                catch { }
            }

            return(retValue);
        }
Ejemplo n.º 5
0
        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            = DocsPAWA.UserManager.getInfoUtente();
            DocsPAWA.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);
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="infoDocumento"></param>
        /// <returns></returns>
        protected string GetTipo(DocsPaWR.InfoDocumento infoDocumento)
        {
            DocsPAWA.DocsPaWR.EtichettaInfo[]         etichette;
            DocsPAWA.DocsPaWR.DocsPaWebService        wws     = new DocsPAWA.DocsPaWR.DocsPaWebService();
            DocsPAWA.AdminTool.Manager.SessionManager session = new DocsPAWA.AdminTool.Manager.SessionManager();
            DocsPAWA.DocsPaWR.InfoUtente infoUtente           = session.getUserAmmSession();
            String idAmm = null;

            if (UserManager.getInfoUtente() != null && !string.IsNullOrEmpty(UserManager.getInfoUtente().idAmministrazione))
            {
                idAmm = UserManager.getInfoUtente().idAmministrazione;
            }
            etichette = wws.getEtichetteDocumenti(infoUtente, idAmm);
            string grigio   = etichette[3].Descrizione; //Valore G
            string allegato = etichette[4].Descrizione; //Valore ALL

            if (infoDocumento.allegato)
            {
                // return "ALL";
                return(allegato);
            }
            else
            {
                // return "NP";
                return(grigio);
            }
        }
Ejemplo n.º 7
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            //verifico se il documento è in edit
            editMode = Request.QueryString["editMode"];
            if (Session["abilitaModificaSpedizione"] != null && (bool)Session["abilitaModificaSpedizione"])
            {
                editMode = "true";
            }

            //preparo il datasource con i mezzi trasmissione
            DocsPaWR.DocsPaWebService ws = new DocsPAWA.DocsPaWR.DocsPaWebService();
            string idAmm = UserManager.getInfoUtente().idAmministrazione;

            DocsPAWA.DocsPaWR.MezzoSpedizione[] m_sped = ws.AmmListaMezzoSpedizione(idAmm, false);
            foreach (DocsPAWA.DocsPaWR.MezzoSpedizione m in m_sped)
            {
                // Il mezzo per l'interoperabilità semplificata può essere inserito solo se è attiva
                if (m.chaTipoCanale == "S")
                {
                    if (InteroperabilitaSemplificataManager.IsEnabledSimpInterop)
                    {
                        listaMezzoSpedizione.Add(new Mezzi(m.Descrizione, m.IDSystem));
                    }
                }
                else
                {
                    listaMezzoSpedizione.Add(new Mezzi(m.Descrizione, m.IDSystem));
                }
            }
            Response.Expires = -1;
            if (!this.IsPostBack)
            {
                //setto il mezzo di spedizione per tutti
                ddlTutti.Items.Add(new ListItem("", "0"));
                if (listaMezzoSpedizione != null)
                {
                    foreach (Mezzi m in listaMezzoSpedizione)
                    {
                        ddlTutti.Items.Add(new ListItem(m.Descrizione, m.Valore));
                    }
                    if (editMode.ToUpper().Equals("FALSE"))
                    {
                        ddlTutti.Enabled = false;
                    }
                }

                BindGrid();

                if (editMode.ToUpper().Equals("FALSE"))
                {
                    btn_ok.Enabled = false;
                }
            }
            (FindControl("div1") as HtmlGenericControl).Style.Remove("overflow-y");
            if (dataGridMezzi != null && dataGridMezzi.Items != null && dataGridMezzi.Items.Count > 7)
            {
                (FindControl("div1") as HtmlGenericControl).Style.Add("overflow-y", "scroll");
            }
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Impostazione del colore del carattere per la prima colonna della griglia:
        /// rosso se doc protocollato, altrimenti grigio
        /// </summary>
        /// <param name="item"></param>
        private void SetForeColorColumnDescrDocumento(DataGridItem item, int index)
        {
            Label lbl = item.Cells[8].Controls[1] as Label;

            if (lbl != null)
            {
                item.Cells[0].Font.Bold = true;

                if (lbl.Text.Equals(""))
                {
                    if (item.ItemIndex != index)
                    {
                        ((Label)item.Cells[0].Controls[1]).ForeColor = Color.Black;
                    }
                    else
                    {
                        ((Label)item.Cells[0].Controls[1]).ForeColor = Color.White;
                    }
                }
                else
                {
                    //string idAmm = UserManager.getInfoUtente().idAmministrazione;
                    string idAmm = string.Empty;
                    if ((string)Session["AMMDATASET"] != null)
                    {
                        idAmm = AmmUtils.UtilsXml.GetAmmDataSession((string)Session["AMMDATASET"], "3");
                    }
                    else
                    if (UserManager.getInfoUtente() != null && !string.IsNullOrEmpty(UserManager.getInfoUtente().idAmministrazione))
                    {
                        idAmm = UserManager.getInfoUtente().idAmministrazione;
                    }

                    DocsPaWR.DocsPaWebService ws = new DocsPAWA.DocsPaWR.DocsPaWebService();
                    string segnAmm = "0";
                    if (!string.IsNullOrEmpty(idAmm))
                    {
                        segnAmm = ws.getSegnAmm(idAmm);
                    }
                    switch (segnAmm)
                    {
                    case "0":
                        ((Label)item.Cells[0].Controls[1]).ForeColor = Color.Black;
                        break;

                    case "1":
                        ((Label)item.Cells[0].Controls[1]).ForeColor = Color.Blue;
                        break;

                    case "2":
                    default:
                        ((Label)item.Cells[0].Controls[1]).ForeColor = Color.Red;
                        break;
                    }
                }
                lbl = null;
            }
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Prende i dati esistenti per le etichette dei protocolli (Inserita da Fabio)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        private void getLettereProtocolli()
        {
            DocsPAWA.DocsPaWR.DocsPaWebService wws = new DocsPAWA.DocsPaWR.DocsPaWebService();
            DocsPaWR.InfoUtente infoUtente         = new DocsPAWA.DocsPaWR.InfoUtente();
            infoUtente = UserManager.getInfoUtente(this);
            String idAmm = UserManager.getInfoUtente().idAmministrazione;

            this.etichette = wws.getEtichetteDocumenti(infoUtente, idAmm);
            this.arrivo    = etichette[0].Descrizione; //Valore A
            this.partenza  = etichette[1].Descrizione; //Valore P
            this.interno   = etichette[2].Descrizione; //Valore I
            this.grigio    = etichette[3].Descrizione; //Valore G
        }
Ejemplo n.º 10
0
 public string HSM_RequestCertificateJson(String AliasCertificato, String DominioCertificato)
 {
     DocsPAWA.DocsPaWR.DocsPaWebService ws = ProxyManager.getWS();
     try
     {
         return(ws.HSM_RequestCertificateJson(AliasCertificato, DominioCertificato));
     }
     catch (Exception e)
     {
         // loggiamo un errore ?!?!?!?
         return(null);
     }
 }
Ejemplo n.º 11
0
        //PRENDI ETICHETTE PROTOCOLLI
        private void getLettereProtocolli()
        {
            DocsPAWA.DocsPaWR.DocsPaWebService        wws     = new DocsPAWA.DocsPaWR.DocsPaWebService();
            DocsPAWA.AdminTool.Manager.SessionManager session = new DocsPAWA.AdminTool.Manager.SessionManager();
            DocsPAWA.DocsPaWR.InfoUtente infoUtente           = session.getUserAmmSession();
            String idAmm = null;

            if (UserManager.getInfoUtente() != null && !string.IsNullOrEmpty(UserManager.getInfoUtente().idAmministrazione))
            {
                idAmm = UserManager.getInfoUtente().idAmministrazione;
            }
            this.etichette = wws.getEtichetteDocumenti(infoUtente, idAmm);
        }
Ejemplo n.º 12
0
        /// <summary>
        ///
        /// </summary>
        protected void WriteContatoreStampeEffettuate()
        {
            DocsPAWA.DocsPaWR.SchedaDocumento schedaDocumento = DocumentManager.getDocumentoInLavorazione();

            DocsPAWA.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;
        }
Ejemplo n.º 13
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        private DocsPaWR.InfoDocumento GetDocumentoSelezionato()
        {
            if (!string.IsNullOrEmpty(this.IdProfile) &&
                !string.IsNullOrEmpty(this.DocNumber))
            {
                DocsPaWR.DocsPaWebService ws = new DocsPAWA.DocsPaWR.DocsPaWebService();

                return(ws.GetInfoDocumento(UserManager.getInfoUtente(), this.IdProfile, this.DocNumber));
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 14
0
        private void GetLettereProtocolli()
        {
            DocsPAWA.DocsPaWR.DocsPaWebService wws  = new DocsPAWA.DocsPaWR.DocsPaWebService();
            DocsPAWA.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]);
            }
        }
Ejemplo n.º 15
0
 public DocsPaWR.FirmaResult[] HSM_SignMultiSignSession(DocsPAWA.DocsPaWR.FileRequest[] fileRequestList, string MultiSignToken, String AliasCertificato, String DominioCertificato, String OtpFirma, String PinCertificato, bool cofirma)
 {
     DocsPaWR.InfoUtente infoUt            = DocsPAWA.UserManager.getInfoUtente();
     DocsPAWA.DocsPaWR.DocsPaWebService ws = ProxyManager.getWS();
     try
     {
         return(ws.HSM_SignMultiSignSession(infoUt, fileRequestList, MultiSignToken, AliasCertificato, DominioCertificato, OtpFirma, PinCertificato, cofirma));
     }
     catch (Exception e)
     {
         // loggiamo un errore ?!?!?!?
         // return false;
         return(null);
     }
 }
Ejemplo n.º 16
0
 public string HSM_OpenMultiSignSession(DocsPAWA.DocsPaWR.FileRequest[] fileRequestList, bool cofirma, bool timestamp, tipoFirma TipoFirma)
 {
     DocsPaWR.InfoUtente infoUt            = DocsPAWA.UserManager.getInfoUtente();
     DocsPAWA.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);
     }
 }
Ejemplo n.º 17
0
        private static string sheetProvvFuoriPianoXML(int id_registro, string registro, string dataInizio, string dataFine, out int res)
        {
            string strXML = string.Empty;

            //Recupero dati e creazione dataset
            DocsPAWA.DocsPaWR.DocsPaWebService docsPaWS = new DocsPAWA.DocsPaWR.DocsPaWebService();
            DataSet ds = new DataSet();

            ds = docsPaWS.ReportPianiRientroFuoriPiano(id_registro, dataInizio, dataFine, out res);

            strXML  = "<Worksheet ss:Name=\"Provv. fuori piano\">";
            strXML += creaTabella();
            strXML += creaTotali(ds, false);
            strXML += datiXML(ds);
            strXML += "</Table>";
            strXML += workSheetOptionsXML(registro, dataInizio, dataFine, "Provvedimenti non previsti da piano");
            return(strXML);
        }
Ejemplo n.º 18
0
        /// <summary>
        /// Reperimento oggetto corrispondente
        /// </summary>
        /// <returns></returns>
        private Corrispondente GetCorrispondente()
        {
            DocsPaWR.DocsPaWebService ws       = new DocsPAWA.DocsPaWR.DocsPaWebService();
            Corrispondente            retValue = ws.AddressbookGetCorrispondenteBySystemId(this._idCorrispondente);

            if (!this.IsCorrispondenteOccasionale(retValue))
            {
                // Reperimento dettagli rubrica, solo se non è occasionale
                retValue = UserManager.getCorrispondenteByCodRubrica(this, retValue.codiceRubrica);
            }

            if (retValue.info == null)
            {
                // Reperimento informazioni supplementari del corrispondente
                retValue.info = UserManager.getDettagliCorrispondente(this, this._idCorrispondente);
            }

            return(retValue);
        }
Ejemplo n.º 19
0
        /// <summary>
        /// Creazione oggetto "FileRequest" relativamente ad una nuova versione del documento
        /// </summary>
        /// <returns></returns>
        private DocsPAWA.DocsPaWR.Documento GetFileRequestVersione()
        {
            DocsPAWA.DocsPaWR.Documento retValue = new DocsPAWA.DocsPaWR.Documento();
            retValue.descrizione = string.Empty;

            ProtocollazioneIngresso.Protocollo.ProtocolloMng protocolloMng = new ProtocollazioneIngresso.Protocollo.ProtocolloMng(this._page);

            DocsPAWA.DocsPaWR.SchedaDocumento schedaDocumento = protocolloMng.GetDocumentoCorrente();
            retValue.docNumber = schedaDocumento.docNumber;

            DocsPAWA.DocsPaWR.DocsPaWebService     ws       = new DocsPAWA.DocsPaWR.DocsPaWebService();
            ProtocollazioneIngresso.Login.LoginMng loginMng = new ProtocollazioneIngresso.Login.LoginMng(this._page);
            retValue = (DocsPAWA.DocsPaWR.Documento)ws.DocumentoAggiungiVersione(retValue, loginMng.GetInfoUtente());
            loginMng = null;
            ws       = null;

            // Inserimento del file request nella scheda documento
            this.AppendFileRequestDocumenti(schedaDocumento, retValue);

            return(retValue);
        }
Ejemplo n.º 20
0
        public Memento HSM_GetMementoForUser()
        {
            DocsPaWR.InfoUtente infoUt            = DocsPAWA.UserManager.getInfoUtente();
            DocsPAWA.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);
            }
        }
Ejemplo n.º 21
0
        /// <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 = DocsPAWA.DocsPaWR.ExportDataFormatEnum.Excel;
                }

                DocsPaWR.DocsPaWebService ws = new DocsPAWA.DocsPaWR.DocsPaWebService();
                this._file = ws.FascCartaceaExportListFilters(UserManager.getInfoUtente(), format, filtri, this._titolo);

                if (this._file != null)
                {
                    exportDatiSessionManager session = new exportDatiSessionManager();
                    session.SetSessionExportFile(this._file);
                }
            }
        }
Ejemplo n.º 22
0
        public bool HSM_RequestOTP(String AliasCertificato, String DominioCertificato)
        {
            if (string.IsNullOrEmpty(AliasCertificato))
            {
                return(false);
            }

            if (string.IsNullOrEmpty(DominioCertificato))
            {
                return(false);
            }

            DocsPAWA.DocsPaWR.DocsPaWebService ws = new DocsPAWA.DocsPaWR.DocsPaWebService();
            try
            {
                return(ws.HSM_RequestOTP(AliasCertificato, DominioCertificato));
            }
            catch (System.Exception ex)
            {
                //UIManager.AdministrationManager.DiagnosticError(ex);
                return(false);
            }
        }
Ejemplo n.º 23
0
        /// <summary>
        /// Upload del documento
        /// </summary>
        /// <param name="fileDoc"></param>
        /// <param name="errorMessage"></param>
        /// <returns></returns>
        public bool Upload(DocsPAWA.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
            {
            }

            DocsPAWA.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);

                DocsPAWA.DocsPaWR.DocsPaWebService ws = new DocsPAWA.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)
            {
                DocsPAWA.DocsPaWR.SchedaDocumento documento = null;

                if (fileReq.GetType() == typeof(DocsPAWA.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);
        }
Ejemplo n.º 24
0
        /// <summary>
        /// Post Gestione Modelli : hd_tipo.Value = "STempl"
        /// </summary>
        private void postGestioneModelli()
        {
            string jscript = string.Empty;

            //Controllo che i campi obbligatori siano stati compilati
            if (this.hd_idPeopleNewPropr.Value.Equals(string.Empty) || this.hd_idRuoloNewPropr.Value.Equals(string.Empty))
            {
                jscript = "<script language='javascript'>alert('Selezionare un utente!');</script>";
                if (!ClientScript.IsStartupScriptRegistered("avvisaUt"))
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "avvisaUt", jscript);
                }
                return;
            }

            if (this.txt_nomeModello.Text.Trim() == "")
            {
                jscript = "<script language='javascript'>alert('Inserire il campo obbligatorio Nome Modello!');</script>";
                if (!ClientScript.IsStartupScriptRegistered("avvisaNM"))
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "avvisaNM", jscript);
                }
                return;
            }

            // ------------------   TRASMISSIONE --------------------
            trasmissione.daAggiornare = true;
            TrasmManager.setGestioneTrasmissione(this, trasmissione);
            TrasmManager.setDocTrasmSel(this, trasmissione);
            TrasmManager.setGestioneTrasmissione(this, trasmissione);

            // ------------------   MODELLO TRASM --------------------
            modello = (DocsPAWA.DocsPaWR.ModelloTrasmissione)Session["Modello"];

            modello.NOME = this.txt_nomeModello.Text;
            if (this.rbl_share.Items[0].Selected)
            {
                for (int k = 0; k < modello.MITTENTE.Length; k++)
                {
                    modello.MITTENTE[k].ID_CORR_GLOBALI = 0;
                }
            }
            else
            {
                modello.ID_PEOPLE = "";
            }

            if (this.hd_tipo.Value.Equals("STempl"))
            {
                modello.CEDE_DIRITTI        = "1";
                modello.ID_PEOPLE_NEW_OWNER = this.hd_idPeopleNewPropr.Value;
                modello.ID_GROUP_NEW_OWNER  = this.hd_idRuoloNewPropr.Value;
            }

            DocsPAWA.DocsPaWR.DocsPaWebService ws = new DocsPAWA.DocsPaWR.DocsPaWebService();
            DocsPaWR.InfoUtente infoUtente        = UserManager.getInfoUtente(this);
            ws.salvaModello(modello, infoUtente);

            Session.Remove("Modello");

            if (trasmissione != null && trasmissione.tipoOggetto == DocsPAWA.DocsPaWR.TrasmissioneTipoOggetto.DOCUMENTO)
            {
                jscript = "<script>window.open('../trasmissione/trasmDatiTrasm_dx.aspx','iFrame_dx'); window.close();</script>";
            }
            else
            {
                jscript = "<script>window.open('../trasmissione/trasmFascDatiTras_dx.aspx','iFrame_dx'); window.close();</script>";
            }

            if (!ClientScript.IsStartupScriptRegistered("chiude"))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "chiude", jscript);
            }
        }
Ejemplo n.º 25
0
        /// <summary>
        /// Paging
        /// </summary>
        /// <param name="folder"></param>
        /// <param name="numPage"></param>
        /// <param name="nRec"></param>
        /// <param name="numTotPage"></param>
        private void caricaDataTablesPaging(DocsPAWA.DocsPaWR.Folder folder,
                                            int numPage,
                                            out int nRec,
                                            out int numTotPage)
        {
            logger.Debug("tabfasclistadoc.aspx_pg.caricaDataTablesPaging");

            nRec       = 0;
            numTotPage = 0;
            try
            {
                dataTableProt = new DataTable();
                //		dataTableNonProt=new DataTable();
                hashListaDocumenti = new Hashtable();

                DocsPaWR.FiltroRicerca[][] filtriRicercaDocumenti = GetFiltriRicercaDocumenti();

                DocsPaWR.InfoDocumento[] listaDoc = null;
                SearchResultInfo[]       idProfileList;
                if (filtriRicercaDocumenti == null)
                {
                    listaDoc = FascicoliManager.getListaDocumentiPaging(this, folder, numPage, out numTotPage, out nRec, false, out idProfileList);
                }
                else
                {
                    listaDoc = FascicoliManager.getListaDocumentiPaging(this, folder, filtriRicercaDocumenti, numPage, out numTotPage, out nRec, false, out idProfileList);
                }

                this.TotalRecordCount         = nRec;
                this.dt_Prot.VirtualItemCount = this.TotalRecordCount;

                if (listaDoc != null)
                {
                    if (listaDoc.Length > 0)
                    {
                        //descrizione documento (prot + data)
                        string descDoc = string.Empty;
                        this.dataSetRFascDoc1.element1.Rows.Clear();
                        for (int i = 0; i < listaDoc.Length; i++)
                        {
                            hashListaDocumenti.Add(i, listaDoc[i]);
                            DocsPaWR.InfoDocumento infoDoc = listaDoc[i];

                            //il campo mittDest è un array list di possibili
                            //mitt/dest lo scorro tutto e concat in una singola string
                            //con separatore ="[spazio]-[spazio]"
                            string MittDest = "";
                            if (infoDoc != null && infoDoc.mittDest != null)
                            {
                                if (infoDoc.mittDest.Length > 0)
                                {
                                    for (int g = 0; g < infoDoc.mittDest.Length; g++)
                                    {
                                        MittDest += infoDoc.mittDest[g] + " - ";
                                    }
                                    MittDest = MittDest.Substring(0, MittDest.Length - 3);
                                }
                            }



                            //data apertura formattata
                            string dataApertura = "";
                            int    numProt      = new Int32();
                            if (infoDoc.dataApertura != null && !infoDoc.dataApertura.Equals(""))
                            {
                                dataApertura = infoDoc.dataApertura.Substring(0, 10);
                            }
                            //setto il registro (prova)
                            //infoDoc.codRegistro = schedaDoc.registro.codice;
                            string tipoProto = string.Empty;


                            // MODIFICATO DA FABIO PER ETICHETTE LETTERE PROTOCOLLI
                            if (infoDoc.tipoProto.Equals("A") || infoDoc.tipoProto.Equals("P") || infoDoc.tipoProto.Equals("I"))
                            {
                                //aggiunge al datatable dei protocollati
                                if (infoDoc.numProt != null && !infoDoc.numProt.Equals(""))
                                {
                                    numProt = Int32.Parse(infoDoc.numProt);
                                    descDoc = numProt + "\n" + dataApertura;
                                    //Protocollo titolario
                                    if (!string.IsNullOrEmpty(infoDoc.protocolloTitolario))
                                    {
                                        descDoc += "<br>---------<br>" + infoDoc.protocolloTitolario.ToString();
                                    }

                                    string nuova_etichetta = getEtichetta(infoDoc.tipoProto);
                                    this.dataSetRFascDoc1.element1.Addelement1Row(descDoc, numProt, dataApertura, infoDoc.segnatura, infoDoc.codRegistro, nuova_etichetta, infoDoc.oggetto, i, MittDest, infoDoc.dataAnnullamento, infoDoc.dataArchiviazione, infoDoc.idProfile, infoDoc.docNumber, infoDoc.acquisitaImmagine, infoDoc.inConservazione, infoDoc.cha_firmato, infoDoc.inADL);
                                }
                                else
                                {
                                    // se documento grigio/pred.
                                    descDoc = infoDoc.docNumber + "\n" + dataApertura;
                                    if (infoDoc.tipoProto != null && infoDoc.tipoProto == "G")
                                    {
                                        tipoProto = "NP";
                                    }
                                    else
                                    {
                                        tipoProto = infoDoc.tipoProto;
                                    }
                                    //Protocollo titolario
                                    if (!string.IsNullOrEmpty(infoDoc.protocolloTitolario))
                                    {
                                        descDoc += "<br>---------<br>" + infoDoc.protocolloTitolario.ToString();
                                    }

                                    string nuova_etichetta = getEtichetta(infoDoc.tipoProto);
                                    this.dataSetRFascDoc1.element1.Addelement1Row(descDoc, new Int32(), dataApertura, "", infoDoc.codRegistro, nuova_etichetta, infoDoc.oggetto, i, MittDest, infoDoc.dataAnnullamento, infoDoc.dataArchiviazione, infoDoc.idProfile, infoDoc.docNumber, infoDoc.acquisitaImmagine, infoDoc.inConservazione, infoDoc.cha_firmato, infoDoc.inADL);
                                }
                            }
                            else
                            {
                                // se documento grigio
                                descDoc = infoDoc.docNumber + "\n" + dataApertura;

                                if (infoDoc.tipoProto != null && infoDoc.tipoProto == "G")
                                {
                                    tipoProto = "NP";
                                }
                                else
                                {
                                    tipoProto = infoDoc.tipoProto;
                                }
                                //Protocollo titolario
                                if (!string.IsNullOrEmpty(infoDoc.protocolloTitolario))
                                {
                                    descDoc += "<br>---------<br>" + infoDoc.protocolloTitolario.ToString();
                                }

                                //aggiunge al datatable dei non protocollati
                                string nuova_etichetta = getEtichetta(infoDoc.tipoProto);
                                this.dataSetRFascDoc1.element1.Addelement1Row(descDoc, Int32.Parse(infoDoc.idProfile), dataApertura, "", "", nuova_etichetta, infoDoc.oggetto, i, "", "", infoDoc.dataArchiviazione, infoDoc.idProfile, infoDoc.docNumber, infoDoc.acquisitaImmagine, infoDoc.inConservazione, infoDoc.cha_firmato, infoDoc.inADL);
                            }
                        }
                    }
                }

                FascicoliManager.setHashDocProtENonProt(this, hashListaDocumenti);

                dataTableProt = dataSetRFascDoc1.Tables[0];

                // impostazione datatable in sessione
                FascicoliManager.setDataTableDocProt(this, dataTableProt);

                //Header protocollo titolario
                DocsPAWA.DocsPaWR.DocsPaWebService wws = new DocsPAWA.DocsPaWR.DocsPaWebService();
                string protocolloTitolario             = wws.isEnableProtocolloTitolario();
                if (!string.IsNullOrEmpty(protocolloTitolario) && !IsPostBack)
                {
                    this.dt_Prot.Columns[0].HeaderText += "<br>---------<br>" + protocolloTitolario;
                }
            }
            catch (Exception es)
            {
                logger.Debug(es.Message + "  tabfasclistadoc.aspx_pg.caricaDataTablesPaging");
                ErrorManager.redirect(this, es);
            }
        }
Ejemplo n.º 26
0
 /// <summary>
 /// Reperimento numero trasmissioni di un documento
 /// </summary>
 /// <param name="schedaDocumento"></param>
 /// <returns></returns>
 public int GetCountTrasmissioni(SchedaDocumento schedaDocumento)
 {
     DocsPaWR.DocsPaWebService ws = new DocsPAWA.DocsPaWR.DocsPaWebService();
     return(ws.DocumentoGetCountTrasmissioniDocumento(Convert.ToInt32(schedaDocumento.systemId)));
 }
Ejemplo n.º 27
0
 private void InvalidaPassiCorrelati(string tipoNodo, string idRuolo, string idPeople, InfoUtenteAmministratore infoAmm)
 {
     DocsPAWA.DocsPaWR.DocsPaWebService wws = new DocsPAWA.DocsPaWR.DocsPaWebService();
     wws.Timeout = System.Threading.Timeout.Infinite;
     wws.InvalidaPassiCorrelatiTitolare(idRuolo, idPeople, tipoNodo, infoAmm);
 }
Ejemplo n.º 28
0
        private void btn_ok_Click(object sender, System.EventArgs e)
        {
            string idCorr   = string.Empty;
            string idCanale = string.Empty;
            bool   acceptCanaleTutti;

            DocsPaWR.Canale           canale = new DocsPAWA.DocsPaWR.Canale();
            DocsPaWR.DocsPaWebService ws     = new DocsPAWA.DocsPaWR.DocsPaWebService();
            schedaDoc = DocumentManager.getDocumentoInLavorazione(this);
            DocsPaWR.Corrispondente[] dest   = ((DocsPAWA.DocsPaWR.ProtocolloUscita)schedaDoc.protocollo).destinatari;
            DocsPaWR.Corrispondente[] destCc = ((DocsPAWA.DocsPaWR.ProtocolloUscita)schedaDoc.protocollo).destinatariConoscenza;

            if (dataGridMezzi != null)
            {
                Canale canaleTutti = null;
                if (!ddlTutti.SelectedValue.Equals("0"))
                {
                    canaleTutti = ws.getCanaleBySystemId(ddlTutti.SelectedValue);
                }
                DataGridItemCollection items = dataGridMezzi.Items;
                if (items != null)
                {
                    //itero sui singoli item della griglia
                    foreach (DataGridItem item in items)
                    {
                        string tipoDest           = string.Empty;
                        TableCellCollection cells = item.Cells;
                        foreach (TableCell cell in cells)
                        {
                            ControlCollection controls = cell.Controls;
                            foreach (Control control in controls)
                            {
                                if (control.GetType() == typeof(Label))
                                {
                                    idCorr = ((Label)control).Text;
                                    break;
                                }

                                if (control.GetType() == typeof(DropDownList))
                                {
                                    idCanale = ((DropDownList)control).SelectedValue;
                                    break;
                                }
                            }
                        }

                        if (dest != null && dest.Length > 0)
                        {
                            acceptCanaleTutti = false;
                            foreach (DocsPaWR.Corrispondente corr in dest)
                            {
                                // se è impostato il canale tutti ed il corrispondente corrente ha visibilità del mezzo di spedizione tutti allora lo imposto
                                if (corr.systemId.Equals(idCorr) && canaleTutti != null)
                                {
                                    System.Collections.Generic.List <Mezzi> listMezziVisCorr = GetMeansDeliveryFiltered(UserManager.getCorrispondenteBySystemID(this.Page, idCorr).canalePref, idCorr);
                                    foreach (Mezzi m in listMezziVisCorr)
                                    {
                                        if (m.Descrizione.Equals(canaleTutti.descrizione) && m.Valore.Equals(canaleTutti.systemId))
                                        {
                                            acceptCanaleTutti = true;
                                            corr.canalePref   = canaleTutti;
                                            tipoDest          = "d";
                                            break;
                                        }
                                    }
                                }

                                //l'utente a selezionata blank quindi reimposto il canale di default
                                if (!acceptCanaleTutti && corr.systemId.Equals(idCorr) && (idCanale.Equals("0")))
                                {
                                    if (corr.canalePref != null && corr.canalePref.systemId != null)
                                    {
                                        canale          = UserManager.getCorrispondenteBySystemID(this.Page, idCorr).canalePref;
                                        corr.canalePref = canale;
                                        tipoDest        = "d";
                                        break;
                                    }
                                }
                                //imposto il canale selezionato dall'utente
                                else if (!acceptCanaleTutti && corr.systemId.Equals(idCorr))
                                {
                                    canale          = ws.getCanaleBySystemId(idCanale);
                                    corr.canalePref = canale;
                                    tipoDest        = "d";
                                    break;
                                }
                            }
                        }
                        if (destCc != null && destCc.Length > 0 && (!tipoDest.Equals("d")))
                        {
                            acceptCanaleTutti = false;
                            foreach (DocsPaWR.Corrispondente corr in destCc)
                            {
                                // se è impostato il canale tutti ed il corrispondente corrente ha visibilità del mezzo di spedizione tutti allora lo imposto
                                if (corr.systemId.Equals(idCorr) && canaleTutti != null)
                                {
                                    System.Collections.Generic.List <Mezzi> listMezziVisCorr = GetMeansDeliveryFiltered(UserManager.getCorrispondenteBySystemID(this.Page, idCorr).canalePref, idCorr);
                                    foreach (Mezzi m in listMezziVisCorr)
                                    {
                                        if (m.Descrizione.Equals(canaleTutti.descrizione) && m.Valore.Equals(canaleTutti.systemId))
                                        {
                                            acceptCanaleTutti = true;
                                            corr.canalePref   = canaleTutti;
                                            tipoDest          = "d";
                                            break;
                                        }
                                    }
                                }

                                //l'utente a selezionata blank quindi reimposto il canale di default
                                if (!acceptCanaleTutti && corr.systemId.Equals(idCorr) && (idCanale.Equals("0")))
                                {
                                    if (corr.canalePref != null && corr.canalePref.systemId != null)
                                    {
                                        canale          = UserManager.getCorrispondenteBySystemID(this.Page, idCorr).canalePref;
                                        corr.canalePref = canale;
                                        break;
                                    }
                                }
                                //imposto il canale selezionato dall'utente
                                else if (!acceptCanaleTutti && corr.systemId.Equals(idCorr))
                                {
                                    canale          = ws.getCanaleBySystemId(idCanale);
                                    corr.canalePref = canale;
                                    break;
                                }
                            }
                        }
                    }
                }
            }

            //Salvo le informazioni aggiornate nella sessione
            ((DocsPAWA.DocsPaWR.ProtocolloUscita)schedaDoc.protocollo).destinatari           = dest;
            ((DocsPAWA.DocsPaWR.ProtocolloUscita)schedaDoc.protocollo).destinatariConoscenza = destCc;
            DocumentManager.setDocumentoInLavorazione(this, schedaDoc);
            DocumentManager.setDocumentoSelezionato(this, schedaDoc);

            //richiama la funzione javascript che aggiorna il form chiamante
            string funct = " window.open('../documento/docProtocollo.aspx?editMode=true','IframeTabs'); ";

            funct = funct + " window.close(); ";
            Response.Write("<script> " + funct + "</script>");
        }
Ejemplo n.º 29
0
        /// <summary>
        /// Aggiornamento abilitazione / disabilitazione funzioni di checkin - checkout
        /// </summary>
        private void RefreshButtons()
        {
            this.DisableAllButtons();

            DocsPaWR.SchedaDocumento currentScheda = this.CurrentSchedaDocumento;

            if (currentScheda != null)
            {
                FileRequest selectedFile = FileManager.getSelectedFile();

                // Verifica stato consolidamento del documento (solo se non consolidato, si può fare checkout)
                if (currentScheda.ConsolidationState == null ||
                    (currentScheda.ConsolidationState != null && currentScheda.ConsolidationState.State == DocsPaWR.DocumentConsolidationStateEnum.None))
                {
                    if (!string.IsNullOrEmpty(currentScheda.systemId) && (currentScheda.tipoProto != "R" && currentScheda.tipoProto != "C"))
                    {
                        // NB: Nei casi in cui l'utente non è abilitato per l'utilizzo della funzione di checkin / checkout,
                        // le uniche funzionalità non disponibili saranno quelle relative al checkin e all'undocheckout.
                        // In ogni caso potrà vedere lo stato del documento e chi l'ha posto in checkout.

                        // Verifica se il documento non è né cestinato né annullato
                        if (!this.IsDocumentoInCestino && !this.IsDocumentoAnnullato)
                        {
                            CheckOutStatus status = CheckInOutServices.GetCheckOutDocumentStatus();

                            if (status != null)
                            {
                                // Il documento risulta bloccato, reperimento del proprietario del blocco
                                string ownerUser       = status.UserName.ToUpper();
                                bool   isOwnerCheckOut = (ownerUser == UserManager.getInfoUtente().userId.ToUpper());

                                if (this.UserEnabled && isOwnerCheckOut)
                                {
                                    // Documento bloccato dall'utente corrente: funzioni di rilascio abilitate
                                    this.btnCheckIn.Enabled            = true;
                                    this.btnOpenCheckedOutFile.Enabled = true;
                                    this.btnUndoCheckOut.Enabled       = true;

                                    if (DocsPAWA.UserManager.isFiltroAooEnabled(this.Page))
                                    {
                                        DocsPaWR.Registro[] userRegistri = DocsPAWA.UserManager.getListaRegistri(this.Page);
                                        this.btnCheckIn.Enabled            = UserManager.verifyRegNoAOO(currentScheda, userRegistri);
                                        this.btnOpenCheckedOutFile.Enabled = UserManager.verifyRegNoAOO(currentScheda, userRegistri);
                                        this.btnUndoCheckOut.Enabled       = UserManager.verifyRegNoAOO(currentScheda, userRegistri);
                                    }
                                }

                                this.btnShowCheckOutStatus.Enabled = true;
                                this.btnShowCheckOutStatus.Visible = true;
                                this.btnShowCheckOutStatus.ToolTip = "Il documento risulta bloccato dall'utente " + ownerUser;

                                //Verifico che il documento è bloccato per una richiesta di conversione pdf lato server
                                //In caso affermativo disabilito l'apertura del file ed il rilascia sen
                                if (status.InConversionePdf)
                                {
                                    this.btnOpenCheckedOutFile.Enabled = false;
                                    this.btnCheckIn.Enabled            = false;

                                    // Se il documento è in stato di conversione pdf,
                                    // il pulsante di annullamento è abilitato solo se l'owner
                                    // del blocco è l'utente stesso
                                    this.btnUndoCheckOut.Enabled = isOwnerCheckOut;
                                }
                            }
                            else
                            {
                                //modifica
                                DocsPAWA.DocsPaWR.DocsPaWebService ws = new DocsPAWA.DocsPaWR.DocsPaWebService();

                                string idAmm = UserManager.getInfoUtente().idAmministrazione;
                                //DocsPAWA.DocsPaWR.CacheConfig info = ws.getConfigurazioneCache(idAmm);
                                if (ws.isActiveCache(idAmm))
                                {
                                    bool inCache = ws.inCache(currentScheda.docNumber, currentScheda.documenti[currentScheda.documenti.Length - 1].versionId, idAmm);

                                    if (inCache)
                                    {
                                        string pathComponents = ws.recuperaPathComponents(currentScheda.docNumber, currentScheda.documenti[currentScheda.documenti.Length - 1].versionId);
                                        if (string.IsNullOrEmpty(pathComponents))
                                        {
                                            this.btnCheckOut.Enabled = false;
                                        }
                                        else
                                        {
                                            this.btnCheckOut.Enabled = true;
                                        }

                                        if (IsTimeStampedFile)
                                        {
                                            this.btnCheckOut.Enabled = false;
                                        }
                                    }
                                }
                                else
                                //fine mofidica
                                if (Session["docInRisposta"] == null && Session["docInRisposta2"] == null)
                                {
                                    if (!this.IsEnabledProfilazioneAllegati &&
                                        this.IsSelectedTabAllegati && selectedFile.GetType() == typeof(DocsPaWR.Allegato))
                                    {
                                        // La funzione di checkout esplicita da tab allegati è disabilitata se la profilazione allegati è disabilitata
                                        this.btnCheckOut.Enabled = false;
                                    }
                                    else
                                    {
                                        this.btnCheckOut.Enabled = this.UserEnabled;

                                        if (IsTimeStampedFile)
                                        {
                                            this.btnCheckOut.Enabled = false;
                                        }

                                        if (DocsPAWA.UserManager.isFiltroAooEnabled(this.Page))
                                        {
                                            if (btnCheckOut.Enabled)
                                            {
                                                DocsPaWR.Registro[] userRegistri = DocsPAWA.UserManager.getListaRegistri(this.Page);
                                                btnCheckOut.Enabled = UserManager.verifyRegNoAOO(currentScheda, userRegistri);
                                            }
                                        }
                                    }
                                }
                                else
                                {
                                    this.btnCheckOut.Enabled = false;
                                    if (Session["docInRisposta"] != null)
                                    {
                                        Session.Remove("docInRisposta");
                                    }
                                    else
                                    if (Session["docInRisposta2"] != null)
                                    {
                                        Session.Remove("docInRisposta2");
                                    }
                                }
                            }
                        }
                    }
                }

                // Abilitazione / disabilitazione pulsante salva file,
                // che viene comunque abilitato (se file presente)
                // indipendentemente dalle regole di abilitazione del checkin / checkout

                int size;
                if (selectedFile != null && Int32.TryParse(selectedFile.fileSize, out size))
                {
                    this.btnSave.Enabled = (size > 0);
                }
            }
        }