private bool SaveTemplate()
        {
            try
            {
                this.Template.NOME = this.txtTitle.Text;
                if (this.rblShare.Items[0].Selected)
                {
                    for (int k = 0; k < this.Template.MITTENTE.Length; k++)
                    {
                        this.Template.MITTENTE[k].ID_CORR_GLOBALI = 0;
                    }
                }
                else
                {
                    this.Template.ID_PEOPLE = "";
                }

                DocsPaWR.InfoUtente infoUtente = UserManager.GetInfoUser();
                this.Template.CODICE = "MT_" + TransmissionModelsManager.GetTemplateSystemId();
                TransmissionModelsManager.SaveTemplate(this.Template, infoUtente);

                return(true);
            }
            catch
            {
                return(false);
            }
        }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try {
                if (!this.IsPostBack)
                {
                    this.InitializeLanguage();
                    DocsPaWR.InfoUtente info = new DocsPaWR.InfoUtente();
                    info = UserManager.GetInfoUser();

                    string valoreChiave = InitConfigurationKeys.GetValue(info.idAmministrazione, FE_MAX_LENGTH_NOTE);
                    if (!string.IsNullOrEmpty(valoreChiave) && int.Parse(valoreChiave) <= maxLength)
                    {
                        maxLength = int.Parse(valoreChiave);
                    }
                    VersionDescription.MaxLength = maxLength;
                    if (this.Request.QueryString["modifyVersion"] != null && this.Request.QueryString["modifyVersion"].Equals("t"))
                    {
                        this.VersionDescription.Text = DescriptionVersion;
                    }
                }
            }
            catch (System.Exception ex)
            {
                UIManager.AdministrationManager.DiagnosticError(ex);
                return;
            }
        }
Esempio n. 3
0
 protected void RegistersBtnPrint_Click(object sender, EventArgs e)
 {
     DocsPaWR.InfoUtente    infoUser = UserManager.GetInfoUser();
     DocsPaWR.InfoDocumento infoDoc  = new InfoDocumento();
     DocsPaWR.Ruolo         role     = RoleManager.GetRoleInSession();
     try
     {
         DocsPaWR.StampaRegistroResult StpRegRS = GestManager.StampaRegistro(this, infoUser, role, SelectedRegister);
         if (StpRegRS != null && StpRegRS.errore != null && StpRegRS.errore != "")
         {
             string error = StpRegRS.errore;
             error = error.Replace("'", "\\'");
             ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) {parent.fra_main.ajaxDialogModal('WarningRegisterPrint', 'warning', '','" + error + "');} else {parent.ajaxDialogModa('ErrorRegisterPrint', 'error', '','" + error + "');}", true);
             return;
         }
         else
         {
             infoDoc.docNumber = StpRegRS.docNumber;
             DocsPaWR.SchedaDocumento schedaDoc = new SchedaDocumento();
             schedaDoc            = DocumentManager.getDocumentDetails(this, infoDoc.idProfile, infoDoc.docNumber);
             FileDocPrintRegister = FileManager.getInstance(schedaDoc.systemId).GetFile(this.Page, schedaDoc.documenti[0], false);
             ScriptManager.RegisterStartupScript(this, this.GetType(), "viewPrintRegister", "ajaxModalPopupViewPrintRegister();", true);
             return;
         }
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) {parent.fra_main.ajaxDialogModal('ErrorRegisterPrint', 'error', '');} else {parent.ajaxDialogModa('ErrorRegisterPrint', 'error', '');}", true);
     }
 }
Esempio n. 4
0
        public static FileDocumento GetReportRegistroWithFilters(
            Page page,
            DocsPaWR.InfoUtente infoUt,
            Ruolo ruolo,
            Registro registro,
            FiltroRicerca[][] filters)
        {
            FileDocumento retValue = null;

            try
            {
                // Chiamata Web Service
                DocsPaWR.StampaRegistroResult result = docsPaWS.RegistriStampaWithFilters(infoUt, ruolo, registro, filters, out retValue);

                if (result == null)
                {
                    throw new Exception();
                }
            }
            catch (Exception es)
            {
                ErrorManager.redirect(page, es);
            }

            return(retValue);
        }
Esempio n. 5
0
        /// <summary>
        /// Rimozione di un elemento rubrica corrispondente ad un'unità organizzativa
        /// </summary>
        /// <param name="infoUtente"></param>
        /// <param name="idUo"></param>
        public static void EliminaElementoRubricaUO(DocsPaWR.InfoUtente infoUtente, string idUo)
        {
            RC.Proxy.Elementi.ElementoRubrica elementoRubrica = GetElementoRubricaUO(infoUtente, idUo);

            if (elementoRubrica != null)
                GetElementiRubricaServiceInstance(infoUtente).Delete(elementoRubrica);
        }
Esempio n. 6
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 = 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);
            }
        }
Esempio n. 7
0
        // Upload entire file
        protected void UploadWholeFile(HttpContext context, List <FilesStatus> statuses)
        {
            DocsPaWR.InfoUtente infoUtente = UIManager.UserManager.GetInfoUser();

            string _tempFileName;

            for (int i = 0; i < context.Request.Files.Count; i++)
            {
                var userPostedFile = context.Request.Files[i];


                if (userPostedFile.FileName.IndexOf("\\") >= 0 || userPostedFile.FileName.IndexOf("/") >= 0)
                {
                    _tempFileName = Path.GetFileName(userPostedFile.FileName);
                }
                else
                {
                    _tempFileName = userPostedFile.FileName;
                }
                if (userPostedFile == null)
                {
                    continue;
                }
                if (String.IsNullOrWhiteSpace(userPostedFile.FileName) || userPostedFile.FileName.Equals("formatPdfExport.xml"))
                {
                    continue;
                }


                bool result = this.Upload(userPostedFile, _tempFileName, infoUtente);

                statuses.Add(new FilesStatus(_tempFileName, userPostedFile.ContentLength));
            }
        }
Esempio n. 8
0
 private void btn_stampaRegistro_Click(object sender, System.Web.UI.ImageClickEventArgs e)
 {
     try
     {
         DocsPaWR.InfoUtente           infoUt   = UserManager.getInfoUtente(this);
         DocsPaWR.InfoDocumento        infoDoc  = new DocsPAWA.DocsPaWR.InfoDocumento();
         DocsPaWR.Registro             registro = GestManager.getRegistroSel(this);
         DocsPaWR.Ruolo                ruolo    = UserManager.getRuolo(this);
         DocsPaWR.StampaRegistroResult StpRegRS = GestManager.StampaRegistro(this, infoUt, ruolo, registro);
         if (StpRegRS != null && StpRegRS.errore != null && StpRegRS.errore != "")
         {
             string errore = StpRegRS.errore;
             errore = errore.Replace("'", "\\'");
             string l_script = "<script language=javascript>alert('" + errore + "');</script>";
             if (!this.IsStartupScriptRegistered("startup"))
             {
                 this.RegisterStartupScript("startup", l_script);
             }
         }
         else
         {
             infoDoc.docNumber = StpRegRS.docNumber;
             DocsPaWR.SchedaDocumento schedaDoc = new DocsPAWA.DocsPaWR.SchedaDocumento();
             schedaDoc = DocumentManager.getDettaglioDocumento(this, infoDoc.idProfile, infoDoc.docNumber);
             FileManager.setSelectedFileReg(this, schedaDoc.documenti[0], "../../popup");
             string sval = @"../../popup/ModalVisualStampaReg.aspx?id=" + this.Session.SessionID;
             RegisterStartupScript("ApriModale", "<script>OpenMyDialog('" + sval + "');</script>");
         }
         Response.Write("<script>parent.iFrame_dettagli.location='regDettagli.aspx';</script>");
     }
     catch (Exception ex)
     {
         ErrorManager.redirectToErrorPage(this, ex);
     }
 }
Esempio n. 9
0
        /// <summary>
        /// Evento generato al cambio del testo nella casella del codice rubrica
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void txtCodRuolo_TextChanged(object sender, EventArgs e)
        {
            if (this.infoUtente != null)
            {
                this.infoUser              = new InfoUtente();
                infoUser.idCorrGlobali     = this.infoUtente.idCorrGlobali;
                infoUser.idPeople          = this.infoUtente.idPeople;
                infoUser.idGruppo          = this.infoUtente.idGruppo;
                infoUser.dst               = this.infoUtente.dst;
                infoUser.idAmministrazione = this.infoUtente.idAmministrazione;
                infoUser.userId            = this.infoUtente.userId;
                infoUser.sede              = this.infoUtente.sede;
            }

            if (!string.IsNullOrEmpty(txtCodRuolo.Text))
            {
                setDescCorr(txtCodRuolo.Text);
            }
            else
            {
                txtCodRuolo.Text  = string.Empty;
                txtDescRuolo.Text = string.Empty;
                id_corr.Value     = string.Empty;
                tipo_corr.Value   = string.Empty;
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "no_prole", "alert('Inserire un codice da cercare in rubrica');", true);
            }
            this.upFiltriRicerca.Update();
        }
Esempio n. 10
0
        /// <summary>
        ///
        /// </summary>
        public virtual void VerificaRevocaAcl()
        {
            if (!string.IsNullOrEmpty(this.IdDocumento))
            {
                DocsPaWR.InfoUtente infoUtente = UserManager.getInfoUtente();

                //Il metodo verificaACL viene chiamato anche per acl dei fascicoli.
                int result = DocumentManager.verificaACL("D", this.IdDocumento, UserManager.getInfoUtente(), out errorMessage);

                // Imposta lo stato della revoca dell'acl

                /************************************
                 *  CASI:
                 *  result = 0 --> ACL rimossa
                 *  result = 1 --> documento rimosso
                 *  result =2 --> documento "normale"
                 *  result -1 --> errore generico
                 ************************************** */
                this.AclRevocata = (result == 0);
            }
            else
            {
                this.AclRevocata = false;
            }
        }
Esempio n. 11
0
        private void SetDataVisibilitaProcessiFirma()
        {
            DocsPaWR.InfoUtente  infoUtente = UserManager.GetInfoUser();
            List <ProcessoFirma> listaProcessiFirma;

            if (this.ProcessoDiFirmaSelected != null && !string.IsNullOrEmpty(this.ProcessoDiFirmaSelected.idProcesso))
            {
                listaProcessiFirma = new List <ProcessoFirma>()
                {
                    ProcessoDiFirmaSelected
                };
            }
            else
            {
                listaProcessiFirma = ListaProcessiDiFirma;
            }
            if (this._campiSelezionati == null)
            {
                this._campiSelezionati = new ArrayList();
            }

            this._file = docsPaWS.ExportVisibilitaProcessiFirma(infoUtente, this._tipologiaExport, this._titolo, this._campiSelezionati.ToArray(), listaProcessiFirma.ToArray());

            if (this._file != null)
            {
                exportDatiSessionManager session = new exportDatiSessionManager();
                session.SetSessionExportFile(this._file);
            }
        }
Esempio n. 12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try {
                if (!this.IsPostBack)
                {
                    DocsPaWR.InfoUtente info = new DocsPaWR.InfoUtente();
                    info = UserManager.GetInfoUser();

                    // Reperimento allegato selezionato
                    DocsPaWR.Allegato allegato = DocumentManager.GetSelectedAttachment();

                    if (!this._isCheckedOutDocument)
                    {
                        try
                        {
                            rowMessage.InnerHtml = "Sei sicuro di voler eliminare l'allegato " + allegato.versionLabel + "?";
                        }
                        catch (Exception ex)
                        {
                            // on postback throw n exception
                        }
                    }
                }
            }
            catch (System.Exception ex)
            {
                UIManager.AdministrationManager.DiagnosticError(ex);
                return;
            }
        }
Esempio n. 13
0
        /// <summary>
        /// Creazione di un elemento contenente gli attributi
        /// di un corrispondente docspa da inviare a rubrica comune
        /// </summary>
        /// <param name="infoUtente"></param>
        /// <param name="idElemento">
        /// Id dell'elemento docspa da inviare a rubrica comune
        /// </param>
        /// <param name="tipo">
        /// Tipo di elemento da salvare
        /// </param>
        /// <returns></returns>
        public static RC.Proxy.Elementi.ElementoRubrica NuovoElementoRubrica(DocsPaWR.InfoUtente infoUtente, string idElemento, Tipo tipo)
        {
            RC.Proxy.Elementi.ElementoRubrica elementoRubrica = null;

            DocsPaWR.ElementoRC elementoDaInviare = null;

            switch (tipo)
            {
                case Tipo.UO:
                    elementoDaInviare = new DocsPaWR.DocsPaWebService().GetElementoRubricaUO(infoUtente, idElemento);
                    break;
                case Tipo.RF:
                    elementoDaInviare = new DocsPaWR.DocsPaWebService().GetElementoRubricaRF(infoUtente, idElemento);
                    break;
            }

            if (elementoDaInviare != null)
            {
                // UO ancora non presente in rubrica comune
                elementoRubrica = new RC.Proxy.Elementi.ElementoRubrica();

                elementoRubrica.Codice = elementoDaInviare.CodiceRubrica;
                elementoRubrica.Descrizione = elementoDaInviare.DescrizioneRubrica;

                ExtractDetails(elementoRubrica, elementoDaInviare, tipo);
            }

            return elementoRubrica;
        }
Esempio n. 14
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);
        }
Esempio n. 15
0
        /// <summary>
        /// Caricamento dati pagina corrente
        /// </summary>
        private void Fetch()
        {
            DocsPaWR.InfoUtente infoUtente = UserManager.getInfoUtente(this);

            int currentPage = this.DataGrid1.CurrentPageIndex + 1;

            int pageCount;
            int recordCount;

            SearchResultInfo[] idProfile;

            DocsPaWR.InfoDocumento[] documenti = DocumentManager.getQueryInfoDocumentoPaging(infoUtente.idGruppo,
                                                                                             infoUtente.idPeople,
                                                                                             this,
                                                                                             this.Filtri,
                                                                                             currentPage,
                                                                                             out pageCount,
                                                                                             out recordCount,
                                                                                             false,
                                                                                             true,
                                                                                             true,
                                                                                             !IsPostBack,
                                                                                             out idProfile);

            DocumentManager.setListaDocNonProt(this, documenti);

            this.DataGrid1.VirtualItemCount = recordCount;
            this.DataGrid1.DataSource       = documenti;
            this.DataGrid1.DataBind();
        }
Esempio n. 16
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="docNumber"></param>
 public SmistaDocManager(SAAdminTool.DocsPaWR.Ruolo ruolo,
                         DocsPaWR.Utente utente,
                         DocsPaWR.InfoUtente infoUtente,
                         string docNumber)
 {
     this.Initialize(ruolo, utente, infoUtente, docNumber);
 }
Esempio n. 17
0
        /// <summary>
        /// Creazione oggetto "UserLogin" a partire dai metadati dalla sessione utente corrente
        /// </summary>
        /// <param name="password">La password deve essere fornita dall'utente, in quanto non è mantenuta nella sessione</param>
        /// <returns></returns>
        public static DocsPaWR.UserLogin CreateUserLoginCurrentUser(string password, bool changePwd)
        {
            DocsPaWR.UserLogin userLogin = null;

            // Reperimento oggetto infoutente corrente
            DocsPaWR.InfoUtente infoUtente = UserManager.GetInfoUser();

            if (infoUtente != null)
            {
                userLogin          = new DocsPaWR.UserLogin();
                userLogin.SystemID = infoUtente.idPeople;
                userLogin.UserName = infoUtente.userId;
                userLogin.Password = password;
                if (changePwd)
                {
                    userLogin.IdAmministrazione = "0";
                }
                else
                {
                    userLogin.IdAmministrazione = infoUtente.idAmministrazione;
                }
                userLogin.DST       = infoUtente.dst;
                userLogin.IPAddress = HttpContext.Current.Request.UserHostAddress;
            }

            return(userLogin);
        }
Esempio n. 18
0
        private bool RifiutaDocumento(string notaRifiuto, string IDTrasmUtente, string idTrasmissione, string idPeople)
        {
            bool retValue = false;

            DocsPaWR.DocsPaWebService ws = new DocsPaWR.DocsPaWebService();
            if (retValue = ws.RifiutaDocumento(notaRifiuto, IDTrasmUtente, idTrasmissione, idPeople, RoleManager.GetRoleInSession(), UserManager.GetInfoUser()))
            {
                // creazione oggetto TrasmissioneUtente per la gestione del ritorno al mitt della trasm. rifiutata
                this.FillMittenteSmistamento();

                DocsPaWR.TrasmissioneUtente objTrasmUt = new DocsPaWR.TrasmissioneUtente();
                objTrasmUt.systemId = IDTrasmUtente;

                DocsPaWR.Utente objUtente = new DocsPaWR.Utente();
                objTrasmUt.utente                   = objUtente;
                objTrasmUt.utente.idPeople          = this._mittenteSmistamento.IDPeople;
                objTrasmUt.utente.idAmministrazione = this._mittenteSmistamento.IDAmministrazione;

                DocsPaWR.Ruolo objRuolo = new DocsPaWR.Ruolo();
                objRuolo.systemId          = this._mittenteSmistamento.IDCorrGlobaleRuolo;
                objTrasmUt.utente.ruoli    = new DocsPaWR.Ruolo[1];
                objTrasmUt.utente.ruoli[0] = objRuolo;

                DocsPaWR.InfoUtente infoUtente = UserManager.GetInfoUser();

                // ws.RitornaAlMittTrasmUt(objTrasmUt, infoUtente);
            }
            return(retValue);
        }
Esempio n. 19
0
        private void setDataToDoList()
        {
            this.getFiltriTrasm();
            DocsPaWR.InfoUtente infoUtente = UserManager.getInfoUtente();

            DocsPAWA.DocsPaWR.Registro[] reg = UserManager.getRuolo().registri;
            string registri = "0";

            if (reg.Length > 0)
            {
                foreach (DocsPAWA.DocsPaWR.Registro registro in reg)
                {
                    registri = registri + "," + registro.systemId;
                }
            }

            AmmUtils.WebServiceLink ws = new AmmUtils.WebServiceLink();
            this._file = ws.ExportToDoList(infoUtente, this._docOrFasc, this._lstFiltriTrasm, registri, this._tipologiaExport, this._titolo, this._campiSelezionati, this._objSystemId);
            ws         = null;

            if (this._file != null)
            {
                exportDatiSessionManager session = new exportDatiSessionManager();
                session.SetSessionExportFile(this._file);
            }
        }
Esempio n. 20
0
        protected void btn_associaTimestamp_Click(object source, EventArgs e)
        {
            FileManager fileManager = new FileManager();

            DocsPaWR.FileRequest   fileRequest   = FileManager.getSelectedFile(this);
            DocsPaWR.FileDocumento fileDocumento = fileManager.getFile(this, fileRequest, false, true);

            DocsPaWR.InfoUtente infoUtente = UserManager.getInfoUtente(this);

            string stringFile = BitConverter.ToString(fileDocumento.content);

            stringFile = stringFile.Replace("-", "");

            DocsPaWR.InputMarca inputMarca = new DocsPaWR.InputMarca();
            inputMarca.applicazione = infoUtente.urlWA;
            inputMarca.file_p7m     = stringFile;
            inputMarca.riferimento  = infoUtente.userId;

            String message = string.Empty;

            DocumentManager.executeAndSaveTSR(infoUtente, inputMarca, fileRequest, out message);

            if (message == "OK")
            {
                timestampsDoc = DocumentManager.getTimestampsDoc(infoUtente, fileRequest);
                caricaDgTimestamp();
            }
            else
            {
                ClientScript.RegisterStartupScript(this.GetType(), "ErroreTimespamp", "alert('" + message + "');", true);
            }

            pnl_dettagli.Visible = false;
        }
Esempio n. 21
0
        public static bool DismettiDelega(DocsPaWR.InfoUtente infoUtente)
        {
            bool retValue = false;

            retValue = docsPaWS.DelegaDismetti(infoUtente, infoUtente.userId);
            return(retValue);
        }
Esempio n. 22
0
        /// <summary>
        /// Abbatangeli - Metodo per recuperare quale tipo di componenti utilizza l'utente
        /// </summary>
        /// <param name="brObject">Il browser utilizzato dall'utente. Se non è Internet Explorer ritorna 3 (APPLET)</param>
        /// <returns>Il tipo di componenti utilizzati:
        /// 0 - non configurati
        /// 1 - activeX
        /// 2 - Smart Client
        /// 3- Applet
        /// </returns>
        public static string getComponentType(string userAgent, DocsPaWR.InfoUtente infoUtente)
        {
            try
            {
                string TYPE_NONE        = "0";
                string TYPE_ACTIVEX     = "1";
                string TYPE_SMARTCLIENT = "2";
                string TYPE_APPLET      = "3";

                string retval = TYPE_ACTIVEX;

                // Verifica se il browser è IE altrimenti avvia sempre le applet
                // Necessario cercare "Trident" nella stringa per IE11+
                if (userAgent.Contains("MSIE") || userAgent.Contains("Trident"))
                {
                    //DocsPaWR.DocsPaWebService ws = NttDataWA.Utils.ProxyManager.GetWS();
                    DocsPaWR.SmartClientConfigurations smcConf = wss.GetSmartClientConfigurationsPerUser(infoUtente);
                    retval = smcConf.ComponentsType;
                }
                else
                {
                    retval = TYPE_APPLET;
                }

                return(retval);
            }
            catch (System.Exception ex)
            {
                return(null);
            }
        }
Esempio n. 23
0
        public static FileDocumento GetReportRegistroWithFilters(
            Page page,
            DocsPaWR.InfoUtente infoUt,
            Ruolo ruolo,
            Registro registro,
            FiltroRicerca[][] filters)
        {
            FileDocumento retValue = null;

            try
            {
                // Chiamata Web Service
                DocsPaWR.StampaRegistroResult result = docsPaWS.RegistriStampaWithFilters(infoUt, ruolo, registro, filters, out retValue);

                if (result == null)
                {
                    throw new Exception();
                }
            }
            catch (System.Exception ex)
            {
                UIManager.AdministrationManager.DiagnosticError(ex);
                return(null);
            }

            return(retValue);
        }
Esempio n. 24
0
        public static Templates getTemplateById(string idTemplate)
        {
            try
            {
                Templates template = docsPaWS.getTemplateById(idTemplate);

                //Se la tipologia è di campi comuni (Iperdocumento) richiamo il metodo che mi restituisce il temmplate
                //affinchè vengano visualizzati solo i campi comuni sui quali si ha visibilità rispetto alle tipologie
                //di documento associate al ruolo
                if (template != null && template.IPER_FASC_DOC == "1")
                {
                    DocsPaWR.InfoUtente infoUtente = UIManager.UserManager.GetInfoUser();
                    template = docsPaWS.getTemplateCampiComuniById(infoUtente, idTemplate);
                }

                if (template != null)
                {
                    return(template);
                }
                else
                {
                    return(null);
                }
            }
            catch (System.Exception ex)
            {
                UIManager.AdministrationManager.DiagnosticError(ex);
                return(null);
            }
        }
Esempio n. 25
0
 public bool ExistUoInf(string idUO,
                        SAAdminTool.DocsPaWR.Ruolo ruolo,
                        DocsPaWR.Utente utente,
                        DocsPaWR.InfoUtente infoUtente)
 {
     FillMittenteSmistamentoNavigaUO(ruolo, utente, infoUtente);
     return(this.existUOInf(idUO));
 }
Esempio n. 26
0
 public void FillUOInf_NavigaUO(string idUO,
                                SAAdminTool.DocsPaWR.Ruolo ruolo,
                                DocsPaWR.Utente utente,
                                DocsPaWR.InfoUtente infoUtente)
 {
     FillMittenteSmistamentoNavigaUO(ruolo, utente, infoUtente);
     // FillUOInf(idUO);
 }
Esempio n. 27
0
        //private bool ScartaDocumento(string IDTrasmUtente, bool trasmConWorkflow, string idPeople, string idTrasmissione)
        //{
        //    bool retValue = false;
        //    DocsPaWR.DocsPaWebService ws=new SAAdminTool.DocsPaWR.DocsPaWebService();
        //    retValue = ws.ScartaDocumento(IDTrasmUtente, trasmConWorkflow, idPeople, idTrasmissione);
        //    return retValue;
        //}

        private bool ScartaDocumentoSP(DocsPaWR.InfoUtente infoUtente, string idOggetto, string tipoOggetto, string idTrasmissione, string idTrasmSingola, DocsPaWR.MittenteSmistamento mittente, DocsPaWR.RuoloSmistamento ruolo)
        {
            bool retValue = false;

            DocsPaWR.DocsPaWebService ws = new SAAdminTool.DocsPaWR.DocsPaWebService();
            retValue = ws.ScartaDocumento(infoUtente, idOggetto, tipoOggetto, idTrasmissione, idTrasmSingola, mittente, ruolo);
            return(retValue);
        }
Esempio n. 28
0
        private bool importa(DocsPaWR.InfoUtente infoUtente, DocsPaWR.EsitoImportPregressi esitoImport, string descrizione)
        {
            wws.Timeout = System.Threading.Timeout.Infinite;
            //Aggiunta parametro descrizione
            wws.asyncImportPregresso(infoUtente, esitoImport, descrizione);

            return(true);
        }
Esempio n. 29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Expires = -1;

            try
            {
                idDocumento     = Request.QueryString["idDocumento"];
                tipofirma       = Request.QueryString["tipofirma"];
                this.infoUtente = ((WSConservazioneLocale.InfoUtente)Session["infoutCons"]);

                if (string.IsNullOrEmpty(tipofirma))
                {
                    tipofirma = string.Empty;
                }
                if (tipofirma.Equals("cosign"))
                {
                    firmabool = true;
                }
                else
                {
                    firmabool = false;
                }

                byte[] ba = Request.BinaryRead(Request.ContentLength);
                DocsPaWR.DocsPaWebService WS = new ProxyManager().getProxyDocsPa();

                DocsPaWR.FileDocumento fd = new ConservazioneWA.DocsPaWR.FileDocumento();

                ASCIIEncoding ae            = new ASCIIEncoding();
                string        base64content = ae.GetString(ba);

                DocsPaWR.InfoUtente infoutWS = WS.getInfoUtente(infoUtente.idPeople, infoUtente.idGruppo);

                if (!IsPostBack)
                {
                    DocsPaWR.FileRequest fr = WS.GetVersionsMainDocument(infoutWS, idDocumento)[0];
                    //il file è in formato pdf
                    //fr.fileName += ".pdf";

                    fr.dataInserimento = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss");

                    bool retValue = WS.AppendDocumentoFirmato(base64content, firmabool, ref fr, infoutWS);

                    if (!retValue)
                    {
                        Debugger.Write("Errore nel Page_Load (docs = NULL)");
                        throw new Exception();
                    }
                }

                string confirmMsg = "Firma avvenuta con successo.";
                this.RegisterClientScript("SignStampaCons", "alert('" + confirmMsg + "');");
            }
            catch (Exception ex)
            {
                Debugger.Write("Errore nella firma della stampa del registro di conservazione: " + ex.Message);
            }
        }
Esempio n. 30
0
        public static bool ModificaDelega(DocsPaWR.InfoDelega delega, string tipoDelega, string idRuoloOld, string idUtenteOld, string dataScadenzaOld, string dataDecorrenzaOld, string idRuoloDeleganteOld)
        {
            bool retValue = false;

            DocsPaWR.InfoUtente infoUtente = UserManager.GetInfoUser();
            retValue = docsPaWS.DelegaModifica(infoUtente, delega, tipoDelega, idRuoloOld, idUtenteOld, dataScadenzaOld, dataDecorrenzaOld, idRuoloDeleganteOld);

            return(retValue);
        }